Skip to main content

Python client library unifying access to MBARI's VARS microservice stack

Project description

vars-client

CI Documentation License: Apache-2.0 Python 3.14+

Python client library unifying access to MBARI's VARS microservice stack:

Service Purpose
Annosaurus Annotations
Vampire Squid Video assets
Oni Taxonomy / knowledge base
Panoptes Image upload / archive
Beholder On-demand video frame extraction
Skimmer ROI cropping
Raziel Service configuration / discovery

VARS is used by multiple institutions, so this library is built so each one can supply its own service URLs and credentials without touching code, and so read-only use works even with no credentials at all.

Full documentation →

Features

  • Unified client. VARSClient wires up all seven services from a single config object.
  • Pluggable endpoint discovery. Bootstrap from a running Raziel instance, or supply endpoints directly via dict, YAML, or environment variables — no institution-specific code required.
  • Handles VARS' four auth schemes (JWT exchange, Raziel's two-stage bootstrap, static API keys, and no auth) uniformly, including token caching, proactive refresh, and retry-on-401. See Auth.
  • Works with zero credentials. Every read endpoint on Annosaurus, Vampire Squid, Oni, and Panoptes is unauthenticated — omit a secret and you still get a fully read-capable client.
  • Generated, not hand-maintained. Five of the six OpenAPI-backed services are wrapped by Kiota-generated clients kept current with just fetch-specs && just generate; the API reference is itself generated from those specs, cross-referenced against the actual generated code.

Installation

uv add vars-client

Quick start

import asyncio

from vars_client.client import VARSClient
from vars_client.config import RazielConfigProvider


async def main():
    config = RazielConfigProvider("https://vars.example.org/raziel")  # anonymous, read-only
    client = await VARSClient(config).connect()

    health = await client.annosaurus.v1.health.get()
    print(health.application)


asyncio.run(main())

See Client for the full usage guide and Configuration for institution-specific setups.

Development

This project uses uv and a justfile for common tasks:

just sync    # install dependencies
just check   # lint + typecheck + test
just build   # build the sdist/wheel

See Development for the full contributor workflow, including regenerating the Kiota clients from upstream OpenAPI specs.

License

Licensed under the Apache License, Version 2.0.

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

vars_client-0.1.0.tar.gz (141.1 kB view details)

Uploaded Source

Built Distribution

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

vars_client-0.1.0-py3-none-any.whl (742.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: vars_client-0.1.0.tar.gz
  • Upload date:
  • Size: 141.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.27 {"installer":{"name":"uv","version":"0.11.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for vars_client-0.1.0.tar.gz
Algorithm Hash digest
SHA256 df4cd70479cc3e534d35c88238e1cbed2ad2e7ce5f7f55d9d39c3e7cbdb1744d
MD5 17414573049643978a5d8c9bb6758fc4
BLAKE2b-256 dc322b9b66e876b6cb280dbb8606e1c7fdff76b77898b513065cdc0e02b52ccf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vars_client-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 742.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.27 {"installer":{"name":"uv","version":"0.11.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for vars_client-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cb2fb06006084c087d95347ac3ee9a449bb8501952a767cec448bfe7a348f5c4
MD5 6b82c2d8dc5f4249f9fe22bbbd65a7ad
BLAKE2b-256 4feb67781957b017e1b38e177421b9aa9acd2e1c0fbf0060d3da42b37a667ac7

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