Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mtchavez/python-package-boilerplate
Boilerplate for a Python Package
https://github.com/mtchavez/python-package-boilerplate
boilerplate boilerplate-package pip-package python python-package python-package-boilerplate
Last synced: about 2 months ago
JSON representation
Boilerplate for a Python Package
- Host: GitHub
- URL: https://github.com/mtchavez/python-package-boilerplate
- Owner: mtchavez
- License: mit
- Created: 2013-04-01T16:51:18.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2021-04-28T21:37:56.000Z (almost 4 years ago)
- Last Synced: 2023-03-17T04:45:31.730Z (almost 2 years ago)
- Topics: boilerplate, boilerplate-package, pip-package, python, python-package, python-package-boilerplate
- Language: Python
- Size: 13.7 KB
- Stars: 79
- Watchers: 4
- Forks: 27
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
python-package-boilerplate
==========================[![Build Status](https://travis-ci.org/mtchavez/python-package-boilerplate.png?branch=master)](https://travis-ci.org/mtchavez/python-package-boilerplate)
[![Requires.io](https://requires.io/github/mtchavez/python-package-boilerplate/requirements.svg?branch=master)](https://requires.io/github/mtchavez/python-package-boilerplate/requirements?branch=master)Boilerplate for a Python Package
## Package
Basic structure of package is
```
├── README.md
├── packagename
│ ├── __init__.py
│ ├── packagename.py
│ └── version.py
├── pytest.ini
├── requirements.txt
├── setup.py
└── tests
├── __init__.py
├── helpers
│ ├── __init__.py
│ └── my_helper.py
├── tests_helper.py
└── unit
├── __init__.py
├── test_example.py
└── test_version.py
```## Requirements
Package requirements are handled using pip. To install them do
```
pip install -r requirements.txt
```## Tests
Testing is set up using [pytest](http://pytest.org) and coverage is handled
with the pytest-cov plugin.Run your tests with ```py.test``` in the root directory.
Coverage is ran by default and is set in the ```pytest.ini``` file.
To see an html output of coverage open ```htmlcov/index.html``` after running the tests.## Travis CI
There is a ```.travis.yml``` file that is set up to run your tests for python 2.7
and python 3.2, should you choose to use it.