Client library for Wiresense
Project description
Wiresense.py
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
✍️Authors
Project details
Release history Release notifications | RSS feed
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)
Built Distribution
Close
Hashes for wiresense-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca2a799f6764c8c46d3bf613825c3857b971acdf2e845ec548e8eedcb843798e |
|
MD5 | dc7f50f34959143158e1312965011739 |
|
BLAKE2b-256 | 63ef004629f4a890fbdbe8d3f9b3934e4307061dec12be63baf30a40f1e479b0 |