skip to navigation
skip to content

Planet Python

Last update: March 31, 2026 04:44 PM UTC

March 31, 2026


Real Python

Adding Python to PATH

Learn how to add Python to your PATH environment variable on Windows, macOS, and Linux so you can run Python from the command line.

March 31, 2026 02:00 PM UTC

Quiz: Test-Driven Development With pytest

Test your TDD skills with pytest. Practice writing unit tests, following pytest conventions, and measuring code coverage.

March 31, 2026 12:00 PM UTC


PyCon

Introducing the 8 Companies on Startup Row at PyCon US 2026

March 31, 2026 09:00 AM UTC

March 30, 2026


"Michael Kennedy's Thoughts on Technology"

Raw+DC Database Pattern: A Retrospective

TL;DR; After migrating three production Python web apps from MongoEngine to the Raw+DC database pattern, I measured nearly 2x the requests per second, 18% less memory, and gained native async support. Raw+DC delivered real-world performance gains, not just synthetic benchmarks.


About a month ago, I wrote about a new design pattern I’m seeing gain traction in the software space: Raw+DC: The ORM pattern of 2026. This article generated a lot of interest and a lot of debate. The short version: instead of using an ORM or ODM, you write raw database queries paired with Python dataclasses for type safety. This gives AI coding assistants a much larger training base to work from, reduces dependency risk, and delivers comparable or better performance.

Putting Raw+DC into practice

Now that some time has passed and I’ve thought about it more, I’ve had a chance to migrate three of my most important web apps to Raw+DC: Talk Python the podcast, Talk Python Courses, and Python Bytes.

So how did it go? From a pure functionality perspective, it went great. There were maybe one to three problems per web app. This might not sound great, and I didn’t love it, but given this is thousands and thousands of lines of code per app, that’s a small percentage of issues, given how many things went right.

More importantly, I was able to remove a dependency on two faltering database libraries. Mongoengine, the one that I’m going to pull numbers from for Talk Python Training below, has not had a meaningful release in years. It was one of the two core blockers that prevented me from using async programming patterns on the website entirely.

How much faster is Raw+DC than MongoEngine?

I said I imagined that we would save in memory and CPU costs, but did it actually pan out in a practical application? After all, we saw that Robyn, the web framework, is 25 times faster than Flask. However, in practice, it was almost a dead even heat.

I’m thrilled to report that yes, the web app is much faster using Raw+DC.

Below is an apples-to-apples comparison for Talk Python Training using MongoEngine and the Raw+DC pattern.

Metric MongoEngine (ODM) Raw+DC Improvement
Requests/sec baseline ~1.75x 1.75x faster
Response time baseline ~50% less ~50% faster
Memory usage baseline 200 MB less 18% less

Raw+DC vs ODM/ORM requests per second graph

The memory story is really great as well. After letting the web app run for over 24 hours for each mode, we saw a 200 MB memory usage decrease using Raw+DC.

Raw+DC vs ODM/ORM memory usage

That amount of memory might still look high to you. This Raw+DC transformation actually facilitates future work that will cut it in half again, down to about 500 MB for the full app, up and running in production at equilibrium.

Is Raw+DC worth migrating to?

To me, this seems 100% worth it. I’ve gained four important things with Raw+DC.

  1. 1.75x the requests per second on the exact same hardware and codebase (sans data layer swap)
  2. 18% less memory usage with much more savings on the horizon
  3. New data layer natively supports async/await
  4. Removal of problematic, core data access library

All of these benefits and none of that even touches on whether or not this new programming model is better for AI (it is).

March 30, 2026 03:31 PM UTC


PyCharm

What’s New in PyCharm 2026.1

Welcome to PyCharm 2026.1. This release doesn’t just add features – it rethinks how you build, debug, and scale Python projects. From a brand-new debugging engine powered by debugpy to first-class uv support on remote targets and expanded JavaScript support in the free tier, this version is all about removing friction and letting you focus […]

March 30, 2026 03:31 PM UTC


Real Python

How to Use Ollama to Run Large Language Models Locally

Learn how to use Ollama to run large language models locally. Install it, pull models, and start chatting from your terminal without needing API keys.

March 30, 2026 02:00 PM UTC


PyCon

Support PyLadies: Donate to the PyLadies Auction at PyCon US 2026!

March 30, 2026 12:53 PM UTC


Mike Driscoll

Vibe Coding Pong with Python and pygame

Pong is one of the first computer games ever created, way back in 1972. If you have never heard of Pong, you can think of it as a kind of “tennis” game. There are two paddles, on each side of the screen. They move up and down. The goal is to bounce a ball between […]

The post Vibe Coding Pong with Python and pygame appeared first on Mouse Vs Python.

March 30, 2026 12:29 PM UTC


Real Python

Quiz: Using Jupyter Notebooks

Test your Jupyter Notebook skills: cells, modes, shortcuts, Markdown, server tools, and exporting notebooks to HTML.

March 30, 2026 12:00 PM UTC


Python Bytes

#475 Haunted warehouses

Topics include Lock the Ghost, Fence for Sandboxing, MALUS: Liberate Open Source, and Harden your GitHub Actions Workflows with zizmor, dependency pinning, and dependency cooldowns.

March 30, 2026 08:00 AM UTC

March 29, 2026


"Michael Kennedy's Thoughts on Technology"

Fire and Forget at Textual

If you read my Fire and Forget (or Never) about Python and asynchronous programming, you could think it’s a super odd edge case. But a reader/listener, Richard, pointed me at Will McGugan’s article The Heisenbug lurking in your async code. This is basically the same article, but in Will-style.

Will does say “This behavior is well documented, as you can see from this excerpt.” True, but the documentation got this emphasis and warning in Python 3.12 whereas the feature create_task was added in Python 3.6/3.5 timeframe. So it’s not just a matter of did we read the docs carefully. It’s a matter of did we reread the docs carefully, years later?

Luckily Will added some nice concrete numbers I didn’t have:

https://github.com/search?q=%22asyncio.create_task%28%22&type=code

This appears in over 0.5M separate code files on GitHub. To be clear, not every search result for create_task uses the fire-and-forget pattern, but just on the first page of results there are 5 instances.

If the design pattern to fix this is to:

  1. Create a global set
  2. When a task is added to the event loop, add it to the set
  3. Remove it from the set when it’s done

Wouldn’t it have been better for the Python team to add this to the event loop internally once and solve this problem for everyone globally across the entire Python ecosystem?

It doesn’t look like that’s going to happen. So make sure you double check your code for create_task. And don’t let the Heisenbugs bite.

And yes, I know about task groups. Several people told me that we could use task groups to hang on to the task. Yes, that’s true. But task groups are incongruent with the fire-and-forget design pattern. Why? Because you create the group in a context manager and then you wait for all the tasks in the group to be finished. That doesn’t allow you to fire off a task and then continue working. So task groups may or may not have fixed Will’s problem, but they don’t solve the one I was originally talking about.

March 29, 2026 04:37 PM UTC

March 28, 2026


EuroPython

Humans of EuroPython: Jodie Burchell

What does it take to run Europe’s largest Python conference? 🐍 Not budgets or venues—it’s people.

EuroPython isn’t powered by code alone, but by a vibrant network of volunteers who shape every session and welcome every attendee. From ensuring talks run seamlessly

March 28, 2026 06:20 PM UTC

March 27, 2026


Real Python

The Real Python Podcast – Episode #289: Limitations in Human and Automated Code Review

With the mountains of Python code that it's possible to generate now, how's your code review going? What are the limitations of human review, and where does machine review excel? Christopher Trudeau is back on the show this week with another batch of PyCoder's Weekly articles and projects.

March 27, 2026 12:00 PM UTC

Quiz: Interacting With REST APIs and Python

Test your Python REST API knowledge: consuming, building, HTTP methods, status codes, Flask, FastAPI, and Django basics.

March 27, 2026 12:00 PM UTC


Holger Krekel

Hello world!

Welcome to WordPress. This is your first post. Edit or delete it, then start writing!

March 27, 2026 02:32 AM UTC

March 26, 2026


Real Python

Quiz: Getting Started With Django: Building a Portfolio App

Test your Django basics: frameworks, projects, views, templates, models, URLs, and migrations with practical questions.

March 26, 2026 12:00 PM UTC


EuroPython

March Newsletter: Sponsorship Early Bird Ending, Programme Due Soon

Hey there! 👋 

Hope you&aposre all having a fantastic March. We sure have been busy and we’ve got some exciting updates for you as we gear up for EuroPython 2026. This year the conference will take place in Kraków, the city of castles

March 26, 2026 07:45 AM UTC


Brett Cannon

Why pylock.toml includes digital attestations

A Python project got hacked where malicious releases were directly uploaded to PyPI. I said on Mastodon that had the project used trusted publishing with digital attestations, then people using a pylock.toml file would have noticed something odd was going on thanks to the lock file including attestation data

March 26, 2026 03:59 AM UTC

March 25, 2026


Talk Python to Me

#542: Zensical - a modern static site generator

If you've built documentation in the Python ecosystem, chances are you've used Martin Donath's work. His Material for MKDocs powers docs for FastAPI, uv, AWS, OpenAI, and tens of thousands of other projects. But when MKDocs 2.0 took a direction that would break Material and 300 ecosystem plugins, Martin went back to the drawing board. The result is Zensical: A new static site generator with a Rust core, differential builds in milliseconds instead of minutes, and a migration path designed to bring the whole community along.

March 25, 2026 08:55 PM UTC


PyCharm

Expanding Our Core Web Development Support in PyCharm 2026.1

With PyCharm 2026.1, our core IDE experience continues to evolve as we’re bringing a broader set of professional-grade web tools to all users for free. Everyone, from beginners to backend-first developers, is getting access to a substantial set of JavaScript, TypeScript, and CSS features that were previously only available with a Pro subscription. React, JavaScript, […]

March 25, 2026 03:01 PM UTC


Real Python

How to Use Git: A Beginner's Guide

Learn how to track your code with Git using clear, step-by-step instructions. Use this guide as a reference for managing projects with version control.

March 25, 2026 02:00 PM UTC

Quiz: Using Data Classes in Python

Test your knowledge of Python data classes, namedtuple, immutability, auto-generated methods, inheritance, and slots.

March 25, 2026 12:00 PM UTC


Kevin Renskers

Building modern Django apps with Alpine AJAX, revisited

Nine months after adopting Alpine AJAX with Django, I've gone through template partials, Jinja2, and landed on an approach that's both fast and clean.

March 25, 2026 10:16 AM UTC


Antonio Cuni

Inside SPy, part 2: Language semantics

Inside SPy 🥸, part 2: Language semantics

This is the second post of the Inside SPy series. The firstpost was mostly about motivations andgoals of SPy. This post will cover in more detail thesemantics of SPy, including the parts which make it different from CPython.

We will talk about phases of execution, colors, redshifting, the very peculiar waySPy implements static typing, and we will start to dive into metaprogramming.

!!! Success "" Before diving in, I want to express my gratitude to my employer, Anaconda, for giving me the opportunity to dedicate 100% of my time to this open-source project.

March 25, 2026 12:00 AM UTC

March 24, 2026


PyCoder’s Weekly

Issue #727: Sunsetting Jazzband, Spyder, A/B Testing, and More (March 24, 2026)

March 24, 2026 07:30 PM UTC