Mathew Brown

Shipping MediaCatalog to PyPI

Table of Contents

Shipping MediaCatalog to PyPI

Notes from publishing my A5 movie catalog CLI to PyPI with trusted publishing and a tag-based release flow.

I shipped a small but meaningful milestone today: MediaCatalog is now published on PyPI and can be installed with a single command. This post is a quick walk through the release flow, the configuration details that mattered, and the checklist I want to keep handy for next time.

Why this release matters

MediaCatalog generates printable A5 pages for a movie catalog from a CSV of IMDb links or IDs. The core tool has been working locally for a while, but publishing it makes the project feel real. A one-line install is the difference between a personal script and a tool other people can actually try.

The release flow I used

I wanted a repeatable, low-friction flow, so I set it up to publish via GitHub Actions on tag push.

  1. Publish-ready metadata in pyproject.toml.
  2. A GitHub Actions workflow that builds and publishes on tags.
  3. Trusted publishing configured in PyPI.
  4. Tag the release (for example, v0.1.1).
  5. Let the workflow build and publish the package.

That is it. I can ship a new version by bumping the version and pushing a tag.

Trusted publishing setup notes

PyPI trusted publishing removes the need for API tokens by letting GitHub Actions sign releases via OIDC. For this repo, the minimal setup was:

I kept the environment name empty because the workflow does not define one. If I want environment protection later, I can add environment: pypi to the workflow and set that same name in PyPI.

Release checks I ran

Before calling it done, I ran a quick install check:

pip install mediacatalog
python -m media_catalog --help

I also verified the GitHub release page and the PyPI package page both show the new version.

What I will reuse next time

This release was deliberately simple, but it established a path I can repeat with confidence. My checklist now looks like this:

That is the flow I want for every small release.

Install

If you want to try it:

pip install mediacatalog

Then point it at a CSV of IMDb links or IDs and generate the output:

python -m media_catalog generate --input movies.csv

The next release will focus on quality of life updates, but getting the publishing pipeline in place is a win I wanted to document.