Skip to main content
Warning: You are using the test version of PyPI. This is a pre-production deployment of Warehouse. Changes made here affect the production instance of TestPyPI (testpypi.python.org).
Help us improve Python packaging - Donate today!

Nameko extension with a Cometd client implementing Bayeux protocol

Project Description

Nameko Cometd Bayeux Client

Nameko extension with a Cometd client implementing Bayeux protocol supporting server to client event delivery via long-polling HTTP transport.

Usage

Add Bayeux client configuration to your Nameko config file:

# config.yaml

BAYEUX:
    VERSION: 1.0
    MINIMUM_VERSION: 1.0
    SERVER_URI: http://example.com/cometd

Decorate entrypoint in your service class:

# service.py

from nameko_bayeux_client import subscribe

class Service:

    name = 'some-service'

    @subscribe('/some/topic')
    def handle_event(self, data):
        # this entrypoint is fired on incoming events
        # of '/some/topic' channel
        print(data)

Run your service, providing the config file:

$ nameko run service --config config.yaml

On start-up, the extension connects to Cometd server, subscribes and starts listening to channels defined by entrypoints.

Release History

Release History

This version
History Node

0.0.1

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
nameko_bayeux_client-0.0.1-py3-none-any.whl (8.0 kB) Copy SHA256 Checksum SHA256 py3 Wheel Apr 22, 2017
nameko-bayeux-client-0.0.1.tar.gz (5.7 kB) Copy SHA256 Checksum SHA256 Source Apr 22, 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