We're sunsetting PodQuest on 2025-07-28. Thank you for your support!
Export Podcast Subscriptions
cover of episode #431 Nerd Gas

#431 Nerd Gas

2025/5/5
logo of podcast Python Bytes

Python Bytes

AI Deep Dive Transcript
People
B
Brian
Python 开发者和播客主持人,专注于测试和软件开发教育。
M
Michael
帮助医生和高收入专业人士管理财务的金融教育者和播客主持人。
Topics
Michael: 我认为 `pirel` 是一个非常有用的工具,它可以让我轻松地查看 Python 版本的维护状态,避免因为版本过期而带来的问题。`pirel check` 命令可以显示当前 Python 解释器的版本信息和维护状态,而 `pirel list` 命令则可以列出所有 Python 版本及其维护状态,方便我及时更新到最新的版本。这对于开发者来说非常重要,可以帮助我们更好地管理项目中的 Python 版本,避免潜在的安全风险。 此外,我还想谈谈 `zev` 这个工具。它可以帮助用户回忆终端命令,这对于那些不熟悉终端命令的用户来说非常有用。`zev` 使用 LLM API 来生成终端命令建议,用户只需要输入简单的描述,`zev` 就能给出相应的命令建议,极大地提高了效率。当然,由于 `zev` 使用的是 LLM API,因此在使用时需要注意安全问题,避免出现意外情况。 Brian: 我今天要分享的是 FastAPI 的新云平台 FastAPI Cloud,以及 Python 3.14 中即将推出的 t-strings。FastAPI Cloud 是由 FastAPI 的创建者 Sebastian Ramirez 创建的,它旨在简化 FastAPI 应用的部署流程。用户只需要一行命令就可以部署 FastAPI 应用,这对于开发者来说非常方便。FastAPI Cloud 还提供了安全可靠的托管服务,可以帮助用户更好地保护他们的应用。 另一个值得关注的是 t-strings。t-strings 是 Python 3.14 中引入的一种新的字符串格式化方式,它比 f-strings 更安全,可以更好地防止安全漏洞。t-strings 将模板和值分开存储,这使得我们可以更好地控制字符串的格式,避免出现安全问题。此外,t-strings 还提供了许多其他的功能,例如可以更好地支持国际化和本地化等。t-strings 的出现,将极大地提高 Python 开发的安全性,并为开发者提供更强大的字符串处理能力。

Deep Dive

Shownotes Transcript

Topics covered in this episode:

- **[ pirel: Python release cycle in your terminal](https://github.com/RafaelWO/pirel?featured_on=pythonbytes))**

Watch on YouTube)

About the show

Sponsored by NordLayer: pythonbytes.fm/nordlayer)

Connect with the hosts

Join us on YouTube at pythonbytes.fm/live) to be part of the audience. Usually Monday at 10am PT. Older video versions available there too.

Finally, if you want an artisanal, hand-crafted digest of every week of the show notes in email form? Add your name and email to our friends of the show list), we'll never share it.

Michael #1: pirel: Python release cycle in your terminal)

  • pirel check shows release information about your active Python interpreter.

  • If the active version is end-of-life, the program exits with code 1. If no active Python interpreter is found, the program exits with code 2.

  • pirel list lists all Python releases in a table. Your active Python interpreter is highlighted.

  • A picture is worth many words

Brian #2: FastAPI Cloud)

  • Sebastián Ramírez, creator of FastAPI, announced today) the formation of a new Company, FastAPI Cloud.

  • Here’s the announcement blog post: FastAPI Cloud - By The Same Team Behind FastAPI)

  • There’s a wait list to try it out.

  • Promises to turns deployment into fastapi login; fastapi deploy

  • Side note: announcement includes quote from Daft Punk: Build Harder, Better, Faster, Stronger

  • I just included this in a talk I’m gave last week (and will again next week), where I modify this to “Build Easier, Better, Faster, Stronger”

  • Sebastian and I are both fans of the rocket emoji.

  • BTW, we first covered FastAPI on episode 123 in 2019)

Brian #3: Python's new t-strings)

  • Dave Peck, one of the authors of PEP 750, which will go into Python 3.14

  • We covered t-strings in ep 428)

  • In article

  • t-strings security benefits over f-strings

  • How to work with t-strings

  • A Pig Latin example

  • Also, I think I have always done this wrong

  • Is it the first consonant to the end? or the first consonant cluster?

  • So… Brian → Rianbay? or Ianbray?

  • BTW, this is an example of nerdgassing

  • What’s next once t-strings ship?

  • On thing that’s next (in Python 3.15, maybe, is using t-strings in shlex and subprocess)

  • PEP 787 – Safer subprocess usage using t-strings) deferred to 3.15

Michael #4: zev)

  • A simple CLI tool to help you remember terminal commands.

Examples:

`# Find running processes
zev 'show all running python processes'
# File operations
zev 'find all .py files modified in the last 24 hours'
# System information
zev 'show disk usage for current directory'
# Network commands
zev 'check if google.com is reachable'
# Git operations
zev 'show uncommitted changes in git'
`

- Again, picture worth many words:

Extras

Brian:

Michael:

Joke: Can my friend come in?)