Starting point for developing python libraries.
This repository includes:
- basic structure of a python library with a console entrypoint
- basic tests structure and coverage configuration
- configuration for
black,isortandflake8which are responsible for code formatting and linting pre-commitconfig for running various linters and formatterstoxconfiguration for:- running tests with coverage for multiple versions of python interpreter
- running
pre-commit - using
mypyfor type checking - generating docs using
sphinx-apidoc
- azure pipelines configuration for running all the previous stuff in CI along with automated publishing of packages to PyPi (or some other package repository)
To use this repo as a base for your next python library either click the
Use this template button on the GitHub page of the repo or simply clone it and
reinitialize it as a new repository (rm -rf .git && git init). To quickly set
up development environment run source init.sh. After that you can install
requirements-dev.txt for running and testing the library or use tox to do
that in a separate environment.
You can use bootstrap.py to create
your library using the following command:
wget -O - https://raw.githubusercontent.com/AleksaC/python-library-base/master/bootstrap.py | python