Skip to content

yash-srivastava19/snappyr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Snappyr - Setup Projects Blazingly Fast πŸš€

PyPI Python License Code style: ruff

PyPI | Repository

Introduction

Snappyr is a modern Python project scaffolding tool that sets up professional Python projects with industry-standard tooling in seconds. Instead of manually configuring the same development environment repeatedly, Snappyr creates a complete, production-ready project structure with modern tools like uv, ruff, mypy, and pre-commit hooks.

✨ Features

Snappyr creates projects with professional development practices out of the box:

πŸ—οΈ Modern Project Structure

project_name/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ main.py
β”‚   └── __init__.py
β”œβ”€β”€ tests/
β”‚   β”œβ”€β”€ __init__.py
β”‚   └── test_main.py
β”œβ”€β”€ scripts/
β”œβ”€β”€ docs/
β”œβ”€β”€ .github/
β”‚   └── workflows/
β”‚       └── ci.yml
β”œβ”€β”€ pyproject.toml        # Modern Python packaging
β”œβ”€β”€ .pre-commit-config.yaml
β”œβ”€β”€ .gitignore
β”œβ”€β”€ .env
β”œβ”€β”€ LICENSE
└── README.md

⚑ Modern Dependency Management with UV

  • Uses uv instead of pip/poetry for ultra-fast dependency management
  • Automatic virtual environment creation and management
  • Lock file generation for reproducible builds

🧹 Code Quality & Linting

  • Ruff: Lightning-fast Python linter and formatter (replaces black, flake8, isort)
  • Mypy: Comprehensive type checking with strict configuration
  • Pre-commit hooks: Automated code quality checks on every commit

πŸ§ͺ Testing & Coverage

  • Pytest with coverage reporting
  • Pre-configured test structure
  • GitHub Actions CI/CD workflow

πŸ“¦ Professional Package Setup

  • Modern pyproject.toml configuration
  • Support for multiple Python versions (3.11+)
  • Configurable license types (MIT, Apache-2.0, GPL-3.0, BSD-3-Clause)
  • Package mode for library development

πŸš€ Installation

Via pip (Recommended)

pip install snappyr

Via uv (if you have uv installed)

uv tool install snappyr

πŸ“– Usage

Basic Usage

# Create a new project
snappyr my_awesome_project

# Or with options
snappyr my_project --python-version 3.12 --license Apache-2.0

Advanced Options

snappyr my_project \
  --is_package \              # Set up as a Python package
  --python-version 3.12 \     # Target Python version
  --license MIT \             # Choose license type
  --no-git \                  # Skip Git initialization
  --no-precommit              # Skip pre-commit setup

Available Options

  • --is_package: Configure project as a Python package with proper structure
  • --python-version: Target Python version (default: 3.11)
  • --license: License type - MIT, Apache-2.0, GPL-3.0, BSD-3-Clause, None (default: MIT)
  • --no-git: Skip Git repository initialization
  • --no-precommit: Skip pre-commit hooks setup
  • --version: Show version information

πŸ”§ What Gets Created

Development Tools Configuration

  • pyproject.toml: Modern Python packaging with comprehensive tool configuration
  • Ruff: Configured with sensible defaults for linting and formatting
  • Mypy: Strict type checking configuration
  • Pytest: Testing framework with coverage reporting
  • Pre-commit: Automated quality checks including ruff, mypy, and security scanning

GitHub Actions CI

  • Multi-Python version testing (3.11, 3.12)
  • Automated linting, formatting, and type checking
  • Test coverage reporting
  • Codecov integration

Professional Files

  • Comprehensive .gitignore for Python projects
  • License file with proper copyright notice
  • Professional README template with badges
  • Environment file template

πŸƒβ€β™‚οΈ Quick Start After Project Creation

cd your_project

# Install dependencies
uv sync

# Run the project
uv run python src/main.py

# Run tests
uv run pytest

# Code quality checks
uv run ruff check .          # Lint code
uv run ruff format .         # Format code  
uv run mypy .                # Type checking

# Set up pre-commit (if not skipped)
uv run pre-commit install
uv run pre-commit run --all-files

πŸ› οΈ Development Workflow

The generated projects support a modern development workflow:

  1. Write code in src/
  2. Write tests in tests/
  3. Quality checks run automatically via pre-commit
  4. CI/CD runs on GitHub Actions
  5. Dependencies managed with uv

πŸ“‹ Prerequisites

Snappyr requires these tools to be installed:

  • Python 3.11+
  • uv: pip install uv or curl -LsSf https://astral.sh/uv/install.sh | sh
  • git: For version control (optional but recommended)

🎯 Why Choose Snappyr?

Speed: Get from idea to coding in seconds

Modern: Uses the latest Python tooling and best practices

Professional: Creates production-ready project structure

Opinionated: Sensible defaults that work for most projects

Extensible: Easy to customize the generated structure

πŸ†š Comparison with Other Tools

Feature Snappyr Cookiecutter Poetry new
Modern tooling (uv, ruff) βœ… ❌ ❌
Pre-commit hooks βœ… Depends ❌
CI/CD setup βœ… Depends ❌
Type checking setup βœ… Depends ❌
Zero configuration βœ… ❌ ❌
Speed ⚑ 🐌 πŸš€

🀝 Contributing

Contributions are welcome! This project uses the same modern tooling it creates:

# Clone and set up development environment
git clone https://github.com/yash-srivastava19/snappyr
cd snappyr
uv sync --all-extras

# Run tests
uv run pytest

# Quality checks  
uv run ruff check .
uv run mypy .

πŸ“„ License

MIT License - see LICENSE file for details.

πŸ™ Acknowledgments

  • uv for blazing-fast Python package management
  • ruff for lightning-fast linting and formatting
  • mypy for comprehensive type checking

About

Setup Python Projects Blazingly Fast. No External Dependencies

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages