Python Package | Cookiecutter Project Template
Cookiecutter template for a Python package.
This Cookiecutter template is a fork of the excellent Cookiecutter-PyPackage project template - adapted for Cisco SE use by licensing the generated project under the Cisco Sample Code License.
Motivation
Starting a new Python Package project, with all the usual bells and whistles, involves a lot of boilerplate code and documentation starters that only vary based on a few input parameters: project name, slug, usernames, etc. Cookiecutter makes generating these boilerplate files a breeze.
Features
- Testing setup with
unittest
andpython setup.py test
orpy.test
- Travis-CI: Ready for Travis Continuous Integration testing
- Tox testing: Setup to easily test for Python 2.7, 3.4, 3.5, 3.6
- Sphinx docs: Documentation ready for generation with, for example, ReadTheDocs
- Bumpversion: Pre-configured version bumping with a single command
- Auto-release to PyPI when you push a new tag to master (optional)
- Command line interface using Click (optional)
Quickstart
Install the latest Cookiecutter if you haven't installed it yet (this requires Cookiecutter 1.4.0 or higher):
pip install -U cookiecutter
If you need a bit more help than that, see Installation in the Cookiecutter docs.
Using the PyPackage Template
The First Time
$ cookiecutter https://github.com/CiscoSE/cc-pypackage
...or using abbreviated syntax:
$ cookiecutter gh:CiscoSE/cc-pypackage
Thereafter
$ cookiecutter cc-pypackage
Looking for more Information?
Please see the PyPackage Tutorial for the original PyPackage template. If you have questions about using the Cookiecutter tool itself, please see the Cookiecutter docs.
Support?
Did we break something? If you are experiencing an issue with this fork of the PyPackage template, please open an issue.
Who is this for?
This project template is for use by Cisco Systems Engineers who are creating example and demonstration code (aka. Cisco Sample Code) and sharing it with Cisco's customers and partners for use with Cisco products and services. The Cisco Sample Code License is for use in Cisco Repositories Only. It is not an Open Source license. The license should only be used by Cisco and/or its affiliates to post and share Cisco Sample Code.