Skip to content

About

A template Python project with a focus on best practices.

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

187 Commits

Folders and files

Repository files navigation

Python Project Template

This project provides a minimalistic template Python project which can be used as a starter template to structure projects.

Tooling choices:

Domain Tool
project structure src structure
build backend setuptools
build frontend pip
build tool build
test pytest, pytest-cov
formatter black

Project Setup

This will be the README for the project. For now, follow these instructions to get this project template set up correctly. Then, come back and replace the contents of this README with contents specific to your project.

Structure

/
├── .gitignore
├── README.md
├── pyproject.toml
├── src/
├── ├── my_package/
├──     ├── __init__.py

Can evolve to this ideal structure

/
├── .gitignore           | Based on https://github.com/github/gitignore
├── pyproject.toml       | Project configuration
├── README.md            | Roll your own README
├── CHANGELOG.md         | Based on https://github.com/github/gitignore
├── LICENSE.md           | Bring your own license
├── venv/                | virtual environment folder
├── src/                 | Folder for all the packages
├── ├── my_package/      |
├──     ├── __init__.py  |
├──     ├── main.py      |
├── ├── my_package2/     |
├──     ├── __init__.py  |
└── test/                | Folder for all the tests
├── ├── my_package1/     |
├── ├── ├── test_main.py |
├── ├── my_package2/     |

Standard procedure that I follow

  1. Create a new virtual environment for your project:

    python -m venv venv --prompt "Cool_Prompt"
    source venv/bin/activate
      (or if Windows)
    venv\Scripts\activate
  2. Install project

    python -m pip install -e .
  3. Install project with dev dependencies

    python -m pip install -e .[dev]
  4. Build sdists and wheels

    python -m build

About

A template Python project with a focus on best practices.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages