Skip to main content

Returns

Returns a Session object.

Example

session = galtea.sessions.get_or_create(
    custom_id=custom_session_id,
    version_id=version_id,
    test_case_id=test_case_id,
)

Parameters

custom_id
string
required
The Custom ID of the session to fetch or create.
This is useful to associate sessions in the Galtea platform with those in your application.
version_id
string
required
The ID of the version to associate with this session if it needs to be created.
test_case_id
string
The test case ID. Required for non-production sessions.
context
dict
A flexible key-value context.
is_production
boolean
A flag to indicate if the session is from a production environment. Defaults to False.