Server components¶
Most users run the packaged pineforge-backtest-server command or submit work
through FastApiBacktestClient. These objects support applications that embed
the service or manage its compiled-strategy cache directly.
create_app ¶
create_app(
service: BacktestService | None = None,
*,
api_key: str | None = None,
) -> FastAPI
BacktestService ¶
BacktestService(
*,
max_concurrency: int | None = None,
max_queue: int | None = None,
queue_timeout_seconds: float | None = None,
execution_timeout_seconds: float | None = None,
release_image: str | None = None,
entrypoint: Path | None = None,
run_json_path: Path | None = None,
cache: CompileCache | None = None,
executor: Executor | None = None,
)
Admit a bounded number of jobs and execute them in isolated directories.
BacktestServiceError ¶
Bases: RuntimeError
CompileCache ¶
Store .so artifacts atomically and deduplicate concurrent compiles.
The running service also publishes an interactive OpenAPI schema at /docs.
See the server guide for HTTP behavior, concurrency, security,
and deployment configuration.