PythonHub Logo Python Hub Weekly Digest for 2026-03-22

This week in Python, a video revealed lesser-known techniques for Python dataclasses, and an interactive guide walked through Karpathy's 200-line GPT. A new Python binding for Apple's Foundation Models framework was introduced, and PEP 827 on Type Manipulation was published. Articles covered topics like serving private files with Django and S3, validating data with pointblank, FastAPI error handling, and the deprecation of confusing APIs like “os.path.commonprefix()”. New security releases for Python 3.10, 3.11 and 3.12 were announced. Interesting projects included Resume-Tailor, hermes-agent, and MedKit. Have a great week and happy coding!

💖 Most Popular

You’ve Been Underusing Dataclasses (These Tricks Are Wild)
The video demonstrates seven powerful, lesser-known techniques using Python dataclasses, including automatic class registration, lightweight validation, cached derived values, and context manager patterns. It also shows practical uses such as CLI generation and explains advanced features like InitVar, highlighting how dataclasses can enable cleaner and more expressive Python designs.

MicroGPT explained interactively
Walk through Karpathy's 200-line GPT from scratch. Tokenize names into integers, watch softmax convert scores to probabilities, step through backpropagation on a computation graph, explore attention heatmaps, and see a tiny model learn to generate plausible names.

python-apple-fm-sdk
Python bindings for access to the on-device model at the core of Apple Intelligence through the Foundation Models framework.

Comparing Python packages for A/B test analysis (with code examples)

PEP 827 - Type Manipulation has just been published


📖 Articles

Serving Private Files with Django and S3
The article shows how to securely serve private user files stored in Amazon S3 from a Django app by keeping the bucket private and generating time-limited pre-signed URLs when a user is authorized to access a file. This approach lets S3 handle file delivery directly while Django controls access, avoiding slow proxying through the app server and making the system more scalable.

Validating data with pointblank in python
One of the most common tasks of any organization is reviewing data to ensure that it is accurate and does not contain errors. Commonly, this is done by producing graphs or summary information like a median or mean and confirming that it looks reasonable. Pointblank is a newer tool that allows you to really dig into a dataset and task assumptions in a robust and reproducible manner.

FastAPI error handling: types, methods, and best practices
Learn FastAPI error handling with different types, methods, and best practices. Build robust APIs using custom exception handlers and practical examples.

Python 3.12.13, 3.11.15 and 3.10.20 are now available!
New security releases for 3.10, 3.11 and 3.12 are now available. (As these Python versions are now in security-fix-only mode, these are source-only releases, and there is no pre-set release cadence.)

Deprecate confusing APIs like “os.path.commonprefix()”
The article argues that confusing APIs like Python’s os.path.commonprefix() should be deprecated because their misleading naming and placement cause developers to misuse them and introduce security vulnerabilities. It shows how decades of confusion around this function led to real path-traversal bugs and concludes that unsafe or misleading APIs should be replaced by clearer alternatives ...

What Python's asyncio primitives get wrong about shared state

databricks-solutions / ai-dev-kit
Databricks Toolkit for Coding Agents provided by Field Engineering

Custom Data Structures in E-Graphs
The post explores how Egglog’s e-graph framework can be extended with custom container data structures to represent algebraic structures (like multisets) more efficiently and reduce expression blow-up during rewriting. It shows that by embedding structural invariants into the data representation and using higher-order functions, you can express powerful rewrite rules without explosive gr...

Designing for Model Swaps
When LLM providers ship breaking changes, a poor architecture turns a config tweak into a 400-line PR. This post introduces seam-driven design - five narrow interfaces (provider, prompt, tools, config, observability) each independently swappable - illustrated with a working FastAPI + LangChain reference app, a practical checklist, and two hands-on drills readers can run immediate

Update on array API adoption in scikit-learn
The article explains how scikit-learn is adopting the Python Array API standard, allowing machine-learning code to run on different array libraries (NumPy, PyTorch, CuPy) without rewriting algorithms. This enables the same scikit-learn models to automatically leverage accelerators like GPUs and improves interoperability across the scientific Python ecosystem.

Using tox to Test a Django App Across Multiple Django Versions
The article shows how to use tox to test a Django app across multiple Python and Django versions by creating isolated environments that install specific dependency combinations and run the same test suite. By defining a version matrix in tox.ini, developers can automatically verify compatibility across many Django releases and catch packaging or environment issues before users encounter them.

Unit testing your code’s performance, part 2: Catching speed changes
Got benchmarks in CI? You can (maybe) use tests to catch performance changes even earlier.

100 days 100 iot project with Micropython

Python Hub Weekly Digest for 2026-03-15

Python Hub Weekly Digest for 2026-03-08


⚙️ Projects

Resume-Tailor
The Resume Tailor is a small tool used to quickly and automatically tailor your resume to a job description. This allows you to have the best odds of getting your resume into the hands of actual humans.

hermes-agent
Hermes Agent is an open-source autonomous AI agent that you install on your own server or machine, where it lives persistently, learns over time, and builds reusable skills and memory across sessions instead of resetting like typical chatbots.

City2Graph
Transform geospatial relations into graphs for Graph Neural Networks and network analysis.

MedKit
MedKit is a high-performance, unified SDK that transforms fragmented medical APIs into a single, programmable platform. It provides a clean interface for OpenFDA, PubMed, and ClinicalTrials.gov, augmented with a clinical intelligence layer and relationship mapping.

seomachine
A specialized Claude Code workspace for creating long-form, SEO-optimized blog content for any business. This system helps you research, write, analyze, and optimize content that ranks well and serves your target audience.

code-graph-rag
Code-Graph-RAG builds knowledge graphs from multi-language codebases and enables AI-powered querying and editing. It uses Tree-sitter to parse ASTs across 11 languages, stores structural data in Memgraph, and translates natural language questions into Cypher graph queries. Unlike vector-based RAG, it preserves exact code relationships: call chains, inheritance hierarchies, and module dep...

Formualizer
The spreadsheet engine that actually evaluates formulas. Parse, evaluate, and mutate Excel workbooks from Rust, Python, or the browser.



← Previous

Project by Ruslan Keba. Since 2012. Powered by Python. Made in 🇺🇦Ukraine.