Foobar is a template for a typical Python 3 library package.
To adopt for a new project:
- replace
foobarandtemplate-pythonwith your package name - replace
Foobarwith your project name (might be the same as the package) - update the links to point to your code repository and badges
- change the license
- Python 3.4+
Foobar can be installed with 'pip':
$ pip install Foobar
Or directly from the source code:
$ git clone https://github.com/jacebrowning/template-python.git
$ cd template-python
$ python setup.py install
After installation, abstract base classes can be imported from the package:
$ python
>>> import foobar
foobar.__version__
Foobar doesn't do anything, it's a template.
- GNU Make:
- Windows: http://cygwin.com/install.html
- Mac: https://developer.apple.com/xcode
- Linux: http://www.gnu.org/software/make (likely already installed)
- Pandoc: http://johnmacfarlane.net/pandoc/installing.html
- Graphviz: http://www.graphviz.org/Download.php
Create a virtual environment:
$ make env
Run the tests:
$ make test
$ make tests # includes integration tests
Build the documentation:
$ make doc
Run static analysis:
$ make pep8
$ make pep257
$ make pylint
$ make check # includes all checks
Prepare a release:
$ make dist # dry run
$ make upload
