Skip to content

Python API

The public Python surface is the application contract: one class that opens a project, the request and result types it takes and returns, the validation report, the error it raises, the operations table every transport shares, and the replay report. Everything else in the package is internal and may change without notice.

from openflowsheet.application.local import LocalApplication
from openflowsheet.application.types import Change, Edit
Page Contents
LocalApplication open a project; the Application, job-control and inspection operations
Requests and results Change, Edit, RunResult, RunFailure, TransactionResult, jobs, project and registry views
Validation ValidationReport, Check
Errors and pages ApplicationError, ApiError, SolveFailedError, Page, Projection
Operations table OPERATIONS and dispatch, the one path from a request document to a response
Replay ReplayReport, ReplayPolicy
Assessment (cost and LCA) load_assessment, view_of, AssessmentProgram, assessment_sensitivity, the Brightway table builders: the assessment layer, which no transport offers yet

Every result type has as_document(), which returns exactly the JSON document the CLI prints and HTTP and MCP send. The documents' JSON Schemas are in the repository's schemas/ directory.