Skip to main content

Official Python SDK for the RapidSockets platform

Project description

RapidSockets Python SDK

Introduction

This is the official Software Development Kit for Python to interact with the RapidSockets real-time messaging platform.

Installation

pip install rapidsockets

Quickstart

from rapidsockets import RapidSockets
import time

# initialize and open a connection to the RapidSockets Gateway
rs = RapidSockets({
    'key': 'your multi key'
})

# the callback function run on a new message to channel "mytest"
def mytest(packet):
    print(packet)

# start listening for new messages on channel "mytest"
rs.subscribe({
    'channel': 'mytest',
    'callback': mytest
})

# as a test, publish messages to channel "mytest" every two seconds
while True:
    rs.publish({
        'channel': 'mytest',
        'message': 'test message'
    })
    time.sleep(2)

Development specific notes

# build test wheel
python3 setup.py bdist_wheel

# install test wheel
python3 -m pip install dist/rapidsockets-0.0.5-py3-none-any.whl

# upload to pypi
python3 -m twine upload dist/rapidsockets-0.0.5-py3-none-any.whl

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

rapidsockets-0.0.5-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file rapidsockets-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: rapidsockets-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 3.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.6.8

File hashes

Hashes for rapidsockets-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 31a93eeb8789b7a27fab19df0c0ddcd6e1183eb458158887da8b58100c7c0cc5
MD5 6d70b59015903583449fbfb6b0097d4d
BLAKE2b-256 6bad2733a44398238c05b48793aebbcf4d4986e0ff7407002a81470d223b3db6

See more details on using hashes here.

Supported by

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