Issue #726

Lazy Imports, Pydantic AI, Classes, and More

March 17, 2026

Lazy Imports, Pydantic AI, Classes, and More
#726 – MARCH 17, 2026 VIEW IN BROWSER
The PyCoder’s Weekly Logo
The Story of Python’s Lazy Imports
This article is about why lazy imports took 3 years and 2 attempts to be added to the language. From PEP 690’s rejection to PEP 810’s unanimous acceptance.
TECHLIFE

Pydantic AI: Build Type-Safe LLM Agents in Python
Learn how to use Pydantic AI to build type-safe LLM agents in Python with structured outputs, function calling, and dependency injection patterns.
REAL PYTHON

Agents as API Services, Not Prompt Chains.
Clone a working 100-agent Python system: Autonomous Engineering Team, Deep Security Auditor, or Adversarial Code Reviewer. Agents run as API services, discover each other at runtime. No DAGs, no glue code. Any model. Apache 2.0. Clone a Recipe →
AGENTFIELD.AIsponsor

When Are Classes Used in Python?
While you don’t often need to make your own classes in Python, they can sometimes make your code reusable and easier to read.
TREY HUNNER

Learn the Agentic Coding Workflow That Actually Works on Real Projects
65% of Python developers are stuck using AI for small tasks that fall apart on anything real. This 2-day live course (March 21-22 via Zoom) walks you through building a complete Python CLI app with Claude Code, from an empty directory to a shipped project on GitHub.
REAL PYTHON

DuckDB 1.5.0 Released
DUCKDB.ORG

PyPy v7.3.21 Released
PYPY.ORG

Python 3.15.0 Alpha 7
PYTHON.ORG


Python Jobs


Python + AI Content Specialist
REAL PYTHON 📍 ANYWHERE

More Python Jobs >>>


Articles & Tutorials


Crafting and Editing in-Depth Tutorials at Real Python
What goes into creating the tutorials you read at Real Python? What are the steps in the editorial process, and who are the people behind the scenes? This week on the show, Real Python team members Martin Breuss, Brenda Weleschuk, and Philipp Acsany join us to discuss topic curation, review stages, and quality assurance.
REAL PYTHON podcast

The Optimization Ladder
Python loses every public benchmark by 21-875x. Cemrehan took the exact problems people use to dunk on Python and climbed every rung of the optimization ladder: from CPython version upgrades to Rust. Real numbers, real code, real effort costs.
CEMREHAN ÇAVDAR

Ship Voice Agents That Sound Like Human with Async
Async Voice API is a human-like low-latency text-to-speech API for real-time apps and agents. 15 languages, streaming-ready, integrations with n8n, LiveKit, Twilio. Top-ranked on the Hugging Face TTS Arena. From$0.50/hour with a 24/7 SLA. Try Now →
ASYNCsponsor

Lock the Ghost in uv.lock
In the software world, “remove” is not equal to “gone.” Take a short trip through how the Python Package Index handles removals and how you can lock a ghost package in an uv.lock file forever!
CERT.AT • Shared by Kamil Mańkowski

Comparing PDF Table Extraction Tools
This article explores three Python tools for PDF table extraction: Docling, Marker, and LlamaParse. Learn which handles merged cells and multi-level headers best.
CODECUT.AI • Shared by Khuyen Tran

What Is Code Review For?
This post explores just what you should and should not use code reviews for. Learn when to use linters to catch problems vs when human review is important.
GLYPH

Caching an Asyncio Function the Easy Way
Caching an async function is trickier than expected, this article walks through why that is and how to use Asyncio primitives to solve the problem.
CHANGS.CO.UK • Shared by Jamie Chang

Working With APIs in Python: Reading Public Data
Learn how to consume REST APIs with Python using the requests library, including authentication, query parameters, and handling responses.
REAL PYTHON course

Nobody Gets Promoted for Simplicity
Our industry often rewards complexity and ignores simplicity. In interviews, design reviews, and promotions. Here’s how to fix it.
TERRIBLE SOFTWARE

You Store Data and You Do Stuff With Data
This post explores the Object Oriented Programming mindset and why you want to associate your data with the operations upon it.
STEPHEN GRUPPETTA

pandas’ Public API Is Now Type-Complete
Marco tells the story of how his team helped make pandas’ public API type-complete, and how to prevent it from regressing.
MARCO GORELLI

Remove Extra Spaces
Learn how to remove extra spaces from a string using regex, string splitting, a fixed point, and itertools.groupby.
RODRIGO GIRÃO SERRÃO

CPython: 36 Years of Source Code
A graphical analysis of the growth of CPython’s codebase from its first commits to the present day
PYTHON.ORG


Projects & Code


Brought to you by Real Python for Teamssponsor
Online Python training created by a community of experts. Give your team the real-world Python skills they need to succeed →

100 Days, 100 MicroPython IoT Projects
GITHUB.COM/KRITISHMOHAPATRA • Shared by Kritish Mohapatra

OpenDocs: Turn Your README Into Documentation
GITHUB.COM/IOTEVERYTHIN

Cycast: Internet Radio Streaming Server
GITHUB.COM/LUKEB42

Crime-Related Datasets for Python
PYPI.ORG • Shared by Renzo Caceres Rossi

django-tasks-db: An ORM-based Backend for Django Tasks
GITHUB.COM/REALORANGEONE

📆🐍 Upcoming Python Events


Weekly Real Python Office Hours Q&A (Virtual)
March 18, 2026

PyData Bristol Meetup
March 19, 2026

PyLadies Dublin
March 19, 2026

Chattanooga Python User Group
March 20 to March 21, 2026

Claude Code for Python Developers: Hands-On Agentic Coding Course
March 21 to March 23, 2026

PyCascades 2026
March 21 to March 23, 2026

PythonAsia 2026
March 21 to March 24, 2026
Happy Pythoning!
Copyright © 2026 PyCoder’s Weekly, All rights reserved.