fzi - Parse Input Variables
fzi scans an input file or directory and reports every variable it finds — the
placeholders your templates expect you to fill in. It reads nothing else and runs
nothing; it is the discovery step.
Function Signature
| Parameter | Type | Description |
|---|---|---|
input_path |
str |
Input file or directory (scanned recursively) |
model |
dict or str |
Model definition or alias — only the syntax fields matter here (varprefix, delim, formulaprefix, commentline) |
input_static |
list, optional |
Shared files to ignore while scanning — never templated (1.2) |
Returns
A dict mapping each variable name to None (a template ready to be filled with
values):
model = {"varprefix": "$", "delim": "{}"}
# input.txt: Temperature: ${temp}, Pressure: ${pressure}
fz.fzi("input.txt", model)
# {'temp': None, 'pressure': None}
Variables vs Formulas
Names that appear only inside a formula (@{...}) or that are defined in a formula
context line (#@ ...) are not variables:
model = {"varprefix": "$", "formulaprefix": "@", "delim": "{}", "commentline": "#"}
fz.fzi("input.txt", model)
# {'n_mol': None, 'T_celsius': None} — T_kelvin is a formula result, not an input
Typical Uses
- Discover the parameters of a legacy input deck.
- Validate that you are supplying every value a template needs before an
fzrrun. - Auto-generate a parameter list for documentation.
CLI
See Also
- fzc — substitute values into the template
- fzr — the full run that calls
fzi→fzc→ execute →fzo - Model Definition · Formula Evaluation