PythonHub
2.54K subscribers
2.35K photos
50.2K links
News & links about Python programming.
https://pythonhub.dev/
Download Telegram
tracesage

tracesage adds local, zero-infra tracing to LangChain/LangGraph agents in two lines, it captures every chain, tool, and LLM call to SQLite and shows the run as a live graph and timeline in your browser. Open source, pip install, MIT licensed.

https://github.com/kjgpta/tracesage
Showcasing allauth IdP: build an MCP server

This article demonstrates how to build a Model Context Protocol (MCP) server using Django and django-allauth, with OpenID Connect (OIDC) authentication handled by the allauth.idp package. It shows how MCP hosts such as Claude can dynamically register and authenticate clients without relying on separate third-party identity providers.

https://allauth.org/news/2026/05/idp-demo-mcp-server/
Libraries for your Python Polars workflows

The post highlights a set of Python libraries that work natively with Polars, letting you stay in the Polars ecosystem for validation, tables, visualization, and LLM-assisted analysis.

https://opensource.posit.co/blog/2026-06-04_libraries-for-python-polars/
How I made dependency injection in Python 130× faster: from reflection to compiling the graph

The post shows how a Python dependency injection container was optimized from ~53 µs to 0.40 µs per resolve by caching plans, eliminating unnecessary checks, and compiling dependency graphs into generated code. Along the way, it demonstrates practical performance engineering techniques, including code generation, common-subexpression elimination, fuzz testing, and reproducible benchmarking

https://vshulcz.hashnode.dev/python-dependency-injection-130x-faster
How to build your first Scrapy extension

This tutorial uses a simple audio notification plugin to explain how Scrapy extensions work, covering signals, lifecycle hooks, settings, testing, and packaging. It provides a practical introduction to extending Scrapy with custom functionality while showcasing common patterns used across the ecosystem.

https://www.zyte.com/blog/how-to-build-your-first-scrapy-extension/
Array API adoption: what to do with compiled code

The post examines how Array API compatibility and JIT compilation can modernize legacy scientific Python code for GPUs and multicore CPUs. The results suggest developers can achieve significant performance gains across hardware platforms without maintaining specialized accelerator-specific code.

https://labs.quansight.org/blog/array-api-aot-jit
The Fastest Python Struct?

The article explores the performance tradeoffs of Python's various struct-like types, focusing on startup and type-definition costs rather than runtime business logic. Extensive benchmarks reveal that NamedTuple sits in the middle of the pack, while msgspec and C-backed implementations deliver the fastest type creation and startup times.

https://www.crumpledpaper.tech/2026-06-21-python-struct-profiling/
Write a coding agent from first principles

This tutorial will show you how to create your own coding agent from first principles. By doing so, you'll understand how coding agents work under the hood.

https://mathspp.com/blog/write-a-coding-agent-from-first-principles
PixelRAG

PixelRAG replaces traditional text-based web RAG with a pixel-native approach that retrieves and reasons over webpage screenshots. By preserving visual structure and using vision-language models, it aims to improve retrieval accuracy and web understanding.

https://github.com/StarTrail-org/PixelRAG
Wagtail as Django admin on steroids

Wagtail can be used as a drop-in replacement for Django Admin, providing a more polished UI and powerful customization capabilities. The article demonstrates how developers can adopt Wagtail incrementally while retaining their existing Django architecture.

https://timonweb.com/wagtail/wagtail-as-django-admin-on-steroids/
You Don’t Need That Design Pattern

Using Python examples, the video explores the tradeoff between simplicity and abstraction, showing how design patterns can introduce unnecessary complexity when applied too early. It provides a practical rule of thumb for recognizing when a pattern adds value versus when it becomes overengineering.

https://www.youtube.com/watch?v=xns3InDkAiA
music-assistant / server

Music Assistant is a free, opensource Media library manager that connects to your streaming services and a wide range of connected speakers. The server is the beating heart, the core of Music Assistant and must run on an always-on device like a Raspberry Pi, a NAS or an Intel NUC or alike.

https://github.com/music-assistant/server