Skip to content

Verify Workloads with the VB-OS Python SDK

Submit a single workload for evaluation against a deployed boundary.

verify(
workload: dict,
project: str | None = None,
boundary_ref: str | None = None,
metadata: dict | None = None,
) -> EvaluationResult
Parameter Type Required Description
workload dict Yes The evidence payload to evaluate
project str | None No Project ID or slug
boundary_ref str | None No Boundary reference to evaluate against
metadata dict | None No Arbitrary metadata (non-authoritative, does not affect evaluation)

An EvaluationResult typed model containing the evaluation decision and details.

from vbos import VBOSClient
with VBOSClient(api_key="vbos_your_key_here") as client:
result = client.verify(
workload={
"npi_number": 1234567890,
"license_state": "TX",
"credential_count": 3,
},
project="healthcare-onboarding",
boundary_ref="provider-credential-check",
)
print(result.decision) # "ASSERT" or "DEFER"
print(result.evaluation_id)
result = client.verify(
workload={"amount": 15000, "region_code": 4},
project="loan-origination",
metadata={"source": "web-portal", "operator_id": "op-42"},
)

Metadata is stored with the evaluation record but never influences the evaluation outcome.

Submit multiple workloads in a single request.

verify_batch(
workloads: list[dict],
project: str | None = None,
boundary_ref: str | None = None,
) -> dict
Parameter Type Required Description
workloads list[dict] Yes List of workload payloads
project str | None No Project ID or slug
boundary_ref str | None No Boundary reference
results = client.verify_batch(
workloads=[
{"amount": 500, "risk_score": 12},
{"amount": 75000, "risk_score": 88},
{"amount": 1200, "risk_score": 45},
],
project="lending-compliance",
)
for item in results["evaluations"]:
print(item["evaluation_id"], item["decision"])

Validate a workload against a boundary without recording an evaluation. Useful for testing and development.

validate(
workload: dict,
project: str | None = None,
boundary_ref: str | None = None,
) -> dict
Parameter Type Required Description
workload dict Yes The evidence payload to validate
project str | None No Project ID or slug
boundary_ref str | None No Boundary reference
validation = client.validate(
workload={"amount": 500, "risk_score": 12},
project="lending-compliance",
boundary_ref="loan-limits",
)
print(validation["decision"]) # "ASSERT" or "DEFER"

The validate method runs the same evaluation logic as verify but does not create an evaluation record. Use it to test boundary behavior during development or to preview results before committing.