Introducing t-strings: f-strings with superpowers - Dave Peck

This video features at PyCascades 2026 in Vancouver, British Columbia.

Introducing t-strings: f-strings with superpowers - Dave Peck
0:27:50
Published May 24, 2026
10 views

Python 3.14 introduces t-strings: template string literals that look like f-strings but evaluate to a Template instance instead of a str. This opens up exciting possibilities for safer string processing (avoiding injection vulnerabilities in SQL and HTML) and powerful custom formatting (like HTML templating directly in Python), all while using the familiar f-string syntax developers already know and love.

In this talk, I'll describe what t-strings are and how they differ from f-strings and other common Python formatting tools. I'll explore when they're a good fit for new projects and how to use them effectively in everyday code. I'll also demonstrate two libraries — tdom (HTML) and t-sql (SQL) — and close with a live tooling demo in VS Code showing the current state of formatting, linting, and syntax highlighting support.

Attendees will leave knowing when to reach for t-strings, how to adopt them safely, and which tools can improve their developer experience.

Presenters

Note: We understand that names change, people change, and bodies change. We respect each individual's journey and privacy. If you have any concerns about a video or need us to remove content, please don't hesitate to contact us. We will handle your request with care and promptly address any issues.

More videos from PyCascades