This week's big news: Google laid off the Python language team. Although fewer than 10 people, it included several Python core developers and steering committee members, sparking intense discussion. Python was one of Google's most-used languages in the early days, but sadly its proportion has been decreasing.
TL;DR
Google lays off its Python team ahead of I/O while Microsoft open-sources MS-DOS 4.0; PEP 686 proposes UTF-8 by default, and the CPython JIT saga continues.
Articles & Tutorials
× 12This is a GitHub document collecting usage tips from a FastAPI Expert. Current content includes: installing uvloop and httptools, using async for instead of while True on WebSockets, ignoring WebSocketDisconnect exceptions, using HTTPX AsyncClient instead of TestClient, and more.
This PEP has been accepted and will be included in Python 3.15 (yes, you read that right - about two and a half years from now). It proposes enabling UTF-8 mode by default. When enabled, text encoding for files, standard IO, and pipes will use UTF-8, making Python operations with them more convenient.
A comprehensive tutorial detailing the use of the Pydantic library. This library uses type hints to help you validate and serialize Python objects, making code more reliable, readable, concise, and easier to debug. It has rewritten core validation logic in Rust for exceptional performance.
What are the best practices for configuration file management and data I/O in Python projects? The article's main approach: use YAML files to record configuration and data class content, abstract dedicated configuration/data classes responsible for read/write operations. (Shared by @AlterNao1)
The author discovered that when making concurrent HTTPS requests with the requests library, enabling CA certificate verification takes 1-5 times longer than disabling it, mainly due to calling load_verify_locations(). The author submitted a PR to improve concurrent performance by avoiding reloading root certificates, and the article analyzes this issue.
Python 3.13 preview already includes a JIT compiler, but there's still limited information about it. The author plans to write a series of articles deeply analyzing Python JIT internals. This piece explains what happens in the CPython runtime before the JIT compiler starts.
Sleep sort is an interesting but impractical sorting algorithm, usually used for educational purposes. The article introduces what it is, the OS task scheduling process, and how to implement sleepsort using Python asyncio.
The Leibniz formula is historically significant as one of the earliest infinite series expressions for π. The article implements this formula's calculation in 3 languages, comparing performance between languages and across Python versions 3.8-3.12.
Trey Hunner is a prolific Python blogger, former PSF director, and regular at various Python events. The article shares his years of attending and organizing Python conferences, people he's met, and things he's learned. (PS. PyCon US 2024 will be held mid-month)
For loops are fundamental code structures in programming languages, but their current state and evolution across different languages is quite diverse. The author reflects on basic for loop formats, foreach/forstep syntax, expressiveness compared to while loops, and for loop extensions (map, reduce).
"10x engineers" represent an aspirational level - those whose productivity and impact far exceed their peers. The author believes these people have 7 important habits, including "code is written for humans, not computers," "use consistent standards," "write simple code," and more.
Projects & Resources
× 12An observability platform from the Pydantic team, featuring simple yet powerful dashboards, rich Python object display support, event loop telemetry, Python code profiling, and database query analysis.
An infrastructure automation tool that's fast and scales from one server to thousands. Perfect for ad-hoc command execution, service deployment, configuration management, etc. (3.2K stars)
Install and use Python in multiple isolated virtual environments, implementing most pipx functionality. Faster performance by using uv instead of venv and pip.
Interacts with Figma API to get file details and convert them to code. Supports placeholder text, multiple frames, and setting foreground colors based on background. (Note: Similar but more successful Tkinter-Designer with 8.3K stars)
A Python-implemented tag-based file/photo management system supporting cross-platform, multi-user, and managing several TBs of data. (1.5K stars)
Portable secure dumps using pdb interface, supporting unittest, pytest, and runtime exceptions.
An open-source software development tool competing with JIRA, Linear, and Asana for managing issues, sprints, and product roadmaps. Frontend uses TypeScript Next.js, backend uses Python Django - excellent full-stack learning project. (24.1K stars)
Combines LLM with Playwright to create scraping pipelines for websites, documents, and XML files. Just describe what you want to scrape, and it handles the rest automatically. (1.2K stars)
Automatically tests playback speed with daily updates. Includes CCTV central and satellite channels plus some local channels with smooth playback. Can also run on OpenWrt or Synology Docker.
A simple, effective tool for measuring ISP performance at home, testing multiple metrics like packet loss, latency, jitter, and DNS performance.
Converts untrusted files (like email attachments) to safe PDFs. Processes in sandbox by first converting files to PDF, then to raw pixel data, finally back to PDF. (3.2K stars)
Microsoft has open-sourced the MS-DOS 4.0 operating system. This version was actually released in 1988 and was the first DOS version to introduce a graphical user interface, making it historically significant. (28.3K stars)
Podcasts & Videos
× 2This Google document currently contains 864 Python talk videos, all hosted on YouTube, mainly from 2023 PyCon, PyData, EuroPython, and other events.
The most-watched video from the above list, using FastAPI + Jinja for backend and the trendy HTMX + Tailwind CSS for frontend. (Note: The video author's blog post introduces the implementation and source code repository)