load
forge.runnerfunctionSince Forge API 1
Signaturepython
forge.runner.load(path: str | os.PathLike[str]) -> ProgramRun a .py file's top level, check it and return the checked Program.
Parameters
| Name | Type |
|---|---|
| path | str | os.PathLike[str] |
The result names what the file holds: kind ("strategy" or "library"), name,
description, settings, hooks, warmup, symbols, direction,
order_mode, exports and warnings. program.instantiate(values) creates the
strategy with those setting values.
A refused file raises a ValueError whose findings list every problem with its line.
Loading runs the file's top-level code, so load only code you trust.