Skip to content

Latest commit

 

History

History

fast-api-sql-demo

Folders and files

README.md

entry-service

Service for admin and inference uis

requirements

  • Python version <= 3.11.5
  • virtual env setup
      python3 -m venv venv
      source ./venv/bin/activate
      pip install -r requirements.txt

run the application

  • run prod
      uvicorn app.main:app

run in development

  uvicorn app.main:app --reload

Open your browser at for th app: http://127.0.0.1:8000. for the Interactive API docs: http://127.0.0.1:8000/docs alternative api docs: http://127.0.0.1:8000/redoc open api schema http://127.0.0.1:8000/openapi.json

run tests

pytest --disable-warnings -vv

Alembic Operations:

setup alembic folder and config files

alembic init <folder name>

create alembic revision (migration)

alembic revision -m "Add user and todo models"

run migrations/revisions with alembic

alembic upgrade <revision #>

undo migrations/revision with alembic

alembic downgrade -l

to run the app get postgres running

docker compose up

and then run the api in dev mode

uvicorn main:app --reload