uf.routes#
API routes for uf web interface.
Provides convenience routes for the web UI, including function listing, spec retrieval, and the main HTML interface.
Functions
|
Add UI routes to a qh app. |
|
Create a request handler for a function. |
- uf.routes.add_ui_routes(app, function_specs, *, page_title='Function Interface', custom_css=None, rjsf_theme='default')[source]#
Add UI routes to a qh app.
Adds the following routes:
GET / : Main UI page (HTML)
GET /api/functions : List available functions (JSON)
GET /api/functions/{name}/spec : Get RJSF spec for function (JSON)
- Parameters:
- Return type:
Note
This function detects whether the app is using Bottle or FastAPI and adds routes accordingly.