PEP-703 is a proposal that came out of the no-GIL project, and this week, the Python Steering Council announced that they had accepted it! This article was written a couple of weeks before the announcement, and it summarizes the technical thinking and progress that had happened up to that point. (See also: PEP-703 discussion.)
TL;DR
A historic moment: PEP 703, the no-GIL proposal, is formally accepted, CPython gains official iOS support via PEP 730, and rip—a Rust-built pip—promises faster installs.
Articles & Tutorials
× 12This article explores integrating advanced features into your Django application, such as implementing a WYSIWYG editor, user authentication and authorization, real-time communication features, asynchronous tasks, integrating Elasticsearch for full-text search, and test automation and continuous integration.
Introduces a simple task queue implemented using multiprocessing.Pool, multiprocessing.Queue, and Redis, which enables basic task scheduling and processing.
Last week's newsletter featured a rant about how Flask's backwards compatibility is bad (see below), and this is a response from one of Flask's maintainers.
This is a follow-up to last week's We have to talk about Flask, where the author received some positive and negative feedback and continues the conversation, mainly rebutting some points.
rip is a PyPI package parsing and installation library written in Rust, or a pip written in Rust. It attempts to build a solid bridge between Conda and PyPI, and the article introduces some of the work it does to overcome the main differences between the two (metadata extraction, Wheel file metadata, dependency specification).
How can you use Rust to implement critical code to improve the performance of a Python program? The article optimizes the implementation of the k-CorrSet problem in several ways, resulting in a significant speed improvement.
What is a lambda expression and a lambda function? How does a lambda function differ from other functions in Python? What are its limitations, when should you avoid using it, and where is it commonly used?
Video translation is the process of taking a video in its original language and displaying it with subtitles and dubbing in another language. This article is a low-cost attempt, with the following tech stack: speech recognition using the openai-whisper offline model, text translation using the Google API, and text-to-speech using Microsoft Edge TTS.
Integration testing is the practice of testing a group of code units as a whole. This article introduces methods for integration testing with FastAPI, including how to mock authentication, how to mock external APIs, how to mock MongoDB interactions, and how to mock AWS S3.
latexify_py is a Google open-source Python package that can compile Python source code snippets into corresponding LaTeX expressions. This article introduces how to use it, including how to convert Python functions to formulas, Latexify parameter settings, and Latexify pseudocode generation.
🎁 Python Trending Weekly 🎁 organizes its content into seasons, with every 30 issues forming a season. The highlights from the first season have been compiled for your convenience. You can access them online here (Chinese).
Projects & Resources
× 12A mature task queue library in Python, supporting message brokers like RabbitMQ and Redis, and it's easy to integrate with mainstream web frameworks. (22.4k stars)
RQ (Redis Queue) is a simple job queue based on Redis, which is easy to use and supports features like queuing, scheduling, and retries. (9.2k stars)
A simple, lightweight task queue library supporting Redis, SQLite, file system and in-memory storage, and supporting multi-process, multi-thread or Greenlet task execution models. (4.7K stars)
A pip implementation in Rust, supporting downloading, parsing, and installing PyPI packages, with support for wheels (partially) and planned support for sdist files.
Selenium is one of the best libraries for web automation, and Helium is a wrapper around it that makes web automation even easier. In addition to a high-level API, it simplifies web driver management, supports interaction with elements in nested iFrames, supports implicit waits, and supports explicit waits. (3.6k stars)
It supports parsing YAML and JSON resume files, creating a latex file, and then rendering it to PDF. Currently, there is only one theme available.
Compile Python source or AST to LaTeX, enabling pretty printing of compiled functions with IPython. (6.5k stars)
A programming assistant that runs locally on your Macbook, with very easy setup and usage. (2.6k stars)
For searching points in a space that are close to a given query point, the major difference from other similar libraries is that it can use a static file as an index, which enables sharing the index across processes. It is used by Spotify for music recommendations. (12.1k stars)
Performs fast approximate nearest neighbor search on a collection of vectors in memory. Also from Spotify, it handles billions of queries per day, serving a large user base. It has a higher recall rate than annoy.
It aims to build an "intelligent agent" in the field of testing, integrating large models and engineering technology in the field of quality, and promoting the upgrading of quality technology generations. The TestGPT-7B model, which is open source, is based on CodeLlama-7B.
Waymo is an autonomous driving company under Google, and Waymax is its open-source, lightweight, multi-agent, JAX-based autonomous driving simulator that can be easily distributed and deployed on hardware accelerators such as GPUs and TPUs.
Podcasts & Videos
× 3A 2012 talk by Armin Ronacher, the lead author of Jinja, where he explains the design of Jinja's compiler infrastructure, why it was designed that way, and how it evolved over different versions. (Slides: here)
Armin Ronacher's 2014 talk compares Jinja and Django's templating, analyzing the historical reasons for their very different designs. (Slides: speakerdeck.com/mitsuhiko/lets-talk-about-templates)
JupyterCon is an annual event focused on Jupyter applications and tools, covering topics such as data science, machine learning, scientific computing, data visualization, education, and research.