Python Packaging without the Pain

Sunday 9:00 am, Cabrillo 1

About This Tutorial

This tutorial takes the FRIGHT out of Python packaging.

We’ll cover all the steps, including creating a Python package, putting the documentation on Read The Docs, implementing a continuous integration test suite, and deploying your package to the Python Package Index.

We’ll rely on the wonderful Cookiecutter tool to make our life a lot easier during the packaging process, taking your module, function or snippet of Python code and turning it into a Python package, getting around the finicky installation hassles.

Once your project is on PyPI, you can add more tests, documentation, and even get some help on your code by collaborating with other open source developers on enhancements and bug fixes.

If you’re a Pythonista or Djangonaut with a module, function, or even a small code snippet that would be useful as a Python package, this tutorial is for you!

Some things we’ll cover:

  • Installing Cookiecutter and using it to generate Python package boilerplate.
  • Adding Python code into the package and adding at least two useful tests.
  • Creating an account on PyPI and uploading the Python package.
  • Using Tox to test the project against multiple versions of Python.
  • Implementing continuous integration: running tests via Travis CI and uploading documentation into Read the Docs.

You’ll walk out of this tutorial knowing how to package a Python project and with bonus material for making installable Django packages!

Photo of

Diane DeMers Chen

Diane Chen has 20+ years of experience programming Engineering CAD/CAM software, has built a few websites and worked in hardware testing. Enamored with the Python programming language, she teaches Python at UC San Diego Extension, workshops and private courses. She is also an online coach for Two Scoops Press course Creating and Distributing Python Packages. Additionally, she contributes to open source software, is active in the local Python and PyLadies user groups and is an organizer and coach for DjangoGirls workshops in the San Diego area.