Skip to main content

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 valid
  • auth_login: to login with the credentials
  • auto_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 devices
  • get_elements: to get the elements, will return object with the elements
  • get_datalog: to get the datalog, will return a Datalog object

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 providing project=project, it will render the element title and color the line, too.
  • get_data: to get the data, each value in a SingleValue object
  • get_raw: to get the raw data
  • get_pandas_df: to get the Pandas DataFrame
  • add_many: to add multiple elements to the datalog
  • add: to add a single element to the datalog
  • remove_element: to remove an element from the datalog
  • remove_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 id
  • get_value: to get the value
  • get_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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

consibio_cloud_client-1.0.0.tar.gz (13.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

consibio_cloud_client-1.0.0-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

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

Hashes for consibio_cloud_client-1.0.0.tar.gz
Algorithm Hash digest
SHA256 aef00c91abc06ce1f80315efce403770f67cf0772c12a7c47262bea5c6475a14
MD5 046029df9a6775977c10db7bac715941
BLAKE2b-256 f4e55e44d7922b371d4a2f8c9ad95ca19287ffab0ba5a30b77a1261c7c63c8b0

See more details on using hashes here.

File details

Details for the file consibio_cloud_client-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for consibio_cloud_client-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0e305aafba8553ecf87b1756fbb083b5bc5cf1fbe0ab03baaf7151cbb2678d11
MD5 f60b976bf22b313b6966a275d4ad5a11
BLAKE2b-256 36d1844ad92013abc75df917a419810d47f80e838eb69c4d7941c5604bfe089d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page