Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 16029ceafb
Fetching contributors…

Cannot retrieve contributors at this time

76 lines (52 sloc) 2.5 kb

Eventsource library for python

this library installs also three utilities:
  • eventsource-server : that helps to create an eventsource server (module eventsource.listener)
  • eventsource-client : that helps to create an eventsource client (module eventsource.client)
  • eventsource-request : that helps to send requests to the client through the server (module eventsource.request)

see --help or README for more information

Have a look at the README part of this documentation to integrate or extend this library.

eventsource Package

This library exposes three modules, two of them based on tornado library. The listener module, ran by the server, waits for incoming connections. When a client, running the client module, connects to the listener, it waits for incoming events from the server. And finally, when the request module is ran, it posts events on the server, who forwards them to the client.

The request module relies only on urllib2.

:mod:`listener` Module

This module opens a new long polling connection on a listener, and waits for events to come.

:mod:`client` Module

This module listens for incoming connections and forwards events from "request" to "client" using tornado http long-polling on the client side, and http post on the request side.

:mod:`request` Module

This module only connects to listener's rest POST interface to send new events

Resources

Indices and tables

Jump to Line
Something went wrong with that request. Please try again.