|
1 | | ---- |
2 | | -title: 'Python 潮流周刊#72:Python 3.13.0 最终版已发布!' |
3 | | -pubDate: 2024-10-12 |
4 | | ---- |
5 | | - |
6 | | -本周刊由 Python猫 出品,精心筛选国内外的 250+ 信息源,为你挑选最值得分享的文章、教程、开源项目、软件工具、播客和视频、热门话题等内容。愿景:帮助所有读者精进 Python 技术,并增长职业和副业的收入。周刊开源在 [Github](https://github.com/chinesehuazhou/python-weekly) 上,喜欢请给颗小星星支持下~ |
7 | | - |
8 | | -分享了 14 篇文章,12 个开源项目,4 则音视频,全文 2300 字。 |
9 | | - |
10 | | -以下是本期摘要: |
11 | | - |
12 | | -**[🦄文章&教程](https://xiaobot.net/p/python_weekly)** |
13 | | - |
14 | | - |
15 | | -① Python 3.13.0 最终版已发布! |
16 | | - |
17 | | -② 关于 Python 3.13,了解这些信息就够了 |
18 | | - |
19 | | -③ Python 3.13 最好用的新特性 |
20 | | - |
21 | | -④ Python 是如何变得越来越健壮和快速的? |
22 | | - |
23 | | -⑤ 20 多个有意思的 Django 项目创意 |
24 | | - |
25 | | -⑥ Python 错误处理的终极指南 |
26 | | - |
27 | | -⑦ PEP-758:允许不带括号的 except 和 except\* 表达式 |
28 | | - |
29 | | -⑧ 自由线程 Python 使用 Asyncio |
30 | | - |
31 | | -⑨ 使用 Streamlit 开发内部 AI 工具 |
32 | | - |
33 | | -⑩ 用 Postgres 和 CLIP 开发一个图像搜索引擎 |
34 | | - |
35 | | -⑪ 不要让字典破坏你的 Python 代码 |
36 | | - |
37 | | -⑫ TypedDict 比你想象的更好用 |
38 | | - |
39 | | -⑬ 从 virtualenvwrapper 切换到 direnv、Starship 和 uv |
40 | | - |
41 | | -⑭ Python NZ 的财务主管挪用资金,导致协会债务危机 |
42 | | - |
43 | | -**[🐿️项目&资源](https://xiaobot.net/p/python_weekly)** |
44 | | - |
45 | | - |
46 | | -① PyUIBuilder:适用于 Tkinter、CustomTkinter、Kivy 的 GUI 构建器 |
47 | | - |
48 | | -② AI-Youtube-Shorts-Generator:用 GPT-4 自动分析并剪辑视频 |
49 | | - |
50 | | -③ streamable:让可迭代对象支持流式操作 |
51 | | - |
52 | | -④ gptme:在终端中写代码、浏览网页、使用视觉 |
53 | | - |
54 | | -⑤ open-notebooklm:将任意 PDF 转换为播客对话节目 |
55 | | - |
56 | | -⑥ starfyre:响应式的基于 WASM 的 SSR Python Web 框架 |
57 | | - |
58 | | -⑦ secure:为 Django、Flask、FastAPI 添加安全的请求头 |
59 | | - |
60 | | -⑧ pooltool:逼真物理效果的沙盒台球游戏 |
61 | | - |
62 | | -⑨ otterwiki:Python 开发的简约 wiki 应用 |
63 | | - |
64 | | -⑩ curl_cffi:可模拟浏览器 tls/ja3/http2 指纹的 http 客户端 |
65 | | - |
66 | | -⑪ thepipe:从 PDF、URL、幻灯片、视频中提取干净的 Markdown |
67 | | - |
68 | | -⑫ erdantic:Pydantic 等数据模型类的实体关系图 |
69 | | - |
70 | | -**[🐢播客&视频](https://xiaobot.net/p/python_weekly)** |
71 | | - |
72 | | - |
73 | | -① Python 3.13 和最新趋势:2025 年开发者指南 |
74 | | - |
75 | | -② 用 FastAPI、React 与 MongoDB 作全栈开发 |
76 | | - |
77 | | -③ 核心开发者们在 Meta 举行 sprint 活动 |
78 | | - |
79 | | -④ 聊聊 3.13 中你们感兴趣的特性,和我实现的功能 |
80 | | - |
81 | | - |
82 | | - |
83 | | -周刊实行付费订阅制,年费 128 元,平均每天不到 4 毛钱,但绝对是一笔有眼光的投资。花钱学习知识,花钱提升自己,欢迎订阅这个你绝对不会后悔的专栏:https://xiaobot.net/p/python_weekly |
84 | | - |
85 | | -订阅后,可免费查看 第 72 期周刊的全文:https://xiaobot.net/post/0bb49b01-ccb2-4001-be76-27ab6262684c |
86 | | - |
87 | | -Python 潮流周刊第 2 季完结了,分享几项总结:https://pythoncat.top/posts/2024-07-14-iweekly |
88 | | - |
89 | | -周刊前30期的免费合集,含精美电子书(EPUB/PDF):https://pythoncat.top/posts/2023-12-11-weekly |
90 | | - |
91 | | -万字浓缩版,Python 潮流周刊第 1 季的 800 个链接!:https://xiaobot.net/post/78c3d645-86fa-4bd8-8eac-46fb192a339e |
92 | | - |
93 | | -**微信关注 Python猫**:[https://img.pythoncat.top/python_cat.jpg](https://img.pythoncat.top/python_cat.jpg) |
| 1 | +--- |
| 2 | +title: 'Python 潮流周刊#72:Python 3.13.0 最终版已发布!' |
| 3 | +pubDate: 2024-10-12 |
| 4 | +--- |
| 5 | + |
| 6 | +你好,我是猫哥。这里每周分享优质的 Python、AI 及通用技术内容,大部分为英文。周刊开源在 [Github](https://github.com/chinesehuazhou/python-weekly) 上,喜欢请给颗小星星支持下~ |
| 7 | + |
| 8 | +分享了 14 篇文章,12 个开源项目,4 则音视频,全文 2300 字。 |
| 9 | + |
| 10 | +## [🦄文章&教程](https://xiaobot.net/p/python_weekly) |
| 11 | + |
| 12 | +1、[Python 3.13.0 最终版已发布!](https://pythoninsider.blogspot.com/2024/10/python-3130-final-released.html) |
| 13 | + |
| 14 | +国庆假期时,Python 3.13 最终版本发布了!官方博客梳理了简要的新特性,以及删除/废弃的内容。(附:最详细和权威的官方文档 [Python 3.13 有什么新变化?](https://docs.python.org/zh-cn/3/whatsnew/3.13.html)) |
| 15 | + |
| 16 | +2、[关于 Python 3.13,了解这些信息就够了](https://drew.silcock.dev/blog/everything-you-need-to-know-about-python-3-13/) |
| 17 | + |
| 18 | +Python 3.13 有什么与众不同的地方?它最值得我们关注的变化是什么?文章重点介绍了自由线程和 JIT 两大特性,介绍了它们是什么、带来的影响以及如何使用。 |
| 19 | + |
| 20 | +3、[Python 3.13 最好用的新特性](https://www.pythonmorsels.com/python-313-whats-new/) |
| 21 | + |
| 22 | +作者说 Python 3.13 是自 Python 3.6 引入 f-string 以来,他最感到兴奋的版本。文章分享了他最喜欢的三个特性:新的 REPL、Git 友好的虚拟环境、PDB 的两项改进。 |
| 23 | + |
| 24 | +4、[Python 是如何变得越来越健壮和快速的?](https://sumercip.com/posts/making-python-fitter-and-faster/) |
| 25 | + |
| 26 | +自 3.11 版本以来,Python 的性能有着显著提升,作者分析了它取得成功的几个关键因素,并解读了几项关键的技术(专门的自适应解释器、更好的内存管理、JIT)。 |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | +5、[20 多个有意思的 Django 项目创意](https://blog.jetbrains.com/pycharm/2024/09/django-project-ideas) |
| 31 | + |
| 32 | +学习 Django 后可以做些什么?文章梳理了近 30 个 Django 项目创意,并列出了所需的技术栈,有面向初学者和高级工程师的两个部分。 |
| 33 | + |
| 34 | +6、[Python 错误处理的终极指南](https://blog.miguelgrinberg.com/post/the-ultimate-guide-to-error-handling-in-python) |
| 35 | + |
| 36 | +什么时候该捕获函数抛出的异常,什么时候不该捕获?怎么知道要捕获哪些异常?捕获异常后,具体如何处理它?为什么不该捕获所有异常,什么时候可以这样做?什么才是错误处理的最佳实践? |
| 37 | + |
| 38 | +7、[PEP-758:允许不带括号的 except 和 except\* 表达式](https://peps.python.org/pep-0758/) |
| 39 | + |
| 40 | +一则新创建的 PEP,提议让异常处理语法支持不带括号的 except 和 except\* 表达式,意图是简化语法,跟其它地方的语法保持一致,提供可读性。 |
| 41 | + |
| 42 | +8、[自由线程 Python 使用 Asyncio](https://blog.changs.co.uk/free-threaded-python-with-asyncio.html) |
| 43 | + |
| 44 | +在 Python 3.13 之前,由于 GIL 的原因,Asyncio 主要用于 IO 密集型任务。3.13 支持自由线程后,asyncio.to_thread() 对于 CPU 密集型任务也有了用武之地,文章介绍了它的用法和性能提升情况。 |
| 45 | + |
| 46 | +9、[使用 Streamlit 开发内部 AI 工具](https://www.propelauth.com/post/internal-ai-tools-with-streamlit) |
| 47 | + |
| 48 | +这篇教程介绍了如何用 Streamlit 加载和可视化数据、根据提示语运行数据、使用 PropelAuth 作身份验证,以及保存用户提示语等内容。 |
| 49 | + |
| 50 | +10、[用 Postgres 和 CLIP 开发一个图像搜索引擎](https://tembo.io/blog/image-search) |
| 51 | + |
| 52 | +文章介绍如何开发一个基本的图像搜索引擎,用预训练模型为图像和文本生成嵌入向量,存储在 Postgres 中,并用 pgvector 对这些嵌入作相似性搜索。 |
| 53 | + |
| 54 | +11、[不要让字典破坏你的 Python 代码](https://roman.pt/posts/dont-let-dicts-spoil-your-code/) |
| 55 | + |
| 56 | +字典是很常用的数据结构,但千万不要滥用!文章指出了字典的不透明和可变性难维护问题,并介绍用类、数据类、Pydantic、TypedDict 等方式来替代字典,提高代码清晰度、可维护性和安全性。 |
| 57 | + |
| 58 | +12、[TypedDict 比你想象的更好用](https://blog.changs.co.uk/typeddicts-are-better-than-you-think.html) |
| 59 | + |
| 60 | +TypedDict 是 Python 3.8 的 PEP-589 引入的,主要为字典提供类型注解。文章介绍了它在某些场景下特别好用,包括非完整性用法、作为 \*\*kwargs 使用、传递依赖等。 |
| 61 | + |
| 62 | +13、[从 virtualenvwrapper 切换到 direnv、Starship 和 uv](https://treyhunner.com/2024/10/switching-from-virtualenvwrapper-to-direnv-starship-and-uv) |
| 63 | + |
| 64 | +作者分享了自己旧的 virtualenvwrapper 工作流,以及最近切换到 direnv、Starship 和 uv 的相关配置和使用体验。 |
| 65 | + |
| 66 | +14、[Python NZ 的财务主管挪用资金,导致协会债务危机](https://www.interest.co.nz/technology/130074/carlos-cordero-treasurer-python-nz-stole-money-high-profile-society-over-several) |
| 67 | + |
| 68 | +Python New Zealand 是由志愿者运营的非营利性协会,其财务主管在近 5 年挪用 7 万美元资金,导致最后账上仅剩 26 美元!文章介绍了调查发现的案情细节。(附:Django 软件基金会财务主管 [关于技术非营利性组织财务主管角色的看法](https://wsvincent.com/thoughts-on-pyconnz)) |
| 69 | + |
| 70 | +## [🐿️项目&资源](https://xiaobot.net/p/python_weekly) |
| 71 | + |
| 72 | +1、[PyUIBuilder:适用于 Tkinter、CustomTkinter、Kivy 的 GUI 构建器](https://github.com/PaulleDemon/PyUIBuilder) |
| 73 | + |
| 74 | +通过拖拽方式,轻松创建 Python GUI 应用。支持多个框架,预提供 UI 小部件,支持扩展三方 UI 库,支持布局管理器,支持上传本地资产。 |
| 75 | + |
| 76 | + |
| 77 | + |
| 78 | +2、[AI-Youtube-Shorts-Generator:用 GPT-4 自动分析并剪辑视频](https://github.com/SamurAIGPT/AI-Youtube-Shorts-Generator) |
| 79 | + |
| 80 | +利用 GPT-4 和 Whisper 从 YoouTube 视频中提取亮点,并剪辑成有趣的短片,支持垂直裁剪,适应短视频平台风格。 |
| 81 | + |
| 82 | +3、[streamable:让可迭代对象支持流式操作](https://github.com/ebonnal/streamable) |
| 83 | + |
| 84 | +让可迭代对象支持流式操作,在操作时延迟计算,支持并发。 |
| 85 | + |
| 86 | +4、[gptme:在终端中写代码、浏览网页、使用视觉](https://github.com/ErikBjare/gptme) |
| 87 | + |
| 88 | +终端中的个人 AI 助手,执行代码、读写文件、浏览网页、查看图片。(star 1.9K) |
| 89 | + |
| 90 | +5、[open-notebooklm:将任意 PDF 转换为播客对话节目](https://github.com/gabrielchua/open-notebooklm) |
| 91 | + |
| 92 | +利用开源 LLM 和 TTS 模型将 PDF 内容生成自然对话形式的播客节目,输出为 MP3 文件。使用 Gradio 开发的简单界面,便于交互。(star 1.1K) |
| 93 | + |
| 94 | +6、[starfyre:响应式的基于 WASM 的 SSR Python Web 框架](https://github.com/sparckles/starfyre) |
| 95 | + |
| 96 | +基于 Pyscript,让你仅用 Python 开发响应式前端应用。 |
| 97 | + |
| 98 | +7、[secure:为 Django、Flask、FastAPI 添加安全的请求头](https://github.com/TypeError/secure) |
| 99 | + |
| 100 | +为主流 Web 框架添加安全请求头(如 `Strict-Transport-Security`、`X-Frame-Options` 等),避免常见安全漏洞的影响。 |
| 101 | + |
| 102 | +8、[pooltool:逼真物理效果的沙盒台球游戏](https://github.com/ekiefl/pooltool) |
| 103 | + |
| 104 | +Python 开发的通用台球模拟器,交互式 3D 界面,侧重于速度、灵活性、可视化和分析的便利性。 |
| 105 | + |
| 106 | + |
| 107 | + |
| 108 | +9、[otterwiki:Python 开发的简约 wiki 应用](https://github.com/redimp/otterwiki) |
| 109 | + |
| 110 | +Python 开发的内容协作管理软件,技术栈:Flask、halfmoon CSS 框架、CodeMirror 用作编辑器。界面简约,支持暗黑模式,支持 Markdown、身份验证、页面历史、页面附件等。 |
| 111 | + |
| 112 | +10、[curl_cffi:可模拟浏览器 tls/ja3/http2 指纹的 http 客户端](https://github.com/lexiforest/curl_cffi) |
| 113 | + |
| 114 | +与其它纯 Python http 客户端(如 httpx 和 requests)不同,curl_cffi 可模拟浏览器的 TLS/JA3 和 HTTP/2 指纹,支持 websocket。(star 2.2K) |
| 115 | + |
| 116 | +11、[thepipe:从 PDF、URL、幻灯片、视频中提取干净的 Markdown](https://github.com/emcf/thepipe) |
| 117 | + |
| 118 | +使用视觉语言模型,从多种数据源上提取结构化数据,可与 LLM、向量数据库和 RAG 框架配合使用。(star 1.1K) |
| 119 | + |
| 120 | +12、[erdantic:Pydantic 等数据模型类的实体关系图](https://github.com/drivendataorg/erdantic) |
| 121 | + |
| 122 | +为 Python 数据模型类(Pydantic、attrs、dataclass)绘制实体关系图(ERD),图表使用 Graphviz 渲染。 |
| 123 | + |
| 124 | + |
| 125 | + |
| 126 | +## [🐢播客&视频](https://xiaobot.net/p/python_weekly) |
| 127 | + |
| 128 | +1、[Python 3.13 和最新趋势:2025 年开发者指南](https://www.youtube.com/live/GPwYSf1t8Lw) |
| 129 | + |
| 130 | +视频介绍了 Python 3.13 中令人兴奋的新功能,还透露了 Python 3.14 最新开发计划。 |
| 131 | + |
| 132 | +2、[用 FastAPI、React 与 MongoDB 作全栈开发](https://www.youtube.com/watch?v=PWG7NlUDVaA) |
| 133 | + |
| 134 | +FreeCodeCamp 的视频教程,介绍了如何用 FARM 技术栈(FastAPI、React 和 MongoDB)开发全栈项目。 |
| 135 | + |
| 136 | +3、[核心开发者们在 Meta 举行 sprint 活动](https://podcasters.spotify.com/pod/show/corepy/episodes/Episode-15-Core-sprint-at-Meta-e2p64tc) |
| 137 | + |
| 138 | +40 多名 Python 核心开发者们花了一周时间对 Python 3.13 作收尾,并为 Python 3.14 规划、原型设计和实现功能。播客中还采访了一些开发者。 |
| 139 | + |
| 140 | +4、[聊聊 3.13 中你们感兴趣的特性,和我实现的功能](https://www.bilibili.com/video/BV1dm2yYrEnn) |
| 141 | + |
| 142 | +国内 Python 核心开发者高天聊了 3.13 的几个新特性,以及他实现的 PEP-667 和几个 PDB 的特性。 |
| 143 | + |
| 144 | +## [🐧 往年回顾](https://xiaobot.net/p/python_weekly) |
| 145 | + |
| 146 | +[Python 潮流周刊#22:Python 3.12.0 发布了!!](https://pythoncat.top/posts/2023-10-12-weekly)(2023.10.12) |
| 147 | + |
| 148 | +## [🐱欢迎订阅](https://xiaobot.net/p/python_weekly) |
| 149 | + |
| 150 | +技术周刊是聪明人在信息过载时代中筛选优质知识的聪明手段。这是一个专为国内 Python 开发者量身打造的资讯平台,为你挑选最值得分享的文章、教程、开源项目、软件工具、播客和视频、热门话题等丰富内容。[立即订阅](https://xiaobot.net/p/python_weekly),每周将收到一篇文章推送,每周进步一点点。 |
| 151 | + |
| 152 | +欢迎留言,说说你最喜欢本期的哪一则分享?大家反馈得越多,我今后分享的也会越多! |
| 153 | + |
| 154 | +欢迎将[本专栏](https://xiaobot.net/p/python_weekly)分享给同样爱学习的同学,当有人通过你分享的海报或者链接,购买了专栏,那么你将获得 **50%** 的返利。 |
| 155 | + |
| 156 | +[Python 潮流周刊第 2 季完结了,分享几项总结](https://pythoncat.top/posts/2024-07-14-iweekly) |
| 157 | + |
| 158 | +[Python 潮流周刊第一季精华合集(1~30)](https://pythoncat.top/posts/2023-12-11-weekly) |
| 159 | + |
| 160 | +[万字浓缩版,Python 潮流周刊第 1 季的 800 个链接!](https://xiaobot.net/post/78c3d645-86fa-4bd8-8eac-46fb192a339e) |
0 commit comments