How to Make Your Own Python Package

It is easier than you think.

Logan Rane
The Pythoneers

--

Photo by Real Python

Ever thought who wrote all those python packages that you use daily for your python projects? A lot of us think that there must be teams with a bunch of pro developers who are making those python packages for us.

I guess it will surprise you that NumPy, one of the most widely-used Python packages was made and maintained by just 6 people for the majority of its time.

Even you can make your own python package and upload it on the PyPi website and then download it anywhere as pip install [mypackage]. It doesn’t have to be some fancy utility library or a whole app. It can be as simple as a calculator (well obviously, you would want to make something of your use). Sounds cool, right?

So, here we will be making a simple calculator with basic functionality and bundle it as a package.

Let’s jump into our very own python package now.

File Structure

One of the most important things before building any application, website, or package is to structure your files so that you don’t have to face any issues while navigating through different pieces of code and functionality.

Here is the basic filesystem structure, that we will follow for our package.

--

--

Logan Rane
The Pythoneers

Top Writer @Medium | Creatorprenuer | Learn How To Create | Build an Internet Business Solo | Join Medium - https://bit.ly/3LypdOK