This has been merged into - use that instead!
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Deprecated. Use cookiecutter-pylibrary instead!

Cookiecutter template for a Python python library. This is largely designed to address this blog post about packaging python libraries.

There's a bare library using this template (if you're curious about the final result):

Note: You should use cookiecutter-pylibrary instead - it's just like this (just use no for the test_matrix_configurator option) but with py.test as the test runner.



Projects using this template have these minimal dependencies:

  • Tox - for running the tests
  • Setuptools - for building the package, wheels etc. Now-days Setuptools is widely available, it shouldn't pose a problem :)


Generate your project:

The variables
project_name Verbose project name, used in headings (docs, readme, etc)
repo_name Repository name on github
package_name Python package name (whatever you would import)
distribution_name PyPI distribution name (what you would pip install)

After this you can create the initial repository (make sure you create an empty Github project):

git init .
git add .
git commit -m "Initial skel."
git remote add origin
git push -u origin master


Not Exactly What You Want?

There's more intricate variant of this template that:

  • Has a generator script for the test matrix (there's a configure script that generates tox.ini/.travis.yml).
  • Uses Pytest for the test runner.
  • Has support for building C extensions.

If you have criticism or suggestions please open up an Issue or Pull Request.