MCPcopy Create free account
hub / github.com/Graphify-Labs/graphify / handle_upload

Function handle_upload

worked/example/raw/api.py:11–24  ·  view source on GitHub ↗

Accept a list of file paths, run the full pipeline on each, and return a summary of what succeeded and what failed.

(paths: list)

Source from the content-addressed store, hash-verified

9
10
11def handle_upload(paths: list) -> dict:
12 """
13 Accept a list of file paths, run the full pipeline on each,
14 and return a summary of what succeeded and what failed.
15 """
16 results = batch_parse(paths)
17 succeeded = [r for r in results if r["ok"]]
18 failed = [r for r in results if not r["ok"]]
19 return {
20 "uploaded": len(succeeded),
21 "failed": len(failed),
22 "ids": [r["id"] for r in succeeded],
23 "errors": failed,
24 }
25
26
27def handle_get(record_id: str) -> dict:

Callers

nothing calls this directly

Calls 1

batch_parseFunction · 0.90

Tested by

no test coverage detected