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.6.0.tar.gz (106.7 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.6.0-py3-none-any.whl (96.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for anomalyarmor_cli-0.6.0.tar.gz
Algorithm Hash digest
SHA256 552051bd18f23f87636f00d2658b0a4389b4a0daa56ff7f8b337a792c165bfb1
MD5 4273cc9628bd09cf5636543572a6fe45
BLAKE2b-256 5e8e8bae004726e4217e2ec61587572ca5dd95b4e86410c8baca5c0406fc1198

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for anomalyarmor_cli-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a7747c4470bfff55bbf2aec835268290d0d76def83e9e3375ac2e9f82e2219e3
MD5 15673c5362d28e7f1fcd0edbc58c224a
BLAKE2b-256 25958b833ecb4da639ac8b65516bfd7b3bbf3d169566f6c749312a5d7e926ee6

See more details on using hashes here.

Provenance

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