Skip to content

tedious ramblings

The blog of Robert Hafner

Menu
  • Projects
  • Resume
  • Sponsor
  • Archives
  • About
Menu

Rob’s Awesome Python Template

Posted on February 3, 2023February 3, 2023 by Robert Hafner

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.

Share this:

  • Click to share on Mastodon (Opens in new window) Mastodon
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on X (Opens in new window) X
  • Click to share on Pocket (Opens in new window) Pocket
  • Click to print (Opens in new window) Print
  • More
  • Click to share on Pinterest (Opens in new window) Pinterest
  • Click to share on Tumblr (Opens in new window) Tumblr
  • Click to email a link to a friend (Opens in new window) Email

Leave a ReplyCancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About

Robert Hafner is a Principal Engineer based in Chicago focusing on distributed applications, infrastructure, and security. This blog is a running journal of projects, tutorials, and random ideas that pop into his head.

  • GitHub
  • Mastodon
  • LinkedIn

Popular Posts

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

©2025 tedious ramblings | Built using WordPress and Responsive Blogily theme by Superb