My fourth project release of the week is my secret sauce, the project that allows me to take my random ideas and quickly prototype them- Rob's Awesome Python Template.
Building a web service? It's got you covered. Deploying with Docker? Sure, that's there too! Wait, you hate Docker and just want to make a simple CLI? Well good news! Just about everything in this Template is optional.
Rob's Awesome Python Template is a highly configurable CookieCutter template that's packed full of best practices for Python Projects-
- Development Management using Makefiles.
- Configuration Management with Pydantic.
- Wheel building versioning using Git Tags via versioneer.
- Python Formatting with Black.
- YAML and JSON Formatting with DapperData.
- Import Sorting with isort.
- Typing with mypy.
- Testing with pytest.
- CI/CD using Github Actions.
- Developer Documentation for enabled services.
- Multiple license options.
Despite having a lot of functionality, Rob's Awesome Python Template tries to be fairly minimalist by default. That said there are a bunch of optional services that can be configured when running CookieCutter.
- FastAPI for building out APIs
- Celery for large scale job processing
- Typer and Click for when a CLI is needed
- SQLAlchemy and Alembic to manage databases and migrations
- Docker Compose Developer Environment for rapid development
- Multi-Py based Docker images with AMD and ARM support
- Github Actions for testing and publishing
- Lockfiles (requirements.txt) with pip-tools for repeatability
- PyPI Publishing so your libraries can be distributed
These services all work together- if both SQLAlchemy and FastAPI are enabled then an SQLAlchemy Dependency function is created for FastAPI, and if Celery is added the Docker Compose Environment will include Redis for Celery.
Want to see it in action? Of course you do! Fortunately for you the Rob's Awesome Template Examples has several! You can see it with all options disabled, all options enabled, and an example of a Simple Library.
Thanks for following along my week of project releases- follow me on Github or Mastodon if you want to keep up to date with my future projects.