3

一篇关于 Python ASGI 的介绍

 2 years ago
source link: https://www.v2ex.com/t/813413
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
一篇关于 Python ASGI 的介绍
5 条回复    2021-11-06 12:25:03 +08:00

ericls

ericls   17 小时 0 分钟前 via iPhone

18 年试手写了一个框架
ASGI 目前最大的优势是很多工具的 signature 都是一样的

ericls

ericls   16 小时 52 分钟前

WSGI 的 signature `simple_app(environ, start_response)`, 所有的框架在包装的时候都没有暴露,而 ASGI 整个生态比较统一

wellsc

wellsc   13 小时 15 分钟前 via Android

为什么那“时代变了”的回复被删了?

ClericPy

ClericPy   11 小时 51 分钟前   ❤️ 1

all-in 协程两年了, 强制关闭在运行的协程时候真香, 比线程灵活太多了. 就是 handle int signal 的时候遇到 subprocess 有点难受, 没在外层截住直接顺便传递给子进程里了... 还在继续折腾

话说协程招人真难啊, 虽然面的人里 2.7 的少了, 但都 3.6 不用协程的...

项目里提到的 Mangum 得去试试, 貌似能少写不少 lambda 的 API gateway 部分

est

est   11 小时 13 分钟前

其实 uvicorn 写得并不完整,fastapi starlette 什么的都只能说玩玩 REST API 。别的都不行。

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK