Python Dev News: Project Layouts, Async, and Browser Tools

·32m 52s
Shared point

Python Project Management & Tooling

UV-Based Application Layout

In this episode, the hosts highlight a best-practice approach to structuring Python projects using UV.
Source layouts are highly recommended over relying solely on a requirements.txt file.
• Developers should commit their uv.lock file to version control to ensure consistent deployments.
• The pyproject.toml file serves as the single source of truth for dependencies and even Python versions.

Improving Developer Workflow

For those looking for real-time feedback during development, the hosts touch on:
Reloadium: A robust tool that enables hot-reloading for code, Jinja templates, and even Pandas data manipulation.
Server Hot Reload: A lightweight alternative for those who prefer an non-intrusive approach that focuses on template refreshing.

Advanced Python Concepts

Handling Async/Await Limits

When dealing with async applications, high-throughput code can overwhelm external APIs or databases.

"I feel like there's a big missing piece for async and await in Python, and that is any sort of mechanism... of the underlying running of async code in general."

• The AIO Limiter project provides a clean way to apply rate limits using async context managers.
• This allows developers to wrap specific async calls to prevent exceeding service thresholds or overloading backend resources.

Python in the Browser

Discussion continues regarding the future of Python in web environments.
• A new research project, SPY, is exploring how Python code can be compiled for better performance in the browser.
• The hosts emphasize the need for browser manufacturers to provide native support for shared WebAssembly runtimes to reduce load times for Python apps.

Topics

Chapters

5 chapters
Python Bytes
AI chat — answers grounded in episodes