gbox_sdk.types.v1 package¶
Subpackages¶
- gbox_sdk.types.v1.boxes package
- Submodules
- gbox_sdk.types.v1.boxes.action_click_params module
- gbox_sdk.types.v1.boxes.action_click_response module
- gbox_sdk.types.v1.boxes.action_drag_params module
- gbox_sdk.types.v1.boxes.action_drag_response module
- gbox_sdk.types.v1.boxes.action_move_params module
- gbox_sdk.types.v1.boxes.action_move_response module
- gbox_sdk.types.v1.boxes.action_press_button_params module
- gbox_sdk.types.v1.boxes.action_press_button_response module
- gbox_sdk.types.v1.boxes.action_press_key_params module
- gbox_sdk.types.v1.boxes.action_press_key_response module
- gbox_sdk.types.v1.boxes.action_screen_rotation_params module
- gbox_sdk.types.v1.boxes.action_screen_rotation_response module
- gbox_sdk.types.v1.boxes.action_screenshot_params module
- gbox_sdk.types.v1.boxes.action_screenshot_response module
- gbox_sdk.types.v1.boxes.action_scroll_params module
- gbox_sdk.types.v1.boxes.action_scroll_response module
- gbox_sdk.types.v1.boxes.action_swipe_params module
- gbox_sdk.types.v1.boxes.action_swipe_response module
- gbox_sdk.types.v1.boxes.action_touch_params module
- gbox_sdk.types.v1.boxes.action_touch_response module
- gbox_sdk.types.v1.boxes.action_type_params module
- gbox_sdk.types.v1.boxes.action_type_response module
- gbox_sdk.types.v1.boxes.android_app module
- gbox_sdk.types.v1.boxes.android_get_connect_address_response module
- gbox_sdk.types.v1.boxes.android_get_response module
- gbox_sdk.types.v1.boxes.android_install_params module
- gbox_sdk.types.v1.boxes.android_install_response module
- gbox_sdk.types.v1.boxes.android_list_activities_response module
- gbox_sdk.types.v1.boxes.android_list_app_response module
- gbox_sdk.types.v1.boxes.android_list_pkg_params module
- gbox_sdk.types.v1.boxes.android_list_pkg_response module
- gbox_sdk.types.v1.boxes.android_list_pkg_simple_params module
- gbox_sdk.types.v1.boxes.android_list_pkg_simple_response module
- gbox_sdk.types.v1.boxes.android_open_params module
- gbox_sdk.types.v1.boxes.android_restart_params module
- gbox_sdk.types.v1.boxes.android_restore_params module
- gbox_sdk.types.v1.boxes.android_uninstall_params module
- gbox_sdk.types.v1.boxes.browser_cdp_url_params module
- gbox_sdk.types.v1.boxes.browser_cdp_url_response module
- gbox_sdk.types.v1.boxes.f_exists_params module
- gbox_sdk.types.v1.boxes.f_exists_response module
- gbox_sdk.types.v1.boxes.f_info_params module
- gbox_sdk.types.v1.boxes.f_info_response module
- gbox_sdk.types.v1.boxes.f_list_params module
- gbox_sdk.types.v1.boxes.f_list_response module
- gbox_sdk.types.v1.boxes.f_read_params module
- gbox_sdk.types.v1.boxes.f_read_response module
- gbox_sdk.types.v1.boxes.f_remove_params module
- gbox_sdk.types.v1.boxes.f_remove_response module
- gbox_sdk.types.v1.boxes.f_rename_params module
- gbox_sdk.types.v1.boxes.f_rename_response module
- gbox_sdk.types.v1.boxes.f_write_params module
- gbox_sdk.types.v1.boxes.f_write_response module
- Module contents
Submodules¶
gbox_sdk.types.v1.android_box module¶
- class gbox_sdk.types.v1.android_box.AndroidBox(**data)¶
Bases:
BaseModel
-
created_at:
datetime
¶ Creation timestamp of the box
-
expires_at:
Optional
[datetime
]¶ Expiration timestamp of the box
-
id:
str
¶ Unique identifier for the box
- model_config: ClassVar[ConfigDict] = {'defer_build': True, 'extra': 'allow'}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
status:
Literal
['pending'
,'running'
,'error'
,'terminated'
]¶ The current status of a box instance
-
type:
Literal
['android'
]¶ Box type is Android
-
updated_at:
datetime
¶ Last update timestamp of the box
-
created_at:
- class gbox_sdk.types.v1.android_box.Config(**data)¶
Bases:
BaseModel
-
cpu:
float
¶ CPU cores allocated to the box
-
device_type:
Optional
[Literal
['virtual'
,'physical'
]]¶ Device type - virtual or physical Android device
-
envs:
Dict
[str
,str
]¶ Environment variables for the box.
These variables will be available in all operations including command execution, code running, and other box behaviors
-
labels:
Dict
[str
,str
]¶ Key-value pairs of labels for the box.
Labels are used to add custom metadata to help identify, categorize, and manage boxes. Common use cases include project names, environments, teams, applications, or any other organizational tags that help you organize and filter your boxes.
-
memory:
float
¶ Memory allocated to the box in MiB
- model_config: ClassVar[ConfigDict] = {'defer_build': True, 'extra': 'allow'}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
storage:
float
¶ Storage allocated to the box in GiB
-
working_dir:
Optional
[str
]¶ Working directory path for the box.
This directory serves as the default starting point for all operations including command execution, code running, and file system operations. When you execute commands or run code, they will start from this directory unless explicitly specified otherwise.
-
cpu:
- class gbox_sdk.types.v1.android_box.ConfigOs(**data)¶
Bases:
BaseModel
- model_config: ClassVar[ConfigDict] = {'defer_build': True, 'extra': 'allow'}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
version:
Literal
['12'
,'13'
,'15'
]¶ Supported Android versions
gbox_sdk.types.v1.box_create_android_params module¶
- class gbox_sdk.types.v1.box_create_android_params.BoxCreateAndroidParams¶
Bases:
TypedDict
-
wait:
bool
¶ Wait for the box operation to be completed, default is true
-
wait:
- class gbox_sdk.types.v1.box_create_android_params.Config¶
Bases:
TypedDict
-
device_type:
Annotated
[Literal
['virtual'
,'physical'
]]¶ Device type - virtual or physical Android device
-
envs:
Dict
[str
,str
]¶ Environment variables for the box.
These variables will be available in all operations including command execution, code running, and other box behaviors
-
expires_in:
Annotated
[str
]¶ The box will be alive for the given duration
Supported time units: ms (milliseconds), s (seconds), m (minutes), h (hours) Example formats: “500ms”, “30s”, “5m”, “1h” Default: 60m
-
labels:
Dict
[str
,str
]¶ Key-value pairs of labels for the box.
Labels are used to add custom metadata to help identify, categorize, and manage boxes. Common use cases include project names, environments, teams, applications, or any other organizational tags that help you organize and filter your boxes.
-
device_type:
gbox_sdk.types.v1.box_create_linux_params module¶
- class gbox_sdk.types.v1.box_create_linux_params.BoxCreateLinuxParams¶
Bases:
TypedDict
-
wait:
bool
¶ Wait for the box operation to be completed, default is true
-
wait:
- class gbox_sdk.types.v1.box_create_linux_params.Config¶
Bases:
TypedDict
-
envs:
Dict
[str
,str
]¶ Environment variables for the box.
These variables will be available in all operations including command execution, code running, and other box behaviors
-
expires_in:
Annotated
[str
]¶ The box will be alive for the given duration
Supported time units: ms (milliseconds), s (seconds), m (minutes), h (hours) Example formats: “500ms”, “30s”, “5m”, “1h” Default: 60m
-
labels:
Dict
[str
,str
]¶ Key-value pairs of labels for the box.
Labels are used to add custom metadata to help identify, categorize, and manage boxes. Common use cases include project names, environments, teams, applications, or any other organizational tags that help you organize and filter your boxes.
-
envs:
gbox_sdk.types.v1.box_execute_commands_params module¶
- class gbox_sdk.types.v1.box_execute_commands_params.BoxExecuteCommandsParams¶
Bases:
TypedDict
-
api_timeout:
Annotated
[str
]¶ The timeout of the command.
If the command times out, the exit code will be 124. For example: ‘timeout 5s sleep 10s’ will result in exit code 124.
Supported time units: ms (milliseconds), s (seconds), m (minutes), h (hours) Example formats: “500ms”, “30s”, “5m”, “1h” Default: 30s
-
commands:
Required
[Union
[str
,List
[str
]]]¶ The command to run. Can be a single string or an array of strings
-
envs:
object
¶ The environment variables to run the command
-
working_dir:
Annotated
[str
]¶ The working directory of the command.
It not provided, the command will be run in the box.config.workingDir directory.
-
api_timeout:
gbox_sdk.types.v1.box_execute_commands_response module¶
- class gbox_sdk.types.v1.box_execute_commands_response.BoxExecuteCommandsResponse(**data)¶
Bases:
BaseModel
-
exit_code:
float
¶ The exit code of the command
- model_config: ClassVar[ConfigDict] = {'defer_build': True, 'extra': 'allow'}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
stderr:
str
¶ The standard error output of the command
-
stdout:
str
¶ The standard output of the command
-
exit_code:
gbox_sdk.types.v1.box_list_params module¶
- class gbox_sdk.types.v1.box_list_params.BoxListParams¶
Bases:
TypedDict
-
device_type:
Annotated
[str
]¶ Filter boxes by their device type (virtual, physical)
-
labels:
object
¶ Filter boxes by their labels.
Labels are key-value pairs that help identify and categorize boxes. Use this to filter boxes that match specific label criteria. For example, you can filter by project, environment, team, or any custom labels you’ve added to your boxes.
-
page:
int
¶ Page number
-
page_size:
Annotated
[int
]¶ Page size
-
status:
List
[Literal
['all'
,'pending'
,'running'
,'error'
,'terminated'
]]¶ Filter boxes by their current status (pending, running, stopped, error, terminated, all). Must be an array of statuses. Use ‘all’ to get boxes with any status.
-
type:
List
[Literal
['all'
,'linux'
,'android'
]]¶ Filter boxes by their type (linux, android, all).
Must be an array of types. Use ‘all’ to get boxes of any type.
-
device_type:
gbox_sdk.types.v1.box_list_response module¶
- class gbox_sdk.types.v1.box_list_response.BoxListResponse(**data)¶
Bases:
BaseModel
-
data:
List
[Union
[LinuxBox
,AndroidBox
]]¶ A box instance that can be either Linux or Android type
- model_config: ClassVar[ConfigDict] = {'defer_build': True, 'extra': 'allow'}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
page:
int
¶ Page number
-
page_size:
int
¶ Page size
-
total:
int
¶ Total number of items
-
data:
gbox_sdk.types.v1.box_live_view_url_params module¶
- class gbox_sdk.types.v1.box_live_view_url_params.BoxLiveViewURLParams¶
Bases:
TypedDict
-
expires_in:
Annotated
[str
]¶ The live view will be alive for the given duration
Supported time units: ms (milliseconds), s (seconds), m (minutes), h (hours) Example formats: “500ms”, “30s”, “5m”, “1h” Default: 180m
-
expires_in:
gbox_sdk.types.v1.box_live_view_url_response module¶
- class gbox_sdk.types.v1.box_live_view_url_response.BoxLiveViewURLResponse(**data)¶
Bases:
BaseModel
- model_config: ClassVar[ConfigDict] = {'defer_build': True, 'extra': 'allow'}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
url:
str
¶ Live view url
gbox_sdk.types.v1.box_retrieve_response module¶
gbox_sdk.types.v1.box_run_code_params module¶
- class gbox_sdk.types.v1.box_run_code_params.BoxRunCodeParams¶
Bases:
TypedDict
-
api_timeout:
Annotated
[str
]¶ The timeout of the code execution.
If the code execution times out, the exit code will be 124.
Supported time units: ms (milliseconds), s (seconds), m (minutes), h (hours) Example formats: “500ms”, “30s”, “5m”, “1h” Default: 30s
-
argv:
List
[str
]¶ The arguments to run the code.
For example, if you want to run “python index.py –help”, you should pass [”–help”] as arguments.
-
code:
Required
[str
]¶ The code to run
-
envs:
object
¶ The environment variables to run the code
-
language:
Literal
['bash'
,'python'
,'typescript'
]¶ The language of the code.
-
working_dir:
Annotated
[str
]¶ The working directory of the code.
It not provided, the code will be run in the box.config.workingDir directory.
-
api_timeout:
gbox_sdk.types.v1.box_run_code_response module¶
- class gbox_sdk.types.v1.box_run_code_response.BoxRunCodeResponse(**data)¶
Bases:
BaseModel
-
exit_code:
float
¶ The exit code of the code
- model_config: ClassVar[ConfigDict] = {'defer_build': True, 'extra': 'allow'}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
stderr:
str
¶ The stderr of the code
-
stdout:
str
¶ The stdout of the code
-
exit_code:
gbox_sdk.types.v1.box_start_params module¶
gbox_sdk.types.v1.box_start_response module¶
gbox_sdk.types.v1.box_stop_params module¶
gbox_sdk.types.v1.box_stop_response module¶
gbox_sdk.types.v1.box_terminate_params module¶
gbox_sdk.types.v1.box_web_terminal_url_params module¶
- class gbox_sdk.types.v1.box_web_terminal_url_params.BoxWebTerminalURLParams¶
Bases:
TypedDict
-
expires_in:
Annotated
[str
]¶ The web terminal will be alive for the given duration
Supported time units: ms (milliseconds), s (seconds), m (minutes), h (hours) Example formats: “500ms”, “30s”, “5m”, “1h” Default: 180m
-
expires_in:
gbox_sdk.types.v1.box_web_terminal_url_response module¶
- class gbox_sdk.types.v1.box_web_terminal_url_response.BoxWebTerminalURLResponse(**data)¶
Bases:
BaseModel
- model_config: ClassVar[ConfigDict] = {'defer_build': True, 'extra': 'allow'}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
url:
str
¶ Web terminal url
gbox_sdk.types.v1.create_box_config_param module¶
gbox_sdk.types.v1.linux_box module¶
- class gbox_sdk.types.v1.linux_box.Config(**data)¶
Bases:
BaseModel
-
cpu:
float
¶ CPU cores allocated to the box
-
envs:
Dict
[str
,str
]¶ Environment variables for the box.
These variables will be available in all operations including command execution, code running, and other box behaviors
-
labels:
Dict
[str
,str
]¶ Key-value pairs of labels for the box.
Labels are used to add custom metadata to help identify, categorize, and manage boxes. Common use cases include project names, environments, teams, applications, or any other organizational tags that help you organize and filter your boxes.
-
memory:
float
¶ Memory allocated to the box in MiB
- model_config: ClassVar[ConfigDict] = {'defer_build': True, 'extra': 'allow'}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
storage:
float
¶ Storage allocated to the box in GiB.
-
working_dir:
str
¶ Working directory path for the box.
This directory serves as the default starting point for all operations including command execution, code running, and file system operations. When you execute commands or run code, they will start from this directory unless explicitly specified otherwise.
-
cpu:
- class gbox_sdk.types.v1.linux_box.ConfigOs(**data)¶
Bases:
BaseModel
- model_config: ClassVar[ConfigDict] = {'defer_build': True, 'extra': 'allow'}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
version:
str
¶ OS version string (e.g. ‘ubuntu-20.04’)
- class gbox_sdk.types.v1.linux_box.LinuxBox(**data)¶
Bases:
BaseModel
-
created_at:
datetime
¶ Creation timestamp of the box
-
expires_at:
Optional
[datetime
]¶ Expiration timestamp of the box
-
id:
str
¶ Unique identifier for the box
- model_config: ClassVar[ConfigDict] = {'defer_build': True, 'extra': 'allow'}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
status:
Literal
['pending'
,'running'
,'error'
,'terminated'
]¶ The current status of a box instance
-
type:
Literal
['linux'
]¶ Box type is Linux
-
updated_at:
datetime
¶ Last update timestamp of the box
-
created_at: