General documentation / cheat sheets for various languages and services

Distribution

First, bump the version in setup.py and commit that change, then use the following to tag that commit and push to remote:

git tag $(python setup.py --version)
git push; git push --tags

Publishing to PyPI

These instructions are current as of 2017-10-22, and reflect the instructions from https://packaging.python.org/tutorials/distributing-packages/.

Generate reStructuredText re-formatting from canonical Markdown-formatted README.md:

pandoc README.md -o README.rst

Definitely the first time you do this, and probably every so often besides, you’ll want to install the required packages:

pip install -U twine wheel

Now we can build the source distribution and a universal (Python 23) “wheel”.

python setup.py sdist
python setup.py bdist_wheel --universal

Ensure that ~/.pypirc includes your PyPI credentials. Then, finally:

twine upload dist/*