Skip to content

Releases: leosussan/fastapi-gino-arq-uvicorn

v0.5.0 - Pre-Commit, Dockerfile Adjustment

13 May 00:23
c19017a
Compare
Choose a tag to compare

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 sorting
  • pre-commit - application of commit hooks

v0.4.0 - Python 3.8, Poetry, ASDF, Dependency Updates

12 May 19:35
67b72f9
Compare
Choose a tag to compare

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, replaces pipenv run docker-compose -f docker-compose.local.yml -f docker-compose.worker.yml -f docker-compose.yml up --build
  • poetry run task app, replaces pipenv run uvicorn app.main:app --reload
  • poetry run task worker, replaces arq app.worker.WorkerSettings --watch ./

update: dependencies

list of dependency updates

  • fastapi to 0.54.1
  • gino to 1.0.0
  • arq to 0.19
  • sqlalchemy-utils to `0.36.5
  • alembicto 1.4.2
  • psycopg2-binary to 2.8.5
  • uvicorn to 0.11.5
  • email_validator to 1.0.5
  • sentry-sdk to 0.14.3

list of added dependencies

  • gino-starlette for starlette support in gino 1.0
  • taskipy for pipenv-style commands in poetry

v0.3.0 - Integrated Task Queue (using Arq), Sentry Integration

28 Oct 20:41
4d61228
Compare
Choose a tag to compare

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: use app/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, updated docker-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

23 Oct 20:49
3f03fcd
Compare
Choose a tag to compare

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

03 Jul 16:58
Compare
Choose a tag to compare

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:

  1. gunicorn_conf.py - A deeper gunicorn configuration file, including customizations for serverless runtimes (Cloud Run)
  2. arq - Preferred async task queue
  3. sentry - Preferred stacktrace solution