There are many tools and approaches that can be used to create a Python package. We build resources that help you both understand the tool ecosystem and also learn how to create a Python package using modern best practices.

Community-created Python Packaging Guide

A group of people working on a tetris like set of building blocks, trying to stack the blocks together.

Our packaging guide is a living document that will help you navigate the Python packaging ecosystem and learn about modern Python packaging best practices.

  • Created & curated by the community
  • Reviewed by beginner to expert level Pythonistas
  • Accurate, modern & beginner-friendly

All contributions are recognized both on our website and in the guidebook’s citation.

Scientific Python packaging guidebook sections

Beginner friendly Python packaging tutorials

Beginner-friendly Python packaging tutorials that will take you through the full process of creating a Python package, following modern best practices.

Add metadata using a pyproject.toml file to your Python package

Hatch is an end-to-end Python packaging and workflow tool. In this tutorial, you will install and learn how to configure Hatch for Python packaging.

View Tutorial

What is a Python package

Learn about what a Python package is and the basic components that make up a Python package.

View Tutorial

Make your Python code installable

Learn how to create the most basic version of a Python package which can then be installed into a Python environment.

View Tutorial

Publish your Python package to PyPI

Learn how to publish your Python package to test.PyPI.org and to PyPI.org.

View Tutorial

Publish your Python package to conda forge using grayskull

Learn how to publish your Python package to the conda-forge channel of conda using the grayskull Python package.

View Tutorial

Add a README file to your Python package

A README file is often the landing page that a user will use to understand your package. Learn about how to create a useful README file for your Python package.

View Tutorial

Add a LICENSE and Code_of_Conduct file to your Python package

License and code of conduct files are important to add to your Python package as they provide instructions for both how users can use your package and also how the community of users should interact with you as a maintainer.

View Tutorial

Add metadata using a pyproject.toml file to your Python package

To enhance the visibility of your package on PyPI and provide more information about its compatibility with Python versions, project development status, and project maintainers, you should add additional metadata to your pyproject.toml file. This lesson will guide you through the process.

View Tutorial

Get Involved: Help us improve our scientific Python packaging resources

A black and grey sketch of a group of people sitting at a desk in front of a monitor smiling.

We need your help! Our packaging content is community-created and reviewed through an open review process on GitHub. The more feedback that we get, the more useful our resources are to the community. Get involved by:

  • Opening an issue about problems that you find in our guidebook
  • Submitting a pull request that fixes a typo or mistake in the guide.
  • Get credit for your contribution

All contributions are recognized both on our website and in the guidebook’s citation.

See what we're working on now