Releases: leosussan/fastapi-gino-arq-uvicorn
v0.5.0 - Pre-Commit, Dockerfile Adjustment
feature: pre-commit
rationale: consistent linting (flake8
), import & formatting standards (isort
, black
), enforced on every commit.
fix: use --no-root
option in Dockerfile
rationale: from-cache building facilitated by adding --no-root
to build step.
update: dependencies
list of added dependencies
isort
- import sortingpre-commit
- application of commit hooks
v0.4.0 - Python 3.8, Poetry, ASDF, Dependency Updates
feature: poetry
rationale: fast, dependable dependency management for python
details: pipenv
has a number of quality of life issues that poetry
solves outright.
feature: python 3.8
rationale: enough useful features (async arepl, walrus operator, typed dictionaries, assignment expressions in f-strings) to justify an upgrade.
details: both Dockerfiles now install & launch the application on Python 3.8.
feature: asdf support
rationale: single package manager for project runtime dependencies
details: clone this repository to your local, then run asdf install
. that's it - no more making sure you have the right version.
feature: taskipy
rationale: pipenv run
without pipenv's headaches
details: add aliases for shell commands you depend on
poetry run task compose-up
, replacespipenv run docker-compose -f docker-compose.local.yml -f docker-compose.worker.yml -f docker-compose.yml up --build
poetry run task app
, replacespipenv run uvicorn app.main:app --reload
poetry run task worker
, replacesarq app.worker.WorkerSettings --watch ./
update: dependencies
list of dependency updates
fastapi
to 0.54.1gino
to 1.0.0arq
to 0.19sqlalchemy-utils
to `0.36.5alembic
to 1.4.2psycopg2-binary
to 2.8.5uvicorn
to 0.11.5email_validator
to 1.0.5sentry-sdk
to 0.14.3
list of added dependencies
gino-starlette
forstarlette
support ingino
1.0taskipy
forpipenv
-style commands in poetry
v0.3.0 - Integrated Task Queue (using Arq), Sentry Integration
feature: arq task queue (via redis)
rationale: write tasks as coroutines, once, use them in the foreground + background.
details: arq's architecture is similar to FastAPI & natively distributes, handles, runs coroutines as background functions. Multiple jobs (potentially hundreds) can be run simultaneously using a pool of asyncio Tasks
- New
tasks
folder: useapp/tasks
to store & expose foreground + background tasks - New
app/workers.py
file configures, launches arq worker. - New
ARQ_BACKGROUND_FUNCTIONS
global: set a list of function references (app.tasks.example.function, app.tasks.another.function
) in env,app/worker.py
will listen for that function in task queue. - New
Dockerfile
,docker-compose.worker.yml
, updateddocker-compose.local.yml
for local & automated testing. - Updated Readme w/ new launch strings
- New dependencies:
arq
,watchgod
(in dev)
feature: sentry integration
rationale: sentry is the standard in error logging.
dept: sentry-sdk w/ asgi, gino integration
v0.2.1 - Dependencies, Dockerfile, Run w/ Auto-Reload, Run w/ Debugger
feature: debugger compatibility
rationale: debuggers don't work with FastAPI unless properly configured.
details: updated readme.md
& app/main.py
: you can now choose between running locally w/ auto-reload, or you can use app/main.py
with a python debugger.
update: dependencies
list of dependency updates:
dept: email-validator
to 1.0.5
dept: fastapi
to 0.42.0
dept: psycopg2-binary
to 2.8.4
dept: sqlalchemy-utils
to 0.34.2
dept: uvicorn
to 0.9.1
update: dev dependencies
rationale: instill good dev hygiene by standardizing your formatting, linting, security checks
dept: black
to dev dependencies
dept: bandit
to dev dependencies
dept: flake8
to dev dependencies
dept: rope
to dev dependencies
fixes: Dockerfile
rationale: make is needed for newer versions of the library
v0.2.0 - Alpine, Migrations, Postgres Docker-Compose Config
feature: app builds on python3.7-alpine3.8
rationale: cuts runtime size by a third, dramatically improves image security. Google's Container Scan now detect 0 exploits, down from 600+ from vanilla python3.7.
feature: Added 'Prestart.sh', configured to run alembic upgrade head
rationale: 'Prestart.sh' used to run scripts before app is instantiated. currently configured to run migrations post-build, pre-server init.
feature: docker-compose.local.yml
rationale: Runs postgres as a docker service, connects app. for local development purposes.
planned updates:
- gunicorn_conf.py - A deeper gunicorn configuration file, including customizations for serverless runtimes (Cloud Run)
- arq - Preferred async task queue
- sentry - Preferred stacktrace solution