Skip to content

project

Class info

Classes

Name Children Inherits
ProjectError
datacook.engine.project

    🛈 DocStrings

    Project files: the node tree as JSON (op records incl. reader specs, versioned).

    {"format": "datacook-project", "version": 1,
     "nodes": [{"id": "...", "op": "read_csv", "params": {...}, "parents": [],
                "name": null, "comment": null}, ...]}
    
    Loading creates nodes only; nothing is computed or executed until a frame is requested.

    load

    load(session: Session, path: str | Path) -> None
    

    Add the project's nodes to session (usually an empty one).

    Source code in src/datacook/engine/project.py
    def load(session: Session, path: str | pathlib.Path) -> None:
        """Add the project's nodes to `session` (usually an empty one)."""
        from_dict(session, json.loads(pathlib.Path(path).read_text(encoding="utf-8")))