pybsub
features
- ipc
- small (< 100 sloc)
- no external dependencies (not even imports)
- docstrings
example
from pybsub import PubSub
ps = PubSub()
# the channel we will subscribe to
c = "test"
# the callback function that will be fired
# when a message has been published on the
# channel we subscribed to
cb = lambda msg: print(msg)
# various ways of subscribing to a channel
# note that it returns an integer
# you will want to save this if you want to
# remove the callback later on
k = ps.subscribe(c, cb)
# or
k = ps.sub(c, cb)
# or
k = ps.s(c, cb)
# various ways of publishing
ps.publish(c, "somedata")
# or
ps.pub(c, {"some": "data"})
# or
ps.p(c, b"somedata")
# various ways of unsubscribing
# we will use the integer we received from
# subscribing here again
ps.unsubscribe(c, k)
# or
ps.unsub(c, k)
# or
ps.u(c, k)
# you could also just clear all subscriptions
ps.clear()
# or you could clear all subscriptions on a channel
ps.clear_channel()
Metadata
Release files for pybsub 0.2
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 |
|---|---|---|---|---|
| pybsub-0.2.tar.gz | 3.2 kB | Without provenance | Details for pybsub-0.2.tar.gz |
Release files / pybsub-0.2.tar.gz
| Download URL | pybsub-0.2.tar.gz |
|---|---|
| Size | 3.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
118c134c354b575cff7f463664fe7dd5985a8749d94057ad1fc5d558ff1b8df6
|
|
BLAKE2b-256 checksum How to use checksums |
7884fc07de743ba7aa2c20ec0740f59c0f53b98a548c73cc8ecbfddc47593edd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2
|
Security for pybsub 0.2
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.