Setting up the boilerplate and scaffolding

.
├── LICENSE.md
├── $package
│   ├── __init__.py
│   ├── <your-python-files>
├── README.md
├── requirements.txt
├── setup.py

File contents

setup.py

from setuptools import setup

setup(
    name='<package-name>',
    version='<package-version>',
    packages=['$package'],
    install_requires=['<pip-dependencies>'],
    author='<author>',
    author_email='<email>',
    description='A python package for $package'
)

requirements.txt

<pip-dependency-1>
<pip-dependency-2>

Install requirements by running pip install -r requirements.txt

$package/__init__.py

from <class> import <function>

__all__ = [<function>]

Building the python package

python setup.py sdist

Configuring ~/.pypirc

[distutils]
index-servers = 
    pypi
[pypi]
username: <pypi-username>

Publishing to public PyPi repository

python setup.py sdist upload

Installing package

pip install <package-name>

Easy bootstrap

sbt new <username>/python-package-bootstrap.g8