Skip to main content

No project description provided

Project description

cyberfly-client-sdk

A python client sdk to interact with cyberfly node to pubsub and store data

Install

pip3 install cyberfly-client-sdk

Example

listen on data

from cyberflySdk import CyberflyClient

kp= {"publicKey": "d04bbd8f403e583248aa461896bd7518113f89b85c98f3d9596bbfbf30df0bcb",
            "secretKey": "a0ec3175c6c80e60bc8ef18bd7b73a631c507b9f0a42c973036c7f96d21b047a"}

client = CyberflyClient(node_url="https://node.cyberfly.io", device_id="093062d0-a357-4f8a-a1cb-35f1b43c12ae",
                        key_pair=kp, network_id="testnet04")


@client.on_message()
def do_something(data):
    print(data)


while 1:
    pass

publish data

from cyberflySdk import CyberflyClient
import time

kp = {"publicKey": "d04bbd8f403e583248aa461896bd7518113f89b85c98f3d9596bbfbf30df0bcb",
            "secretKey": "a0ec3175c6c80e60bc8ef18bd7b73a631c507b9f0a42c973036c7f96d21b047a"}

client = CyberflyClient(node_url="https://node.cyberfly.io", device_id="093062d0-a357-4f8a-a1cb-35f1b43c12ae",
                        key_pair=kp, network_id="testnet04")


while 1:
    client.publish("device id or any topic", {"Temp": 22})
    time.sleep(1)

Project details


Release history Release notifications | RSS feed

This version

0.1

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

cyberfly_client_sdk-0.1-py3-none-any.whl (9.7 kB view hashes)

Uploaded Python 3

Supported by

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