Skip to content
Public template

About

This is a template repo for building a repo which is a python package

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python-template

A template repository for building a Python package with the src layout.

Structure

python-template/
├── src/
│   └── my_package/
│       ├── __init__.py
│       └── core.py
├── tests/
│   ├── __init__.py
│   └── test_core.py
├── pyproject.toml
└── .gitignore

Getting started

  1. Rename the package — replace every occurrence of my_package / my-package with your package name.

  2. Install in editable mode:

    pip install -e ".[dev]"
  3. Run tests:

    pytest
  4. Lint / format:

    ruff check src tests
    ruff format src tests

Using this as a template

  • Source code lives under src/<your_package>/
  • Add runtime dependencies to [project] dependencies in pyproject.toml
  • Add dev/test dependencies to [project.optional-dependencies] dev

About

This is a template repo for building a repo which is a python package

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages