• Stars
    star
    125
  • Rank 284,921 (Top 6 %)
  • Language
    Python
  • License
    MIT License
  • Created almost 2 years ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Highly Configurable Python Project Template for Modern Python Projects

Rob's Awesome Python Template

Rob's Awesome Python Template is extremely customizable- it can work for the smallest library to the largest application.

Usage

  1. Install cookiecutter.
  2. Install pyenv if you haven't already.
  3. Run the cookiecutter command.
cookiecutter gh:tedivm/robs_awesome_python_template

The rest of the process is interactive- you'll be asked for a project name and about which features you want enabled, after which the project will be setup.

Core Functionality

  • Development Management using Makefiles.
  • Configuration Management with Pydantic Settings.
  • PyPI Publishing from Github Tags using setuptools-scm.
  • Formatting and Linting with Ruff.
  • Typing with mypy.
  • Lockfiles (requirements.txt) with uv.
  • Testing with pytest.
  • CI/CD using Github Actions.
  • Precommit Hooks using the precommit framework.
  • Multiple license options.
  • Modern pyproject.toml without any legacy files.

Optional Libraries

This template can also configure and setup a variety of optional services. Each optional service adds its own dependencies, configuration, handlers, and everything else needed to jump right into development.

Features that are not selected get completely cleaned up and will not pollute the newly created project.

FastAPI

FastAPI is one of the easiest ways to develop REST Based APIs. When enabled a "Hello World" application will be setup.

Celery

Celery is the standard for Queue Management systems with Python.

Typer and Click

Typer, which is built on top of the Click Framework, is one of the easiest ways to build command line applications. When enabled this template will create an initial CLI handler and register it with python for easy installation.

SQLAlchemy and Alembic

SQLAlchemy is one of the most used SQL ORM frameworks in python. It is regularly paired with Alembic to handle database migrations.

This template configures SQLAlchemy and Alembic to work together using a unified configuration. Alembic will automatically discover all models in the models directory.

Projects with this template will have access to the Async SQLAlchemy engine.

Paracelsus

Paracelsus is a library that automatically generates diagrams of SQLAlchemy database schemas and injects them into documentation.

Docker

Docker Images are the standard for distributing and running applications. The Docker extensions to this project create containers for the other services that are enabled, such as FastAPI and Celery.

The images made by this template come from the Multi-Py project and support both AMD and ARM architectures.

Github Actions

Github Action Workflows are optionally created for a variety of tasks-

  • Formatting Python, JSON, YAML, and TOML
  • Testing
  • Typing
  • Publishing Packages to PyPI
  • Pushing Images to GHCR
  • Updating Dependency (requirements.txt) Files

Examples

Project examples are available in the example repository.

These are just some options, as features can be mixed and matched to create numerous permutations.

More Repositories

1

tedivms-flask

Flask starter app with celery, bootstrap, and docker environment
CSS
223
star
2

quasiqueue

Multiprocessing Queues Made Easy
Python
98
star
3

paracelsus

Visualize SQLAlchemy Databases using Mermaid or Dot Diagrams.
Python
89
star
4

ec2details

API providing AWS EC2 Instance Type Data
JavaScript
40
star
5

nebula

EC2 Self-Management Portal
Python
34
star
6

jsonsmash

a shell for browsing json files
JavaScript
26
star
7

secretcli

AWS Secrets Manager CLI
Python
21
star
8

Spawn1

JavaScript
18
star
9

fedimapper

An API for the Fediverse - The Software behind the Fediverse Almanac
Python
16
star
10

phpsessionmanager

Automatically exported from code.google.com/p/phpsessionmanager
PHP
13
star
11

ScreepsAutoSpawner

Automatic Respawner for Screeps
Python
13
star
12

action-ecr-publish

12
star
13

github3apps.py

Python
9
star
14

jekyll-theme-portfolio

A Portfolio Theme for Jekyll
HTML
8
star
15

gitstars

Python
7
star
16

puppet-hieratic

Create Puppet Resources and Classes Directly in Hiera
Puppet
7
star
17

terraform-general-cloudinit

A cloudinit wrapper module that enables quick machine configuration
HCL
7
star
18

BadThingsDailyBot

Python
7
star
19

stash-docs

The documentation for the Stash Cache
Python
6
star
20

ScreepsDashboard

JavaScript
6
star
21

robs_awesome_python_template_examples

Examples from Rob's Awesome Python Template
Makefile
6
star
22

action-python-lockfile-update

A Github Action that uses pip-tools to update a project's lockfiles via a Pull Request.
Shell
5
star
23

puppet-psad

Configure and Control PSAD with Puppet
1C Enterprise
5
star
24

urlparser

Extract information from URLs inside shell scripts
Python
5
star
25

terraform-aws-lambda

A terraform module for managing Lambda Functions
HCL
5
star
26

HeadedHome

An IOT Button for leaving the office.
Python
5
star
27

scp_crawler

SCP Wiki Crawler
Python
4
star
28

formations

Playing with Pathfinding
JavaScript
4
star
29

puppet-iscsi

Puppet
4
star
30

Spark

Ignite Your Next Project With Spark
PHP
4
star
31

game_of_life_populations

A Colorful Game of Life
JavaScript
4
star
32

puppet-rsnapshot

This module manages backups using rsnapshot.
Puppet
4
star
33

shinigami-as-a-service

Wraps the Shinigami Eyes extension's data around a simple HTTP Service
JavaScript
4
star
34

dapperdata

An opinionated formatter for configuration files
Python
3
star
35

portfolio

SCSS
3
star
36

www.goodguywarren.com

HTML
3
star
37

slack_proxy

Python
3
star
38

osx_start

Shell
3
star
39

puppet-ghebackups

Github Enterprise Backups Controlled By Puppet
Puppet
2
star
40

puppet-inspircd

Puppet
2
star
41

terraformer

Terraformer is a Python wrapper around Terraform.
Python
2
star
42

syntaxhighlighter_yaml

This Wordpress Plugin adds support for the Yaml language to the SyntaxHighlighter Evolved plugin.
PHP
2
star
43

nginx_aws_proxy

AWS SSL Termination via NGINX
Shell
2
star
44

pear.tedivm.com

A pear server for my projects.
1
star
45

Certain

PHP
1
star
46

screeps_marketd

Python
1
star
47

CHOPper

PHP
1
star
48

lambda-ecs-redeploy

Python
1
star
49

chalice-config

1
star
50

schema_transpose

Python
1
star
51

terraform-aws-nat

Terraform module for creating NAT Gateways or Instances and attaching them to a VPC
HCL
1
star
52

nebula-cli

CLI for the Nebula Cloud Dashboard
Python
1
star
53

terraform-aws-dev-vpn

Terraform module for lauching a VPN and configuring the local client
HCL
1
star
54

tfc_version

Terraform Cloud CLI for Managing Workspace Terraform Versions
Python
1
star