All requirements are stored in requirements/.
base.txt: dependencies that are used in both local and prod environments, e.g.fastapilocal.txt: dependencies that are used in local only, e.g.pytestprod.txt: depencendies that are used in prod only, e.g.uvicorn
- Install dependencies:
pip install -r requirements/local.txt - Ensure all environment variables referred to in
config.pyare defined in.env. A minimal.envusing a local SQLite3 database is:
DATABASE_DATABASE=llmanipulate.sqlite3
DATABASE_DRIVERNAME='sqlite+aiosqlite'
- Run development server:
fastapi dev apis/apis.py
apis/should only handle API specification, requests/responses, parameters etc. Contains minimal business logic which should be delegated to code withinservices/models/should only only be used to define database models and database interfacingservices/should contain all other functionalities, the majority of which being business logic
black .
flake8 .
isort .
mypy .