Skip to content

vars-client

vars-client is a Python client library that unifies 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 the library is built so each institution can supply its own service URLs and credentials without touching code — see Configuration.

Layout

Five of the six microservices with an OpenAPI spec are wrapped by Kiota-generated clients under vars_client.generated; Skimmer has no spec and is a small hand-written URL builder (see Skimmer). On top of those, this library adds:

  • A shared auth layer for the four different credential schemes VARS services use.
  • A ConfigProvider abstraction so endpoint discovery isn't tied to any one institution's deployment.
  • VARSClient, the single entry point that wires the two together.

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", "user", "password")
    client = await VARSClient(config).connect()

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


asyncio.run(main())

See Installation to get set up, or jump straight to Client for the full usage guide.