Python Trending Weekly
ISSUE 79

Python's Metadata Dilemma

2024-12-01 Season 3

TL;DR

Python's metadata dilemma takes center stage as Talk Python gets rewritten in Quart, a test measures the memory needed for one million concurrent tasks, and Alibaba ships Qwen2.5-Coder.

Articles 12 Projects 12 Discussions 2
🦄

Articles & Tutorials

× 12
01 Constraints are Good: Python's Metadata Dilemma lucumr.pocoo.org

The author argues that Python's metadata system is overly complex and suffers from a "lack of constraints." Comparing it with JavaScript, the article highlights several issues with Python metadata: complicated metadata access, the need to regenerate metadata, unclear cache invalidation, and parser inefficiency caused by dynamic metadata.

02 Talk Python rewritten in Quart (async Flask) talkpython.fm

The Talk Python website was built in 2015 using the Pyramid framework, but that framework has stagnated. The article discusses various popular Python web frameworks, explains why they weren't chosen, why Quart (async Flask) was selected, and details the migration process.

03 Python isn't just glue, it's an implicit JIT ecosystem state.smerity.com

In traditional JIT compilation, programs optimize their hot paths (frequently executed code sections) at runtime. The author discovered that Python's community ecosystem does something remarkably similar—when performance bottlenecks persist on certain paths, the ecosystem optimizes those paths.

04 Python type hints may not be for me in practice utcc.utoronto.ca

The author experimented with Python type hints but found that the benefits don't outweigh the hassle. For occasional small, single-person Python projects, you can indeed get away without worrying much about type hints. (Note: The author also wrote Some of my experiences with Python type hints and mypy)

05 A Comprehensive Guide to Python Project Management and Packaging: Concepts Illustrated with uv – Part II reinforcedknowledge.com

This popular series uses uv to introduce Python project management. This is part two, covering project building and release workflows, including build systems, source trees, build front-end/back-end interfaces, editable installations, custom build processes, and how to handle dependencies and metadata.

06 How Much Memory Do You Need in 2024 to Run 1 Million Concurrent Tasks? hez2010.github.io

The author benchmarked memory usage for concurrent tasks using coroutines in Rust, C#, NodeJS, Python, Go, and Java, testing how these languages perform with 1, 10K, 100K, and 1M tasks. (Note: The author also did a similar comparison last year How much memory is needed to run 1 million concurrent tasks in different languages?)

07 Pushing the boundaries of Streamlit twitchard.github.io

The author shares their experience developing web UIs with Streamlit, discussing challenges encountered when integrating voice interfaces and handling long-running tasks, and explaining how they overcame these obstacles through custom components and multithreading.

08 Using GitHub Actions to run a Python script mechanicalgirl.com

The author shares their experience using GitHub Actions for automation, focusing on GitHub Actions workflow configuration, how to invoke Python scripts, and implementing their own automation tasks.

09 Solving Boolean satisfiability and integer programming with Python packaging mmaaz.ca

Inspired by Python packaging solving Sudoku problems, the author developed a solver called pipip that uses Python package dependency resolvers to solve Boolean satisfiability (SAT) and 0/1 integer programming (IP) problems. The article explains the principles, implementation details, and usage examples in detail.

10 Squashing Django Migrations Easily jacklinke.com

The author's Django project has been running for 6 years with nearly 300 modules, making migration risk reduction a challenge. The article introduces using django-model-info to generate migration graphs, identifying safe migration paths for squashing, and how the entire process reduced migration file count and optimized deployment time.

11 These Languages are Accumulating jcarroll.com.au

The more programming languages you learn, the deeper your understanding becomes. The author compares how Python, R, Haskell, APL, and Julia implement cumulative operations (like accumulate and cumsum), showing the diversity in how they solve the same problems.

12 Comparing 1 Billion Nested Loop Iterations Across Languages benjdd.com

More than 10 programming languages executing 1 billion nested loops—the execution time was made into an animation. Watching Python crawling at the bottom is genuinely frustrating...

Comparing 1 Billion Nested Loop Iterations Across Languages
🐿️

Projects & Resources

× 12
01 aisuite: Simple, unified interface to multiple Generative AI providers github.com

Provides a standardized interface that allows developers to easily use multiple LLMs. Uses an OpenAI-like interface focused on chat mode. (5.6K stars)

02 opennb: Open Jupyter notebooks from GitHub repositories or URLs directly in Jupyter github.com

Supports opening ipynb files from GitHub repository file paths, automatically detects default branches, and supports using specified branches. Also supports opening ipynb files directly via URL. Allows passing parameters to notebooks.

03 ridgeplot: Beautiful ridgeline plots in Python github.com

A simple tool based on Plotly that creates beautiful and interactive ridgeline plots.

ridgeplot: Beautiful ridgeline plots in Python
04 Qwen2.5-Coder: the large language model series developed by Qwen team, Alibaba Cloud github.com

A powerful domestic open-source large language model that supports 92 programming languages with a context length of 128K tokens. (3.1K stars)

05 pex: A tool for generating .pex (Python EXecutable) files, lock files and venvs github.com

.pex is a Python executable format that extends the ideas in PEP-441, making Python program deployment as simple as cp. A single pex file can contain multiple Python distributions, meaning it's portable between Linux and OS X. (2.9K stars)

06 pipe-operator: Elixir's pipe operator in Python github.com

This library lets you use Elixir-style pipe syntax in Python.

07 Sequoia: Automated Stock-Picking Program for China's A-Share Market github.com

Fetches data from East Money and implements several stock selection strategies, including Turtle Trading rules, Chan's bull market buy points, and other technical patterns. (2.2K stars)

08 LLM-Engineers-Handbook: The LLM's practical guide: From the fundamentals to deploying advanced LLM github.com

This e-book aims to teach you best practices for creating end-to-end LLM-based systems, including data collection and generation, training pipelines, simple RAG systems, production-ready AWS deployment, comprehensive monitoring, testing, and evaluation frameworks. (1.8K stars)

09 bbot: A recursive internet scanner for hackers github.com

A versatile scanner inspired by Spiderfoot designed to automate your reconnaissance, bug bounty hunting, and ASM. (7.1K stars)

10 Scraperr: Self-hosted webscraper github.com

A self-hosted web scraper that extracts data by specifying elements via XPath. Supports scraping by URL, managing previous tasks, user management, log viewing, statistical analysis, and AI integration. (1.2K stars)

11 ImportSpy: ImportSpy is a lightweight Python library that gives developers proactive control github.com

Supports defining clear rules for modules and validates whether external modules comply with these rules before they import your module, reducing errors caused by improper imports or environment configuration issues.

12 zerox: PDF to Markdown with vision models github.com

Uses AI vision models for precise document content extraction, overcoming challenges with unusual layouts, tables, and charts. (6.7K stars)

zerox: PDF to Markdown with vision models
🥂

Discussions & Questions

× 2
01 Deploying Python Projects to Production v2ex.com

The company has many Python projects—what deployment solutions should be used for production? How should package management be handled? Should inter-service communication use HTTP or RPC?

02 What are you all-time favorite Python talks? reddit.com

There are 19,163 conference talks on pyvideo—do you have any favorite talks or speakers you'd recommend?

ESC
↑↓ select · ↵ open175 issues