Fastapi private REST API that aloes a financial sector to access information about patients, pharmacies and transactions between those.
- Protected API, that requires JWT to make requests
- Unit tests to check routes and token validation
- Can be ran on containers
You can run this API with docker, by using the command, this will create a local container with a connection to port 8000
docker compose upYou can also run this app locally, you need python 3.10, and run the commands bellow:
python -m venv venv activate venv/bin/activate pip install -r requirments.txt uvicorn app.main:app --reloadYou can enter your localhost:8000/docs after running your app to check swagger generated API docs
url/users {
"username": "john"
"password": "securepassword"
} url/login {
"username": "john"
"password": "securepassword"
}{
"access_token": "token string",
"token_type": "bearer"
}{
"Authorization": "Bearer tokenstring"
} url/patients url/patients?first_name=string&last_name=string[
{
"uuid": "PATIENT0001",
"first_name": "JOANA",
"last_name": "SILVA",
"date_of_birth": "1996-10-25T00:00:00"
}
] url/pharmacies[
{
"uuid": "PHARM0001",
"name": "DROGA MAIS",
"city": "RIBEIRAO PRETO"
}
] url/transactions[
{
"uuid": "TRAN0001",
"patient_uuid": "PATIENT0045",
"pharmacy_uuid": "PHARM0008",
"amount": 3,
"timestamp": "2020-02-05T07:49:03"
}
]- Made with ❤️ by [Lucas Gasque](https://www.linkedin.com/in/lucasgasque/