Skip to content

Rich cookiecutter template for python service with FastAPI, optional Celery, support for multiple data sources (SQL, Mongo, etc.), and automatic "dockerization"

License

Notifications You must be signed in to change notification settings

ProjectTemplates/python-backend-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rich template for a complete python backend service

work in progress

The ultimate backend service template

Use with cookiecutter: cookiecutter https://github.com/ProjectTemplates/python-backend-service.git

Generates a foundation for a python server based on FastAPI, can optionally add celery worker and celerybeat. Uses poetry for dependency resolution.

Automatically adds dockerfiles for everything, as well as docker-compose.yml for development and automatic setup of all services. Also generates a simple nginx config - internal structure of the template supports creating multiple microservices in one repository. You can use generated nginx config and container as a reverse proxy to those microservices during local development.

For storage supports MongoDB, PostgreSQL (or any other SQL database with some tweaking) and Redis, or any combination of them.

For SQL databases includes configured Alembic, yay!

Note: this template is a bit opinionated


Шаблон для бэкенд-сервиса на Python. В основе - FastAPI, опционально может добавить celery worker и celery beat. Автоматически добавляет nginx для реверс-проксирования (если микросервисов будет несколько внутри одного репозитория - структура проекта это позовляет). Для всех сервисов автоматически сконфигурируется docker-compose.yml для локальной разработки.

В качестве хранилища позволяет выбрать MongoDB, PostgreSQL, Redis, или любую комбинацию из них.

About

Rich cookiecutter template for python service with FastAPI, optional Celery, support for multiple data sources (SQL, Mongo, etc.), and automatic "dockerization"

Topics

Resources

License

Stars

Watchers

Forks