ABSTRACT

While the libraries that come with a programming language are useful on their own, much of a language's value is added by community-contributed packages with domain-specific functionality. The most popular way to build packages in Python is by using setuptools. This involves creating a directory named containing a script and a subdirectory also called containing the package's source files. To track and communicate new functionality that is added to the package it is recommended to use semantic versioning. Before distributing packages a test install should be performed in a fresh environment; virtual Python environments can be used for this purpose to avoid messing up the main Python installation. To ensure that packages can be used as intended, it is customary to write documentation in the package's README file and host it in the source code repository, or use documentation frameworks such as Sphinx and Read The Docs. When the package is ready for distribution, it can be uploaded to the PyPI repository, which makes it easy to install with pip. It is important to create a DOI for each package and potentially also publish it in a citable software journal.