Python Trending Weekly
ISSUE 93

Red Knot Type Checker Early Preview!

2025-03-15 Season 4

TL;DR

Why is 'if not list' twice as fast as len()? A microbenchmark dive into bytecode, plus the tail-call interpreter landing in Python 3.14 and PEP 779 setting the bar for free-threaded graduation.

Articles 11 Projects 12 Media 2
🦄

Articles & Tutorials

× 11
01 How to solve FastAPI's large file transfer problem? so1n.me

Why is FastAPI/Starlette slower than other frameworks when handling large file transfers? In file upload and download scenarios, the author compares the performance differences of various implementation approaches, analyzes the root causes, and shares multiple performance optimization solutions.

How to solve FastAPI's large file transfer problem?
02 Operationalizing Python – Part 1: Why Does It Hurt? leejustin.com

Python is great to write, but can be frustrating to maintain. The article analyzes some reasons why Python can feel painful, such as clashing programming cultures and package dependency management, and finally shares suggestions for improving maintainability.

03 Python Discord 2024 Survey Report pydis.wtf

The 2024 survey results from the Python Discord community, covering user programming experience, community engagement, learning resource usage, help seeking and providing, community activity experience, voice channel usage, and open source contribution intentions.

04 A Very (!) Early Play With Astral's Red Knot Static Type Checker jurasofish.github.io

The team behind Ruff and uv is developing a Python type checker aimed at becoming an alternative to mypy. The article introduces Red Knot's installation, configuration, and usage methods, and demonstrates its significant speed advantages through comparisons with mypy and performance testing.

05 Best Practises for A Performant Django Admin hodovi.cc

Addressing Django Admin's performance issues when handling large datasets, the article introduces various optimization strategies: limiting sortable fields, adjusting pagination size, using estimated counts, caching, optimizing search fields, etc.

06 PEP 776 – Emscripten Support peps.python.org

PEP-776 proposes adding Emscripten as Tier 3 support in Python 3.14. Emscripten is a compiler toolchain that can compile C/C++ code to WebAssembly/JavaScript, suitable for browsers and JavaScript runtimes like Node.js.

07 Binary search as a bidirectional generator mathspp.com

The article proposes a binary search implementation based on bidirectional generators, using Python generator's send method to dynamically adjust algorithm behavior. This method can be extended to unbounded search, providing new implementation ideas.

08 The Boolean Trap read.engineerscodex.com

The author points out that using boolean parameters in functions or APIs can easily cause problems, such as poor code readability, limited extensibility, and potential errors, suggesting using enums as an alternative.

09 Reinventing notebooks as reusable Python programs marimo.io

Marimo is a new type of notebook that, unlike traditional Jupyter notebooks, saves as Python files, solving pain points like version control, code reuse, and testing, while supporting import and script execution capabilities.

10 Python Programming and the Art of Knitting compucademy.net

What relationship could coding with code and knitting with yarn possibly have? Besides requiring patience, logic, and creativity, the article shares several interesting parallels.

11 The "Active Enum" Pattern blog.glyph.im

The article points out that traditional enums have problems like maintenance difficulties and separation of behavior from data, thus proposing the "Active Enum" pattern, making enums not just data containers but also actively executing related operations. It demonstrates specific code examples, revealing its advantages, potential problems, and corresponding solutions.

🐿️

Projects & Resources

× 12
01 docs: A collaborative note taking, wiki and documentation platform that scales github.com

A collaborative document editor developed with Django and React, serving as an open source alternative to Notion, Outline, and Confluence. (8.9K stars)

docs: A collaborative note taking, wiki and documentation platform that scales
02 mcp-tool-kit: Agentic abstraction layer for building high precision vertical AI agents written in python github.com

MCP (Model Context Protocol) middleware for developing high-precision vertical AI agents.

03 eventure: A powerful event-driven framework for simulations, games, and complex systems github.com

A pure Python event-driven framework with features: event-driven, event sourcing, tick-based system, advanced event querying, out-of-the-box examples, type safety.

04 html5lib-python: Standards-compliant library for parsing and serializing HTML documents and fragments in Python github.com

A pure Python HTML parsing library compliant with WHATWG HTML specifications. (1.2K stars)

05 Run Python Online: Run Python code in the browser cliprun.com

A website for executing Python scripts online, providing a Python compiler and IDE in the browser, with built-in common Python libraries and support for file upload/download.

06 rusty-graph: High-performance graph database library developed in Rust github.com

Efficiently converts SQL relational data into knowledge graphs, implementing high-performance computing through Rust at the bottom layer, providing Python bindings to lower the usage barrier.

07 aiopandas: Lightweight Pandas monkey-patch that adds async support to map, apply, applymap, aggregate, and transform github.com

Uses monkey patching to add async support to Pandas' map, apply, applymap, aggregate, and transform methods.

08 basic-memory: Build persistent semantic graphs from AI assistant conversations github.com

A knowledge management system that uses conversations with large models to build persistent knowledge, saved as Markdown files.

09 Python Developer Tooling Handbook pydevtools.com

An online e-book aimed at helping you understand the complex ecosystem of developing Python packages: What exactly are uv, Poetry, Flit, Setuptools, and Hatch? What are their pros and cons? How to compare and choose? Additionally, it covers content on code review, formatting, and dependency management.

10 mcp-agent: Build effective agents using Model Context Protocol and simple workflow patterns github.com

A simple, composable agent development framework using MCP protocol and all patterns described in Building Effective Agents. (1.6K stars)

11 InkyPi: E-Ink Display with a Raspberry Pi and a Web Interface to customize and update the display with various plugins github.com

Open source, customizable E-Ink display providing a web interface usable on any networked device, easy to install and configure, supports timed playlists. (1K stars)

12 physicsnemo: Open-source deep-learning framework for building, training, and fine-tuning deep learning models using state-of-the-art Physics-ML methods github.com

Builds, trains, and fine-tunes deep learning models using state-of-the-art SciML methods. Provides tools and optimization pipelines to develop AI models that combine physical knowledge with data for real-time predictions. (1.3K stars)

🐢

Podcasts & Videos

× 2
01 SPA vs. HTMX for Your Next Web Project with Chris May djangotv.com

The video explores factors influencing the choice between Single Page Applications (SPA) and server-side rendered applications, such as state management, user experience management, performance and scalability, project constraints, and development team expertise.

02 Python developers just use Postgres with Dawn Wages talkingpostgres.com

Talking Postgres podcast discusses why so many Python and Django developers have a special fondness for Postgres? The guest is the Python Software Foundation chair, whose new book "Domain-Driven Django" has a chapter titled "Just Use Postgres".

ESC
↑↓ select · ↵ open175 issues