Connect with Consibio Cloud
Project description
consibio-cloud-client
Data Client for Consibio Cloud
Installation
To install the package, run the following command:
pip install consibio-cloud-client
Usage
See the examples folder for examples on how to use the client.
You'll need a Consibio Cloud account, to use the client.
The client can be imported with: from consibio_cloud_client import Client, Project
Initialize the client with client = Client(), login and initialize the Project with project = Project(client), and get the datalog in DataFrame with df = project.get_datalog().
Client
The Client exposes the following methods:
auth_valid: to check if the authentication is validauth_login: to login with the credentialsauto_output: to get the output of the last command
The Client stores the session token in a secrets.json file.
Project
The Project exposes the following methods:
get_devices: to get the devices, will return object with the devicesget_elements: to get the elements, will return object with the elementsget_datalog: to get the datalog, will return aDatalogobject
The Project will use the Client to get the data, to remember to initialize the Client before initializing the Project, and login with the auth_login method, too.
DataFrame
The get_datalog method on the Project returns a DataFrame object, where you can use:
plot: to plot the data, by providingproject=project, it will render the element title and color the line, too.get_data: to get the data, each value in aSingleValueobjectget_raw: to get the raw dataget_pandas_df: to get the Pandas DataFrameadd_many: to add multiple elements to the datalogadd: to add a single element to the datalogremove_element: to remove an element from the datalogremove_specific: to remove a specific element from the datalog, with a specific timestamp
SingleValue
The SingleValue object has the following methods:
get_element_id: to get the element idget_value: to get the valueget_timestamp: to get the timestamp
Development
Nox
Nox is a Python automation tool that automates testing in multiple Python environments, packaging, and more.
To install nox, run the following command:
pip install nox
To run the tests session, run the following command:
python3 -m nox -s tests
To run the lint session, run the following command:
python3 -m nox -s lint
It's recommended to use autopep8 to format the code. Install the extension in VS Code, and use the Workspace settings, which can be found in the .vscode folder.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file consibio_cloud_client-1.0.0.tar.gz.
File metadata
- Download URL: consibio_cloud_client-1.0.0.tar.gz
- Upload date:
- Size: 13.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aef00c91abc06ce1f80315efce403770f67cf0772c12a7c47262bea5c6475a14
|
|
| MD5 |
046029df9a6775977c10db7bac715941
|
|
| BLAKE2b-256 |
f4e55e44d7922b371d4a2f8c9ad95ca19287ffab0ba5a30b77a1261c7c63c8b0
|
File details
Details for the file consibio_cloud_client-1.0.0-py3-none-any.whl.
File metadata
- Download URL: consibio_cloud_client-1.0.0-py3-none-any.whl
- Upload date:
- Size: 11.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e305aafba8553ecf87b1756fbb083b5bc5cf1fbe0ab03baaf7151cbb2678d11
|
|
| MD5 |
f60b976bf22b313b6966a275d4ad5a11
|
|
| BLAKE2b-256 |
36d1844ad92013abc75df917a419810d47f80e838eb69c4d7941c5604bfe089d
|