Turn Your Python Code Into a pip Package in Minutes

Will Norris
Level Up Coding
Published in
6 min readJan 12, 2021

--

Photo by Markus Spiske on Unsplash

Why You Should Package Your Code

One of Python’s greatest strengths is the ability for users to package their code and publish it for fellow pythonistas to use in their workflows. Without libraries like pandas, numpy, and matplotlib Python would not be the wonderfully flexible language we have all come to love.

You don’t need to create a package as expansive as numpy to benefit other users in the community. Even very niche workflows generally have a group of users working on similar problems. Packaging your software for others to use can save time and bring other developers to your work to help improve your code via collaboration. I published my first Python library while working with passive microwave data for large scale snow pack analysis, sounds pretty niche right? Well in only a couple months it had passed 5,000 downloads and now has almost 20,000 from conda-forge alone. I hope that it has helped some Earth Scientists speed up their workflows, and I know it helped me understand my own code better.

Getting Started

Choosing a Package Installer: pip or conda

Pip is the default package installer in python. It stands for pip installs packages. Conda is an environment manager that aims to take…

--

--

Software Dev and Earth Scientist. Background involves the use of python and machine learning to study snowpack and full-stack web development.