Publish a (Perfect) Python Package on PyPI

Package a Python project, from scratch.

Mark Smith

Best Practice Packaging Python 3

See in schedule

Always wanted to publish a package on PyPI, but didn't know where to start? This talk is for you! Starting with nothing, we'll build a package and publish it on PyPI using current best practices.

Learn how to structure your project and your code. Discover what goes in your `requirements.txt` and your `setup.py`. Ensure your code will work in different on different platforms! Document your code so people won't ask you loads of questions! Finally, learn how avoid doing any of this yourself.

This talk will cover:

* Why should you package your code for PyPI?
* How to structure your project and your code, including why you need a `src` folder!
* Discover what goes in your `Pipfile` and your `setup.py`, and why. Learn the difference between installing your library to use it, and installing it to develop on it.
* Write tests for your project, and run them using Tox.
* Ensure your code will work in different on different platforms with
Continuous Integration!
* Document your code so people won't ask you loads of questions!
* How to actually get your code on PyPI using Twine.
* Finally, learn how avoid doing any of this yourself (or avoid doing it twice) using CookieCutter templates.

Type: Talk (30 mins); Python level: Beginner; Domain level: Beginner


Mark Smith

Nexmo

Mark has been a Python developer & trainer for 19 years and is now trying out Developer Relations to see how that feels. He always attempts to sneak a Perl or Ruby slide into his talks (so you have that to look forward to). His Twitter handle is @judy2k, which tends to confuse people. Despite the photos in circulation, he rarely wears a Viking helmet in public.