# #540: Modern Python monorepo with uv and prek Page: https://stenobird.com/podcast/talk-python-to-me/540-modern-python-monorepo-with-uv-and-prek Text version: https://stenobird.com/podcast/talk-python-to-me/540-modern-python-monorepo-with-uv-and-prek.md Podcast: [Talk Python To Me](https://stenobird.com/podcast/talk-python-to-me) Published: 2026-03-13T21:17:50+00:00 Episode link: https://talkpython.fm/episodes/show/540/modern-python-monorepo-with-uv-and-prek Audio file: https://talkpython.fm/episodes/download/540/modern-python-monorepo-with-uv-and-prek.mp3 Processing state: processed JSON: https://stenobird.com/v1/public/podcasts/talk-python-to-me/episodes/540-modern-python-monorepo-with-uv-and-prek Duration seconds: 3733 ## Resource Learn how the Apache Airflow team manages a massive Python monorepo containing over a million lines of code and 100+ sub-packages. Discover how modern tooling like uv and pre-commit has eliminated the traditional friction of monorepo maintenance. ## Highlights - Main idea: Modern Python packaging standards (PEPs) and tools like uv have made monorepos viable by simplifying dependency management - Practical takeaway: Use uv workspaces to ensure sub-packages are isolated and cross-imports are caught easily during development - Practical takeaway: Leverage inline script metadata and dependency groups to simplify pre-commit configurations and environment setup - Failure mode: Avoid the old 'multi-repo' complexity; the benefits of testing everything together in one place now outweigh the overhead of a monorepo - Main idea: The shift toward standardized, tool-agnostic metadata allows for better interoperability between tools like uv, hatch, and pre-commit ## Topics Python, Monorepo, Apache Airflow, uv, Software Architecture, Package Management, DevOps, Python Packaging ## Chapters - 1:00 — Introduction to Airflow's Monorepo: An introduction to the scale of the Apache Airflow codebase and the challenges of managing hundreds of interconnected sub-packages. - 10:25 — Monolith vs. Sub-packages: Discussing the architectural decision to use a monorepo structure rather than a single monolithic repository or fragmented separate repos. - 24:35 — The Role of uv and Astral: How the uv toolchain and collaboration with the Astral team enabled better integration for large-scale Python projects. - 33:45 — Modern Packaging Standards: Deep dive into how PEPs regarding dependency groups and inline script metadata simplify development and pre-commit hooks. - 43:00 — Pre-commit and Rust-based Tooling: The synergy between uv and Rust-based tools like pre-commit in maintaining high-quality code in a large-scale environment. - 52:40 — Automated Vendoring and Distribution: How modern standards allow for automatic vendoring of shared libraries during the build process. - 1:02:10 — Final Verdict: Just Do It: A concluding recommendation for developers to adopt monorepos now that the tooling has matured. ## Actions - request_transcript: `POST https://stenobird.com/v1/public/podcasts/talk-python-to-me/episodes/540-modern-python-monorepo-with-uv-and-prek/transcription-requests` — Idempotently request low-priority transcript generation for this episode. - read_markdown: `GET https://stenobird.com/podcast/talk-python-to-me/540-modern-python-monorepo-with-uv-and-prek.md` — Read the agent-friendly Markdown representation of this episode resource. A page view does not enqueue transcription. Agents should invoke `request_transcript` explicitly when they need this episode processed. ## Transcript Full transcripts are not published on public pages unless there is a clear rights basis.