We're sunsetting PodQuest on 2025-07-28. Thank you for your support!
Export Podcast Subscriptions
cover of episode #415 Just put the fries in the bag bro

#415 Just put the fries in the bag bro

2024/12/23
logo of podcast Python Bytes

Python Bytes

AI Deep Dive AI Chapters Transcript
People
B
Brian
Python 开发者和播客主持人,专注于测试和软件开发教育。
M
Michael
帮助医生和高收入专业人士管理财务的金融教育者和播客主持人。
Topics
Michael: 介绍了dbos-transact-py库,它提供超轻量级的持久化执行功能,能够在程序中断或崩溃后自动恢复。该库使用Postgres数据库存储程序的执行状态,并支持各种高级功能,例如计划任务和精确一次事件处理。其速度比AWS Step Functions快25倍,并集成了Open Telemetry进行可观测性。 还介绍了RightTyper工具,这是一个快速高效的Python类型助手,可以自动为代码添加类型提示,包括张量形状推断。它支持多种数据科学库,并与BearType和TypeGuard等工具兼容。RightTyper的性能优于MonkeyType等其他工具,可以有效提高代码的可读性和可维护性。 最后,Michael分享了在macOS系统中设置应用程序快捷键检查更新的技巧,以及Talk Python网站上一个巧妙的URL设计,通过在URL后添加后缀来直接访问缩略图和字幕文件。他还撰写了一篇详细分析文章,总结了Talk Python播客2024年最受欢迎的五集内容,并推荐了关于Python类型提示和工具的课程。 Brian: 讨论了Meta工程博客上的一项调查结果,该调查显示Python类型提示的采用率很高,但仍然存在可用性和表达复杂模式方面的挑战。Brian还介绍了使用uv库创建懒加载自安装Python脚本的方法,方便在各种操作系统上创建和管理单文件命令行脚本及其依赖项。uv库可以自动安装依赖项,甚至可以安装Python解释器,简化了脚本的部署和使用。 Brian还介绍了Talk Python Training提供的课程,并表示愿意为经济困难的学生提供折扣。最后,Brian参与了关于Python with Rizz的幽默编程语言的讨论,该语言使用一些非正式的关键词来替代标准的Python关键词,增加了代码的趣味性。

Deep Dive

Chapters
dbos-transact-py offers ultra-lightweight durable execution in Python, ensuring resilience against failures in long-running processes by storing the execution state in a Postgres database. It's significantly faster than alternatives like AWS Step Functions and provides features like scheduled jobs and exactly-once event processing.
  • dbos-transact-py provides ultra-lightweight durable execution.
  • It stores program's execution state in Postgres.
  • 25x faster than AWS Step Functions.
  • Offers scheduled jobs and exactly-once event processing.

Shownotes Transcript

Topics covered in this episode:

- [**dbos-transact-py**](https://github.com/dbos-inc/dbos-transact-py?featured_on=pythonbytes))

Watch on YouTube)

About the show

Sponsored by us! Support our work through:

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: dbos-transact-py)

  • DBOS Transact is a Python library providing ultra-lightweight durable execution.

  • Durable execution means your program is resilient to any failure.

  • If it is ever interrupted or crashes, all your workflows will automatically resume from the last completed step.

  • Under the hood, DBOS Transact works by storing your program's execution state (which workflows are currently executing and which steps they've completed) in a Postgres database.

  • Incredibly fast, for example 25x faster than AWS Step Functions).

Brian #2: Typed Python in 2024: Well adopted, yet usability challenges persist)

  • Aaron Pollack on Engineering at Meta blog

  • “Overall findings

  • 88% of respondents “Always” or “Often” use Types in their Python code.

  • IDE tooling, documentation, and catching bugs are drivers for the high adoption of types in survey responses,

  • The usability of types and ability to express complex patterns still are challenges that leave some code unchecked.

  • Latency in tooling and lack of types in popular libraries are limiting the effectiveness of type checkers.

  • Inconsistency in type check implementations and poor discoverability of the documentation create friction in onboarding types into a project and seeking help when using the tools. “

  • Notes

  • Seems to be a different survey than the 2023 (current) dev survey. Diff time frame and results. July 29 - Oct 8, 2024

Michael #3: RightTyper)

  • A fast and efficient type assistant for Python, including tensor shape inference

Brian #4: Lazy self-installing Python scripts with uv)

  • Trey Hunner

  • Creating your own ~/bin full of single-file command line scripts is common for *nix folks, still powerful but underutilized on Mac, and trickier but still useful on Windows.

  • Python has been difficult in the past to use for standalone scripts if you need dependencies, but that’s no longer the case with uv.

  • Trey walks through user scripts (*nix and Mac)

  • Using #! for scripts that don’thave dependencies

  • Using #! with uv run --script and /// script for dependencies

  • Discussion about how uv handles that.

Extras

Brian:

  • Courses at pythontest.com)

  • If you live in a place (or are in a place in your life) where these prices are too much, let me know. I had a recent request and I really appreciate it.

Michael:

  • Python 3.14 update) released

  • Top episodes of 2024) at Talk Python

  • Universal check for updates macOS:

  • Settings > Keyboard > Keyboard shortcuts > App shortcuts > +

  • Then add shortcut for single app, ^U and the menu title.

Joke: Python with rizz)