Skip to main content

Adding Data to VxData

Creating New Resources

info

Read the full guide on the mental models behind adding data before starting to add large amounts of data.

The VxData SDK exposes ResourceCreate requests that allow you to create new resources in the database.

from vxdata.schemas.create import MeasurementCreate

client.resources.create(MeasurementCreate(
identifier="psa/BB12345/2025-01-01",
license="VIRDX-PSEUDONYMIZED",
value=1.23,
unit="ng/ml"
))

This operation will fail if a resource with the same identifier already exists. Read below for a guide on updating existing resources.

Updating Existing Resources

from vxdata.schemas.update import MeasurementUpdate

client.resources.update(
"psa/BB12345/2025-01-01",
MeasurementUpdate(
value=100.0,
))