Have you wanted the flexibility of f-strings but need safety checks in place? What if you could have deferred evaluation for logging or avoiding injection attacks? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder’s Weekly articles and projects.
We discuss a set of recent Python Enhancement Proposals (PEPs). The idea of template strings has been under consideration for a while, and PEP 750 describes a new way forward. PEP 759 proposes a way for projects on PyPI to safely host resources on external sites using a new package upload format called a .rim file.
We share several other articles and projects from the Python community, including what didn’t make the headlines about Python 3.13, solving Sudoku with Python packaging, what’s sweet about Python’s syntactic sugar, creating database-generated columns using SQLite and Django, a discussion about mentoring, an adaptive web scraper, and a debugging tool for HTTP(S) client requests.
This episode is sponsored by Sentry.
Course Spotlight: [Using Pydantic to Simplify Python Data Validation] (https://realpython.com/courses/pydantic-simplify-data-validation/)
Discover the power of Pydantic, Python’s most popular data parsing, validation, and serialization library. In this hands-on video course, you’ll learn how to make your code more robust, trustworthy, and easier to debug with Pydantic.
Topics:
---00:00:00 – Introduction
---00:02:08 – Python 3.14.0 Alpha 1 Released
---00:02:38 – Python 3.13, What Didn’t Make the Headlines
---00:05:23 – What’s up Python? 3.13 is out, t-strings look awesome
---00:10:21 – Sponsor: Sentry
---00:11:25 – Sudoku in Python Packaging
---00:14:29 – Syntactic Sugar: Why Python Is Sweet and Pythonic
---00:22:31 – Database generated columns: Django & SQLite
---00:27:14 – Video Course Spotlight
---00:28:39 – Mentors
---00:42:23 – Scrapling: Lightning-Fast, Adaptive Web Scraping for Python
---00:44:14 – httpdbg: A tool for Python developers to easily debug the HTTP(S) client requests
---00:46:04 – Request for project submissions to PyCoders
---00:46:59 – Thanks and goodbye
News:
--- [Python 3.14.0 Alpha 1 Released] (https://pythoninsider.blogspot.com/2024/10/python-3140-alpha-1-is-now-available.html)
Show Links:
--- [Python 3.13, What Didn’t Make the Headlines] (https://www.bitecode.dev/p/python-313-what-didnt-make-the-headlines) – Bite Code summarizes some of the lesser covered changes to Python in the 3.13 release, including how some of the REPL improvements made it into pdb, improvements to shutil, and small additions to the asyncio library.
--- [What’s up Python? 3.13 is out, t-strings look awesome, dep groups come in handy…] (https://www.bitecode.dev/p/whats-up-python-313-is-out-t-strings?utm_source=post-email-title&publication_id=1516188&post_id=150838079&utm_campaign=email-post-title&isFreemail=true&r=3ebaxe&triedRedirect=true&utm_medium=email)
--- [Sudoku in Python Packaging] (https://simonwillison.net/2024/Oct/21/sudoku-in-python-packaging/) – Simon writes about a [Sudoku solver] (https://github.com/konstin/sudoku-in-python-packaging) written by Konstin that uses the Python packaging mechanisms to do Sudoku puzzles. The results are output using a requirements.txt file, where sudoku-0-3==5 represents the (0,3) cell’s answer of 5.
--- [Syntactic Sugar: Why Python Is Sweet and Pythonic] (https://realpython.com/syntactic-sugar-python/) – In this tutorial, you’ll learn what syntactic sugar is and how Python uses it to help you create more readable, descriptive, clean, and Pythonic code. You’ll also learn how to replace a given piece of syntactic sugar with another syntax construct.
--- [Database generated columns: Django & SQLite] (https://www.paulox.net/2023/11/07/database-generated-columns-part-1-django-and-sqlite/) – An introduction to database generated columns, using SQLite and the new GeneratedField added in Django 5.0
Discussion:
--- [Mentors] (https://www.ryancheley.com/2024/09/16/mentors/) – Ryan just finished his second round of mentoring with the Djangonaut.Space program. This post talks about how you can help your mentor help you and how to be a good mentor.
Projects:
--- [Scrapling: Lightning-Fast, Adaptive Web Scraping for Python] (https://github.com/D4Vinci/Scrapling)
--- [httpdbg: A tool for Python developers to easily debug the HTTP(S) client requests in a Python program] (https://github.com/cle-b/httpdbg)
Additional Links:
--- [PEP 750 – Template Strings] (https://peps.python.org/pep-0750/)
--- [PEP 735 – Dependency Groups in pyproject.toml] (https://peps.python.org/pep-0735/)
--- [PEP 759 – External Wheel Hosting] (https://peps.python.org/pep-0759/)
--- [Episode #47: Unraveling Python’s Syntax to Its Core With Brett Cannon – The Real Python Podcast] (https://realpython.com/podcasts/rpp/47/)
--- [Episode #92: Continuing to Unravel Python’s Syntactic Sugar With Brett Cannon – The Real Python Podcast] (https://realpython.com/podcasts/rpp/92/)
--- [Episode #4: Learning Python Through Errors – The Real Python Podcast] (https://realpython.com/podcasts/rpp/4/)
--- [PyCoder’s Weekly - Have a Project You Want to Share? - Submit a Link] (https://pycoders.com/submissions)
Level up your Python skills with our expert-led courses:
--- [Using Pydantic to Simplify Python Data Validation] (https://realpython.com/courses/pydantic-simplify-data-validation/)
--- [Python Type Checking] (https://realpython.com/courses/python-type-checking/)
--- [Using Type Hints for Multiple Return Types in Python] (https://realpython.com/courses/type-hints-multiple-return-types/)
[Support the podcast & join our community of Pythonistas] (https://realpython.com/join)
... Read more