Skip to main content

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

anomalyarmor_cli-0.2.2.tar.gz (52.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

anomalyarmor_cli-0.2.2-py3-none-any.whl (57.0 kB view details)

Uploaded Python 3

File details

Details for the file anomalyarmor_cli-0.2.2.tar.gz.

File metadata

  • Download URL: anomalyarmor_cli-0.2.2.tar.gz
  • Upload date:
  • Size: 52.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for anomalyarmor_cli-0.2.2.tar.gz
Algorithm Hash digest
SHA256 7f8644d0f6811de60c4f5a5e10c44476848b26b344f405997c3dc237abe532d7
MD5 db2719760cbe464d7a2b8b64dd6b7c67
BLAKE2b-256 3c0931585e99bdb5b4fe80dd085a53c0af7d49d988890107d88a647f045b3edc

See more details on using hashes here.

Provenance

The following attestation bundles were made for anomalyarmor_cli-0.2.2.tar.gz:

Publisher: publish-sdk.yml on anomalyarmor/core

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file anomalyarmor_cli-0.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for anomalyarmor_cli-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 66c7bd0976940498f302793fd447b2d0585ce976cbbc125684d03b938f95e3ae
MD5 fde03bd93620d7b995e684c8a3f95feb
BLAKE2b-256 9477513179d6ef1c2289bb11941dcf781179d659ef2fb530024dff1e5da3eeb6

See more details on using hashes here.

Provenance

The following attestation bundles were made for anomalyarmor_cli-0.2.2-py3-none-any.whl:

Publisher: publish-sdk.yml on anomalyarmor/core

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page