Infrastructure anomaly detection and monitoring tool
Project description
deta
AI Cost Tracking
- 🤖 LLM usage: $3.4500 (23 commits)
- 👤 Human dev: ~$519 (5.2h @ $100/h, 30min dedup)
Generated on 2026-04-30 using openrouter/qwen/qwen3-coder-next
Infrastructure anomaly detection and monitoring tool for development environments.
Features
- Manifest Scanning: Scans docker-compose, OpenAPI, package.json, and pyproject.toml files up to 3 layers deep
- Topology Building: Builds service dependency graphs and detects anomalies
- Real-time Monitoring: Watches for config changes and probes HTTP health checks
- Anomaly Detection: Detects missing healthchecks, port conflicts, dependency cycles, and hardcoded secrets
- Toon Format: Generates Semcod-compatible toon output for ecosystem integration
- CLI Interface: Simple command-line interface with scan, monitor, and diff commands
Installation
pip install deta
Or with optional dependencies:
pip install deta[docker,toml]
Jak uruchomić
Instalacja zależności web: pip install 'deta[web]' Start dashboardu: deta web /home/tom/github/maskservice/c2004 --depth 3 --host 127.0.0.1 --port 8765 Otwórz: http://127.0.0.1:8765
Usage
Scan infrastructure
deta scan /path/to/project --depth 3 --output infra-map.json
Generate graph outputs (YAML / Mermaid / PNG)
# text graph + mermaid + json
deta scan /path/to/project --formats json,yaml,mermaid
# include online checks (localhost probes)
deta scan /path/to/project --formats json,yaml,mermaid --online
# try PNG (requires graphviz python package + graphviz binary)
deta scan /path/to/project --formats png
Generated files (configurable in deta.yaml):
infra-map.jsoninfra-graph.yamlinfra-graph.mmdinfra-graph.pnginfra.toon.yaml
Monitor in real-time
deta monitor /path/to/project --interval 30 --depth 3
deta monitor . --interval 30 --depth 3
# realtime watch from scan command (regenerates outputs on each change)
deta scan /path/to/project --watch --formats json,yaml,mermaid --online
Compare with baseline
deta diff --baseline infra-map.json /path/to/project
Python API
from pathlib import Path
from deta import build_topology
# Build topology from manifests
topology = build_topology(Path("/path/to/project"), max_depth=3)
# Detect anomalies
anomalies = topology.detect_anomalies()
for anomaly in anomalies:
print(f"{anomaly['severity']}: {anomaly['type']}")
# Export to JSON
import json
output = json.loads(topology.to_json())
Architecture
deta/
├── scanner/ # Manifest parsing
│ ├── compose.py # docker-compose.yml
│ ├── openapi.py # OpenAPI specs
│ ├── npm.py # package.json
│ └── python.py # pyproject.toml
├── builder/ # Topology construction
│ └── topology.py # Graph & anomaly detection
├── monitor/ # Real-time monitoring
│ ├── watcher.py # File watching
│ ├── prober.py # HTTP health checks
│ └── alerter.py # Colored output
├── formatter/ # Output formats
│ └── toon.py # Semcod toon format
├── integration/ # Ecosystem hooks
│ └── semcod.py # sumd, pyqual, vallm
└── cli.py # Command-line interface
Semcod Integration
deta integrates with the Semcod ecosystem:
from deta.integration import generate_for_sumd, pre_deploy_check
# Generate toon for sumd
generate_for_sumd(Path("."), output=Path("infra.toon.yaml"))
# Pre-deployment validation
passed, issues = pre_deploy_check(Path("."))
if not passed:
print("Deployment blocked:", issues)
License
Licensed under Apache-2.0.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file deta-0.2.21.tar.gz.
File metadata
- Download URL: deta-0.2.21.tar.gz
- Upload date:
- Size: 48.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
90bd695f1b648f1266ad5c4c8ba1239abce03353d2c46b01d63878294ad33f66
|
|
| MD5 |
7941be66a573fb2b893f2c7278b7316a
|
|
| BLAKE2b-256 |
40f3f2e8b13d99e1cbf32721418f008a478b13c2e669074a22f0b23727aa82b4
|
File details
Details for the file deta-0.2.21-py3-none-any.whl.
File metadata
- Download URL: deta-0.2.21-py3-none-any.whl
- Upload date:
- Size: 51.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6fbdfbe1be3485a235beee880049756cee48bbfb50268be6145545f87e50e2b6
|
|
| MD5 |
fa77c97bc5ba84963322874065ff0ac4
|
|
| BLAKE2b-256 |
6e7b343e6079e3c4e962c7f07d5eb779b41e6ac4b97b761de8150ab5614453c4
|