py-ipfs-pubsub
Pubsub client for python, since ipfshttpclient pubsub isn't compatibe with the newer versions of ipfs
http://github.com/ZachisGit/py-ipfs-pubsub
Install
pip3 install py-ipfs-pubsub
Example
import pubsub
# Topic specific callback
def on_sub_test(data,seqno,topic_ids,cid):
print ("New Message:",cid)
print (data)
print ("")
# Subscribe - pubsub.sub(endpoint, topic, callback)
pubsub.sub("/dns/127.0.0.1/tcp/5001/http","mytopic",on_sub_test)
# Publish 10x
for i in range(10):
# Publish - pubsub.pub(endpoint, topic, str/bytes message)
pubsub.pub("/dns/127.0.0.1/tcp/5001/http","mytopic","Hello World!")
input("")
# Unsubscribe from topic - pubsub.unsub(topic)
pubsub.unsub("mytopic")
Release files for py-ipfs-pubsub 0.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 | |
|---|---|---|---|
| py-ipfs-pubsub-0.0.2.tar.gz | 3.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| py_ipfs_pubsub-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.4 kB
Release files / py-ipfs-pubsub-0.0.2.tar.gz
| Download URL | py-ipfs-pubsub-0.0.2.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b55dc4cb540fb1fc9cbb63e578cfe5367f0c3e408834751eb38469c0decf2f96
|
|
BLAKE2b-256 checksum How to use checksums |
04a709a0876492c5a44163917732f3243b673bdb550cc790ae26ab74d3b2168b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Release files / py_ipfs_pubsub-0.0.2-py3-none-any.whl
| Download URL | py_ipfs_pubsub-0.0.2-py3-none-any.whl |
|---|---|
| Size | 3.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0c156f07d78b30568f4d61f89681c24a854b03a17373dd26d1cff16401978582
|
|
BLAKE2b-256 checksum How to use checksums |
e1b9db227b1ef6a189b58b25c87d7821f689b561778ee5970c0a0b7966051f58
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|