Skip to content
/ base-fastapi-api Public template

This is the base for the main projects made with fasta-I

License

Notifications You must be signed in to change notification settings

finalsa/base-fastapi-api

Repository files navigation

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.

About

This is the base for the main projects made with fasta-I

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published