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 and example_metadata.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.3.tar.gz (7.1 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.3-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for vivent_client-0.1.3.tar.gz
Algorithm Hash digest
SHA256 c2ce6b35f034498057c9108e4568559688775d9bea6b14f685c6062a4bd77a00
MD5 75168ba401cf45a744dfea1e38b1c959
BLAKE2b-256 0f5c51f4af342b26c7628327b7db5e0c06d4c19cd1aa6384819f962f1c40c9af

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for vivent_client-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e991af80f27163d0573ad4913d9bdb449ccde50e10329b51834264bffb4e7b71
MD5 80213ba35f6edd4954453e177ed7434a
BLAKE2b-256 3c52569275b4f63b425477ac9717da9cba339090fdb8d6d89de426dd0cd3e939

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