Metadata-Version: 2.5
Name: byaml
Version: 0.4.0a1
Summary: SOFE Architecture Graph v0.4 — models, validate (JSON Schema + catalog + relationships), convert (Terraform/evaluation → graph), dump/load. BYaML v2 (graph-first, fusión Ñan × BYaML).
Project-URL: homepage, https://github.com/breakingthecloud/byaml-py
Project-URL: repository, https://github.com/breakingthecloud/byaml-py
Author-email: Carlos Cortez <carlos@finoptix.dev>
License: Apache-2.0
Keywords: architecture,blast-radius,byaml,graph,sofe,terraform,topology
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.11
Requires-Dist: jsonschema>=4.0
Requires-Dist: pydantic>=2.0
Requires-Dist: pyyaml>=6.0
Description-Content-Type: text/markdown

# byaml — SOFE Architecture Graph v0.4 (BYaML v2)

> **BYaML v2** — relanzamiento graph-first bajo `breakingthecloud` (Apache-2.0).
> Un solo modelo (grafo) · serialización BYaML solo para interop · interfaces AI-native (MCP).

Paquete PyPI `byaml` con el **Architecture Graph v0.4**: models, validate, convert, dump/load.
El grafo lo consume **`nan-graph`** como motor (traversal, blast radius, cost chain, SPOF).

## Instalar

```bash
pip install byaml
```

## Uso

```python
from byaml import Graph, load, dump, validate, from_terraform, from_evaluation

# Validate
g = load("graph.byaml")
ok, issues = validate(g, schema="v0.4")

# Convert IaC → graph
g = from_terraform("tfplan.json", account="279624932954")

# Convert SOFE evaluation → graph
g = from_evaluation(findings, cost_map, eval_id="8f2a...")
```

## CLI

```bash
byaml validate out.byaml
byaml convert --terraform tfplan.json -o graph.byaml
byaml dump --json graph.byaml
```

## Modelo (graph-first)

- **Nodes** = recursos/servicios (`id`, `type`, `layer`, `region`, `account`, `cost`, `findings`, `owner`)
- **Edges** = relaciones tipadas (`from`, `to`, `type`, `weight`)
- **Catalog** = `catalog.yaml` (baseline ≥17 tipos desde SOFE collectors, expandible)
- **Relationships** = `relationships.yaml` (matriz from/to/type; fuera de matriz → WARNING)

Ver `SPEC.md` en `breakingthecloud/byaml-spec`.
