AnomalyArmor SDK and CLI for data observability
Project description
AnomalyArmor Python SDK
Python SDK and CLI for AnomalyArmor data observability platform.
Installation
pip install anomalyarmor-cli
Quick Start
from anomalyarmor import Client
client = Client(
api_key="your-api-key",
api_url="https://api.anomalyarmor.com"
)
# List assets
assets = client.assets.list()
CLI Usage
# Configure credentials
anomalyarmor auth login
# List assets
anomalyarmor assets list
# Check freshness
anomalyarmor freshness summary
Data Quality
Metrics
Track quantitative metrics like row counts, null percentages, and distinct counts.
# Get metrics summary
summary = client.metrics.summary("asset-uuid")
print(f"Active metrics: {summary.active_metrics}")
# Create a row count metric
metric = client.metrics.create(
"asset-uuid",
metric_type="row_count",
table_path="catalog.schema.orders",
)
# Trigger capture
client.metrics.capture("asset-uuid", metric.id)
CLI:
anomalyarmor metrics summary <asset-uuid>
anomalyarmor metrics list <asset-uuid>
anomalyarmor metrics capture <asset-uuid> <metric-uuid>
Validity Rules
Define and monitor data quality rules like NOT_NULL, UNIQUE, REGEX, and RANGE checks.
# Get validity summary
summary = client.validity.summary("asset-uuid")
print(f"Failing rules: {summary.failing_rules}")
# Create a NOT NULL rule
rule = client.validity.create(
"asset-uuid",
rule_type="NOT_NULL",
table_path="catalog.schema.orders",
column_name="order_id",
severity="critical",
)
# Run a check
result = client.validity.check("asset-uuid", rule.id)
print(f"Status: {result.status}, Invalid: {result.invalid_count}")
CLI:
anomalyarmor validity summary <asset-uuid>
anomalyarmor validity list <asset-uuid>
anomalyarmor validity check <asset-uuid> <rule-uuid>
Referential Integrity
Monitor foreign key relationships and detect orphan records.
# List referential checks
checks = client.referential.list("asset-uuid")
# Create a referential check
check = client.referential.create(
"asset-uuid",
child_table_path="catalog.schema.orders",
child_column_name="customer_id",
parent_table_path="catalog.schema.customers",
parent_column_name="id",
)
# Execute check
result = client.referential.execute("asset-uuid", check.id)
print(f"Orphan count: {result.orphan_count}")
CLI:
anomalyarmor referential list <asset-uuid>
anomalyarmor referential execute <asset-uuid> <check-uuid>
Documentation
See docs.anomalyarmor.com for full documentation.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file anomalyarmor_cli-0.3.0.tar.gz.
File metadata
- Download URL: anomalyarmor_cli-0.3.0.tar.gz
- Upload date:
- Size: 53.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f66a5d850241c6c244df6ad1f7c2c882c0edebc983a9051075aa76946c5b2c1
|
|
| MD5 |
fa43a3a27e8ce6b5ecf26137db90daa5
|
|
| BLAKE2b-256 |
87e1de998e8bfbf3b363e34ff694c9973f90e14502fda99b0e59d94b639eda10
|
Provenance
The following attestation bundles were made for anomalyarmor_cli-0.3.0.tar.gz:
Publisher:
publish-sdk.yml on anomalyarmor/core
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
anomalyarmor_cli-0.3.0.tar.gz -
Subject digest:
1f66a5d850241c6c244df6ad1f7c2c882c0edebc983a9051075aa76946c5b2c1 - Sigstore transparency entry: 1099764064
- Sigstore integration time:
-
Permalink:
anomalyarmor/core@0e9baedd0c898fd0a919e855118d5618c76ec5f4 -
Branch / Tag:
refs/tags/sdk-v0.3.0 - Owner: https://github.com/anomalyarmor
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-sdk.yml@0e9baedd0c898fd0a919e855118d5618c76ec5f4 -
Trigger Event:
release
-
Statement type:
File details
Details for the file anomalyarmor_cli-0.3.0-py3-none-any.whl.
File metadata
- Download URL: anomalyarmor_cli-0.3.0-py3-none-any.whl
- Upload date:
- Size: 57.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
369e6a13ba6b7ac9170d297709bc495423b8d2d1f47b020a123497509c8ab07a
|
|
| MD5 |
b6d6dde97157b1931382dd850afd64ce
|
|
| BLAKE2b-256 |
895a1f1a7802f459dae84ce685fdee25f640384b69b42db0afea6bf6ed43b2e4
|
Provenance
The following attestation bundles were made for anomalyarmor_cli-0.3.0-py3-none-any.whl:
Publisher:
publish-sdk.yml on anomalyarmor/core
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
anomalyarmor_cli-0.3.0-py3-none-any.whl -
Subject digest:
369e6a13ba6b7ac9170d297709bc495423b8d2d1f47b020a123497509c8ab07a - Sigstore transparency entry: 1099764065
- Sigstore integration time:
-
Permalink:
anomalyarmor/core@0e9baedd0c898fd0a919e855118d5618c76ec5f4 -
Branch / Tag:
refs/tags/sdk-v0.3.0 - Owner: https://github.com/anomalyarmor
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-sdk.yml@0e9baedd0c898fd0a919e855118d5618c76ec5f4 -
Trigger Event:
release
-
Statement type: