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第三方库


热门话题
JPanel的java滚动窗格?   java JPA查询方法:findTopX,其中X是给定的(变量)数?   当应用程序在Oreo中处于后台时,java音乐服务在几秒钟后不工作   java通过TCP流发送密钥编码的字符串BadPaddingException with Windows   java在这里构建代码的更好方法是什么?   如何使用Java(无给定参数)检查列表中是否有数字   跨多个JVM的java事务控制   dataframe如何使用SparkJavaAPI的MapFunction和ReduceFunction在集群上并行处理这个问题?   java如何在多模块spring引导中配置yml文件   已安装java JDBC驱动程序,但出现异常   JUnit 4中的java,有没有一种方法可以在扩展BlockJUnit4ClassRunner的自定义运行程序中,在all@BeforeClass之前运行一段代码   继续未能选择JAVA上的radioButton   java如何通过PHP代码运行shell命令?   java JSlider SynthLookandFeel填充颜色   java给定一个数字,打印下三个数字   java SpringMVC(安全)403错误   java Graphhopper从装载的obb文件系统加载路由信息时出错   java安全工具扫描问题,发现依赖默认编码:新字符串(字节[])   java如何获取嵌套字段