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
SSE
===

Simple asyncio/aiohttp wrapper for Server-Sent Events.

Usage
-----

Sending events:

```python
import asyncio
import sse


class Handler(sse.Handler):
@asyncio.coroutine
def handle_request(self):
yield from asyncio.sleep(2)
self.send('foo')
yield from asyncio.sleep(2)
self.send('bar', event='wakeup')

start_server = sse.serve(Handler, 'localhost', 8888)
asyncio.get_event_loop().run_until_complete(start_server)
asyncio.get_event_loop().run_forever()
```

Validating incoming requests:

```python
class Handler(sse.Handler):
def validate_sse(self):
super().validate_sse()
# use self.request / self.payload
if not self.request.path.startswith('/live'):
raise sse.SseException()
```

Sending JSON data:

```python
class Handler(sse.Handler):
@asyncio.coroutine
def handle_request(self):
self.send({'foo': 'bar'})
```

Sending IDs / event names / retry information:

```python
class Handler(sse.Handler):
@asyncio.coroutine
def handle_request(self):
self.send('some data', id=12345, event='something', retry=10000)
```
Release History

Release History

0.1

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

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
asyncio_sse-0.1-py33-none-any.whl (5.2 kB) Copy SHA256 Checksum SHA256 py33 Wheel Feb 23, 2014
asyncio-sse-0.1.tar.gz (3.9 kB) Copy SHA256 Checksum SHA256 Source Feb 23, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development 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