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.2.tar.gz
(4.6 kB
view details)
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 vivent_client-0.1.2.tar.gz.
File metadata
- Download URL: vivent_client-0.1.2.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ccfc6e7f4ff260f8d9a142d1f28cc38219ad43fa0861b4cff9c94d0b0300acc7
|
|
| MD5 |
6baacca6f1450c4f48ec9e91c3f78420
|
|
| BLAKE2b-256 |
5a6dcb58accd1c0a1cc177afbeae0c8dc9a79e66794ed4594d453ef8227e9679
|
File details
Details for the file vivent_client-0.1.2-py3-none-any.whl.
File metadata
- Download URL: vivent_client-0.1.2-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a6c472cf88ba93fdcd4bad0576824a5f63fe164228e418a334d3365320f95dbe
|
|
| MD5 |
5e932bd4ba1f136c46ddc7a66511cc95
|
|
| BLAKE2b-256 |
26448dc001ddc9bf899b34534cee3e98ec0eb2d83acd3d5be67a72895d3bd3f3
|