PythonHub
2.49K subscribers
2.35K photos
49.9K links
News & links about Python programming.
https://pythonhub.dev/
Download Telegram
How to use overloaded signatures in Python?

Sometimes a function takes multiple arguments of different types, and the return type depends on specific combinations of inputs. It’s often easy to understand by reading code, but how do you tell the type checker that this is the case? This is where the @overload decorator from the typing module comes handy.

https://borutzki.github.io/2026/02/07/how-to-use-overloaded-signatures-in-python.html
quip-protocol

This project implements a quantum blockchain using quantum annealing for proof-of-work consensus. It features competitive mining between quantum computers (QPU) and classical simulated annealing (SA) with a dynamic difficulty adjustment mechanism.

https://github.com/QuipNetwork/quip-protocol
Building a FOSS live streaming camera

The author walks through designing and building an open source live streaming camera using a Raspberry Pi and camera module, aiming for low-latency HDMI output suitable for event livestreams instead of consumer cameras. They discuss hardware selection (Pi 4B, HQ camera, lenses), software using picamera2, HDMI output and potential future improvements like custom PCBs and enclosures.

https://blog.brixit.nl/building-a-custom-live-streaming-camera/
Use your Claude Max subscription as an API with CLIProxyAPI

The post explains how to use CLIProxyAPI, a local proxy that takes your Claude Max subscription’s OAuth token and exposes it as an OpenAI-compatible API endpoint so you can use your subscription in tools that expect standard API keys. It covers setup steps, installation, and how this lets you avoid paying for separate API access while working with models like Claude Opus and Sonnet throu...

https://rogs.me/2026/02/use-your-claude-max-subscription-as-an-api-with-cliproxyapi/
CQRS in Python: Clean Reads, Clean Writes

When your FastAPI list endpoint starts pulling full documents just to compute derived fields, it’s usually a sign your read and write models are drifting apart. This video demonstrates how to refactor a tickets API (FastAPI + MongoDB) using CQRS, explain projections and eventual consistency, and show when this architecture is worth the added complexity, and when it’s not.

https://www.youtube.com/watch?v=Spp-uzXzzdE
Type-based alias analysis in the Toy Optimizer

The post explains the basics of Type Based Alias Analysis (TBAA), a compiler optimization that uses type information to determine whether different memory accesses can alias, enabling more aggressive optimization. It walks through a simple “toy” example to make the concept concrete and shows how TBAA improves generated code by removing unnecessary load and store barriers.

https://bernsteinbear.com/blog/toy-tbaa/
Visual Introduction to PyTorch

This article provides a visual, intuition-first guide to PyTorch, focusing on how tensors and computational graphs enable automatic differentiation. It strips away complex mathematical jargon to explain how the "Autograd" engine tracks operations to compute gradients for neural network training.

https://0byte.io/articles/pytorch_introduction.html
Runtime validation in type annotations

The article shows how Python’s typing.Annotated metadata can be used to attach runtime validators to type annotations and then automatically apply those validators when instances are created. It walks through extracting annotation metadata, handling callable validators, and improving error reporting so that annotated fields are validated and meaningful errors are thrown during object ini...

https://blog.natfu.be/validation-in-type-annotations/
nao

nao is a framework to build and deploy analytics agent. Create the context of your analytics agent with nao-core cli: data, metadata, modeling, rules, etc. Deploy a UI for anyone to chat with your agent and run analytics on your data.

https://github.com/getnao/nao
Coodie: A 4-year-old idea brought to life by AI (and some coffee)

After shelving the idea for four years, the author used AI to rapidly bootstrap Coodie, a Pydantic v2 based ODM for Cassandra and ScyllaDB inspired by Beanie for MongoDB. The result is a fully working library with declarative schemas, automatic table management, sync and async APIs, and chainable queries, built largely with AI assistance in a fraction of the time.

https://fruch.github.io/python/2026/02/24/coodie-ai-pydantic-odm