Planet Python
Last update: November 29, 2025 04:44 AM UTC
November 29, 2025
Zero to Mastery
[November 2025] Python Monthly Newsletter đ
72nd issue of Andrei's Python Monthly: uv is the Future, Python Hyperflask, Python 3.14 is here, and much more. Read the full newsletter to get up-to-date with everything you need to know from last month.
November 29, 2025 04:43 AM UTC
November 28, 2025
death and gravity
reader 3.20 released â we're so back
November 28, 2025 09:43 PM UTC
Django Weblog
2026 DSF Board Election Results
The 2026 DSF Board Election has closed, and the following candidates have been elected:
- Jacob Kaplan-Moss
- Priya Pahwa
- Ryan Cheley
They will all serve two years for their term.
2026 Board
Directors elected for the 2025 DSF Board - Abigail Gbadago, Jeff Triplett, Paolo Melchiorre, Tom Carrick - are continuing with one year left to serve on the board.
Therefore, the combined 2026 DSF Board of Directors are:
- Abigail Gbadago
- Jacob Kaplan-Moss*
- Jeff Triplett
- Paolo Melchiorre
- Priya Pahwa*
- Ryan Cheley*
- Tom Carrick
* Elected to a two year term

Congratulations to our winners, and a huge thank you to our departing board members Sarah Abderemane and Thibaud Colas.
Thank you again to everyone who nominated themselves. Even if you were not successful, you gave our community the chance to make their voices heard in who they wanted to represent them.
November 28, 2025 06:15 AM UTC
November 27, 2025
Python GUIs
Getting Started With NiceGUI for Web UI Development in Python â Your First Steps With the NiceGUI Library for Web UI Development
NiceGUI is a Python library that allows developers to create interactive web applications with minimal effort. It's intuitive and easy to use. It provides a high-level interface to build modern web-based graphical user interfaces (GUIs) without requiring deep knowledge of web technologies like HTML, CSS, or JavaScript.
November 27, 2025 06:00 AM UTC
November 26, 2025
Real Python
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.
November 26, 2025 02:00 PM UTC
November 25, 2025
PyCoderâs Weekly
Issue #710: FastAPI, Floodfill, 20 Years of Django, and More (Nov. 25, 2025)
November 25, 2025 07:30 PM UTC
Real Python
Getting Started With Claude Code
Learn to set up and use Claude Code for Python projects: install, run commands, and integrate with Git.
November 25, 2025 02:00 PM UTC
Python Software Foundation
PSF Code of Conduct Working Group Shares First Transparency Report
November 25, 2025 01:51 PM UTC
HoloViz
Rich parameters & reactive programming with Param: 2.3 release
Release announcement for Param 2.3, including improved docstrings, two new Parameter attributes default_factory and metadata, the new ParameterizedABC abstract base class, and more!
November 25, 2025 12:00 AM UTC
Brian Okken
PythonTest Black Friday Deals 2025
Save up to 50% on courses and the pytest book.
The Complete pytest Course bundle
Use BLACKFRIDAY to save 20% off through November.
This code is intended to match lots of 10-20% off deals around
Use SAVE50 to save 50% off through November
This code is intended to match the PragProg deal below
Why leave both in place?
No reason, really. I just thought it’d be fun to have a “choose your own discount” thing.
November 25, 2025 12:00 AM UTC
Seth Michael Larson
WebKit browsers see telephone numbers everywhere
November 25, 2025 12:00 AM UTC
November 24, 2025
Rodrigo GirĂŁo SerrĂŁo
Generalising itertools.pairwise
In this article you will learn about itertools.pairwise, how to use it, and how to generalise it.
In this tutorial you will learn to use and generalise itertools.pairwise.
You will understand what itertools.pairwise does, how to use it, and how to implement a generalised version for when itertools.pairwise isn't enough.
itertools.pairwise
itertools.pairwise is an iterable from the standard module itertools that lets you access overlapping pairs of consecutive elements of the input iterable.
That's quite a mouthful, so let me translate:
You give
pairwisean iterable, like"ABCD", andpairwisegives you pairs back, like("A", "B"),("B", "C"), and("C", "D").
In loops, it is common to unpack the pairs directly to perform some operation on both values.
The example below uses pairwise to determine how the balance of a bank account changed based on the balance history:
from itertools import pairwise # Python 3.10+
balance_history = [700, 1000, 800, 750]
for before, after in pairwise(balance_history):
change = after - before
print(f"Balance changed by {change:+}.")
Balance changed by +300.
Balance changed by -200.
Balance changed by -50.
How to implement pairwise
If you had to implement pairwise, you might think of something like the code below:
def my_pairwise(iterable):
for prev_, next_ in zip(iterable, iterable[1:]):
yield (prev_, next_)
Which directly translates to
def my_pairwise(iterable):
yield from zip(iterable, iterable[1:])
But there is a problem with this implementation, and that is the slicing operation.
pairwise is supposed to work with any iterable and not all iterables are sliceable.
For example, files are iterables but are not sliceable.
There are a couple of different ways to fix this but my favourite uses collections.deque with its parameter maxlen:
from collections import deque
from itertools import islice
def my_pairwise(data):
data = iter(data)
window = deque(islice(data, 1), maxlen=2)
for value in data:
window.append(value)
yield tuple(window)
Generalising itertools.pairwise
pairwise will always produce pairs of consecutive elements, but sometimes you might want tuples of different sizes.
For example, you might want something like “triplewise”, to get triples of consecutive elements, but pairwise can't be used for that.
So, how do you implement that generalisation?
In the upcoming subsections I will present different ways of implementing the function nwise(iterable, n) that accepts an iterable and a positive integer n and produces overlapping tuples of n elements taken from the given iterable.
Some example applications:
nwise("ABCD", 2) -> ("A", "B"), ("B", "C"), ("C", "D")
nwise("ABCD", 3) -> ("A", "B", "C"), ("B", "C", "D")
nwise("ABCD", 4) -> ("A", "B", "C", "D")
Using deque
The implementation of pairwise that I showed above can be adapted for nwise:
from collections import deque
from itertools import islice
def nwise(iterable, n):
iterable = iter(iterable)
window = deque(islice(iterable, n - 1), maxlen=n)
for value in iterable:
window.append(value)
yield tuple(window)
Note that you have to change maxlen=2 to maxlen=n, but also islice(iterable, 1) to islice(iterable, n - 1).
Using tee
Another fundamentally different way of implement nwise is by using itertools.tee to split the input...
November 24, 2025 06:36 PM UTC
EuroPython Society
New EuroPython Society Fellow in 2025
A warm welcome to Martin Borus as the second elected EuroPython Society Fellow in 2025.
EuroPython Society Fellows
EuroPython Society Fellows have contributed significantly towards our mission, the EuroPython conference and the Society as an organisation. They are eligible for a lifetime free attendance of the EuroPython conference and will
November 24, 2025 05:58 PM UTC
Trey Hunner
Python Black Friday & Cyber Monday sales (2025)
November 24, 2025 04:00 PM UTC
Nicola Iarocci
Flask started as an April Fool's joke
The story that the Python micro web framework Flask started as an April Fool’s joke is well known in Python circles, but it was nice to see it told by Armin Ronacher himself1.
I’m fond of Flask. It was a breath of fresh air when it came out, and most of my Python open-source work is based on it.
-
The video is produced by the people who also authored the remarkable Python: The Documentary. ↩︎
November 24, 2025 02:29 PM UTC
Real Python
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.
November 24, 2025 02:00 PM UTC
Python Software Foundation
Python is for Everyone: Grab PyCharm Pro for 30% offâplus a special bonus!
November 24, 2025 10:44 AM UTC
Python Bytes
#459 Inverted dependency trees
Topics include PEP 814 â Add frozendict built-in type, Material for MkDocs Zensical, Tach, and.
November 24, 2025 08:00 AM UTC
Zato Blog
Automation in Python
Automation in Python
How to automate systems in Python and how the Zato Python integration platform differs from a network automation tool, how to start using it, along with a couple of examples of integrations with Office 365 and Jira, is what the latest article is about.
†Read it here: Systems Automation in Python.
More resources
†Python API integration tutorials
†What is an integration platform?
†Python Integration platform as a Service (iPaaS)
†What is an Enterprise Service Bus (ESB)? What is SOA?
†Open-source iPaaS in Python
November 24, 2025 03:00 AM UTC
November 22, 2025
Daniel Roy Greenfeld
TIL: Default code block languages for mkdocs
Really useful for making inline code examples have code highlighting.
November 22, 2025 12:08 PM UTC
Brett Cannon
Should I rewrite the Python Launcher for Unix in Python?
I want to be upfront that this blog post is for me to write down some thoughts that I have on the idea of rewriting the Python Launcher for Unix from Rust to pure Python. This blog post is not meant to explicitly be educational or enlightening for others, but
November 22, 2025 12:18 AM UTC
Bruno Ponne / Coding The Past
Data Science Quiz For Humanities
Test your skills with this interactive data science quiz covering statistics, Python, R, and data analysis.
November 22, 2025 12:00 AM UTC
Stéphane Wirtel
Claude Code : comment un assistant IA m'a fait gagner des jours de développement
TL;DR
AprĂšs une semaine d’utilisation intensive de Claude Code1 pendant PyCon Ireland et sur mes projets personnels, je suis complĂštement bluffĂ© par les gains de productivitĂ©. L’outil m’a permis de migrer automatiquement le site Python Ireland de Django 5.0 vers 5.2 et Wagtail 6.2 vers 7.2, de dĂ©velopper un outil de conversion de livres scannĂ©s en 5 minutes, et de gĂ©nĂ©rer une documentation complĂšte en quelques minutes. Contrairement Ă Cursor ou Windsurf, Claude Code s’intĂšgre partout (PyCharm, VS Code, Zed, Neovim, ligne de commande), ce qui en fait un vĂ©ritable game changer pour les dĂ©veloppeurs professionnels.
November 22, 2025 12:00 AM UTC
Armin Ronacher
LLM APIs are a Synchronization Problem
November 22, 2025 12:00 AM UTC
November 21, 2025
Trey Hunner
Python Morsels Lifetime Access Sale
