Pymitter Integration
Adds the ability to inject an instance of EventEmitter from pymitter. This instance will be shared within a context (separate threads have separate emitters). Registration is done via the entry point in autoinject, so no need to do anything other than install this package.
from autoinject import injector as _injector
import pymitter
class NeedsEvents:
ee: pymitter.EventEmitter = None
@_injector.construct
def __init__(self):
pass
def do_stuff(self):
self.ee.emit("foo.bar", "hello world")
class LikesEvents:
ee: pymitter.EventEmitter = None
@_injector.construct
def __init__(self):
self.ee.on("foo.bar", self.on_event)
def on_event(self, arg):
print("foo bar emitted: {}".format(arg))
emitter = NeedsEvents()
receiver = LikesEvents()
emitter.do_stuff()
# OUTPUT: foo bar emitted: hello world
Metadata
Release files for autoinject-pymitter 1.0.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 | Provenance | Actions |
|---|---|---|---|---|
| autoinject_pymitter-1.0.0.tar.gz | 2.5 kB | Without provenance | Details for autoinject_pymitter-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| autoinject_pymitter-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for autoinject_pymitter-1.0.0-py3-none-any.whl |
Total release size: 5.7 kB
Release files / autoinject_pymitter-1.0.0.tar.gz
| Download URL | autoinject_pymitter-1.0.0.tar.gz |
|---|---|
| Size | 2.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e41d8cf7eedbd247b12ce602764da0a93634ea05078d30519841a4b2eb12c496
|
|
BLAKE2b-256 checksum How to use checksums |
ac0856e889aac1ea7329376287d0bb55064f0b35c86d27c1386f7e9ee3647395
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.7.9
|
Release files / autoinject_pymitter-1.0.0-py3-none-any.whl
| Download URL | autoinject_pymitter-1.0.0-py3-none-any.whl |
|---|---|
| Size | 3.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
216ebd46c4d07bf6b0d851903257ab3ba2638f4a72ea74b9522ac9955c88ca4a
|
|
BLAKE2b-256 checksum How to use checksums |
5c33feb6f870fe8e640d87c5951e1871247a7c06ba202b5f2c328c11227d128c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.7.9
|
Security for autoinject-pymitter 1.0.0
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.