Appearance
AGB API Reference
🚀 Related Tutorial
- Quick Start Guide - Get started with the AGB Python SDK
Overview
The main AGB module provides the core functionality for creating and managing sessions with the AGB cloud platform. It serves as the entry point for all SDK operations.
AGB represents the main client for interacting with the AGB cloud runtime environment.
AGB
python
class AGB()AGB represents the main client for interacting with the AGB cloud runtime environment.
create
python
def create(params: Optional[CreateSessionParams] = None) -> SessionResultCreate a new session in the AGB cloud environment.
Arguments:
paramsOptional[CreateSessionParams] - Parameters for creating the session. Defaults to None.
Returns:
SessionResult: Result containing the created session and request ID.
list
python
def list(labels: Optional[Dict[str, str]] = None,
page: Optional[int] = None,
limit: Optional[int] = None) -> SessionListResultReturns paginated list of session IDs filtered by labels.
Arguments:
labelsOptional[Dict[str, str]] - Labels to filter sessions. Defaults to None (empty dict).pageOptional[int] - Page number for pagination (starting from 1). Defaults to None (returns first page).limitOptional[int] - Maximum number of items per page. Defaults to None (uses default of 10).
Returns:
SessionListResult: Paginated list of session IDs that match the labels,
including request_id, success status, and pagination information.
delete
python
def delete(session: Session, sync_context: bool = False) -> DeleteResultDelete a session by session object.
Arguments:
sessionSession - The session to delete.sync_contextbool - Whether to sync context before deletion. Defaults to False.
Returns:
DeleteResult: Result indicating success or failure and request ID.
get_session
python
def get_session(session_id: str) -> GetSessionResultGet session information by session ID.
Arguments:
session_idstr - The ID of the session to retrieve.
Returns:
GetSessionResult: Result containing session information.
get
python
def get(session_id: str) -> SessionResultGet a session by its ID.
This method retrieves a session by calling the GetSession API and returns a SessionResult containing the Session object and request ID.
Arguments:
session_idstr - The ID of the session to retrieve.
Returns:
SessionResult: Result containing the Session instance, request ID, and success status.
Related Resources
Documentation generated automatically from source code using pydoc-markdown.