Skip to main content

A client library for Vivent

Project description

vivent-client

A Python client library for the Vivent Biosignals public API.

Requirements

  • Python >= 3.13
  • requests

Installation

bash
pip install vivent-client

Quick Start

python
from vivent_client import ViventClient

client = ViventClient(
    auth_code="YOUR_AUTH_CODE",
    username="YOUR_USERNAME",
    password="YOUR_PASSWORD",
)

# List available channels
channels = client.list_channels(start_ts="2024-01-31T14:00:00Z")

# List available metrics
metrics = client.list_metrics()

# Fetch time-series data for a single channel
data = client.get_metric(
    metric="water-status-ssp",
    source_id="2561775-1",
    start_ts="2024-01-31T14:00:00Z",
    stop_ts="2024-01-31T15:00:00Z",
    resolution="MINUTES_5",
)

# Fetch aggregated data across multiple channels
agg = client.get_aggregate_metric(
    metric="water-status-ssp",
    source_ids=["2561775-1", "2561662-1"],
    start_ts="2024-01-31T14:00:00Z",
    resolution="MINUTES_5",
    function="MEAN",
)

See example.py for a full usage walkthrough.

Authentication

Credentials (AUTH_CODE, USERNAME, PASSWORD) are provided by Vivent. The client handles token acquisition, refresh, and re-authentication automatically.

License

MIT

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

vivent_client-0.1.1.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

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

vivent_client-0.1.1-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file vivent_client-0.1.1.tar.gz.

File metadata

  • Download URL: vivent_client-0.1.1.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for vivent_client-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b7542cc7e4e855e9ec496e9a5afef7e03dd74385276450e08484e71189d0f90e
MD5 6edab1b2540234eaf5485215ae2f13e9
BLAKE2b-256 054a7cab7d8a9b908ea2cf8f543ff497af908bf861e615bd24aa086b2acb6fe7

See more details on using hashes here.

File details

Details for the file vivent_client-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: vivent_client-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for vivent_client-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 dcb19b53ab32fa28c30e889c678a06148f37b0c34b143e72a9866ea9053ea246
MD5 3f3c1dc4fa7143fb86b9c184bf8d558e
BLAKE2b-256 010519dff1fdf631f7b37d940cc1df07f6c72151c61ab15245f85b6ad06ee012

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