liveBook · Manning

PyPI

As explained in Software Engineering for Data Scientists

PyPI is the Python Package Index, a repository and distribution service for Python software packages.

The Python Package Index (PyPI) is the main repository for downloading Python libraries. It hosts hundreds of thousands of packages for machine learning, data science, security, automation, and other uses. section 11.2

A typical package workflow uses PyPI to:

  • Find libraries through the PyPI website. section 11.2
  • Download libraries with pip. section 11.2
  • Publish packages by building distributions and uploading them with twine. section 11.2

Publish a small machine-learning package

Define the package name, version, dependencies, description, README, and required Python version in pyproject.toml. Install or upgrade build and install twine, run python3 -m build to create wheel and source distributions in dist, then run twine upload dist/* to upload them to PyPI.

How Software Engineering for Data Scientists covers it

How deep it goes
Explains the repository workflow through metadata, builds, distributions, and uploads, but not repository internals.
Examples
Uses an ml_model package, pyproject.toml metadata, a dist directory, wheel files, and source distributions.
What it assumes
Requires a package project with pyproject.toml and familiarity with installing build and twine through pip.
What you can do after
Apply it via pip and twine to install libraries or publish wheel and source distributions.
How it connects
Connects Python packaging with pip, pyproject.toml, twine, wheels, and source distributions.

Also explained in

Compare how 3 books explain PyPI →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Software Engineering for Data Scientists. The section links point to the parts of the book it draws on.