micropython-event-bus
Micropython producer/subscriber event system with optional threading
Note that this package is early stages so could have undocumented bugs.
Installation
pip3 install micropython-event-bus
or Clone this repository into your project:
git clone https://github.com/jaycosaur/micropython-event-bus
Usage
from micropython_event_bus import Producer, subscribe
# setup simple producer
my_producer = Producer(name="my first producer")
# create subscriber
# with decorator
@subscribe(my_producer)
def my_subscriber(*args, **kwargs):
print('I got a message!')
# or by calling the producer subscribe method
def my_second_subscriber(*args, **kwargs):
print('I also got a message!')
my_producer.subscribe(my_second_subscriber)
# emit event
# from producer via __call__ method
my_producer(1,2,3,4)
# or by calling emit directly
my_producer.emit(1,2,3,4)
For more examples please refer to the examples
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
License
Metadata
Release files for micropython-event-bus 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| micropython_event_bus-0.0.4.tar.gz | 3.0 kB | Without provenance | Details for micropython_event_bus-0.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| micropython_event_bus-0.0.4-py3-none-any.whl | Python 3 | none | any | Details for micropython_event_bus-0.0.4-py3-none-any.whl |
Total release size: 7.5 kB
Release files / micropython_event_bus-0.0.4.tar.gz
| Download URL | micropython_event_bus-0.0.4.tar.gz |
|---|---|
| Size | 3.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4891199049ae12a152b099e91fc966cd1600b5115c6c1981f17e0148b0307079
|
|
BLAKE2b-256 checksum How to use checksums |
fb0f253df818e25e83a45507dd368d572e2842fa4e4962589084aa8ce7a6603b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
|
Release files / micropython_event_bus-0.0.4-py3-none-any.whl
| Download URL | micropython_event_bus-0.0.4-py3-none-any.whl |
|---|---|
| Size | 4.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
965de77712de022d440c90cdbd39e45ccbdb31bada2dc7ad2b93da401c410174
|
|
BLAKE2b-256 checksum How to use checksums |
73ba454975269b044870c763a5c74b116d4bdbdc07dd9a57e3c2ca0dacf811d6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
|
Security for micropython-event-bus 0.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.