Skip to content

standsleeping/package-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MyPackage

A simple Python package template with standard structure and best practices.

Features

  • Python 3.13+
  • Standard src-layout package structure
  • CLI interface with entry point
  • uv for dependency management and builds
  • Type checking with mypy
  • Linting and formatting with Ruff
  • Testing with pytest

Installation

uv sync --all-groups

This installs the package in editable mode along with dev dependencies.

Usage

# Basic usage
mypackage 1 2

# Or as a module
python -m mypackage 1 2

# JSON output
mypackage 1 2 --format json

# With custom log level
mypackage 1 2 --log-level DEBUG

Maintenance workflow (uv)

To update dependencies with a newer uv and verify everything still works:

# Refresh lockfile to latest compatible versions
uv lock --refresh

# Sync environment (include dev dependencies)
uv sync --all-groups --refresh

# Run quality checks
uv run pytest -q
uv run ruff format --check .
uv run ruff check .
uv run mypy src
uv run ty check src

If uv.lock changes, commit it:

git add uv.lock
git commit -m "chore: refresh uv.lock with uv $(uv --version)"

About

A template for simple Python packages.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages