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.5.1.tar.gz (104.6 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.5.1-py3-none-any.whl (93.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: anomalyarmor_cli-0.5.1.tar.gz
  • Upload date:
  • Size: 104.6 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.5.1.tar.gz
Algorithm Hash digest
SHA256 b08474a3d29e4506ee0c5b36cd17694dbb347c0abc3d3269d36b882abf16b0f3
MD5 7719d3bb5d7756db26b9157aab8446fc
BLAKE2b-256 906ca74c7f34a3fd1d0b339024ab6da8c043d4afa4b703908741985114a11f6f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for anomalyarmor_cli-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0a659df48b76f228c398b40624cbf04577c872f5b7fe80b0e91599246337a654
MD5 5acf266db1354389ddeaddee47ed05f8
BLAKE2b-256 de32e930baa1a4c64f32cb7ca3683609e3c481123828091e6ff19f2aeef94454

See more details on using hashes here.

Provenance

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