The obvious question in the back of our minds should be “what is the point in creating a package”? Learning about all of these terms feels like extra work.
Sharing is caring¶
By packaging your code, other people can use it!
When you write code to solve a problem, it may often solve a problem that other people have too. By packaging your code, other people can benefit from your work and re-use the solution.
Re-use and recycle¶
There are other reasons, besides philanthropy or network-effects, to share your code by packaging it. Just as functions and classes break your code into re-usable pieces, packaging your code makes it possible to re-use it in different projects (such as different analyses or tools). This both saves time and reduces certain kinds of errors (like copy-paste errors)!
Strive for reproducibility¶
Although we won’t discuss this in great detail, the hardest part of programming is trying to revive an old project. Through the best-practices involved in creating a Python package, it will be easier to come-back to an old project and figure out why it doesn’t work! Packaging makes it easier to write good tests, and encourages you to author helpful documentation and employ continuous integration.
As of 2025-06-23.