Python Weekly (Issue 696 April 24 2025)

Welcome to issue 696 of Python Weekly. Let's get straight to the links this week.

From Our Sponsor
Accelerate HubSpot app development with revamped platform tools. HubSpot's AI-driven ecosystem offers more extensibility, better APIs, and a multitude of new possibilities. Start building faster than ever before!

Articles, Tutorials and Talks

This guide is designed for product and engineering teams exploring how to build their first agents, distilling insights from numerous customer deployments into practical and actionable best practices. It includes frameworks for identifying promising use cases, clear patterns for designing agent logic and orchestration, and best practices to ensure your agents run safely, predictably, and effectively.

Trail of Bits is developing a high-performance, Rust-backed ASN.1 API for Python's PyCA Cryptography to address security and speed gaps in existing libraries. The new API offers declarative dataclass-style syntax, reduces parser differentials, and integrates with cryptographic workflows (e.g., X.509, Sigstore) to modernize ASN.1 handling in Python.

Step-by-step guide to integrating Meilisearch with Django, complete with automatic indexing, typo tolerance, and relevant filtering capabilities.

This post highlights customizable UI packages like Dracula, Django Daisy, and Unfold, offering dark modes, Bootstrap/TailwindCSS integrations, and enhanced features. These themes modernize the admin interface while maintaining Django's rapid prototyping core, with options ranging from simple CSS overrides to full modular dashboards.

Avoid writing custom init methods in Python; use @dataclass for attribute definition and @classmethod factories for object creation. This approach ensures valid instances, simplifies testing, and supports async/error-prone operations, while maintaining type safety with NewType

Sparsely-gated Mixture of Experts (MoE) replaces dense feed-forward layers with specialized, selectively-activated experts, boosting model capacity without proportional computational cost. By routing tokens to top-k experts via learned gates, MoE maintains efficiency while enabling larger, more capable models like Mixtral's 8x7B architecture with 13B active parameters per token.

The article introduces a custom ProcessThreadPoolExecutor in Python, designed to efficiently handle workloads that are primarily I/O-bound but include CPU-intensive tasks, by combining threading and multiprocessing. This hybrid approach addresses limitations of ThreadPoolExecutor and ProcessPoolExecutor when used separately, offering improved performance and resource utilization.

Reimplementing Haskell lazy infinite lists using Python generators.

Python integrated 15,000 lines of verified HACL cryptographic code into its core, replacing vulnerable implementations with formally proven algorithms for hashing and HMAC.* This 2.5-year effort introduced automated updates, strict abstraction patterns, and resilience to memory failures while maintaining backward compatibility across 50+ toolchains.

The untold story of the craziest __init__ I’ve ever seen.

This shows you 10 essential tips to keep your code simple, maintainable, and easy to work with.

Learn to build a Python tool using Pandas, Streamlit, and Plotly to automate personal finance tracking by analyzing bank statements, categorizing transactions, and generating visual dashboards. The tutorial includes file upload handling, editable dataframes, and interactive charts for expense analysis.

The author built an AI-powered Teams bot using Azure OpenAI Service to query their team's dynamic Azure DevOps Wiki, automating data ingestion via Python scripts and Azure AI Search Indexers. The solution includes custom metadata integration for source linking and highlights challenges like SDK limitations and deployment security considerations.


Interesting Projects, Tools, and Libraries

100-line LLM framework. Let Agents build Agents!

Open source multi-modal RAG for building AI apps over private knowledge.

A framework that enables AI agents to control full operating systems within high-performance, lightweight virtual containers. It delivers up to 97% native speed on Apple Silicon and works with any vision language models.

Minimal and annotated implementations of key ideas from modern deep learning research.

Turns Codebase into Easy Tutorial with AI.

Lets make video diffusion practical!

Your agentic CLI developer.

MacOS menu-bar utility to adjust Apple Silicon GPU VRAM allocation.

A Large-Scale, Challenging, Decontaminated, and Verifiable Mathematical Dataset for Advancing Reasoning.

A UI Based FastAPI Project Generation tool.

Agentfy is a modular microservices architecture designed to process user requests and execute workflows across multiple social media platforms.

A Better, Faster, and Simpler Python Visualization Library.

A portable Actor System for C++ and Python.

MCP server for operating on Markdown knowledge bases.

Fully neural approach for text chunking.


Upcoming Events and Webinars

There will be a workshop, Open source, open pipelines: Data ingestion with modern data stack.

There will be a talk, Build a Virtual Guitar Tuner and Effects Suite with Python.

There will be a talk, BeeAI: An open-source platform to discover, run, and compose AI agents from any framework followed by Hack session - first steps with BeeAI.


Our Other Newsletters

Programmer Weekly - A free weekly newsletter for programmers.

Founder Weekly - A free weekly newsletter for entrepreneurs featuring best curated content, must read articles, how to guides, tips and tricks, resources, events and more.