Skip to content

EliasOPrado/fastapi-application

Repository files navigation

FastAPI Application

Link: http://localhost:8000/docs

Before everything:

  • Bear in mind you need one .env file to run the application. With user and admin password. Therefore, there is a contrib/ folder that you can see how your .envshould be.

How to run the application:

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
  1. 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.

Operations

There are all the CRUD opertions as:

  1. /api/fetch-user/ (POST)
  2. /api/fetch-admin/ (POST)
  3. /api/users/ Read all users (GET)
  4. /api/users/{user_id} Get user (GET)
  5. /api/purchases/ Read all purchases (GET)
  6. /api/purchases/{purchase_id} Get purchase (GET)
  7. /api/reports/ Read all reports (GET)
  8. /api/reports/{report_id} Get report (GET)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published