Skip to content

Instantly share code, notes, and snippets.

View shaun-russell's full-sized avatar

Shaun shaun-russell

  • New Zealand
View GitHub Profile
@shaun-russell
shaun-russell / main.py
Created October 24, 2018 03:28
Click Python command line program template
''' Tool for FUNCTION and FUNCTION. '''
# Better description of thing.
import os
import click
# used to tell Click that -h is shorthand for help
CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help'])
@shaun-russell
shaun-russell / setup.py
Created October 24, 2018 03:19
Python setup.py template
from setuptools import setup
setup(
name='EXEC_NAME',
version='1.0',
py_modules=['MAIN', 'FILE2'],
install_requires=['Click'],
entry_points='''
[console_scripts]
MAIN=MAIN:cli
@shaun-russell
shaun-russell / README.md
Created October 24, 2018 03:18
Standard readme template for my python packages

PROGRAM_NAME (used as 'executable-name')

This program does XYZ.

This program supports ABC.

Additional features include 123.

Installation

Download the files and install locally with pip. Requires Python 3 and the click package (this should be installed automatically because it's a required package).