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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file more.signals-0.1.0.tar.gz.
File metadata
- Download URL: more.signals-0.1.0.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7437c492051f0b75f2ef6525f36c5e460b02aecec7aad9bb7665ae78e048106e
|
|
| MD5 |
4e45d1e1965cae5df7dd4440f5852d51
|
|
| BLAKE2b-256 |
e5afc40ef509c6c90ac43d1c62e4bdecc3ac6c469c923eba079c6fc25ab2e747
|
File details
Details for the file more.signals-0.1.0-py3-none-any.whl.
File metadata
- Download URL: more.signals-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b58f3dfafc6daafbe41eb60871b0379cdd7287cf455fff697b403551b0560c9
|
|
| MD5 |
2e59ef7220e845addbc486bf4c69ade6
|
|
| BLAKE2b-256 |
17e1255a61cb8c80ade0446ae1b8fc8d3220ed421468e4ab413c6be37edb31af
|