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.0.tar.gz (4.9 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.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: vivent_client-0.1.0.tar.gz
  • Upload date:
  • Size: 4.9 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.0.tar.gz
Algorithm Hash digest
SHA256 fd82b8b3807ba519a12fd3e9f623917629ef0ff126cbe03529d17f236039b642
MD5 24d965474c04f6b7d17605b5ee83b126
BLAKE2b-256 fa4706b27e492f94223a90f422c22bb56bca591201f3f01498228e857685b63e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vivent_client-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.7 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0820c2a5bdec287f8e67861bf8b2872068381539df56543e8ca07c7920833303
MD5 c029aad30580af9175932ddb4acaca64
BLAKE2b-256 3f8cb5f267053615ccbb9d580d20db4c728bb4f4561226acad3e313ce2bf7ffd

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