Uploading your packages to Packagr with twine

Building a package

Let’s say you have a folder containing some code to deploy to Packagr in a folder that looks like this:

        <<some python files>>

To create a package from the my_code folder, create a file called, and add the following content to it

from setuptools import setup


To create a package from your code, open a terminal window at the same location as, and enter the following commands:

Install wheel

pip install wheel

Create wheel/sdist format packages

python sdist bdist_wheel

This will create a folder called dist containing your package

Uploading your package with twine

We can now upload our package to Packagr using twine. Let’s start by installing twine using pip

pip install twine

We can now upload our package to Packagr using the following command (don’t forget to insert your own repository URL here):

twine upload  --repository-url<my-hash-id>/ dist/*

Free accounts

Free accounts do not get their own repository URL - instead, you should use the default public endpoint as follows:

twine upload  --repository-url dist/*