4  Python packaging

Published

October 9, 2026

This chapter is about how you should go about structuring the repository hosting your latest, awesome Python package. This will be a fairly short chapter—not because the issue is not important (in fact packaging is so important that Python even has its own dedicated working group) but because the most natural way to illustrate how to structure a repository is, well… through an actual repository.

And you are covered: metarep is there for you to look at, and it is designed to be a fellow complement to these notes. More specifically, the associated documentation will patiently walk you through all the practical aspects of making a package that can be installed with pip and placed on PyPI.

If you want to share your package with the outside world, this is the standard way. As you will see, the bar to achieve that is surprisingly low, these days.