mirror of
https://github.com/johndoe6345789/AutoMetabuilder.git
synced 2026-04-30 00:34:58 +00:00
14 lines
333 B
Python
14 lines
333 B
Python
"""Workflow plugin: read JSON file."""
|
|
from pathlib import Path
|
|
from ....web.data.json_utils import read_json
|
|
|
|
|
|
def run(_runtime, inputs):
|
|
"""Read JSON file."""
|
|
path = inputs.get("path")
|
|
if not path:
|
|
return {"error": "path is required"}
|
|
|
|
json_data = read_json(Path(path))
|
|
return {"result": json_data}
|