merton.excel.server¶
FastAPI app that hosts the merton Excel custom functions.
The Office.js custom-function protocol expects two JSON documents and a JavaScript runtime:
GET /functions.json— metadata describing each function, its parameters, and return type.GET /static/functions.html— a tiny HTML page that loadsfunctions.js.GET /static/functions.js— callsCustomFunctions.associate(...)for each function name, forwarding invocations to ourPOST /callendpoint.POST /call— receives{"function": str, "args": list}, executes the matching Python function, and returns{"result": ...}.
This module is intentionally framework-light: we don’t depend on
xlwings-server to keep the dependency footprint small. Anyone who
prefers the xlwings-server route can still import
merton.excel.functions and register the callables manually.
Functions¶
|
Construct the |
|
Build and return the FastAPI app. |
|
Start the FastAPI server with uvicorn. |
Module Contents¶
- merton.excel.server.build_functions_metadata() dict[str, Any][source]¶
Construct the
functions.jsonpayload Office.js expects.