Skip to content

clarriu97/python-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Cookiecutter Python Package

A cookiecutter template for Python packages (ready for CI/CD pipelines) based on cookiecutter-pypackage.

Features

  • Scripted operations: with GNU make
  • Testing: with pytest
  • Multiple Python versions support: Setup tox to easily test for Python 3.8, 3.9, etc.
  • Package documentation: ready for generation with mkdocs
  • Version handling: Pre-configured version bumping with a single command: bump2version

Quickstart

Install cookiecutter (1.4.0 or higher):

python3 -m pip install --user cookiecutter

Create the project:

cookiecutter https://github.com/clarriu97/python-template

Fill all the details and your project should be ready in a matter of seconds!

If you want to upload your project to Github, please make sure the URL is the same as the one you configured during project creation to ensure everything works properly (links, etc.).

Configuration

The template provides sensible defaults for all the configuration options, however you can customize your project using the following parameters:

  • author: The name of the person or team behind this project.
  • author_email: The email of the author. In the case of a team or group, you can use a mailing list address.
  • project_name: The name of the project. Prefer short names (ideally one word) using kebab-case (hyphen-separated lowercase letters)
  • project_slug: The name of the project in snake case (underscore-separated lowercase letters). Will be autogenerated if left empty.
  • project_short_description: A short description of the project
  • project_url: The Github URL of the project. It's recommended that you create the project first on Github and paste the generated URL here.
  • project_type: one of:
    • library (default): Generate a library project meant to provide features and utilities for other libraries or applications to import and use. A library project will be packaged and released as a binary distribution (wheel).
    • application: Generate an application project meant to ship runnable code to users (with at least one entrypoint). This can be a CLI application, a web service, etc. An application project will be packaged and released as a docker image.
  • version: The initial version (Semantic Versioning). It's recommended you use the default value (0.1.0).
  • python_versions: The supported python versions. If possible, prefer supporting only the latest version available.

Contributing

You can freely contribute to this template by submitting a merge request with the intended changes. Before you do, please take a look at the CONTRIBUTING guidelines.

Request a Feature / Fork This / Create Your Own

If you have differences in your preferred setup, you are encouraged to fork this or create your own template. But before you do, please contact the maintainers of this repo to see if the missing feature can be added (or do it yourself!). The recommended way is to create an issue detailing what the feature is and the value it would bring.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published