Metadata-Version: 2.5
Name: plantgraph
Version: 0.4.0
Summary: Typed plant context graph schema shared by penguineer and homeostat
Project-URL: Documentation, https://kausalflow.com/penguineer/concepts/plant-graph/
Project-URL: Source, https://github.com/kausalflow/penguineer/tree/main/packages/plantgraph
Author: KausalFlow
License-Expression: Apache-2.0
License-File: LICENSE
Keywords: plant graph,process industry,pydantic
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.11
Requires-Dist: pydantic>=2.7
Description-Content-Type: text/markdown

# plantgraph

The plant context graph schema used by [penguineer](https://github.com/kausalflow/penguineer) and homeostat. It depends only on Pydantic.

A graph has typed nodes (`unit`, `equipment`, `stream`, `tag`, `loop`, `actuator`, `sample_point`, `quality`) and typed edges (`flows_to`, `measures`, `controls`, `manipulates`, `samples`, `reported_as`, `affects`). Every node and edge carries a stable `id`, a `provenance` (declared, inferred or confirmed), a `source` (user, llm, data, dexpi or homeostat), a `confidence` and `valid_from` / `valid_to` dates.

```python
from plantgraph import PlantGraph

graph = PlantGraph.model_validate(data)  # data loaded from YAML or JSON
graph.valid_on(date(2026, 8, 3))  # the plant as it was on that day
graph.to_data()  # back to a plain dict
```

Licensed under Apache-2.0.
