A script is a file you run; a package is something other people can install and import, and getting from one to the other is ten small steps rather than one big one. This cheatsheet gathers the whole workflow on one page, from __init__.py and the core-and-api split through docstrings, setup.py, editable installs, testing and publishing, each snippet annotated line by line. Keep it open while you build, or save the image and pin it nearby.
For the full background, read the guide to turning your Python code into a real package. To practise, work through the 10 code-along examples.
Download the cheatsheet
Hope this helps.
[…] Python Packaging Cheatsheet […]