When you are programming, usually you are solving a problem - the programming is simply a means to an end. If that’s the case, then packaging is a means to a means to an end. This often makes packaging the last thing you think about, but it’s actually one of the most important parts of any work, as it’s what makes code obtainable and reusable!
Packaging is absolutely critical as soon as you:
- Work on more than one thing
- Share your work with anyone (even if not as a package)
- Work in more than one place
- Upgrade or change anything on your computer
Unfortunately, packing has a lot of historical cruft, bad practices that have easy solutions today but are still propagated. This material tries to correct that by showing you a clean, modern way to write and work with Python packages.
See Also
This is a tutorial. For reference material, you should bookmark the following guides:
Prerequisites
- Basic Python
- Light familiarity with pytest may be helpful