Welcome to pythontemplate’s documentation!¶
Cookiecutter template for a Python package.
- GitHub repo:
- Free software:
- GNU General Public License v3
- Testing setup with
python setup.py testor
- Tox testing: Setup to easily test for Python 3.5 (WIP)
- Sphinx docs: Documentation ready for generation with, for example, ReadTheDocs
- Command line interface using Click
- Support for implicit namespaces from PEP420
- Gets you started for a web application (optional)
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:
- Create a repo and put it there.
- Install the dev requirements into a virtualenv.
pip install -r requirements/dev.txt)
- Edit the 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.
Be carefull with namespace packages using the implicit namespace mechanism. Some tools are not fully compliant yet.
Namespace package and editable installations should be fixed with setuptools 31 and Python 3.5:
Using latest versions, only pylint still has issues with implicit namespaces at the time of this writing.
Fork This / Create Your Own¶
If you have differences in your preferred setup, I encourage you to fork this to create your own version. Or create your own; it doesn’t strictly have to be a fork.
It’s up to you whether or not to rename your fork/own version. Do whatever you think sounds good.
Or Submit a Pull Request¶
I also accept pull requests on this, if they’re small, atomic, and if they make my own packaging experience better. Read on in the Contributing section.
- PyPI Release Checklist