SessionsResource
Session API methods.
Session API methods.
Functions
constructor__init__(client) -> NoneInitialize the resource.
paramclientKitaruAPIClientAPI client used to send requests.
Returns
Nonefunccreate(request, idempotency_key=None) -> SessionResponseCreate a session.
paramrequestSessionCreateRequestSession create request.
paramidempotency_keystr | None= NoneIdempotency key overriding the transport's random default.
Returns
kitaru.api_models.v1.session.SessionResponseCreated session.
funcget(session_id) -> SessionDetailResponseGet a session by id.
paramsession_iduuid.UUIDId of the session.
Returns
kitaru.api_models.v1.session.SessionDetailResponseStored session.
funcget_with_nodes(session_id) -> SessionWithNodesResponseGet a session together with every one of its nodes.
The node list is not paginated, so one call carries a whole session.
paramsession_iduuid.UUIDId of the session.
Returns
kitaru.api_models.v1.session_node.SessionWithNodesResponseSession with every node, ordered by index.
funcingest_nodes(session_id, batch) -> list[SessionNodeResponse]Ingest a batch of session nodes.
An external id already stored is replaced whole.
paramsession_iduuid.UUIDId of the session to ingest into.
parambatchSessionNodeBatchRequestSession node batch request.
Returns
listStored nodes in batch order.
funccreate_evaluations(session_id, request) -> list[EvaluationResponse]Create manual evaluations on a session.
paramsession_iduuid.UUIDId of the session to create evaluations on.
paramrequestSessionEvaluationsRequestSession evaluations request.
Returns
listStored evaluations in request order.
funclist(params=None) -> Page[SessionResponse] | Page[SessionDetailResponse]List sessions.
paramparamsSessionListParams | None= NoneSession list params.
Returns
Page[SessionResponse] | Page[SessionDetailResponse]Page of sessions, with payloads when include_payloads is set.
funciter(params=None) -> AsyncIterator[SessionResponse]Iterate over all sessions.
paramparamsSessionListParams | None= NoneSession list params.
Returns
collections.abc.AsyncIteratorAsync iterator over every session.
funcupdate(session_id, request) -> SessionResponseUpdate a session.
paramsession_iduuid.UUIDId of the session.
paramrequestSessionUpdateRequestSession update request, unset fields stay unchanged.
Returns
kitaru.api_models.v1.session.SessionResponseUpdated session.
funcdelete(session_id) -> NoneDelete a session.
paramsession_iduuid.UUIDId of the session.
Returns
Nonefunclist_nodes(session_id, params=None) -> Page[SessionNodeResponse]List the nodes of a session, ordered by index ascending.
paramsession_iduuid.UUIDId of the session.
paramparamsSessionNodeListParams | None= NoneSession node list params.
Returns
kitaru.api_models.v1.base.PagePage of session nodes, ordered by index.
funciter_nodes(session_id, params=None) -> AsyncIterator[SessionNodeResponse]Iterate over every node of a session, ordered by index ascending.
paramsession_iduuid.UUIDId of the session.
paramparamsSessionNodeListParams | None= NoneSession node list params.
Returns
collections.abc.AsyncIteratorAsync iterator over every node of the session.