Publishing & Maintaining Opensource Python Packages in PyPI
summary
A concrete checklist that goes from minimal pyproject.toml and README to an automated release: set up tox test matrix to run pytest and mypy across supported Python versions, add pre-commit hooks for black isort and flake8, generate Sphinx docs and badges, track CHANGELOG and Manifest.in, run CI (GitHub Actions) to gate merges, publish via twine to test.pypi then PyPI on git tag, and verify uploads; examples show the exact commands, config files, and expected failing errors so maintainers know what to fix.
AI-written summary · about
chapters (34)
- 0:00Start
- 3:50Scope
- 4:06Typical Package Structure
- 4:38Setup - README.md or .rst
- 5:56Setup.gitignore
- 7:21Setup -setup.py and pyproject.toml
- 8:11Setup - Summary
- 8:33Dev setup-requirements-dev.txt
- 8:54Dev setup-Summary
- 9:05Tox- Overview
- 13:36Tox - mypy
- 15:03Tox codecov
- 18:04Tox Summary
- 18:35Linters - Overview
- 18:57Linters - black
- 20:15Linters-isort
- 20:52Linters-configuring black and isort
- 21:17Linters - flake8
- 22:524. Linters adding it to tox
- 23:334. Linters.git-blame-ignore-revs
- 23:594. Linters Summary
- 24:38Docs - Sphinx + ReadTheDocs
- 26:45Docs License
- 27:39Docs - Badges
- 28:52Docs Summary
- 29:14Quick Recap
- 29:56Release Prep - Overview
- 30:30Release Prep - MANIFEST.in
- 30:48Release Prep - Automate Read The Docs
- 31:51Release Prep - Automate tests
- 33:206. Release Prep - Automate releases to PyPI
- 34:326. Release Prep - Release on PyPI Test server
- 35:206. Release Prep - Summary
- 35:45Actual Release
related talks
22mPublishing well formed Python packages
25mPublishing well-formed Python packages
28mModern Python packaging without pain
24mShipping your first Python package and automating future publishing
01h 21mSecure Python Packaging & Release Using Continuous Deployment
45mStarting your project right: setup and automation for all
31mA reliable developmentrelease workflow for open source Python libraries
39mMoving to pyproject and tox
