Python's package management ecosystem is diverse at best, fragmented at worst. The author surveys over 10 Python package/virtual environment management tools and concludes: data scientists and researchers should use conda, while everyone else should stick with pip or poetry in production. (Note: here's a Chinese translation)
TL;DR
Python has too many package managers, yet uv cuts Streamlit Cloud's load times by 55%; PySkyWiFi finds free in-flight Wi-Fi through airline loopholes, and ChatGPT's Linux sandbox gets exposed.
Articles & Tutorials
× 13A Python full-stack web development series using Flask and HTMX to build an interactive blog. The second part of the series is the advanced version, adding TailwindCSS and authentication features.
The author discovered that airplane Wi-Fi requires a credit card, but you can log into airline mileage accounts for free. So they figured out how to send messages by constantly updating account profile information. The article explains the implementation, showcases several prototypes including instant messaging, news/stock prices, and soccer scores, plus ideas for efficiency improvements.
The author encountered a bug related to random numbers and explored how to make random numbers predictable without modifying existing Python code. The article explains how to use ptrace to intercept and modify system calls to getrandom.
ChatGPT can execute Python code and system commands in a sandbox environment. The author unveils its mystery, revealing it runs on Azure cloud platform K8S cluster machines. The author tried various commands including viewing processes, accessing networks, uploading and downloading files, and even found the complete Python source code for the sandbox environment, approximately 650 lines.
A fascinating project where the author uses AI, Raspberry Pi, and motor devices to create an automated hat-dropping system from their window. It's now available for online purchase - what a novel shopping experience!
uv is a pip replacement developed in Rust. After Streamlit Cloud adopted it, they achieved significant speed improvements compared to pip. The article analyzes why pip is so slow and what performance optimization techniques uv employs.
The author gave a talk about CPython JIT at The Chicago Python Meetup Group this week. This article contains the complete slides and related materials from his presentation. (Additional: How to get started with the latest CPython JIT?)
Typically, a Python package name matches its module name, but this is just an unwritten convention. The article analyzed the naming of the 8,000 most popular packages on PyPI and found that 81% have matching package and module names. The article also analyzes other aspects including namespaces, common prefixes/suffixes, etc.
The author's Cirron library can trace system calls and record single-line code performance. The article uses it to compare Python and Ruby's system call commands and timing differences for operations like file I/O, random number generation, time display, and string printing.
Explains how to use GitHub Actions to automatically run web scraping programs and save scraped data to GitHub Artifacts, completely free without needing servers. The article covers the workflow, configuration details, and implementation limitations.
The author shares 12 profound lessons learned from 35 years in software development, focusing mainly on soft skills including doing things in the most direct way, the importance of relationships, never being invisible, doing things willingly, and more.
As an experienced programmer, the author wishes they had seen these suggestions earlier: proactively fix easily overlooked small issues, balance development speed with code quality, simplify complex problems, get to the root of bugs, accept imperfect code, and more.
🎁Python Trending Weekly🎁 Season 1 highlights have been compiled into a beautiful e-book (EPUB/PDF). Send "W30" to the Python Cat WeChat account to get your free download link.
Projects & Resources
× 13DNS fuzzing tool for detecting potential malicious domains, discovering phishing attacks and brand impersonation issues. (star 4.7K)
A Postman and Insomnia-like HTTP client for the terminal, supporting syntax highlighting, Vim shortcuts, various built-in themes, auto-completable environment variables, command palette for quick access, and more. (star 1.9K)
Generates templates and specification files for filesystem interfaces to provide stable and reliable common behavior. Libraries like Pandas, Dask, and Huggingface Datasets all use this library internally.
Primarily used for internationalization in web projects, handling multi-language display issues. (star 1.3K)
Can be used to quickly build and deploy FastAPI-based services. The tech stack also includes SQLModel for database mapping, Poetry for dependency management, and Alembic for database migrations.
Extract data for AI, LLMs, RAG, or GPT. Download HTML, PDF, JPG, PNG and other files from websites, compatible with BeautifulSoup, Playwright and native HTTP. Provides both headed and headless modes, supports proxy rotation. (star 1K)
Django-based project for writing and sharing SQL in an SQL editor, viewing results in the browser. Supports adding LLM assistants to help write and debug SQL. (star 2.7K)
Develop pixel-style retro games with Python, runs on Windows, Mac, Linux and Web, supports keyboard, mouse and gamepad input. (star 14K)
X-ray vision for Linux systems to detect program performance. Supports measuring thread-level activity, viewing CPU usage for individual threads or the entire system. (star 1.2K)
A practical toolkit for running security assessment tasks and workflows, supporting dozens of well-known security tools to improve the efficiency of penetration testers and security researchers.
Convert RSS to email newsletters, 100% free and open source, integrates with listmonk for email delivery.
A runtime loadable extension for SQLite, supporting fast ANN search based on hnswlib, compatible with Windows, MacOS and Linux.
An open-source portrait animation model by Kuaishou, USTC and Fudan University, supporting audio-video concatenation, automatic cropping of driving videos, template creation, and more. (star 6K)