Skip to content

Latest commit

 

History

History
141 lines (85 loc) · 2.21 KB

File metadata and controls

141 lines (85 loc) · 2.21 KB

Base-fastapi-API

The api arquitecture is based on the good practices for Fast-API by @tialongo, for more information check https://fastapi.tiangolo.com

API Reference

All the models should have the same acces methods, you should check http://localhost:8000/docs for testings all the methods

Get all items

  GET /items
Parameter Type Description
token string Required. Your API key

Get item

  GET /api/items/${id}
Parameter Type Description
id string Required. Id of item to fetch

Post Item

  POST /items/
Parameter Type Description
id string Required. Id of item to fetch

Put Item

  PUT /items/${id}
Parameter Type Description
id string Required. Id of item to fetch

Delete Item

  DELETE /items/${id}
Parameter Type Description
id string Required. Id of item to fetch

Run Locally

Clone the project

  git clone ${project_link}

Go to the project directory

  cd ${project_name}

Create a virutal environment

  virutalenv venv

Activate the virutalenv

  . ./venv/bin/activate

Install dependencies

  python3 -m pip install -r requirements.txt

Update the db

  alembic revision --autogenerate -m "made some changes"
  alembic upgrade head 

Start the server

  cd app
  python3 main.py

Start the celery server

  cd app
  celery -A celery_app worker -B -l info 

Deployment

To deploy this project run

    ./install.sh

Documentation

Documentation

License

The project is licensed only for the use by the team.