Running Python

The AI generates Python; HISAB runs it sandboxed; results land in your sheet.

Pre-installed packages

HISAB ships with CPython 3.11 and a curated set of ~40 pre-installed packages:

Sandbox guarantees

The Python interpreter runs in an isolated CPython process with these restrictions:

Excel I/O from Python

HISAB injects a hisab helper module into every Python run:

import hisab as h

# read a range as a pandas DataFrame
df = h.read_range("Bank Statement", "A1:E1000")

# write back to a (new or existing) sheet
h.write_range("Mismatches", "A1", df_unmatched)

# create a sheet
h.create_sheet("Reconciliation Summary")

# refresh formulas
h.calculate()