Metadata-Version: 2.4
Name: pywaterasm
Version: 1.0.0
Summary: Generate standalone activated-sludge model simulation scripts from .inwt definitions
Author: jsdsg666
License-Expression: MIT
Project-URL: Homepage, https://github.com/jsdsg666/pywaterasm
Project-URL: Repository, https://github.com/jsdsg666/pywaterasm
Project-URL: Issues, https://github.com/jsdsg666/pywaterasm/issues
Keywords: ASM,activated sludge,wastewater,code generation
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: sim
Requires-Dist: numpy>=1.23; extra == "sim"
Requires-Dist: scipy>=1.9; extra == "sim"
Dynamic: license-file

# pywaterasm

`pywaterasm` parses `.inwt` activated-sludge model definition files and generates standalone Python simulation scripts for single-tank or multi-tank A2O layouts.

## Install

```bash
pip install pywaterasm
```

The generator itself uses only the Python standard library. Generated simulation scripts use `numpy` and `scipy`; install them with:

```bash
pip install "pywaterasm[sim]"
```

## Usage

Command line:

```bash
pywaterasm input/ASM1.inwt -o generated_model/asm1_tank.py
# or
python -m pywaterasm input/ASM1.inwt -o generated_model/asm1_tank.py
```

Python API:

```python
from pathlib import Path
from pywaterasm.engine import parse_asm, validate, generate_py

model = parse_asm(Path("input/ASM1.inwt"))
validate(model)
code = generate_py(model, "ASM1.inwt")
Path("generated_model/asm1_tank.py").write_text(code, encoding="utf-8")
```

For multi-tank models, `pywaterasm.engine.generate_multi(model, asm_name)` returns a dictionary of generated file contents.

## Repository

- Source: https://github.com/jsdsg666/pywaterasm
- PyPI: https://pypi.org/project/pywaterasm/

## License

MIT. See `LICENSE`.
