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.3.tar.gz
(9.2 kB
view hashes)
Built Distribution
Close
Hashes for txasgiresource-2.1.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a49dbb5f4ed618f7cd9a3ecae3e09eab9b9f23282519041823045de18ea6e524 |
|
MD5 | bd9d844e5a8231705931f26ad740c4df |
|
BLAKE2b-256 | 24c369fd4377e8de38a6093baaa60ccd5034bf3efc6d9a4a21540e807dc09d05 |