Skip to content

Cookiecutter template for a Python application or library.

Notifications You must be signed in to change notification settings

meltygroup/cookiecutter-pypackage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cookiecutter PyPackage

Cookiecutter template for a Python application or library.

Using

To create a project using this template, simply run cookiecutter:

cookiecutter gh:meltygroup/cookiecutter-pypackage

Handling requirements

Python projects should have broad dependencies to avoid incompatibilities with other projects.

So a setup.py should look like:

install_requires=["aiohttp>=3.5.4,<4", "defusedxml>=0.5,<1"]

Or even this one if you feel maintaining it:

install_requires=["aiohttp", "defusedxml"]

Deployments and test requirements

When you test an application or a library you may want the dependencies to be a bit more pinned, and when you deploy an application you want the dependencies to be clearly pinned.

To handle this, use a requirements.txt file with precisely pinned dependencies, that your CI/CD can use. You can easily generate a requirements.txt file by using:

pip-compile setup.py

from pip-tools.

About

Cookiecutter template for a Python application or library.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages