The author has open-sourced multiple Python projects including PyOxidizer and python-build-standalone. However, with his programming interests shifting toward Rust and his new roles as husband and father taking up time and energy, he's choosing to prioritize family and is looking for new maintainers for these open source projects.
TL;DR
A maintainer chooses family over open source with disarming honesty; Musk open-sources Grok, CPython without the GIL gets a hands-on test, and ruff and uv keep rising.
Articles & Tutorials
× 12How do you remotely wake up your home computer when it's in sleep mode? The author used a Raspberry Pi single-board computer + a simple Python web page + systemd service to send data packets to the computer's network controller, achieving remote machine wake-up.
Compared to statically typed languages, Python consumes a lot of memory. This article explores Python's memory model: how objects are allocated, where they're stored, and how they're eventually cleaned up. It introduces simple techniques to significantly improve memory usage.
What does the "$" symbol match in regular expressions? How does Python's re.MULTILINE mode affect string matching? Do different programming languages behave the same way? When should you use "\z" and "\Z"?
Dunder methods are special methods that start and end with double underscores, like __init__(). Python has over 150 special dunder methods. This article categorizes and provides a comprehensive list of them.
Python has rich libraries for internationalization and localization support. This article explains how to use the gettext library for language internationalization and how to manage localization resources.
Qwen is a large language model released by Alibaba. The author built a Qwen-based AI Q&A assistant on a Win10 system. The content includes environment setup, model downloading, and using transformers to implement model conversation functionality.
"If you don't know how compilers work, then you don't know how computers work." The author develops a Lisp interpreter using Python, providing detailed coverage of Scheme syntax and deep exploration of how interpreters/computers work.
Correctly parsing URLs is harder than you might think - they've changed dramatically since being introduced in 1994. Python's standard library urllib doesn't follow any URL specification. This article introduces two WHATWG-compliant parsing libraries: ada-python and can_ada. The latter is 2x faster than the former, and the former is 2x faster than urllib.parse.
The core idea of duck typing is "if it walks like a duck and quacks like a duck, then it is a duck." Type is determined by an object's behavior, not by rigid definitions. This comprehensive article provides detailed coverage of duck typing: what it is, how to use it, its pros and cons, and solutions to address duck typing's shortcomings.
Introduces the communication flow between PostgreSQL server and client, implementing a minimal server using Python.
The author developed two Python frameworks last year. This article shares what he learned while building frameworks. Some advice includes: define your anti-goals, understand what already exists, think interface-first, use it before it's ready, one sample isn't enough, prioritize documentation, etc.
🎁Python Trending Weekly🎁 Every 30 issues makes a season, and the highlights from the first season have been compiled for easy reference. Online access: Python Trending Weekly Season 1 Highlights Collection (Issues 1~30)
Projects & Resources
× 12This week's hottest project is definitely Musk's almost-delayed Grok large language model, with an impressive 314B parameters, a mixture of 8 experts, and a maximum context length of 8192 tokens. (43K stars)
An open source intelligence assistant based on GPT-4 that efficiently collects and analyzes information from the paid DeHashed service, helpful for cybersecurity and data breach investigations.
A Python logging library emphasizing structured and type-safe logging, compatible with the logging standard library, supporting JSON, logfmt, and beautiful console log output. (3.1K stars)
A Python debug tool that, like debugging core dump files in Linux, supports preserving current call stack frames when exceptions occur or at any point in the program, then debugging through pdb. Supports global hooks and remote server debugging. (Contributed by @cocolato)
A WHATWG-compliant URL parser also used in projects like Node.js. 4x faster than the standard library urllib.
A proof-of-concept project that can serve as a template for building and customizing your own CRM solutions, focusing on easy integration and scalability.
A PyTorch toolkit designed for quickly and easily creating advanced speech and text processing technologies, accelerating conversational AI development (i.e., voice assistants, chatbots, and large language models). (7.7K stars)
Provides a very simple and unified API for handling configuration files in various formats, supporting JSON, ini, Pickle, XML, Java properties, YAML, TOML, and more.
An advanced technical community focused on optimizing Llama models for Chinese and building upper-layer applications. Regularly organizes online events, technical seminars, and experience sharing to promote innovative exchanges among members. (9K stars)
Packages Python applications into binaries (APK, AAB, and AAR) that run on Android devices, supporting multiple CPU architectures and most pure Python packages plus some popular C-dependent packages (like numpy, sqlalchemy). (8K stars)
Quickly generate images from sketches, convert night images to day (or vice versa), convert sunny images to rainy, and more.
Build HTML pages using React-like components, designed to work with htmx.org with almost no JavaScript required. Backend based on the Starlette framework.
Podcasts & Videos
× 2The CPython main branch has merged a switch to disable GIL. This video shows what Python performance looks like without GIL.
ruff and uv come from the same team, bringing very promising impact to Python's foundational toolchain. This podcast features a conversation with Charlie Marsh. (Also: another similar topic podcast uv - The Next Evolution in Python Packages?)
Book Giveaway
Irregular giveaway events! This week we're giving away 5 copies of "Problem Solving with Algorithms and Data Structures using Python (3rd Edition)". Drawing date: March 29th. Send the number "8043" to the Python Cat WeChat public account to get the lottery mini-program code.
This book is a pioneering work describing data structures and algorithms using Python, gathering the author's years of practical experience and thoroughly explaining how to efficiently implement various algorithms through a series of storage mechanisms in Python. This book gives you deep understanding of Python data structures, recursion, searching, sorting, trees and graph applications, and more.