Metadata-Version: 2.4
Name: sqllocks-shape-behavior
Version: 0.9.1
Summary: Shape plugin: behavior models (state machines on a virtual clock)
License-Expression: MIT
Project-URL: Homepage, https://github.com/sqllocks/shape
Project-URL: Repository, https://github.com/sqllocks/shape
Project-URL: Issues, https://github.com/sqllocks/shape/issues
Project-URL: Documentation, https://github.com/sqllocks/shape/tree/main/plugins/shape-behavior
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Operating System :: OS Independent
Classifier: Topic :: Database
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: sqllocks-shape==0.9.1
Dynamic: license-file

# sqllocks-shape-behavior

Shape plugin: **behavior models**. Declarative state-machine modules (states with delays, guards,
weighted and conditional transitions, attributes, clinical-style events and an extension point for
domain events) run for a population on a virtual clock, deterministic per seed and resumable, and
return an Arrow table of timestamped events that a domain pack turns into tables. It also imports
Generic Module Framework JSON modules that you download yourself.

```bash
pip install sqllocks-shape-behavior
shape behave run subscription --population 10000 --years 3 --seed 7 -o out/
```

```python
from shape_behavior import Population, Simulator, load_module

sim = Simulator([load_module("subscription")], Population(size=10_000, start="2024-01-01"))
events = sim.run_until("2027-01-01")  # a pyarrow.Table
```

Behavior modules are plugins of the entry-point group `shape.behaviors`: `shape plugins list`
shows them, and `python -m shape.plugins.kit sqllocks-shape-behavior` checks them.

Full reference: `docs/plugins/behavior.md` in the repository. Its version always equals core's
(`sqllocks-shape`) and it is released together with core. It depends only on numpy and pyarrow.
