Skip to main content

Python client to consume the CIOT Device Backbone GraphQL API

Project description

IOT Device Backbone - Client (Python)

Getting Started

pip install iot-device-backbone-client

Usage

from iot_device_backbone_client.client import IotDeviceBackboneClient
import asyncio

# Replace with your connection string
connection_string = "http://clq2kqjsy0jgqvvlq7tm1mlyt:e3c2216a-cfff-4924-8420-2c65dd2c5d58@localhost:4900/"

# Create a client to connect to the backbone
client = IotDeviceBackboneClient(
    f"{connection_string}graphql",
    {
        # Required for ensuring we bypass the CSRF protection from the backbone
        "Apollo-Require-Preflight": "1"
    },
)

For a full example, see the example directory.

Development

Generate the client by running:

ariadne-codegen

Install dependencies:

pip install -r requirements.txt

Install locally:

python -m pip install -e .

See example directoy for a complete. You can run them with:

python -m example.main

Publishing

python -m pip install build twine

python -m build

twine check dist/*

twine upload dist/*

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

iot-device-backbone-client-0.0.2.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

iot_device_backbone_client-0.0.2-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file iot-device-backbone-client-0.0.2.tar.gz.

File metadata

File hashes

Hashes for iot-device-backbone-client-0.0.2.tar.gz
Algorithm Hash digest
SHA256 f9d3ef2fa8119d9a4b975074d6de7ef2766da8c7352e91ecfb8676995018c84a
MD5 5d1825c8dca563d8546588df0c64197d
BLAKE2b-256 127b1d13f70af82ef2aab4c25cad8b544e16ba8132beb8746f587f8abf3a9298

See more details on using hashes here.

File details

Details for the file iot_device_backbone_client-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for iot_device_backbone_client-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7c5cda2dfeebc91a93da06db20abc42f77041f8f08aabc05c41ee695e300e72d
MD5 0c27266c88f103e371cb8c6fca3f9163
BLAKE2b-256 3fe94afbc8cdc27680ff100eb110021a3ae409f5bf7ce5185855f5cdaec47f31

See more details on using hashes here.

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