https://github.com/kjczarne/python-template
My go-to cookiecutter template for Python projects
https://github.com/kjczarne/python-template
Last synced: 3 months ago
JSON representation
My go-to cookiecutter template for Python projects
- Host: GitHub
- URL: https://github.com/kjczarne/python-template
- Owner: kjczarne
- Created: 2022-07-03T18:00:30.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-07-07T10:00:16.000Z (almost 3 years ago)
- Last Synced: 2025-01-23T04:12:00.928Z (4 months ago)
- Language: Python
- Size: 20.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Python PyPI Package Template
This Cookiecutter is a basic Python Package template that contains:
- `setup.cfg` -> declarative definition of the package and its dependencies
- `dev` extras -> minimal toolkit for effective high-quality development
- `pdoc3` -> documentation builder
- `flake8` -> linter of choice
- `twine` -> to upload packages
- `autopep8` -> autoformatter that complements `flake8`
- `pytest` -> test runner
- I generally use `unittest`, however `pytest` sometimes comes in handy as a runner with its `marker` feature.
- `flake8` config -> opinionated config that does not depart from PEP8 too far but adds some sane linter config mods like extending the max line lenght to 100 characters
- `noxfile.py` -> my lint/test/build/deployment automation tool of choice
- I usually use it both when developing and when running CI jobs for consistency
- I find `tox` obnoxiously inflexible and the INI-format config file for `tox` is absurd
- `.coveragerc` -> `coverage.py` config
- `.editorconfig` -> so that your editor opens the file formats we care about in a proper manner
- `README.md` template -> no project should be left without at least a basic readme as a piece of documentation
- Source Code directory template -> with a sane layout named after the package itself (not `src`, which I frankly despise) and a tiny command-line application in `main.py`, since I never remember how to put things together in `argparse`.