Skip to content

Install

Python 3.12 or later. Two dependencies: RestrictedPython, which runs formulas safely, and orjson, which makes loads into a store fast. The Excel export needs openpyxl.

pip install pytracemodel
pip install "pytracemodel[excel]"    # with model.to_excel

For the fewest dependencies (a wheel-less platform, a locked-down image), skip orjson. The store then uses the standard library's json and gives the same results, only slower to load. Python extras can only add packages, so there is no extra for this; install without dependencies and add the one that is required:

pip install --no-deps pytracemodel restrictedpython
import tracemodel as tm