Skip to main content

Aids users in publishing data to a Record Evolution Datapod

Reason this release was yanked:

requires protected realms

Project description

reswarm-py

About

Makes publishing data to a Record Evolution Datapod incredibly easy!

Usage

import asyncio
from reswarm import Reswarm

# create a reswarm instance, which auto connects to the Record Evolution Platform
# the reswarm instance handles authentication and reconnects when connection is lost
rw = Reswarm()

async def main():
    while True:
        # publish an event (if connection is not established the publish is skipped)
        publication = await rw.publish("test.publish.com", {"temperature": 20})
        print(publication)
        await asyncio.sleep(3)


if __name__ == "__main__":
    # run the main coroutine
    asyncio.get_event_loop().create_task(main())
    # run the reswarm component
    rw.run()

Options

The Reswarm __init__ function can be configured with the following options:

{
    serial_number: string;
}

serial_number: Used to set the serial_number of the device if the DEVICE_SERIAL_NUMBER environment variable does not exist. It can also be used if the user wishes to authenticate as another device.

Advanced Usage

If you need more control, e.g. acting on lifecycle events (onJoin, onLeave) take a look at the examples folder.

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

reswarm-0.0.18.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

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

reswarm-0.0.18-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file reswarm-0.0.18.tar.gz.

File metadata

  • Download URL: reswarm-0.0.18.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for reswarm-0.0.18.tar.gz
Algorithm Hash digest
SHA256 39ff5c5440e4763790d831f25104dbf4a2c0adcf3c35d645ec678f00aa4816d2
MD5 f355e7ffd420a07ac71f2b0a54c1118c
BLAKE2b-256 33009c8b0251dfe9d382a61f501500ebe27ad00afebf1fe75f9a31a0aadbcb32

See more details on using hashes here.

File details

Details for the file reswarm-0.0.18-py3-none-any.whl.

File metadata

  • Download URL: reswarm-0.0.18-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for reswarm-0.0.18-py3-none-any.whl
Algorithm Hash digest
SHA256 4a38111607485a50f94fc69e0e46153d1ff87416a4a1fd2250702e3e5051c016
MD5 465ea3e0fbbcec5a47bfd764fa4fed5d
BLAKE2b-256 ae421976b18071505a612e7098225a66cb6e4ac8f0b0eb52064b03d653ecfc99

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