ASGI implemented as a Twisted resource
Project description
txasgiresource is ASGI implemented as a Twisted Web Resource, very similar to WSGIResource.
This is inspired by Daphne but somewhat implemented from specs.
It can also run as a daemon.
The code is available on GitHub
Usage
As Twisted Resource
from twisted.web import server
from yourdjangoproject.routing import application
resource = ASGIResource(application)
site = server.Site(resource)
# If we are done with the resource, make sure to stop it.
yield resource.stop()
As ASGI Protocol server
twistd -n txasgi -a yourdjangoproject.routing:application
As ASGI Protocol server on a different port and ip
twistd -n txasgi -a yourdjangoproject.asgi:channel_layer -d tcp:5566:interface=0.0.0.0
Status
Master branch
Develop branch
License
MIT, see LICENSE
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
txasgiresource-2.1.7.tar.gz
(9.5 kB
view hashes)
Built Distribution
Close
Hashes for txasgiresource-2.1.7-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 026fcadb0c227afd6f70f5f5bebd84b7ec08d02c7b0e5f070941b34a7e5af3cb |
|
MD5 | 32c11b149f9fdd98ee1102e09a575759 |
|
BLAKE2b-256 | 10b8c50011e6cdf9311ac915cffb2f20976f272bc72056e824775abe9fb1d99a |