vetvise-vms-client
Python client for the REST API of the VetVise Management System (VMS).
It handles service account authentication and wraps the most common endpoints: cameras, still frames, recordings, timeseries data, artifacts, incidents, pens, regions, reports and data collection.
- Website: vetvise.com
- REST API documentation: external.dev.apidoc.vetvise.dev
- VMS Wiki: VMSWiki
Installation
pip install vetvise-vms-client
Requires Python 3.12 or newer.
Configuration
Servers are configured in a JSON file, keyed by an alias of your choice:
{
"my-barn": {
"protocol": "https",
"hostname": "vms.example.com",
"port": 443,
"service_account_name": "my-service-account",
"fingerprint": "<public key fingerprint>",
"private_key": "/path/to/private_key.pem"
}
}
private_key is either a path to a PEM file or the PEM content itself.
Keep this file out of version control.
Each entry can also have an optional "tags": ["production", "barn", "chickens"]
list to group servers:
vms.get_instances_by_tags("production", "chickens") # {alias: Server} with all given tags
vms.get_all_tags() # every tag in the config
server.get_tags() # tags of one server
server.has_tags("barn") # True / False
Usage
import time
from vms import VMS
vms = VMS("servers.json")
server = vms.get_instance("my-barn")
# Basic info
server.api.base.is_online()
server.api.base.get_version()
# Cameras and frames
camera_ids = server.api.cameras.get_camera_ids()
jpeg = server.api.frames.get_current_thumbnail_frame(camera_ids[0])
frame = server.api.frames.get_frame(camera_ids[0], time.time() * 1000)
# Timeseries data
server.api.timeseries.get_measurements()
df = server.api.timeseries.get_simple_measurement(
"activity", "activity",
start=(time.time() - 6 * 3600) * 1000,
response_type="dataframe",
)
# Document collections support query / query_one / get_specific
latest = server.api.recordings.query_one({"order": {"timestamp": "desc"}})
reports = server.api.reports.query({"limit": 10})
# Regions
mappings = server.api.regions.get_mappings_for_camera(camera_ids[0])
# Pen state: is the barn full or empty, and since how many days?
pen_state = server.helpers.pen_state.get_pen_state() # None if no pen state exists
print(pen_state) # e.g. "Full, Day 9"
pen_state.is_full, pen_state.is_empty, pen_state.day
# Day of epoch (the filling day is day 0; None while the barn is empty)
server.helpers.pen_state.get_day_of_epoch(timestamp_ms)
# All absolute timespans that fell on day of epoch 1 to 3, over all epochs
for span in server.helpers.pen_state.get_timespans_for_days_of_epoch(1, 3):
print(span.start_datetime, span.end_datetime)
# Stitch all cameras into one canvas image (PIL.Image)
canvas = server.helpers.canvas.build_canvas(image_source="stillFrame")
rotated = server.helpers.canvas.build_canvas(rotation=90) # degrees, counter-clockwise
Authentication happens automatically on the first request and is renewed when
the access token expires. Failed requests raise vms.RequestFailed, which
carries the HTTP status, reason and response body.
Which endpoints a service account can use depends on the permissions it has been granted in the VMS. For endpoints and query syntax not covered by this client, see the REST API documentation.
Releasing
The package version comes from git tags, and Bitbucket Pipelines publishes to PyPI when a
v* tag is pushed (the UV_PUBLISH_TOKEN repository variable holds the PyPI token).
git tag -a v0.1.0 -m "First release"
git push origin v0.1.0
- Tags must start with
v;v0.1.0becomes version0.1.0. - Use
vX.Y.Z: bump Z for fixes, Y for new features (or breaking changes before 1.0), X for breaking changes after 1.0. - Every version can be published only once. Never move or reuse a tag; if a release is broken, fix it and tag the next version.
- Only a pushed tag publishes. Running the tag pipeline manually on a branch fails on purpose.
License
Apache License 2.0. See LICENSE and NOTICE. Copyright 2026 VetVise GmbH.
Metadata
Release files for vetvise-vms-client 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| vetvise_vms_client-0.1.2.tar.gz | 54.3 kB | Without provenance | Details for vetvise_vms_client-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| vetvise_vms_client-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for vetvise_vms_client-0.1.2-py3-none-any.whl |
Total release size: 77.5 kB
Release files / vetvise_vms_client-0.1.2.tar.gz
| Download URL | vetvise_vms_client-0.1.2.tar.gz |
|---|---|
| Size | 54.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
99286948fc9ccc8482f0f322ad364799542b8c0d19c1c8192cccd352765ef15a
|
|
BLAKE2b-256 checksum How to use checksums |
e9d4aaf44075e09f99940521d7c5a2a1c70f27e5aff3763e040f34538d6a379c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / vetvise_vms_client-0.1.2-py3-none-any.whl
| Download URL | vetvise_vms_client-0.1.2-py3-none-any.whl |
|---|---|
| Size | 23.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e55f9613e6b26e09432fd0cd88f732f8b41cad2361284e2722fa72bad6ca14c1
|
|
BLAKE2b-256 checksum How to use checksums |
f219f9e7b8ace7b141c7c5649fddffd1c5ec1fe09e512d93f0aea623aaaf0b21
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for vetvise-vms-client 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.