r/pythoncoding • • Jul 19 '23

Python project generator (Poetry/Linters/Makefile/FastAPI)

Hey community!
I wrote a small cookicutter template that can help with new Python project creation
https://github.com/astoliarov/cookiecutter-python-project

I decided to create this generator because during my last job search I was asked to build a home task in a half of the interview processes. So, having this template could save me around 4h at every process)

Also I've collected here all practices that I am moving from project to project.

Main features:

  • Poetry package management

  • Set of linters/formatters: black, isort, flake8 and mypy

  • Structured logging out of the box

  • Dockerfile for tests and for deploy

  • Environment configuration

  • Makefile with set of commands to install, format, lint, test (on local machine and in docker)

  • Separate package for business logic + tests

  • FastAPI API + tests + 2 deployment options

  • Background worker

Pls take a look.
Thank you!

5 Upvotes

0 comments sorted by