Skip to main content

PubSubRT Python connector

Project description

PSRT Python connector

Python connector for PSRT

SDK Documentation: https://psrt-py.readthedocs.io/

Client usage example:

from psrt import Client
import time

def process_message(client, userdata, message):
    print(message.topic)
    print(message.payload)


client = Client(path='localhost:2873')
# client.tls = True
# client.tls_ca = '/opt/workstuff/psrt/certs/ca.crt'
# client.need_data_socket = False
client.on_message = process_message
client.connect()
client.subscribe('test')
client.subscribe_bulk(['test2', '#'])
client.unsubscribe('test')
client.unsubscribe_bulk(['test2', '#'])
client.subscribe('#')
for _ in range(3):
    client.publish('unit/tests/test1', 'hello')
    time.sleep(1)
client.bye()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

psrt-0.0.16.tar.gz (5.9 kB view details)

Uploaded Source

File details

Details for the file psrt-0.0.16.tar.gz.

File metadata

  • Download URL: psrt-0.0.16.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.26.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.10

File hashes

Hashes for psrt-0.0.16.tar.gz
Algorithm Hash digest
SHA256 91fd9556c912d8450acb33766c14d4a5fcef5c6b21a2290519787ac18eed5bd4
MD5 c8a27095b30f92e4ec2dd56f4ef3372c
BLAKE2b-256 46137d75b69c8cc7759f89b65a1444ac20d5746a9984d52f5f9d184fa7d31ff0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page