Stable - The cookiecutter I use. It's getting upgraded all the time.
Clone or download
Pull request Compare This branch is 219 commits ahead, 408 commits behind audreyr:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.



Cookiecutter template for a Python package.

Notable Deviations from Upstream

  • pytest! Uses pytest with a test command. See: python test and make test
  • git-flow friendly! Subtle changes to improve git-flow workflow.
  • coveralls! Preconfigured integration with coveralls--coverage report monitoring.
  • pip-tools! Uses pip-tools for managing dependendencies. See: make requirements.
  • Better requirements management. Project and dev requirements are seperated, and pip-tools makes it easier to update and pin requirements.
  • PyPy! Preconfigured to include PyPy. This is usually free accessibility! Try it out! See if PyPy passes your tests.
  • Better Tox + Travis-CI setup. Philosophy: Tox should do the maximum amount of work, and Travis-CI the minimum. This creates a more consistent results when testing locally vs remotely on Travis-CI.
  • Inludes _compat module and logging boilerplate.

Massive overhaul to docs

  • Github readme is automatically generated from compiling doc sources, reasoning:

    1. Sphinx specific RST doesn't render on github (ugly) and outright breaks PyPI. For example, if you use Sphinx' python domain references, it looks like this: :class:`MyAwesomeClass` or :py:class:`MyAwesomeClass` instead of MyAwesomeClass
    2. Usually you want to include extra sections on the github README. For example, I like to include installation instructions and a quick start guide. But I also like how things look on ReadTheDocs, and don't want to mess that up. The answer is they need to be combined using a different process. This fork delivers a DRY and intuitive process to have both.

    See: make github and docs/ I wrote a minimalistic, text processing framework--it should be intuitive to extend and customize for your needs.

  • Doc sources follow the nested format, adding clarity.

  • Includes a doc linter to avoid PyPI's RST parser from breaking.

  • A million times more badges, badges for everything! You get a badge, you get badge, and YOU get badge!!


  • Open source MIT license
  • Travis-CI: Ready for Travis Continuous Integration testing
  • Tox testing: Setup to easily test for Python 2.6, 2.7, 3.3, 3.4, 3.5, and PyPy
  • 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)


Generate a Python package project:



  • Create a repo and put it there.
  • Add the repo to your Travis CI account.
  • Install the dev requirements into a virtualenv. (pip install -r requirements_dev.txt)
  • Run the script to encrypt your PyPI password in Travis config and activate automated deployment on PyPI when you push a new tag to master branch.
  • Add the repo to your ReadTheDocs account + turn on the ReadTheDocs service hook.
  • Release your package by pushing a new tag to master.
  • (Optional) If you feel like pinning the requirements for your package, you can add a requirements.txt that specifies packages and version numbers.

For more details, see the cookiecutter-pypackage tutorial.

Not Exactly What You Want?

Don't worry, you have options:

Similar Cookiecutter Templates

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.

  • Once you have your own version working, add it to the Similar Cookiecutter Templates list above with a brief description.
  • 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.