Welcome to the “py-generic-project” manual!

_images/logo.png

This is a Cookiecutter template that creates a basic Python Setuptools project, which can be later on augmented with various optional accessories. See the demo for getting a 1ˢᵗ impression on how this Cookiecutter template can be used, including screenshots of the terminal session.

If you have questions or need any other kind of help, please join the springerle-users Google group.

Features

The resulting project uses rituals and invoke for task automation, and setuptools for building and distributing the project. A provided autoenv script takes care of creating a fully boot-strapped Python 3 venv or Python 2 virtualenv – it can also be called manually if you don’t want to install autoenv.

The setup.py script follows the DRY principle and tries to minimize repetition of project metadata by loading it from other places (like the package’s __init__.py). Incidently, this makes the script almost identical between different projects, and thus provides an easy update experience later on. Usually, the only specific thing in it is the docstring with the project’s name and license notice. This relies on conventions, especially check out __init__.py and __main__.py in the src folder, for their double-underscore meta variables.

It is also importable (by using the usual if __name__ == '__main__' idiom), and exposes the project’s setup data in a project dict. This allows other tools to exploit the contained data assembling code, and again supports the DRY principle. The rituals package uses that to provide Invoke tasks that work for any project, based on its project metadata.

Other integrated tools are pylint for code quality checking, pytest for testing support, and a Travis CI configuration.

Indices and Tables