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.3.0.tar.gz (53.3 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.3.0-py3-none-any.whl (57.5 kB view details)

Uploaded Python 3

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

Hashes for anomalyarmor_cli-0.3.0.tar.gz
Algorithm Hash digest
SHA256 1f66a5d850241c6c244df6ad1f7c2c882c0edebc983a9051075aa76946c5b2c1
MD5 fa43a3a27e8ce6b5ecf26137db90daa5
BLAKE2b-256 87e1de998e8bfbf3b363e34ff694c9973f90e14502fda99b0e59d94b639eda10

See more details on using hashes here.

Provenance

The following attestation bundles were made for anomalyarmor_cli-0.3.0.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.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for anomalyarmor_cli-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 369e6a13ba6b7ac9170d297709bc495423b8d2d1f47b020a123497509c8ab07a
MD5 b6d6dde97157b1931382dd850afd64ce
BLAKE2b-256 895a1f1a7802f459dae84ce685fdee25f640384b69b42db0afea6bf6ed43b2e4

See more details on using hashes here.

Provenance

The following attestation bundles were made for anomalyarmor_cli-0.3.0-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