| Build Status | |
| Supported Versions | |
| Latest Version |
Overview
gossip is a library implementing a basic hook mechanism for implementing callbacks. It provides flexible configuration, hook namespaces and error handling strategies.
Installation
$ pip install gossip
Usage
The simplest use case when we want to register a callback to be called later. We start by registering a callback through gossip.register:
>>> from __future__ import print_function
>>> import gossip
>>> @gossip.register('hook_name')
... def func():
... print('Called')
Now we can call the hook:
>>> gossip.trigger('hook_name')
Called
And There's A Lot More!
Plain publish/subscribe is just the tip of the iceberg. Gossip is geared towards implementing complex plugin systems, and supports many more advanced features, such as:
- Token (bulk) unregistration of hooks
- Hook dependencies - control the order of hook callbacks, either implicitly or explicitly
- Non-reentrant hooks
- Custom exception handling strategies
And much more. For more information, please refer to the documentation
Licence
BSD3
Release files for gossip 2.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| gossip-2.5.0.tar.gz | 64.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gossip-2.5.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 80.6 kB
Release files / gossip-2.5.0.tar.gz
| Download URL | gossip-2.5.0.tar.gz |
|---|---|
| Size | 64.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f0d2338f49f2c1445a7e463076b208464590c90cb5b576bf242d59b705c8d09e
|
|
BLAKE2b-256 checksum How to use checksums |
2c4c86dc8fb75aec9d84456ef7ba2d3307411f5efebed07081c279c9e2659b94
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.28.1
|
Release files / gossip-2.5.0-py3-none-any.whl
| Download URL | gossip-2.5.0-py3-none-any.whl |
|---|---|
| Size | 16.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2e5a1c82ab797126558e9f2709e671029f31a620550da25201a6867425db4108
|
|
BLAKE2b-256 checksum How to use checksums |
d6c4429565ca5febe2497396fff0b9b829cc7db42ffe06a301868249a13ef3d5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.28.1
|