Skip to content

coke5151/python-project-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Project Template

A modern Python project template leveraging uv for dependency management and integrating various development tools for code quality assurance.

Features

  • Fast and reliable package management with uv
  • Integrated code quality tools settings:
    • Ruff for linting and formatting
    • Mypy for static type checking
    • VSCode integration
    • Jupyter notebook

Project Structure

.
├── notebooks/         # Jupyter notebook files
├── .vscode/          # VSCode configuration
├── README.md         # Project documentation
├── LICENSE           # License
├── .gitignore       # Git ignore patterns
├── mypy.ini         # Mypy configuration
├── ruff.toml        # Ruff configuration
└── pyrightconfig.json # Pyright configuration

Development Setup

  1. Install uv:

    # macOS and Linux
    curl -LsSf https://astral.sh/uv/install.sh | sh
    # Windows
    powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
  2. Initialize Project:

    # For applications
    uv init --python <version>
    # Example: uv init --python 3.13
    
    # For libraries (eg. PyPI distribution)
    uv init --lib
  3. Install Packages:

    # Install development tools globally (each tool has its own venv)
    uv tool install mypy ruff
    
    # Install development dependencies (jupyterlab for example)
    uv add jupyterlab --dev  # --dev for development dependencies
    
    # Install project dependencies (pandas and requests for example)
    uv add pandas requests  # example packages
  4. Run Code:

    uv run main.py  # Run main.py in virtual environment
    uv run jupyter lab  # Launch Jupyter Lab

Recommanded VSCode/Cursor Extension

License

See LICENSE for details.

About

A Python project template with Ruff and Mypy settings

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published