This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

txasgiresource is ASGI implemented as a Twisted Web Resource, very similar to WSGIResource.

This is inspired by Daphne but largely implemented from specs.

It can also run as a daemon with or without the actual application embedded inside.

The code is available on GitHub

Usage

As Twisted Resource

from twisted.web import server

from yourdjangoproject.asgi import channel_layer

resource = ASGIResource(channel_layer)
site = server.Site(resource)

# If we are done with the resource, make sure to stop it.

resource.stop()

As ASGI Protocol server

twistd -n txasgi -c yourdjangoproject.asgi:channel_layer

As ASGI Protocol server with embedded workers

twistd -n txasgi -c yourdjangoproject.asgi:channel_layer -w 6

As ASGI Protocol server with embedded workers and on a different port and ip

twistd -n txasgi -c yourdjangoproject.asgi:channel_layer -w 6 -d tcp:5566:interface=0.0.0.0

Scheduler

The scheduler is built around apscheduler and directly maps to the three schedule-types:

Schedule a job

Channel('schedule').send({
    'method': 'add',
    'id': 'some_unique_job_id',
    'reply_channel': 'schedule.time_to_run',
    'reply_args': {'some', 'reply'},
    'trigger': 'date',
    'run_date': '2009-11-06 16:30:05',
})

Setup channel for the reply

channel_routing = {
    'schedule.time_to_run': 'myapp.consumers.my_consumer',
}

Cancel the job

Channel('schedule').send({
    'method': 'remove',
    'id': 'some_unique_job_id',
})

Status

Master branch

Develop branch

License

MIT, see LICENSE

Release History

Release History

0.3.0

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
txasgiresource-0.3.0-py2.py3-none-any.whl (20.2 kB) Copy SHA256 Checksum SHA256 3.4 Wheel Apr 10, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting