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.3.0.tar.gz
(4.3 kB
view details)
Built Distribution
File details
Details for the file PyFlume-0.3.0.tar.gz
.
File metadata
- Download URL: PyFlume-0.3.0.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62f35276bda1311206544c0e66e591442a209267cbd9c80af029fd61a7571333 |
|
MD5 | 82d362e8e1acfc758dd0e19fbc426329 |
|
BLAKE2b-256 | 8dee6bc49eb370bfb11374bc83fdbee40b26b9c61d7fa432f03128f2dbf0016c |
File details
Details for the file PyFlume-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: PyFlume-0.3.0-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60876482b5889e7fe606ad3e70c131ea5fcff0855e737c4967266bb87cd45222 |
|
MD5 | 99337be19e123ab9e87e6544250e89d6 |
|
BLAKE2b-256 | 94c0cb43a1607b3fbc8622effa5ca19a523c875a6ab5dc15831e9f81fb980da3 |