Skip to main content

Example Project to show how to package a Django project for pip and PyPI

Project description

This is just a sample project to illustrate how to package a Django project so it can be installed over PyPi with pip.

You can find the source code at: The important parts are in the files: django-pip-project/ and django-pip-project/pipinator/

Installing the project from a local directory:

If you clone the code repository to a local directory (~/tmp/django-pip-project/) you can install the project with the following command:

$ pip3 install -e ~/tmp/django-pip-project/

After this you can run the debug server of the project with a simple:

$ pipinator

You need to run pipinator inside (or above) the local directory you cloned the project to or you will get an SuspiciousFileOperation Error.

Uploading to PyPI:

Check description format:

Check if the description and long_description can be rendered by PyPI:

$ pip install readme_renderer
$ python check -r -s

Create a source distribution:

This creates a dist/ directory containing a archive with your project:

$ python sdist

Note: There are also other ways to package your project. See the Python documentation for a complete guide on how to package your project:

Create an account on PyPI:


Upload your project to PyPI:

You have to use twine to upload your package (you will need to enter your username and password):

$ pip install twine
$ twine upload dist/*

If you want to save your credentials to a file, so you do not have to enter them every time you upload a version see:

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pipinator-0.1.20.tar.gz (124.0 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page