Skip to main content

SDK for Stallion message broker

Project description

Stallion Python SDK


go version version
version version version

Client SDK for Stallion message broker

How to use?

Python install:

pip install stallion-python-sdk

Client

Create a client:

# importing Client module
from stallion import Client

# creating a client
# with given stallion server url
c = Client(url="st://localhost:9090")

Publish

# publish an object on a topic
c.Publish("book", {'author': "Amirhossein", 'name': "Stallion"})

Subscribe

# creating a handler
# any published object will be given to this handler as data
def handler(data):
    print(f'{data['author']}: {data['name']})

# subscribe over a topic with given handler
c.Subscribe("book", handler)

Unsubscribe

# unsubscribe from a topic
c.Unsubscribe("book")

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

stallion-python-sdk-1.2.4.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

stallion_python_sdk-1.2.4-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file stallion-python-sdk-1.2.4.tar.gz.

File metadata

  • Download URL: stallion-python-sdk-1.2.4.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.0

File hashes

Hashes for stallion-python-sdk-1.2.4.tar.gz
Algorithm Hash digest
SHA256 b90d22b3e9d22eb87d5f550744d5b1be5cc5b1cd4891af29cef33c8e4bff70d1
MD5 22588cb05433bc0b6b8f90a9e8fa8de2
BLAKE2b-256 8d1fe8e593fb32123457b758bc962ecd90168807316e0c5b74c48eabfe810d83

See more details on using hashes here.

File details

Details for the file stallion_python_sdk-1.2.4-py3-none-any.whl.

File metadata

File hashes

Hashes for stallion_python_sdk-1.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 1260fc74d905b30aa89e580952b98e3ebcb4ad7033a0c39cb808d46489a5f1b1
MD5 d74fc24a66b4a7e0c72fbf87d6fc1c39
BLAKE2b-256 244d680659010b429ab40d0d8dfd6f90eb499dd4b3133ced56c591010b5c8dca

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