Skip to content

Latest commit

 

History

History
45 lines (38 loc) · 1.16 KB

README.md

File metadata and controls

45 lines (38 loc) · 1.16 KB

TODO

  1. Auth
  2. OrderBy
  3. Migrations
  4. Async
  5. Pagination
  6. CORS
  7. Logging (Uvicorn and Python)
  8. Frontend (templates)
  9. Use gunicorn as a process manager

Installation

python -V  # 3.11.2
pipenv install --dev

Tests

pytest tests

Configuration

Settings are configured through environment variables, see settings.py.

With environment variables set, launch the app or migrate the database like so:

./run.py app launch                # launch the app
./run.py db update                 # migrate the db to the latest revision
./run.py --help                    # see all commands

API Docs

http://localhost:8000/docs/

Migrations in detail

The database uri is configured in alembic/env.py (see database.engine and settings.SQLALCHEMY_DATABASE_URI).

Then, the migrations are auto generated from the SqlAlchemy models. After making a change to the models, apply the change to the database like so:

./run.py db create-migration     # create a new migration revision
./run.py db update               # migrate the database to the latest revision