Skip to content
Template python package
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


A template for python packaging

This python package provides a template for other python packages. This template contains:

  • entry point scripts
  • data files
  • version information

This is the folder structure:

├── rain
│   ├──
│   ├──
│   ├──
│   ├──
│   ├── module_three
│   │   ├──
│   │   ├──
│   │   └──
│   ├── scripts
│   │   ├──
│   │   └──
│   ├── tests
│   │   └──
│   ├── resources
│   │   └── mathematicians.txt
│   └──
└── .gitignore

The template is designed to work with both python2 and python3 but is only tested on python3, as of now.

Run tests

Run tests from $REPO_ROOT. You will get an error otherwise.

python3 -m pytest rain/tests

Installation & Uninstallation

Install using pip at user-site instead of python This makes it easier to uninstall. The script rain_maker is installed in user-site/bin.

# Installation
pip3 install --user ./

# Uninstallation
# From any location. This will uninstall the script `rain_maker` as well.
pip3 uninstall rain

Run script to check your installation

# From anywhere (assuming user-site/bin is is your PATH)
$ rain_maker --help
$ rain_maker --times 10
$ rain_maker

Sample output of rain_maker looks like:

$ rain_maker
Galois, Weirstrauss, Descartes, Euler, Cauchy, VonNeumann, Russell, Chebyshev, Newton, Leibniz
Russell, DeMoivre, Cauchy, Erdos, Bayes, Newton, Leibniz, Peano, Weirstrauss, Nash
Taylor, Galois, Godel, Riemann, Weirstrauss, Pythagoras, Leibniz, Chebyshev, Russell, Maxwell
Turing, Frege, Cantor, Bernoulli, Weirstrauss, Einstein, Boole, Kolmogorov, Gauss, Bayes
Godel, Poincare, Banach, Bernoulli, Newton, Maxwell, Lagrange, Huygens, Riemann, Chebyshev
You can’t perform that action at this time.