Package to integrate with Flume Sensor
Project description
PyFlume
Authenticates to Flume API, returns a list of devices and allows you to pull the latest sensor results over a period of time.
Configuration
You can find your Client ID and Client Secret under "API Access" on the settings page.
Configuration Variables
username:
description: Your flume user id.
required: true
type: string
password:
description: Your flume password.
required: true
type: string
client_id:
description: Your flume Client ID.
required: true
type: string
client_secret:
description: Your flume Client Secret.
required: true
type: string
Retrieve a list of devices:
import pyflume
flume_devices = pyflume.FlumeDeviceList(username, password, client_id, client_secret)`
Return Data for all Flume Devices of Type 2
import pyflume
from datetime import timedelta
username="<username>"
password="<password>"
client_id="<client_id>"
client_secret="<client_secret>"
flume_devices = pyflume.FlumeDeviceList(username, password, client_id, client_secret)
SCAN_INTERVAL = timedelta(minutes=1) # Using datetime
TIME_ZONE='America/Los_Angeles' # Using pytz
for device in flume_devices.device_list:
if device["type"] == 2:
flume = pyflume.FlumeData(
username,
password,
client_id,
client_secret,
device["id"],
TIME_ZONE,
SCAN_INTERVAL,
)
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
PyFlume-0.2.4.tar.gz
(4.0 kB
view details)
Built Distribution
File details
Details for the file PyFlume-0.2.4.tar.gz
.
File metadata
- Download URL: PyFlume-0.2.4.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f64d3f7d2c4656b428037a63f47f2f463b2b90e2d89e5c457ce14e1ecdeb7219 |
|
MD5 | 0a9c47bbba84fcba30af850c4c7d357c |
|
BLAKE2b-256 | 402a2c5dd1f9efca952e11bbdb7098073bc901493754d2fbeaec5658131915ec |
File details
Details for the file PyFlume-0.2.4-py3-none-any.whl
.
File metadata
- Download URL: PyFlume-0.2.4-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3c6371160ecec3afc798018b9f7ad08758abbbce663fc769d9fed634ec37a815 |
|
MD5 | c131be1d7bed270b33426eea213191ba |
|
BLAKE2b-256 | 8f466adbad33ddde5866d812da24b466752de3be22f83c9d59a1baf3abd2bb69 |