Both Meta's Pyrefly and Astral's ty are Python type checking tools developed based on Rust, and they both appeared at this year's PyCon Typing Summit. The article introduces their differences in development background, design philosophy, technical features and performance.
TL;DR
Pyrefly and ty square off as the new type checkers to beat, Pandas plans to swap NumPy for the faster PyArrow, and a virtual threads proposal sparks discussion alongside a 70-line MCP agent.
In this issue
× 28How to implement single-process multi-interpreter execution in Python versions before 3.12? The article introduces using dlopen and dynamic library loading mechanisms to bypass Python's single interpreter limitation. This approach allows the robotics framework Basis to run multiple Python instances in the same process space while avoiding GIL contention, providing an innovative architectural solution for high-performance robotics systems.
This article from the official Django blog raises a question: Do we really need third-party libraries to build REST APIs with Django? It introduces how to use Django's built-in generic class views and form system to implement complete CRUD REST API functionality with less than 100 lines of code.
Meta officially announced the alpha version of Pyrefly, which can perform type checking at a speed of 1.8 million lines of code per second, supporting IDE-first development experience and automatic type inference. The article explains why it was developed to replace Pyre, the principles behind it, and future development plans.
Pandas is about to release version 3.0, which will use PyArrow to replace NumPy as the default engine for handling columnar data loading and reading. PyArrow provides columnar storage, supports Copy on Write mode, and has significant advantages in memory usage and reading speed.
Hugging Face released "Tiny Agents", which can enable large language models to call external tools and APIs through the MCP protocol, thereby achieving more powerful functionality. The article demonstrates its usage and powerful capabilities.
Narwhals is a lightweight compatibility layer that unifies functions from mainstream DataFrame libraries like pandas, Polars, and PySpark, avoiding the complexity of writing separate code for each library and improving code portability and reusability.
The author proposes redesigning NumPy with loop and indexing syntax, solving the complexity of high-dimensional array operations by compiling loop syntax into vectorized operations. DumPy implements automatic vectorization based on JAX's vmap, allowing intuitive loop syntax to achieve GPU-accelerated performance, significantly reducing the cognitive burden of multi-dimensional array programming.
Lyft's engineering team shares their practical experience migrating from application-level connection pooling to AWS RDSProxy proxy connection pooling. It details the importance of connection pooling, SQLAlchemy configuration methods, and how RDSProxy solves the problem of connection number surge during application scaling.
The author open-sourced py-bugger, a tool that introduces specific types of bugs to assist in debugging education. He communicated face-to-face with other developers at PyCon's open spaces, discovered some new use cases and issues, emphasizing the importance of getting feedback through open spaces in the early stages of a project.
Introduces a series of important technical improvements that have emerged in the Transformer model field since the famous "Attention Is All You Need" paper was published. The author uses the PyTorch framework and concise code examples to explain the core ideas of 14 important technologies and how they improve model inference speed and memory efficiency.
The author shares more than 10 articles in the field of programming languages and compilers that have had a significant impact on their thinking, including garbage collector implementation, optimizer instruction rewriting, abstract domains and Z3 usage, correctness proofs of register allocation, regular expression engines, automatic differentiation, SSA form implementation, and more.
A 100% local alternative to Manus AI that supports voice, autonomous web browsing, code writing and task planning, with all data staying on local devices. (star 13.5K)
A Django application suite that provides complete user authentication, registration, account management, and third-party social account authentication functionality. Supports multiple authentication schemes (username or email login), multiple account verification strategies, and integrates OAuth 1.0/2.0, OpenID Connect, SAML 2.0 and other protocols.
A cross-platform multi-threaded downloader developed based on Python, adopting Fluent Design style, with AI intelligent acceleration functionality, IDM-style intelligent chunked downloading, browser extension support and plugin system, supporting Windows, macOS and Linux platforms. (star 2.6K)
Beautiful downloader
A lightweight Python package that converts Linux file systems into vector databases, storing vector embeddings directly outside files through VFS extended attributes, without requiring external indexes or database services.
Kuaishou's open-source portrait animation generation tool that supports efficient portrait animation creation, with stitching and redirection control functions, supporting portrait and animal modes, providing Gradio interface and one-click installation package. (star 15.5K)
Bringing world famous paintings to life
A professional Python causal and probabilistic modeling library based on Bayesian networks. Provides a complete set of probabilistic graphical model tools, suitable for machine learning and statistical analysis fields. (star 3K)
An interactive intelligent agent based on large models, focusing on group chat scenarios. Features intelligent conversation, real-time thinking, emotional expression, persistent memory and dynamic personality systems. (star 2.5K)
Microsoft's open-source human-computer collaborative web agent research prototype that can automate web tasks while maintaining user control, supporting collaborative planning, collaborative execution, action protection, plan learning and parallel task execution. (star 4.7K)
Converts rough hand-drawn sketches into beautiful 3D models. Supports free drawing, AI enhancement optimization, one-click 3D conversion, world building and model export functions. Developed based on Next.js, Three.js and FastAPI. (star 1.8K)
Nice full-stack + AI project
This intelligent agent can connect various applications, productivity tools and databases, converting their content into searchable knowledge bases and providing services to agents through standardized interfaces. (star 2.5K)
It provides @task decorators to track and visualize function execution flows. Supports retry mechanisms, logging, context managers and interactive visualization interfaces.
An intelligent baby monitoring system based on local video large models that monitors in real-time through cameras, performs real-time analysis according to safety rules, and issues gentle reminder sounds when violations of safety rules are detected.
This year's PyCon US videos were released very early! See if there are any topics that interest you?
The PyTexas event in Texas, USA has released 21 presentation videos.
Python core developer Mark Shannon (yes, the proposer of Faster CPython, who was recently laid off by Microsoft) proposed the idea of adding virtual threads to Python, believing that virtual threads can handle concurrency better than async/await. The post introduces the advantages and implementation methods of this approach, sparking widespread discussion in the community.
Microsoft's layoffs of the CPython and TypeScript compiler teams triggered the author's deep thinking about the value of technical expertise. Should we focus on output rather than architecture, on impact rather than elegance? How to balance technical depth with business value?
Python Weekly #54: ChatTTS Powerful Text-to-Speech Model (2024.06.08)
Python Weekly #4: Python 2023 Language Summit (2023.05.31)