<jupyter_start><jupyter_text>AUTH<jupyter_code>#POST /api/v1/auth/register
url = f'{server}/api/auth/custom-registration'
print(url)

data = {
  "password":"<PASSWORD>",
  "name":"string",
  "lastname":"string",
  "email":email,
}
r = requests.post(url, headers = header,json=data)
print(r.status_code)
if r.status_code == 201:
  sanctum = r.json()['success']['token']
  header['Authorization'] =  'Bearer ' + sanctum
print(r.text)
#POST api/v1/auth/login
url = f'{server}/api/auth/custom-login'
print(url)

data = {
  "password": "<PASSWORD>",
  "email": email
}
r = requests.post(url, headers = header,json=data)
print(r.status_code)
if r.status_code == 201:
  sanctum = r.json()['success']['token']
  header['Authorization'] =  'Bearer ' + sanctum
print(r.text)
#POST /api/v1/auth/reset
url = f'{server}/api/auth/ShowUserlist'
print(url)
r = requests.get(url, headers = header)
print(r.status_code)
print(r.text)
#POST /api/v1/auth/reset
url = f'{server}/api/auth/signout'
print(url)
r = requests.get(url, headers = header)
print(r.status_code)
print(r.text)<jupyter_output>http://localhost:80/api/auth/signout
201
{"message":"Success"}<jupyter_text>orders<jupyter_code>import datetime
url = f'{server}/api/orders'
print(url)
data = {
        'order_number':555,
        'date':str(datetime.datetime.now()),
        'amount':'1.5',
        'status':'active'
}
r = requests.post(url, headers = header,json=data)
print(r.status_code)
print(r.text)
orders_id = r.json()['id']
import datetime
url = f'{server}/api/orders/{orders_id}'
print(url)
data = {
        'date':str(datetime.datetime.now()),
        'amount':'1.2',
        'status':'active'
}
r = requests.put(url, headers = header,json=data)
print(r.status_code)
print(r.text)
url = f'{server}/api/orders'
print(url)
r = requests.get(url, headers = header)
print(r.status_code)
print(r.text)
url = f'{server}/api/orders/{orders_id}'
print(url)
r = requests.delete(url, headers = header)
print(r.status_code)
print(r.text)<jupyter_output>http://localhost:80/api/orders/4
201
{"message":"Success"}<jupyter_text>orders_detail<jupyter_code># AUTH
url = f'{server}/api/orders_detail'
print(url)
data = {
  'item': "chocolate", 
        'price':"3",
        'quantity':"59",
        'total':"564",
        'order_id':orders_id
}
r = requests.post(url, headers = header,json=data)
print(r.status_code)
print(r.text)
order_detail_id = r.json()['id']
url = f'{server}/api/orders_detail/{order_detail_id}'
print(url)
data = {
        'item': "1111", 
        'quantity':"1.5",
        'price':"3",
        'total':"564",
}
r = requests.put(url, headers = header,json=data)
print(r.status_code)
print(r.text)
url = f'{server}/api/orders_detail'
print(url)
r = requests.get(url, headers = header)
print(r.status_code)
print(r.text)
url = f'{server}/api/orders_detail/{order_detail_id}'
print(url)
r = requests.delete(url, headers = header)
print(r.status_code)
print(r.text)<jupyter_output>http://localhost:80/api/orders_detail/2
201
{"message":"Success"}<jupyter_text>otros<jupyter_code>import pandas as pd
url = f'{server}/api/otros'
print(url)
data = {"helo":"heeu"}
r = requests.get(url, headers = header,json=data)
print(r.status_code)
import json
a_json = json.loads(r.text)
print(r.text)
pd.DataFrame.from_dict(a_json)
url = f'{server}/api/otros'
print(url)
files = [('files[]',open('doc.pdf', 'rb')),('files[]', open('doc2.pdf', 'rb'))]
#files = [('doc.pdf',open('doc.pdf', 'rb')),('doc2.pdf', open('doc2.pdf', 'rb'))]
#files = {'files':[open('doc.pdf', 'rb'), open('doc2.pdf', 'rb')]}
#files = {'files':[('doc.pdf',open('doc.pdf', 'rb')), ('doc2.pdf',open('doc2.pdf', 'rb'))]}
#files = [('files', "hola"), ('files', "hola")]
header2 = {
    'Accept': 'application/json',
   'Content-type': 'multipart/form-data'
}
print(files)
header2['Authorization'] =  'Bearer ' + sanctum
r = requests.post(url, files=files, headers=header2)
print(r.status_code)
print(r.text)<jupyter_output>http://localhost:80/api/otros
[('files[]', <_io.BufferedReader name='doc.pdf'>), ('files[]', <_io.BufferedReader name='doc2.pdf'>)]
201
[[]]
{'fraction_non_alphanumeric': 0.21335624846550455, 'fraction_numerical': 0.015958752762091823, 'mean_word_length': 5.375586854460094, 'pattern_counts': {'":': 10, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '612534', 'license': 'MIT', 'n_tokens_mistral': 1627, 'n_tokens_neox': 1589, 'n_words': 247, 'path': 'Test.ipynb', 'repo_name': 'Kajen5/laravel-prueba', 'size': '4065'}