Skip to main content

Client library for Wiresense

Project description

Wiresense.py

wiresense.py

made with love asyncio build status pypi version pypi downloads

Client libary for Wiresense

🛠️Features

  • Send data to the wiresense frontend
  • Works with almost every sensor
  • Automaticly saved data into csv files

📖Usage

Install the libary with pip:

pip install wiresense

Import the libary and configure it

from wiresense import Wiresense

await Wiresense.config({
    "port": 8080
})

Setup a new sensor (group)

def readSensorData():
    # Replace with you actual sensor reading logic
    return {
        "Pressure": random.randint(0, 10),
        "Humidity": random.randint(0, 10),
        "Temperature": random.randint(0, 10),
    }

sensor_1 = Wiresense('Fake-BME280', readSensorData, './data/sensor1_data.csv')

Execute a sensor (Send to frontend and save to file)

await sensor_1.execute()

Please note that Wiresense is an asynchronous library and requires execution within an asyncio event loop. Make sure to run the main function using asyncio.run() or within an existing asyncio application.

📜License

MIT

✍️Authors

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

wiresense-1.0.2.tar.gz (7.9 kB view hashes)

Uploaded Source

Built Distribution

wiresense-1.0.2-py3-none-any.whl (5.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