Python Updates: PythonAnywhere, Ruff, and PyTorch
The Python Ecosystem: News and Tools
This episode of Python Bytes covers several updates and tools designed to make the life of a Python developer easier, faster, and more efficient.
PythonAnywhere: Continuing Free Access
In response to other cloud providers restricting their free tiers, PythonAnywhere has reaffirmed its commitment to supporting the community with free access to its platform. Some key points discussed:
• You can run a fully functional Python REPL directly in your browser without local installation.
• It provides a simplified environment for hosting Flask, Django, and Pyramid web applications.
• To maintain these free services, PythonAnywhere limits outbound internet access on free accounts and requires a periodic 'proof of life' click every few months for web apps to stay active.
Ruff: Next-Generation Performance
We explored Ruff, an extremely fast Python linter written in Rust.
"It's like 150 times faster or something like that."
• It functions as a replacement for flake8.
• The tool has seen rapid adoption, gaining thousands of GitHub stars in just a few weeks.
• It is highly compatible with popular tools like Black.
Meta Spins Off PyTorch
A major shift in the machine learning space has occurred as Meta announced that PyTorch is joining the Linux Foundation. This move toward a vendor-neutral governance model is intended to ensure long-term independence and foster a more open ecosystem. The board will include representatives from major tech firms like Microsoft, Google, NVIDIA, and Amazon, solidifying its status as an industry-standard framework.
String Manipulation and Formatting
Effective string handling is fundamental to Python coding. Key resources mentioned include:
• A deep dive into essential string methods like join, split, and the newer removeprefix and removesuffix introduced in Python 3.9.
• A comprehensive F-strings number formatting cheat sheet, which offers efficient ways to handle floating-point precision, scientific notation, and percentages directly in display strings.
Podcast Extras and Course Announcements
• Seaborn 0.12 has officially released its highly anticipated object interface.
• PEP 690 (Lazy Imports) was discussed as a promising feature for future Python versions, potentially targeting Python 3.12.
• A new, comprehensive PyTest course has launched on Talk Python, designed to take developers from basic testing strategies to utilizing the full power of modern Python testing and fixtures.