Skip to content

btjones-me/python-project-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Python Project Template

A cookiecutter template for Python projects with modern tooling and best practices.

Features

  • UV for fast dependency management
  • Streamlit for dashboards
  • Loguru for structured logging
  • Ruff for linting and formatting
  • Pytest with coverage
  • GitHub Actions CI/CD
  • Environment management with python-dotenv
  • Makefile for common tasks
  • Absolute imports (no relative imports)

Usage

Option 1: With Cruft (Recommended)

Cruft allows you to update projects when the template changes:

# Install cruft
pip install cruft

# Create new project
cruft create https://github.com/btjones-me/python-project-template

# Later, update when template improves
cd your-project
cruft update

Option 2: With Cookiecutter

# Install cookiecutter
pip install cookiecutter

# Generate new project
cookiecutter https://github.com/btjones-me/python-project-template

Setup

cd your-new-project
make setup
make dashboard

Template Structure

{{cookiecutter.project_slug}}/
├── {{cookiecutter.package_name}}/     # Main package
├── tests/                               # Test files
├── .env.example                         # Environment template
├── pyproject.toml                       # Project configuration
└── Makefile                            # Development commands

Development Commands

  • make setup - Initial project setup
  • make install-dev - Install with dev dependencies
  • make test - Run tests with coverage
  • make lint - Check code quality
  • make format - Format code
  • make dashboard - Start Streamlit dashboard
  • make clean - Clean build artifacts

Requirements

  • Python 3.12+
  • UV package manager

About

New template repo using uv, cookiecutter and cruft

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published