asgi实现为一个扭曲的资源

txasgiresource的Python项目详细描述


txasgiresource是ASGI实现为一个扭曲的web资源, 非常类似于WSGIResource

这是受Daphne启发的,但有些是从规范实现的。

它也可以作为守护进程运行。

代码可在GitHub

用法

作为扭曲资源

fromtwisted.webimportserverfromyourdjangoproject.routingimportapplicationresource=ASGIResource(application)site=server.Site(resource)# If we are done with the resource, make sure to stop it.yieldresource.stop()

作为asgi协议服务器

twistd -n txasgi -a yourdjangoproject.routing:application

作为不同端口和IP上的ASGi协议服务器

twistd -n txasgi -a yourdjangoproject.asgi:channel_layer -d tcp:5566:interface=0.0.0.0

状态

主分支

https://coveralls.io/repos/github/JohnDoee/txasgiresource/badge.svg?branch=masterhttps://travis-ci.org/JohnDoee/txasgiresource.svg?branch=master

发展分支

https://coveralls.io/repos/github/JohnDoee/txasgiresource/badge.svg?branch=develophttps://travis-ci.org/JohnDoee/txasgiresource.svg?branch=develop

许可证

麻省理工学院,请参见许可证

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
hibernate java JPA使用限制api调用sql函数   java使用哈希代码确定对象等价性   java通过蓝牙在安卓应用程序和pc应用程序之间发送敏感数据   mysql查询在java上不提供小数,但在数据库上提供小数   java链接的JAR在IntelliJ中运行良好,但在命令行中却不行   mkstemp的java等价物   java SINGLE_INTERVAL_SELECTION未按预期工作   使用Java流的lambda并行循环?   java如何增加按键上的数字值?   java karaf单个依赖项错误   具有共享主键的java JPA单向@OneToOne关系始终会触发辅助查询,即使fetchType是急切的   java为什么选择。select()总是返回0   java无法确定NullPointerException中哪个变量为null   字符串Java谜题的原因是什么?