FlowSDK¶
flow_sdk.flow_sdk.FlowSDK(*, org_id=None, workspace_id=None, auth_token=None, platform_url=None, gateway_url=None, service_id=None, execution_id=None, job_id=None, request_id=None, ring_id=None)
¶
Unified SDK facade for HSL customer code blocks.
Initializes from environment variables when called with no arguments (the normal case inside platform execution contexts).
Source code in flow_sdk/flow_sdk.py
log(action, resource_type, resource_id, details=None)
async
¶
Backward-compatible alias for flow.audit.log(...).
Source code in flow_sdk/flow_sdk.py
bind_request_context(*, auth=None, execution=None, headers=None, service=None)
¶
Bind request-scoped HSL context for the current execution.
Source code in flow_sdk/flow_sdk.py
reset_request_context(token)
¶
refresh_auth_token(new_token)
async
¶
Replace the platform auth token and update cached clients in place.
Called by the background token-refresh loop in persistent runtimes so that the SDK always uses a valid (non-expired) JWT.
Source code in flow_sdk/flow_sdk.py
close()
async
¶
Close cached clients held by this FlowSDK instance.