This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Reason given by maintainers: Package renamed to anomalyarmor-cli
armor
Official Python SDK and CLI for AnomalyArmor - Data Observability Platform.
Installation
pip install armor
Quick Start
from armor import Client
# Initialize client (uses ARMOR_API_KEY env var)
client = Client()
# Check if data is fresh - raises StalenessError if stale
client.freshness.require_fresh("snowflake.prod.warehouse.orders")
print("Data is fresh, proceeding with pipeline...")
Key Features
Gate Pattern for Pipelines
The require_fresh() method fails fast if data is stale:
from armor import Client
from armor.exceptions import StalenessError
client = Client()
try:
client.freshness.require_fresh("snowflake.prod.warehouse.orders")
# Data is fresh, safe to proceed
run_transformation()
except StalenessError as e:
# Data is stale, handle appropriately
print(f"Stale: {e.asset} - last updated {e.last_updated}")
# Fail the pipeline, send alert, etc.
CLI for CI/CD
# Check freshness (exit 0=fresh, 1=stale)
armor freshness check snowflake.prod.warehouse.orders
# Use in CI/CD
armor freshness check snowflake.prod.warehouse.orders || exit 1
Comprehensive Monitoring
from armor import Client
client = Client()
# List assets
for asset in client.assets.list(source="snowflake"):
print(f"{asset.qualified_name}: {asset.asset_type}")
# Check freshness status
status = client.freshness.get("snowflake.prod.warehouse.orders")
print(f"Fresh: {status.is_fresh}, Last updated: {status.last_updated}")
# Get lineage
lineage = client.lineage.get("snowflake.prod.warehouse.orders")
for upstream in lineage.upstream:
print(f"Depends on: {upstream.qualified_name}")
# View alerts
alerts = client.alerts.list(status="triggered")
for alert in alerts:
print(f"{alert.qualified_name}: {alert.message}")
Configuration
Configuration can be set via:
-
Environment variables (highest priority)
ARMOR_API_KEY: Your API keyARMOR_API_URL: API base URL
-
Config file (
~/.armor/config.yaml)api_key: aa_live_...
-
Parameters when initializing the client
client = Client(api_key="aa_live_...")
CLI Commands
Authentication
armor auth login # Authenticate with API key
armor auth status # Check authentication status
armor auth logout # Remove stored credentials
Assets
armor assets list # List all assets
armor assets list --source postgresql # Filter by source
armor assets get <qualified_name> # Get asset details
Freshness
armor freshness summary # Get freshness summary
armor freshness get <asset> # Check asset freshness
armor freshness list --status stale # List stale assets
Schema
armor schema summary # Get changes summary
armor schema changes # List all changes
armor schema changes --unacknowledged # Only unacknowledged
Alerts
armor alerts summary # Get alerts summary
armor alerts list # List all alerts
armor alerts list --severity critical # Filter by severity
API Keys
armor api-keys list # List API keys
armor api-keys create --name "CI/CD" # Create new key
armor api-keys revoke <key_id> # Revoke a key
Lineage
armor lineage get <asset> # Get asset lineage
armor lineage get <asset> --depth 2 # With depth
Exit Codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Asset is stale (freshness check) |
| 2 | Authentication error |
| 3 | Resource not found |
| 4 | Rate limit exceeded |
| 5 | General error |
Examples
CI/CD Pipeline Integration
# .github/workflows/data-quality.yml
- name: Check data freshness
run: |
pip install armor-cli
armor freshness get production.analytics.orders
env:
ARMOR_API_KEY: ${{ secrets.ARMOR_API_KEY }}
Airflow Operator
from airflow.operators.python import PythonOperator
from armor import Client
def check_upstream_freshness(asset_name: str):
client = Client()
status = client.freshness.get(asset_name)
if status.is_stale:
raise Exception(f"Upstream {asset_name} is stale")
check_freshness = PythonOperator(
task_id="check_freshness",
python_callable=check_upstream_freshness,
op_kwargs={"asset_name": "production.raw.events"},
)
Development
# Clone the repo
git clone https://github.com/anomalyarmor/armor-cli
# Install dev dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Run linting
ruff check .
License
MIT
Metadata
Release files for armor-cli 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| armor_cli-0.1.0.tar.gz | 25.3 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| armor_cli-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 48.5 kB
Release files / armor_cli-0.1.0.tar.gz
| Download URL | armor_cli-0.1.0.tar.gz |
|---|---|
| Size | 25.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b4f2b46ee14a0baa7d0cf3b613cce9cbe59c69339147ab5129af972d13fbdcbd
|
|
BLAKE2b-256 checksum How to use checksums |
06e086dc2db1b8e3c4c199400111910dc804cc627b97c73b51e50909e5df7a34
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 5, 2025.
Transparency logRelease files / armor_cli-0.1.0-py3-none-any.whl
| Download URL | armor_cli-0.1.0-py3-none-any.whl |
|---|---|
| Size | 23.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
311b5d0face756613b2216dc42c8d60c2180e1ed1be9d1b5c6e3b5a6f780750f
|
|
BLAKE2b-256 checksum How to use checksums |
7563eddd9ead1e35831389545dc1258680984b1508c1c934738e6efe7e5c4bf4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 5, 2025.
Transparency logSecurity for armor-cli 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for armor_cli-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 5, 2025.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.