Link: http://localhost:8000/docs
- Bear in mind you need one
.env
file to run the application. With user and admin password. Therefore, there is acontrib/
folder that you can see how your.env
should be.
If you have docker installed just run the following command:
docker compose up --build
If you prefer using the default way of start a fastapi application you can follow the next steps:
1 Create a virtual environment and activate it
python3 -m venv venv && source venv/bin/activate
2 Install the packages:
pip install -r requirements.txt
- Once it is installed you can initiate the wsgi server from fastapi using uvcorn:
uvicorn main:app --reload
ps: remember you should be in the root directory to run this command.
There are all the CRUD opertions as:
/api/fetch-user/
(POST)/api/fetch-admin/
(POST)/api/users/
Read all users (GET)/api/users/{user_id}
Get user (GET)/api/purchases/
Read all purchases (GET)/api/purchases/{purchase_id}
Get purchase (GET)/api/reports/
Read all reports (GET)/api/reports/{report_id}
Get report (GET)