PyCon Pune 2018

PyCon Pune

The making of a Python package

Submitted by poruri sai rahul (@rahulporuri) on Sunday, 27 August 2017

Technical level: Intermediate


Writing a script that does something amazing is not enough to get people to use it, it needs to be packaged so that it’s easy to install, it needs to be open sourced so that it will live longer than you will, it needs to be tested continuously and it needs to have user-friendly documentation. This is what all of the popular Python packages have in common.

Over the course of this talk :
you will learn what a basic is you will understand how Git and GitHub can be used effectively to open source your project you will look at how Sphinx can be used to easily generate docs, which can then be hosted as GitHub pages. you will look at how tests and Continuous Integration tools like Travis can be used.

While a prior understanding of Python will definitely help you get more out of this talk, it is not necessary. Understanding how to deliver and sustain a Python project is what I will convey through this talk.


After briefly talking about how packaging your scripts makes them easily accessible, I’ll talk about the script and the setuptools.setup function. I’ll show what a basic setup script is and then i’ll talk about all the important arguments that can be passed to the setup function in the script.

Now that we have a working package, we’ll talk about PyPI and how to use the twine package to upload your package to twine.

We’ll now talk about using Git & GitHub to host your package and it’s docs. We’ll talk about using Continuous Integration tools like Travis. Finally, we’ll look at examples from popular packages in the Python community.

Speaker bio

I am a Scientific Software Developer at Enthought. By day, I work on Enthought’s Product offerings. I have a background in Physics. I like giving talks and conducting workshops because researching the topic increases my understanding of it. I’ve been (semi-) active in the Python community in Pune over the last year and I’ve given talks at local meetups & organized workshops.




  • Kushal Das (@kushaldas) Reviewer 2 years ago

    Thank you for submitting the talk to PyCon Pune. The talk selection team will contact you here in case of any queries. Meanwhile, please make sure that you provide a link to the presentation slides.

    • poruri sai rahul (@rahulporuri) Proposer a year ago

      Hey Kushal, note that I have updated the slides on the GitHub repo.

  • Parag Nemade (@paragan) a year ago

    Thank you for this submission. Packaging is important part for any distribution of software. From the slides I see you are going to talk about writing script. But are you going to use some other presentation for talking about generating docs for python package, configuring travis?

    • poruri sai rahul (@rahulporuri) Proposer a year ago

      Hey Parag, note that the updated slides contain info on setting up Sphinx docs, configuring Travis and uploading the package to PyPI. I hope they answer your questions.

      I apologize if I didn’t answer your questions in the updated slides. If I didn’t, can you clarify what you’re looking for?

      I welcome comments and criticism.

Login with Twitter or Google to leave a comment