Cookiecutter template for a Python package.
- GitHub repo: https://github.com/swarmer/cookiecutter-pypackage-medium/
- Free software: BSD license
- Testing setup with
unittest
andpython setup.py test
orpy.test
- Tox testing: Setup to easily test for different python versions
- Sphinx docs: Documentation ready for generation with, for example, ReadTheDocs
Install the latest Cookiecutter if you haven't installed it yet (this requires Cookiecutter 1.4.0 or higher):
pip install -U cookiecutter
Generate a Python package project:
cookiecutter https://github.com/swarmer/cookiecutter-pypackage-medium.git
Then:
- Create a repo and put it there.
- Install the dev requirements into a virtualenv. (
pip install -r requirements_dev.txt
) - Install the project into your environment. (
pip install -e .
) - Register your project with PyPI.
- Add the repo to your ReadTheDocs account + turn on the ReadTheDocs service hook.
- Add a requirements.txt file that specifies the packages you will need for your project and their versions. For more info see the pip docs for requirements files.
Based on https://github.com/audreyr/cookiecutter-pypackage