Skip to content

fernandojunior/python-boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

python-boilerplate

A collection of very simple boilerplates for Python projects. See features, structure and glossary to better understand them.

Boilerplates

building module - Boilerplate to create a project with a Python module.

building package - Boilerplate to create a project with a Python package.

building script - Boilerplate to create a command line script project with a Python module.

Features

Common preconfigured tools to facilitate the project development.

  • coverage.py - Code coverage measurement.
  • Flake8 - The modular source code checker: pep8, pyflakes and co.
  • pytest - A mature full-featured Python testing tool.
  • setuptools - Easily download, build, install, upgrade, and uninstall distribution packages.
  • tox - Auto builds and tests distributions in multiple Python versions using virtualenvs.

Structure

Basic structure of the boilerplates in tree format.

project_name/
├── <CORE_CODE>  # Python package or module with the core code of the project
├── CONTRIBUTING.md  # Details about how the project mantainer would like to receive contributions
├── LICENSE  # Informs users and contributors what they can and can't do with the project
├── Makefile  # Automates useful tasks to use with make, a build automation tool
├── MANIFEST.in  # Specifies extra resources to add in distributions packages
├── README.md  # Details how to build, install, use and contribute to the project
├── requirements*  # Contains dependencies of the project to be installed using pip
├── setup.cfg  # Configures some settings of the tools used in the project
├── setup.py  # Contains information needed to build distributions with setuptools
├── tests*  # Provides some automated tests to run with pytest
└── tox.ini  # Defines test environments to run with tox

Glossary

Terms to understand the capabilities offered by the boilerplates.

  • build - Refers to preparing a project in a distribution package that users can install and use easily.
  • dependency - A distribution package that is required to build, install and use a project.
  • distribution package - A archive file with packages, modules or other resources used to distribute a release.
  • module - A .py file that serves as a unit of Python source code which can expose variables, functions and classes.
  • package - A directory containing an __init__.py file and which can contain modules or recursively, other packages.
  • pip - The preferred package manager system for installing distribution packages.
  • project - A library, framework, script, plugin, application, or other resources or some combination thereof.
  • release - A snapshot of a project at a particular point in time, denoted by a version identifier.
  • virtualenv - A tool to isolate a environment of a project and its dependencies from a Python installation.

Other nice glossaries at Python Documentation, Python Packaging User Guide and Setuptools' Documentation.

Contributing

See CONTRIBUTING.

License

CC0

The MIT License.

Copyright (c) 2016 Fernando Felix do Nascimento Junior.

About

A collection of very simple boilerplates for Python projects

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published