from model_security_client.api import ModelSecurityAPIClient
client = ModelSecurityAPIClient(base_url="https://api.sase.paloaltonetworks.com/aims")
# List scans that have a label key 'env' with value 'production' or 'staging' and have a label key 'team' with value 'ml-platform' or 'security'
scans = client.list_scans(
labels_query="(env:production OR env:staging) AND (team:ml-platform OR team:security)"
)
for scan in scans.scans:
print(f"Scan {scan.uuid}: {scan.model_uri}")
print(f" Labels: {scan.labels}")
print(f" Outcome: {scan.eval_outcome}")