Skip to content

Once I coped with typing theater instead of theatre that was easy.

Notifications You must be signed in to change notification settings

vacarme/eigakan

Repository files navigation

Eigakan

Demo of a full asynchronous backend API server based on FastAPI and SQLAlchemy.

Stack

API

  • fastapi for routing,
  • sqlalchemy for ORM and everything database related,
  • pydantic for serialization,
  • granian for ASGI web server,
  • slowapi for rate limiting.

Test

  • pytest for running tests,
  • factoryboy for integration testing all orm related behaviour,
  • faker for generating relevant fake data.

Database

  • postgis (geospatial enriched PostgreSQL)

Toolchain

  • mise for managing environment variables, python version and tasks,
  • poetry for dependency management.
  • vscode (with vim motions) for development.

Deployment

I am used to work with kubernetes, so upon release this image would be pushed to a container registry and then deployed on a k8s cluster from a gitlab or github job/action. Consequently, this explain the absence of a concurrency configuration for granian as scaling would be done at the k8s level.

How to Run

Docker is required.

  • Mount the stack by running: docker compose -f docker/compose.yaml up
  • Seed the database by running: seed (current package should be installed)

API interactive swagger should be available at http://localhost:8000/api/docs, use the following credentials to get a token for authenticated routes:

TODO

  • cli

References

This project is inspired by netflix's dispatch repo.

About

Once I coped with typing theater instead of theatre that was easy.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published