Skip to content

cc-jj/bakery

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published