Issue #711

pairwise(), Mocks, Claude, and More

Dec. 2, 2025

pairwise(), Mocks, Claude, and More
#711 – DECEMBER 2, 2025 VIEW IN BROWSER
The PyCoder’s Weekly Logo
Generalising itertools.pairwise
This article teaches you about itertools.pairwise, a function for accessing pairs of components over an iterable. Learn where it is helpful and what its limitations are.
RODRIGO GIRÃO SERRÃO

Why Your Mock Breaks Later
An overly aggressive mock can work fine, but then break much later. If you don’t mock the right spot in your code you can break other testing libraries.
NED BATCHELDER

Turn Multi-Agent Mayhem into Harmony (with Python + Temporal)
AI is powerful but messier than a three-way Git merge on a Friday afternoon. Join us to see how Temporal helps Python devs orchestrate multi-agent systems with confidence. Learn how to make your agents play nicely and your code stay clean →
TEMPORALsponsor

Getting Started With Claude Code
Learn to set up and use Claude Code for Python projects: install, run commands, and integrate with Git.
REAL PYTHON course

PyCon Austria 2026: Free Conference, Registration Is Open
PYCON.AT • Shared by Horst JENS

PSF Code of Conduct Working Group Transparency Report
PYTHON SOFTWARE FOUNDATION

Microsoft Announces SQL Server Python Driver
MICROSOFT.COM • Shared by Howard Rothenburg


Python Jobs


Python Video Course Instructor
REAL PYTHON 📍 ANYWHERE

Python Tutorial Writer
REAL PYTHON 📍 ANYWHERE

More Python Jobs >>>


Articles & Tutorials


PyPI and Shai-Hulud: Staying Secure Amid Emerging Threats
There is an attack on-going in the JavaScript/NPM world that has been named Shai-Hulud. It has targeted a large number of packages. So far, PyPI has not been exploited, but attempts have been made. This post explains what the folks at PyPI are doing to prevent problems and how you can protect yourself.
MIKE FIEDLER

Understanding the Different POST Content Types
When writing code that accepts user data on the web, you usually are using the HTTP POST method. POST supports several different types of data in the request body. This post teaches you about each of them, with examples in Django to make it clearer.
AIDAS BENDORAITIS

B2B Authentication for any Situation - Fully Managed or BYO
What your sales team needs to close deals: multi-tenancy, SAML, SSO, SCIM provisioning, passkeys…What you’d rather be doing: almost anything else. PropelAuth does it all for you, at every stage →
PROPELAUTHsponsor

American Data Centers
This step-by-step post shows you how to do data analysis on the Business Insider’s dataset on American Data Centres. The analysis uses a variety of tools, including the Python esprima library for parsing, duckdb, and more.
MARK LITWINTSCHIK

Django: Implement HTTP Bearer Authentication
HTTP Bearer is a header-based mechanism authentication mechanism. There are many Django frameworks that support it, but some can be a little heavy weight. Learn how to handle HTTP Bearer Authentication in your own code.
ADAM JOHNSON

Pydantic Can Do What?
Pydantic started out as a validation library but over the years it has added many useful features. It includes a full-featured settings loader which can read from multiple env files, config files, and cloud vaults.
BITE CODE!

Why Django’s DATETIME_FORMAT Ignores You
A dive into why Django’s DATETIME_FORMAT setting seems to do nothing, and how to actually force the 24-hour clock in the admin, even when your locale says otherwise.
KEVIN RENSKERS

Disable Network Requests When Running pytest
Even with diligent mocking of external requests, a few web requests can still slip through. A quick pytest fixture can force a failure though, saving you from problems.
ANŽE PEČAR

How to Properly Indent Python Code
Learn how to properly indent Python code in IDEs, Python-aware editors, and plain text editors—plus explore PEP 8 formatters like Black and Ruff.
REAL PYTHON

Why Developers Still Flock to Python
This interview with Python creator Guido van Rossum covers everything from writing readable code to AI and the future of programming.
NATALIE GUEVARA

Your new AI Pair Programmer for Data Science
Most AI coding assistants are built for general software engineering. Positron’s AI is different. It’s designed to work with you, not replace you, while understanding your data science workflow
POSITsponsor

Improve Your Programming Skills With Advent of Code
It is that time of year again, time for Advent of Code. Not familiar? This post explains what it is and how it can help you up-skill.
JUHA-MATTI SANTALA

How to Convert Bytes to Strings in Python
Turn Python bytes to strings, pick the right encoding, and validate results with clear error handling strategies.
REAL PYTHON


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 →

elf: Advent of Code Helper for Python
GITHUB.COM/CAK • Shared by Caleb Kinney

kroma: Terminal Formatting Library
GITHUB.COM/POWERPCFAN

nicegui-fastapi-template: FastAPI/NiceGUI/Docker Template
GITHUB.COM/JAEHYEON-KIM

PyStrict-strict-python: Ultra-Strict Python Project Template
GITHUB.COM/RANTECK

Minimalist, Thread-Safe Config Management for Python
GITHUB.COM/POMPONCHIK • Shared by Evgeniy Blinov

DjangoRealtime: Realtime Browser Events for Django
GITHUB.COM/USMANHALALIT

📆🐍 Upcoming Python Events


Weekly Real Python Office Hours Q&A (Virtual)
December 3, 2025

Canberra Python Meetup
December 4, 2025

Sydney Python User Group (SyPy)
December 4, 2025

PyData Global 2025
December 9 to December 12, 2025

PiterPy Meetup
December 9, 2025

Leipzig Python User Group Meeting
December 9, 2025
Happy Pythoning!
Copyright © 2025 PyCoder’s Weekly, All rights reserved.