Django Query Optimization, Marimo, Self-contained Python scripts with uv and more
with some more interesting news, articles, packages and projects
News
PyOhio CFP is Open
The CFP is currently Open through April 27th.
PEP 751 is accepted
There’s currently no standard for creating an immutable record, like a lock file, that defines both direct and indirect dependencies for a virtual environment. This PEP proposes a new file format to ensure reproducible installations in Python environments.
Where to Find the PSF Online
Articles
How to build Hot Module Replacement in Python
Hot-reloading in Python can be slow since the entire server process must be restarted from scratch. The Tach
package speeds this up by building a dependency map. Evan Doyle explained how it works with an interesting example.
# Evan Doyle
Django Query Optimization - Defer, Only, and Exclude
We all know that SELECT * FROM table_name
is less efficient than selecting specific columns. The same applies to Django ORM, where you can optimize application performance using defer()
and only()
. If you want to learn how to use them, check out this article by Nik Tomazic.
# Nik Tomazic
Reinventing notebooks as reusable Python programs
If you use Jupyter notebooks often, you’ve probably faced issues like small edits leading to big Git diffs or difficulties reusing code across notebooks. Marimo is a good alternative that tackles these problems. In this article, Akshay, Myles and Dylan explained how Marimo solves these issues.
# Akshay, Myles and Dylan
Self-contained Python scripts with uv
If you wrote a script and need to run it, installing dependencies and setting up a virtual environment can feel like extra effort for a small script. A neat alternative is using # /// script
tags (Inline script metadata) in the Python script. Tucker Beck shared a great example in this article, demonstrating how he did it using uv
.
# Tucker Beck
Implementation of all RL algorithms in a simpler way
Fareed Khan shared a repository with Jupyter notebooks that provide a clear understanding of RL algorithms like PPO, SAC, A3C and more. Each notebook includes both theory and code to help you understand the concepts.
# Fareed Khan
Interesting Packages and Projects to Explore
Cookiecutter Data Science - A logical, reasonably standardized, but flexible project structure for doing and sharing data science work
Memray - memory profiler for Python
maestro - A command-line tool to play songs (or any audio, really) in the terminal.
Niquests - simple, yet elegant, HTTP library. It is a drop-in replacement for Requests, which is under feature freeze.
nbdime - Diff and merge of Jupyter Notebooks
About Upcoming Python Events
Leipzig Python User Group - Monatliches Treffen
April 8, 2025
Python Meeting Düsseldorf - April 2025
April 9, 2025
PyCologne Discussions
April 9, 2025
Python Ireland April 2025 Meetup
April 9, 2025
Python Atlanta Meetup
April 10, 2025
PyTexas 2025
April 11 – 13, 2025
SpaceCon 2025
April 11, 2025
IndyPy - Developer Tools Showdown
April 15, 2025