DEV Community


Posted on

The easiest way to upload your own pip package to

Python's package choice is a selling point of it. Yet the package management pip can be quite tricky for starters with issues like env, version number, etc.

To publish a package using pip to is not easier at all, due to the complicated and unintuitive process.

The good news is, we have now have a wonderful template to work with and the powerful GitHub Action to help.

Use a template

First, you should download this repo:

Some things to do:

  • change the name of mypackage to YOUR-PACKAGE-NAME
  • Edit the to fit your need
  • Edit the based on the comment inside

Use GitHub

Now create a new GitHub repo.
Upload your package and double check the license, readme, version number, author, etc.

Create a new action

After you upload your code, click Action on your repository.

Choose Publish Python Package.

Change the __token__ to your username on (you should have registered one).

Then, commit it.

Create a secret in your repo settings

Settings -> Secrets -> New repository secret



Create a release. Then the project will be built and uploaded to pypi automatically.

Top comments (0)