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!

Events for Morepath

Project Description

more.signals is an extension for Morepath that adds Blinker signals support.

Quickstart

The integration adds two directives to a Morepath App for connecting and disconnecting signals. Once connected you can emit to signal using request.app.signal('signal.name') to specify a named signal and then use the send() method, or you can combine both using request.app.signal('signal.name').send(self, **data). Please read Blinker’s documentation for all the details.

from more.signals import SignalApp

class App(SignalApp):
    pass


@App.connect('hello')
def say_hello(sender, **data):
    print('HELLO {}!'.format(data.get('name')))


@App.path(path='')
class Root(object):
    pass


@App.json(model=Root)
def root_view(self, request):
    name = 'Foo Bar'
    request.app.signal('hello').send(self, name=name)
    return {'name': name}


if __name__ == '__main__':
    morepath.run(App())

CHANGES

0.1.0 (2017-01-29)

  • Initial public release
Release History

Release History

This version
History Node

0.1.0

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