Minimal Flask portal that exposes hydra-base functions over JSON HTTP.
- No dependency on legacy SOAP/JSON-RPC server code
- No protocol bridge layer
- Direct invocation of public callables from
hydra_base.lib.*
POST /auth/loginPOST /auth/logoutGET /healthGET /api(function index)POST /api/<module>/<function>GET /api/<module>/<function>
Where <module> maps to selected modules under hydra_base.lib, for example:
/api/project/get_project/api/network/get_network/api/scenario/add_scenario
Preferred:
{
"args": [12, "Y"],
"kwargs": {
"include_data": "N"
}
}Named-parameter shortcut:
{
"project_id": 12,
"include_data": "Y"
}- Login uses
hydra_base.lib.service.login. - After login, session keys are stored in Flask session (
user_id,username,session_id). - API endpoints inject
user_idandusernameinto function kwargs.
pip install -e .
hydra-flask-server --host 127.0.0.1 --port 8080