boxfab 0.1.0a1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- boxfab-0.1.0a1/LICENSE +13 -0
- boxfab-0.1.0a1/LICENSE-E2B +9 -0
- boxfab-0.1.0a1/PKG-INFO +186 -0
- boxfab-0.1.0a1/README.md +154 -0
- boxfab-0.1.0a1/boxfab/__init__.py +331 -0
- boxfab-0.1.0a1/boxfab/api/__init__.py +301 -0
- boxfab-0.1.0a1/boxfab/api/client/__init__.py +8 -0
- boxfab-0.1.0a1/boxfab/api/client/api/__init__.py +1 -0
- boxfab-0.1.0a1/boxfab/api/client/api/sandboxes/__init__.py +1 -0
- boxfab-0.1.0a1/boxfab/api/client/api/sandboxes/delete_sandboxes_sandbox_id.py +173 -0
- boxfab-0.1.0a1/boxfab/api/client/api/sandboxes/get_sandboxes.py +188 -0
- boxfab-0.1.0a1/boxfab/api/client/api/sandboxes/get_sandboxes_metrics.py +185 -0
- boxfab-0.1.0a1/boxfab/api/client/api/sandboxes/get_sandboxes_sandbox_id.py +175 -0
- boxfab-0.1.0a1/boxfab/api/client/api/sandboxes/get_sandboxes_sandbox_id_logs.py +211 -0
- boxfab-0.1.0a1/boxfab/api/client/api/sandboxes/get_sandboxes_sandbox_id_metrics.py +224 -0
- boxfab-0.1.0a1/boxfab/api/client/api/sandboxes/get_v2_sandboxes.py +296 -0
- boxfab-0.1.0a1/boxfab/api/client/api/sandboxes/get_v_2_sandboxes_sandbox_id_logs.py +266 -0
- boxfab-0.1.0a1/boxfab/api/client/api/sandboxes/post_sandboxes.py +196 -0
- boxfab-0.1.0a1/boxfab/api/client/api/sandboxes/post_sandboxes_sandbox_id_connect.py +221 -0
- boxfab-0.1.0a1/boxfab/api/client/api/sandboxes/post_sandboxes_sandbox_id_fork.py +226 -0
- boxfab-0.1.0a1/boxfab/api/client/api/sandboxes/post_sandboxes_sandbox_id_pause.py +203 -0
- boxfab-0.1.0a1/boxfab/api/client/api/sandboxes/post_sandboxes_sandbox_id_refreshes.py +191 -0
- boxfab-0.1.0a1/boxfab/api/client/api/sandboxes/post_sandboxes_sandbox_id_resume.py +213 -0
- boxfab-0.1.0a1/boxfab/api/client/api/sandboxes/post_sandboxes_sandbox_id_snapshots.py +205 -0
- boxfab-0.1.0a1/boxfab/api/client/api/sandboxes/post_sandboxes_sandbox_id_timeout.py +203 -0
- boxfab-0.1.0a1/boxfab/api/client/api/sandboxes/post_v2_sandboxes.py +227 -0
- boxfab-0.1.0a1/boxfab/api/client/api/sandboxes/post_v_2_sandboxes_sandbox_id_connect.py +221 -0
- boxfab-0.1.0a1/boxfab/api/client/api/sandboxes/put_sandboxes_sandbox_id_network.py +211 -0
- boxfab-0.1.0a1/boxfab/api/client/api/secrets/__init__.py +1 -0
- boxfab-0.1.0a1/boxfab/api/client/api/secrets/delete_secrets_secret_id.py +197 -0
- boxfab-0.1.0a1/boxfab/api/client/api/secrets/get_secrets.py +223 -0
- boxfab-0.1.0a1/boxfab/api/client/api/secrets/get_secrets_secret_id.py +199 -0
- boxfab-0.1.0a1/boxfab/api/client/api/secrets/post_secrets.py +208 -0
- boxfab-0.1.0a1/boxfab/api/client/api/secrets/post_secrets_secret_id.py +221 -0
- boxfab-0.1.0a1/boxfab/api/client/api/snapshots/__init__.py +1 -0
- boxfab-0.1.0a1/boxfab/api/client/api/snapshots/get_snapshots.py +229 -0
- boxfab-0.1.0a1/boxfab/api/client/api/tags/__init__.py +1 -0
- boxfab-0.1.0a1/boxfab/api/client/api/tags/delete_templates_tags.py +186 -0
- boxfab-0.1.0a1/boxfab/api/client/api/tags/get_templates_template_id_tags.py +184 -0
- boxfab-0.1.0a1/boxfab/api/client/api/tags/get_templates_template_id_tags_count.py +183 -0
- boxfab-0.1.0a1/boxfab/api/client/api/tags/get_templates_template_id_tags_exists.py +208 -0
- boxfab-0.1.0a1/boxfab/api/client/api/tags/get_templates_template_id_tags_groups.py +293 -0
- boxfab-0.1.0a1/boxfab/api/client/api/tags/get_templates_template_id_tags_tag_assignments.py +236 -0
- boxfab-0.1.0a1/boxfab/api/client/api/tags/post_templates_tags.py +188 -0
- boxfab-0.1.0a1/boxfab/api/client/api/templates/__init__.py +1 -0
- boxfab-0.1.0a1/boxfab/api/client/api/templates/delete_templates_template_id.py +169 -0
- boxfab-0.1.0a1/boxfab/api/client/api/templates/get_default_templates.py +172 -0
- boxfab-0.1.0a1/boxfab/api/client/api/templates/get_templates.py +188 -0
- boxfab-0.1.0a1/boxfab/api/client/api/templates/get_templates_aliases_alias.py +179 -0
- boxfab-0.1.0a1/boxfab/api/client/api/templates/get_templates_template_id.py +207 -0
- boxfab-0.1.0a1/boxfab/api/client/api/templates/get_templates_template_id_builds_build_id_logs.py +284 -0
- boxfab-0.1.0a1/boxfab/api/client/api/templates/get_templates_template_id_builds_build_id_status.py +244 -0
- boxfab-0.1.0a1/boxfab/api/client/api/templates/get_templates_template_id_files_hash.py +192 -0
- boxfab-0.1.0a1/boxfab/api/client/api/templates/get_v2_templates.py +226 -0
- boxfab-0.1.0a1/boxfab/api/client/api/templates/patch_templates_template_id.py +195 -0
- boxfab-0.1.0a1/boxfab/api/client/api/templates/patch_v_2_templates_template_id.py +197 -0
- boxfab-0.1.0a1/boxfab/api/client/api/templates/post_v3_templates.py +192 -0
- boxfab-0.1.0a1/boxfab/api/client/api/templates/post_v_2_templates_template_id_builds_build_id.py +212 -0
- boxfab-0.1.0a1/boxfab/api/client/api/volumes/__init__.py +1 -0
- boxfab-0.1.0a1/boxfab/api/client/api/volumes/delete_volumes_volume_id.py +173 -0
- boxfab-0.1.0a1/boxfab/api/client/api/volumes/get_volumes.py +152 -0
- boxfab-0.1.0a1/boxfab/api/client/api/volumes/get_volumes_volume_id.py +175 -0
- boxfab-0.1.0a1/boxfab/api/client/api/volumes/post_volumes.py +184 -0
- boxfab-0.1.0a1/boxfab/api/client/client.py +286 -0
- boxfab-0.1.0a1/boxfab/api/client/errors.py +16 -0
- boxfab-0.1.0a1/boxfab/api/client/models/__init__.py +183 -0
- boxfab-0.1.0a1/boxfab/api/client/models/assign_template_tags_request.py +67 -0
- boxfab-0.1.0a1/boxfab/api/client/models/assigned_template_tags.py +68 -0
- boxfab-0.1.0a1/boxfab/api/client/models/aws_registry.py +85 -0
- boxfab-0.1.0a1/boxfab/api/client/models/aws_registry_type.py +8 -0
- boxfab-0.1.0a1/boxfab/api/client/models/build_log_entry.py +89 -0
- boxfab-0.1.0a1/boxfab/api/client/models/build_status_reason.py +95 -0
- boxfab-0.1.0a1/boxfab/api/client/models/connect_sandbox.py +74 -0
- boxfab-0.1.0a1/boxfab/api/client/models/connect_sandbox_v2.py +73 -0
- boxfab-0.1.0a1/boxfab/api/client/models/delete_template_tags_request.py +67 -0
- boxfab-0.1.0a1/boxfab/api/client/models/error.py +83 -0
- boxfab-0.1.0a1/boxfab/api/client/models/gcp_registry.py +69 -0
- boxfab-0.1.0a1/boxfab/api/client/models/gcp_registry_type.py +8 -0
- boxfab-0.1.0a1/boxfab/api/client/models/general_registry.py +77 -0
- boxfab-0.1.0a1/boxfab/api/client/models/general_registry_type.py +8 -0
- boxfab-0.1.0a1/boxfab/api/client/models/get_templates_template_id_tags_groups_sort.py +11 -0
- boxfab-0.1.0a1/boxfab/api/client/models/listed_sandbox.py +179 -0
- boxfab-0.1.0a1/boxfab/api/client/models/log_level.py +11 -0
- boxfab-0.1.0a1/boxfab/api/client/models/logs_direction.py +9 -0
- boxfab-0.1.0a1/boxfab/api/client/models/logs_source.py +9 -0
- boxfab-0.1.0a1/boxfab/api/client/models/mcp_type_0.py +44 -0
- boxfab-0.1.0a1/boxfab/api/client/models/new_sandbox.py +244 -0
- boxfab-0.1.0a1/boxfab/api/client/models/new_sandbox_v2.py +236 -0
- boxfab-0.1.0a1/boxfab/api/client/models/new_secret.py +95 -0
- boxfab-0.1.0a1/boxfab/api/client/models/new_volume.py +59 -0
- boxfab-0.1.0a1/boxfab/api/client/models/order_direction.py +9 -0
- boxfab-0.1.0a1/boxfab/api/client/models/resumed_sandbox.py +81 -0
- boxfab-0.1.0a1/boxfab/api/client/models/sandbox.py +145 -0
- boxfab-0.1.0a1/boxfab/api/client/models/sandbox_auto_resume_config.py +60 -0
- boxfab-0.1.0a1/boxfab/api/client/models/sandbox_detail.py +287 -0
- boxfab-0.1.0a1/boxfab/api/client/models/sandbox_egress_proxy_config_type_0.py +133 -0
- boxfab-0.1.0a1/boxfab/api/client/models/sandbox_egress_proxy_tls_config_type_0.py +87 -0
- boxfab-0.1.0a1/boxfab/api/client/models/sandbox_fork_request.py +70 -0
- boxfab-0.1.0a1/boxfab/api/client/models/sandbox_fork_result.py +92 -0
- boxfab-0.1.0a1/boxfab/api/client/models/sandbox_iam.py +73 -0
- boxfab-0.1.0a1/boxfab/api/client/models/sandbox_iam_token.py +67 -0
- boxfab-0.1.0a1/boxfab/api/client/models/sandbox_iam_tokens.py +59 -0
- boxfab-0.1.0a1/boxfab/api/client/models/sandbox_lifecycle.py +70 -0
- boxfab-0.1.0a1/boxfab/api/client/models/sandbox_log.py +70 -0
- boxfab-0.1.0a1/boxfab/api/client/models/sandbox_log_entry.py +93 -0
- boxfab-0.1.0a1/boxfab/api/client/models/sandbox_log_entry_fields.py +44 -0
- boxfab-0.1.0a1/boxfab/api/client/models/sandbox_logs.py +91 -0
- boxfab-0.1.0a1/boxfab/api/client/models/sandbox_logs_v2_response.py +73 -0
- boxfab-0.1.0a1/boxfab/api/client/models/sandbox_metric.py +126 -0
- boxfab-0.1.0a1/boxfab/api/client/models/sandbox_network_config.py +210 -0
- boxfab-0.1.0a1/boxfab/api/client/models/sandbox_network_config_rules.py +76 -0
- boxfab-0.1.0a1/boxfab/api/client/models/sandbox_network_rule.py +74 -0
- boxfab-0.1.0a1/boxfab/api/client/models/sandbox_network_transform.py +79 -0
- boxfab-0.1.0a1/boxfab/api/client/models/sandbox_network_transform_headers.py +47 -0
- boxfab-0.1.0a1/boxfab/api/client/models/sandbox_network_update_config.py +179 -0
- boxfab-0.1.0a1/boxfab/api/client/models/sandbox_network_update_config_rules.py +78 -0
- boxfab-0.1.0a1/boxfab/api/client/models/sandbox_on_timeout.py +9 -0
- boxfab-0.1.0a1/boxfab/api/client/models/sandbox_pause_mode.py +9 -0
- boxfab-0.1.0a1/boxfab/api/client/models/sandbox_pause_request.py +62 -0
- boxfab-0.1.0a1/boxfab/api/client/models/sandbox_refresh_request.py +59 -0
- boxfab-0.1.0a1/boxfab/api/client/models/sandbox_snapshot_request.py +72 -0
- boxfab-0.1.0a1/boxfab/api/client/models/sandbox_state.py +9 -0
- boxfab-0.1.0a1/boxfab/api/client/models/sandbox_timeout_request.py +59 -0
- boxfab-0.1.0a1/boxfab/api/client/models/sandbox_volume_mount.py +67 -0
- boxfab-0.1.0a1/boxfab/api/client/models/sandboxes_with_metrics.py +59 -0
- boxfab-0.1.0a1/boxfab/api/client/models/secret.py +109 -0
- boxfab-0.1.0a1/boxfab/api/client/models/secret_metadata.py +47 -0
- boxfab-0.1.0a1/boxfab/api/client/models/secret_update.py +86 -0
- boxfab-0.1.0a1/boxfab/api/client/models/snapshot_info.py +70 -0
- boxfab-0.1.0a1/boxfab/api/client/models/team_user.py +74 -0
- boxfab-0.1.0a1/boxfab/api/client/models/template.py +246 -0
- boxfab-0.1.0a1/boxfab/api/client/models/template_alias_response.py +67 -0
- boxfab-0.1.0a1/boxfab/api/client/models/template_build.py +139 -0
- boxfab-0.1.0a1/boxfab/api/client/models/template_build_file_upload.py +97 -0
- boxfab-0.1.0a1/boxfab/api/client/models/template_build_file_upload_headers.py +44 -0
- boxfab-0.1.0a1/boxfab/api/client/models/template_build_info.py +126 -0
- boxfab-0.1.0a1/boxfab/api/client/models/template_build_logs_response.py +73 -0
- boxfab-0.1.0a1/boxfab/api/client/models/template_build_request_v3.py +119 -0
- boxfab-0.1.0a1/boxfab/api/client/models/template_build_start_v2.py +185 -0
- boxfab-0.1.0a1/boxfab/api/client/models/template_build_status.py +11 -0
- boxfab-0.1.0a1/boxfab/api/client/models/template_request_response_v3.py +99 -0
- boxfab-0.1.0a1/boxfab/api/client/models/template_step.py +91 -0
- boxfab-0.1.0a1/boxfab/api/client/models/template_tag.py +78 -0
- boxfab-0.1.0a1/boxfab/api/client/models/template_tag_assignment.py +111 -0
- boxfab-0.1.0a1/boxfab/api/client/models/template_tag_assignments_response.py +87 -0
- boxfab-0.1.0a1/boxfab/api/client/models/template_tag_exists_response.py +67 -0
- boxfab-0.1.0a1/boxfab/api/client/models/template_tag_group.py +89 -0
- boxfab-0.1.0a1/boxfab/api/client/models/template_tag_groups_response.py +88 -0
- boxfab-0.1.0a1/boxfab/api/client/models/template_tags_count_response.py +59 -0
- boxfab-0.1.0a1/boxfab/api/client/models/template_update_request.py +59 -0
- boxfab-0.1.0a1/boxfab/api/client/models/template_update_response.py +59 -0
- boxfab-0.1.0a1/boxfab/api/client/models/template_with_builds.py +264 -0
- boxfab-0.1.0a1/boxfab/api/client/models/volume.py +67 -0
- boxfab-0.1.0a1/boxfab/api/client/models/volume_and_token.py +89 -0
- boxfab-0.1.0a1/boxfab/api/client/py.typed +1 -0
- boxfab-0.1.0a1/boxfab/api/client/types.py +54 -0
- boxfab-0.1.0a1/boxfab/api/client_async/__init__.py +232 -0
- boxfab-0.1.0a1/boxfab/api/client_sync/__init__.py +237 -0
- boxfab-0.1.0a1/boxfab/api/metadata.py +14 -0
- boxfab-0.1.0a1/boxfab/client.py +92 -0
- boxfab-0.1.0a1/boxfab/connection_config.py +473 -0
- boxfab-0.1.0a1/boxfab/envd/__init__.py +1 -0
- boxfab-0.1.0a1/boxfab/envd/api.py +204 -0
- boxfab-0.1.0a1/boxfab/envd/client_async/__init__.py +149 -0
- boxfab-0.1.0a1/boxfab/envd/client_shared.py +143 -0
- boxfab-0.1.0a1/boxfab/envd/client_sync/__init__.py +97 -0
- boxfab-0.1.0a1/boxfab/envd/filesystem/__init__.py +1 -0
- boxfab-0.1.0a1/boxfab/envd/filesystem/filesystem_connect.py +690 -0
- boxfab-0.1.0a1/boxfab/envd/filesystem/filesystem_pb.py +851 -0
- boxfab-0.1.0a1/boxfab/envd/interceptors.py +275 -0
- boxfab-0.1.0a1/boxfab/envd/process/__init__.py +1 -0
- boxfab-0.1.0a1/boxfab/envd/process/process_connect.py +641 -0
- boxfab-0.1.0a1/boxfab/envd/process/process_pb.py +938 -0
- boxfab-0.1.0a1/boxfab/envd/rpc.py +247 -0
- boxfab-0.1.0a1/boxfab/envd/utils.py +57 -0
- boxfab-0.1.0a1/boxfab/envd/versions.py +11 -0
- boxfab-0.1.0a1/boxfab/exceptions.py +269 -0
- boxfab-0.1.0a1/boxfab/io_utils.py +57 -0
- boxfab-0.1.0a1/boxfab/paginator.py +50 -0
- boxfab-0.1.0a1/boxfab/py.typed +0 -0
- boxfab-0.1.0a1/boxfab/retry.py +229 -0
- boxfab-0.1.0a1/boxfab/sandbox/_git/__init__.py +85 -0
- boxfab-0.1.0a1/boxfab/sandbox/_git/args.py +363 -0
- boxfab-0.1.0a1/boxfab/sandbox/_git/auth.py +132 -0
- boxfab-0.1.0a1/boxfab/sandbox/_git/config.py +32 -0
- boxfab-0.1.0a1/boxfab/sandbox/_git/parse.py +222 -0
- boxfab-0.1.0a1/boxfab/sandbox/_git/types.py +156 -0
- boxfab-0.1.0a1/boxfab/sandbox/commands/command_handle.py +89 -0
- boxfab-0.1.0a1/boxfab/sandbox/commands/main.py +39 -0
- boxfab-0.1.0a1/boxfab/sandbox/commands/stream_input.py +37 -0
- boxfab-0.1.0a1/boxfab/sandbox/filesystem/filesystem.py +585 -0
- boxfab-0.1.0a1/boxfab/sandbox/filesystem/watch_handle.py +70 -0
- boxfab-0.1.0a1/boxfab/sandbox/iam.py +93 -0
- boxfab-0.1.0a1/boxfab/sandbox/main.py +232 -0
- boxfab-0.1.0a1/boxfab/sandbox/mcp.py +2538 -0
- boxfab-0.1.0a1/boxfab/sandbox/network.py +8 -0
- boxfab-0.1.0a1/boxfab/sandbox/sandbox_api.py +1398 -0
- boxfab-0.1.0a1/boxfab/sandbox/signature.py +47 -0
- boxfab-0.1.0a1/boxfab/sandbox/utils.py +34 -0
- boxfab-0.1.0a1/boxfab/sandbox_async/commands/command.py +582 -0
- boxfab-0.1.0a1/boxfab/sandbox_async/commands/command_handle.py +324 -0
- boxfab-0.1.0a1/boxfab/sandbox_async/commands/command_input_handle.py +131 -0
- boxfab-0.1.0a1/boxfab/sandbox_async/commands/pty.py +283 -0
- boxfab-0.1.0a1/boxfab/sandbox_async/filesystem/filesystem.py +785 -0
- boxfab-0.1.0a1/boxfab/sandbox_async/filesystem/watch_handle.py +100 -0
- boxfab-0.1.0a1/boxfab/sandbox_async/git.py +1102 -0
- boxfab-0.1.0a1/boxfab/sandbox_async/main.py +1250 -0
- boxfab-0.1.0a1/boxfab/sandbox_async/paginator.py +159 -0
- boxfab-0.1.0a1/boxfab/sandbox_async/sandbox_api.py +533 -0
- boxfab-0.1.0a1/boxfab/sandbox_async/utils.py +7 -0
- boxfab-0.1.0a1/boxfab/sandbox_domains.py +13 -0
- boxfab-0.1.0a1/boxfab/sandbox_sync/commands/command.py +576 -0
- boxfab-0.1.0a1/boxfab/sandbox_sync/commands/command_handle.py +260 -0
- boxfab-0.1.0a1/boxfab/sandbox_sync/commands/pty.py +286 -0
- boxfab-0.1.0a1/boxfab/sandbox_sync/filesystem/filesystem.py +731 -0
- boxfab-0.1.0a1/boxfab/sandbox_sync/filesystem/watch_handle.py +103 -0
- boxfab-0.1.0a1/boxfab/sandbox_sync/git.py +1079 -0
- boxfab-0.1.0a1/boxfab/sandbox_sync/main.py +1246 -0
- boxfab-0.1.0a1/boxfab/sandbox_sync/paginator.py +159 -0
- boxfab-0.1.0a1/boxfab/sandbox_sync/sandbox_api.py +520 -0
- boxfab-0.1.0a1/boxfab/secret/__init__.py +11 -0
- boxfab-0.1.0a1/boxfab/secret/base.py +84 -0
- boxfab-0.1.0a1/boxfab/secret/secret_async.py +270 -0
- boxfab-0.1.0a1/boxfab/secret/secret_sync.py +270 -0
- boxfab-0.1.0a1/boxfab/secret/types.py +34 -0
- boxfab-0.1.0a1/boxfab/template/consts.py +33 -0
- boxfab-0.1.0a1/boxfab/template/dockerfile_parser.py +634 -0
- boxfab-0.1.0a1/boxfab/template/logger.py +232 -0
- boxfab-0.1.0a1/boxfab/template/main.py +1315 -0
- boxfab-0.1.0a1/boxfab/template/readycmd.py +144 -0
- boxfab-0.1.0a1/boxfab/template/types.py +194 -0
- boxfab-0.1.0a1/boxfab/template/utils.py +535 -0
- boxfab-0.1.0a1/boxfab/template_async/build_api.py +449 -0
- boxfab-0.1.0a1/boxfab/template_async/main.py +551 -0
- boxfab-0.1.0a1/boxfab/template_sync/build_api.py +445 -0
- boxfab-0.1.0a1/boxfab/template_sync/main.py +553 -0
- boxfab-0.1.0a1/boxfab/volume/client/__init__.py +8 -0
- boxfab-0.1.0a1/boxfab/volume/client/api/__init__.py +1 -0
- boxfab-0.1.0a1/boxfab/volume/client/api/volumes/__init__.py +1 -0
- boxfab-0.1.0a1/boxfab/volume/client/api/volumes/delete_volumecontent_volume_id_path.py +174 -0
- boxfab-0.1.0a1/boxfab/volume/client/api/volumes/get_volumecontent_volume_id_dir.py +204 -0
- boxfab-0.1.0a1/boxfab/volume/client/api/volumes/get_volumecontent_volume_id_file.py +179 -0
- boxfab-0.1.0a1/boxfab/volume/client/api/volumes/get_volumecontent_volume_id_path.py +176 -0
- boxfab-0.1.0a1/boxfab/volume/client/api/volumes/patch_volumecontent_volume_id_path.py +203 -0
- boxfab-0.1.0a1/boxfab/volume/client/api/volumes/post_volumecontent_volume_id_dir.py +239 -0
- boxfab-0.1.0a1/boxfab/volume/client/api/volumes/put_volumecontent_volume_id_file.py +259 -0
- boxfab-0.1.0a1/boxfab/volume/client/client.py +286 -0
- boxfab-0.1.0a1/boxfab/volume/client/errors.py +16 -0
- boxfab-0.1.0a1/boxfab/volume/client/models/__init__.py +13 -0
- boxfab-0.1.0a1/boxfab/volume/client/models/error.py +67 -0
- boxfab-0.1.0a1/boxfab/volume/client/models/patch_volumecontent_volume_id_path_body.py +77 -0
- boxfab-0.1.0a1/boxfab/volume/client/models/volume_entry_stat.py +145 -0
- boxfab-0.1.0a1/boxfab/volume/client/models/volume_entry_stat_type.py +11 -0
- boxfab-0.1.0a1/boxfab/volume/client/py.typed +1 -0
- boxfab-0.1.0a1/boxfab/volume/client/types.py +54 -0
- boxfab-0.1.0a1/boxfab/volume/client_async/__init__.py +94 -0
- boxfab-0.1.0a1/boxfab/volume/client_sync/__init__.py +92 -0
- boxfab-0.1.0a1/boxfab/volume/connection_config.py +166 -0
- boxfab-0.1.0a1/boxfab/volume/types.py +66 -0
- boxfab-0.1.0a1/boxfab/volume/utils.py +56 -0
- boxfab-0.1.0a1/boxfab/volume/volume_async.py +719 -0
- boxfab-0.1.0a1/boxfab/volume/volume_sync.py +691 -0
- boxfab-0.1.0a1/pyproject.toml +67 -0
- boxfab-0.1.0a1/pyproject.toml.orig +57 -0
boxfab-0.1.0a1/LICENSE
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 ContextFab, Inc.
|
|
4
|
+
|
|
5
|
+
This software is derived from the E2B Python SDK, Copyright (c) 2025 FOUNDRYLABS, INC.,
|
|
6
|
+
distributed under the MIT License reproduced in LICENSE-E2B. Boxfab's modifications are
|
|
7
|
+
distributed under the same terms:
|
|
8
|
+
|
|
9
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
10
|
+
|
|
11
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 FOUNDRYLABS, INC.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
boxfab-0.1.0a1/PKG-INFO
ADDED
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: boxfab
|
|
3
|
+
Version: 0.1.0a1
|
|
4
|
+
Summary: Python SDK for BoxFab, an agent execution cloud of Firecracker sandboxes (derived from the E2B SDK)
|
|
5
|
+
Author: ContextFab, Inc.
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
License-File: LICENSE-E2B
|
|
9
|
+
Classifier: Development Status :: 3 - Alpha
|
|
10
|
+
Classifier: Intended Audience :: Developers
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
15
|
+
Classifier: Typing :: Typed
|
|
16
|
+
Requires-Dist: python-dateutil>=2.8.2
|
|
17
|
+
Requires-Dist: wcmatch>=10.1,<12
|
|
18
|
+
Requires-Dist: protobuf-py>=0.6.0,<0.7
|
|
19
|
+
Requires-Dist: httpx>=0.27.0,<1.0.0
|
|
20
|
+
Requires-Dist: h2>=4.4.1,<5
|
|
21
|
+
Requires-Dist: attrs>=23.2.0
|
|
22
|
+
Requires-Dist: packaging>=24.1
|
|
23
|
+
Requires-Dist: typing-extensions>=4.10.0
|
|
24
|
+
Requires-Dist: rich>=14.0.0
|
|
25
|
+
Requires-Dist: connectrpc>=0.12.1,<0.13
|
|
26
|
+
Requires-Dist: pyqwest>=0.12.0,<0.13
|
|
27
|
+
Requires-Dist: e2b-dockerfile-utils>=0.1.0,<0.2
|
|
28
|
+
Requires-Python: >=3.11
|
|
29
|
+
Project-URL: Repository, https://github.com/boxfab/python-sdk
|
|
30
|
+
Project-URL: Upstream, https://github.com/e2b-dev/E2B/tree/main/packages/python-sdk
|
|
31
|
+
Description-Content-Type: text/markdown
|
|
32
|
+
|
|
33
|
+
# BoxFab Python SDK
|
|
34
|
+
|
|
35
|
+
Python SDK for [BoxFab](https://github.com/boxfab), an agent execution cloud: start isolated
|
|
36
|
+
Firecracker sandboxes, run commands, move files, and reach services running inside them.
|
|
37
|
+
|
|
38
|
+
> **Alpha.** `0.1.0a1` is the first release. The API follows the E2B SDK it is derived from and
|
|
39
|
+
> may still change.
|
|
40
|
+
|
|
41
|
+
The BoxFab Python SDK is derived from the open-source
|
|
42
|
+
[E2B Python SDK](https://github.com/e2b-dev/E2B/tree/main/packages/python-sdk) and includes
|
|
43
|
+
modifications for BoxFab's sandbox infrastructure. BoxFab is an independent project and is not
|
|
44
|
+
affiliated with or endorsed by E2B. See [UPSTREAM.md](UPSTREAM.md) for the exact source revision
|
|
45
|
+
and what was changed.
|
|
46
|
+
|
|
47
|
+
## Install
|
|
48
|
+
|
|
49
|
+
Python 3.11 or newer.
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
pip install boxfab
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Authenticate
|
|
56
|
+
|
|
57
|
+
Get an API key from your BoxFab administrator and export it:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
export BOXFAB_API_KEY="e2b_..."
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
(Keys keep the `e2b_` prefix of the underlying protocol.) You can also pass `api_key=` to any
|
|
64
|
+
call. The SDK reads only `BOXFAB_*` variables; `E2B_*` variables are ignored, so a BoxFab
|
|
65
|
+
program never picks up an E2B key and never talks to E2B's service by accident.
|
|
66
|
+
|
|
67
|
+
## Quick start
|
|
68
|
+
|
|
69
|
+
```python
|
|
70
|
+
from boxfab import Sandbox
|
|
71
|
+
|
|
72
|
+
with Sandbox.create() as sandbox: # killed when the block exits
|
|
73
|
+
result = sandbox.commands.run("echo Hello from BoxFab")
|
|
74
|
+
print(result.stdout)
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
`Sandbox.create("base", timeout=600)` picks a template and a lifetime in seconds (default 300).
|
|
78
|
+
|
|
79
|
+
### Commands
|
|
80
|
+
|
|
81
|
+
```python
|
|
82
|
+
from boxfab import CommandExitException
|
|
83
|
+
|
|
84
|
+
result = sandbox.commands.run("ls -la /home/user")
|
|
85
|
+
print(result.exit_code, result.stdout, result.stderr)
|
|
86
|
+
|
|
87
|
+
try:
|
|
88
|
+
sandbox.commands.run("exit 3")
|
|
89
|
+
except CommandExitException as e: # non-zero exit codes raise
|
|
90
|
+
print(e.exit_code, e.stderr)
|
|
91
|
+
|
|
92
|
+
server = sandbox.commands.run("python3 -m http.server 8080", background=True)
|
|
93
|
+
print(sandbox.get_host(8080)) # 8080-<sandbox id>.<domain>, served over HTTPS
|
|
94
|
+
server.kill()
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### Files
|
|
98
|
+
|
|
99
|
+
```python
|
|
100
|
+
sandbox.files.write("/home/user/hello.txt", "hi")
|
|
101
|
+
print(sandbox.files.read("/home/user/hello.txt"))
|
|
102
|
+
print([e.name for e in sandbox.files.list("/home/user")])
|
|
103
|
+
data = sandbox.files.read("/home/user/hello.txt", format="bytes")
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### Reconnect, pause and resume
|
|
107
|
+
|
|
108
|
+
```python
|
|
109
|
+
sandbox_id = sandbox.sandbox_id
|
|
110
|
+
sandbox.pause() # keeps memory and disk
|
|
111
|
+
sandbox = Sandbox.connect(sandbox_id) # resumes it
|
|
112
|
+
sandbox.kill()
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Async
|
|
116
|
+
|
|
117
|
+
```python
|
|
118
|
+
import asyncio
|
|
119
|
+
from boxfab import AsyncSandbox
|
|
120
|
+
|
|
121
|
+
async def main():
|
|
122
|
+
sandbox = await AsyncSandbox.create()
|
|
123
|
+
try:
|
|
124
|
+
result = await sandbox.commands.run("uname -a")
|
|
125
|
+
print(result.stdout)
|
|
126
|
+
finally:
|
|
127
|
+
await sandbox.kill()
|
|
128
|
+
|
|
129
|
+
asyncio.run(main())
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### Explicit client
|
|
133
|
+
|
|
134
|
+
```python
|
|
135
|
+
from boxfab import BoxFab
|
|
136
|
+
|
|
137
|
+
client = BoxFab(api_key="e2b_...", domain="sandd.contextfab.io")
|
|
138
|
+
sandbox = client.Sandbox.create()
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## Configuration
|
|
142
|
+
|
|
143
|
+
| Variable | Default | Meaning |
|
|
144
|
+
|---|---|---|
|
|
145
|
+
| `BOXFAB_API_KEY` | none | API key |
|
|
146
|
+
| `BOXFAB_DOMAIN` | `sandd.contextfab.io` | BoxFab domain; the API is `https://api.<domain>`, sandbox ports are `https://<port>-<id>.<domain>` |
|
|
147
|
+
| `BOXFAB_DEBUG` | `false` | plain HTTP to a local development stack |
|
|
148
|
+
| `BOXFAB_HTTP_VERSION`, `BOXFAB_CONNECTION_RETRIES`, `BOXFAB_MAX_CONNECTIONS`, `BOXFAB_MAX_KEEPALIVE_CONNECTIONS`, `BOXFAB_KEEPALIVE_EXPIRY` | as upstream | transport tuning |
|
|
149
|
+
|
|
150
|
+
Every call also accepts `api_key=`, `domain=`, `request_timeout=` and the other connection
|
|
151
|
+
parameters directly.
|
|
152
|
+
|
|
153
|
+
**About the domain.** The alpha runs on BoxFab's current deployment at `sandd.contextfab.io`.
|
|
154
|
+
This is a temporary name; a BoxFab-branded domain will become the default in a later release,
|
|
155
|
+
and `BOXFAB_DOMAIN` lets you switch without upgrading.
|
|
156
|
+
|
|
157
|
+
## Known limitations
|
|
158
|
+
|
|
159
|
+
- Verified against the live service: sandbox create/connect/list/kill, commands (stdout,
|
|
160
|
+
stderr, exit codes, timeouts, background processes), files (read, write, list, remove,
|
|
161
|
+
signed upload/download URLs), port URLs, pause/resume, timeouts and info, async with
|
|
162
|
+
concurrency. Other upstream features (template builds, volumes, secrets, MCP, IAM tokens,
|
|
163
|
+
network rules, git helpers, PTY, filesystem watch) are included but not yet verified on
|
|
164
|
+
BoxFab; volumes, secrets and MCP depend on services the deployment may not run.
|
|
165
|
+
- E2B add-on packages (`e2b-code-interpreter`, `e2b-desktop`) build on the `e2b` package and do
|
|
166
|
+
not use `boxfab`.
|
|
167
|
+
- Docstrings still say "E2B" in places; behaviour is as documented here.
|
|
168
|
+
|
|
169
|
+
## Development
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
uv sync
|
|
173
|
+
uv run pytest tests tests_boxfab -n 8 # unit tests (offline)
|
|
174
|
+
SDK=boxfab BOXFAB_API_KEY=... uv run pytest integration # live tests, create a few sandboxes
|
|
175
|
+
uv build
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
`boxfab/` and `tests/` are generated from upstream by `scripts/sync_upstream.py`; change the
|
|
179
|
+
rules there, not the generated files. See [UPSTREAM.md](UPSTREAM.md).
|
|
180
|
+
Releases: see [RELEASING.md](RELEASING.md).
|
|
181
|
+
|
|
182
|
+
## License
|
|
183
|
+
|
|
184
|
+
MIT. See [LICENSE](LICENSE) and, for the upstream E2B SDK, [LICENSE-E2B](LICENSE-E2B).
|
|
185
|
+
|
|
186
|
+
BoxFab is a product of ContextFab, Inc.
|
boxfab-0.1.0a1/README.md
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
# BoxFab Python SDK
|
|
2
|
+
|
|
3
|
+
Python SDK for [BoxFab](https://github.com/boxfab), an agent execution cloud: start isolated
|
|
4
|
+
Firecracker sandboxes, run commands, move files, and reach services running inside them.
|
|
5
|
+
|
|
6
|
+
> **Alpha.** `0.1.0a1` is the first release. The API follows the E2B SDK it is derived from and
|
|
7
|
+
> may still change.
|
|
8
|
+
|
|
9
|
+
The BoxFab Python SDK is derived from the open-source
|
|
10
|
+
[E2B Python SDK](https://github.com/e2b-dev/E2B/tree/main/packages/python-sdk) and includes
|
|
11
|
+
modifications for BoxFab's sandbox infrastructure. BoxFab is an independent project and is not
|
|
12
|
+
affiliated with or endorsed by E2B. See [UPSTREAM.md](UPSTREAM.md) for the exact source revision
|
|
13
|
+
and what was changed.
|
|
14
|
+
|
|
15
|
+
## Install
|
|
16
|
+
|
|
17
|
+
Python 3.11 or newer.
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
pip install boxfab
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Authenticate
|
|
24
|
+
|
|
25
|
+
Get an API key from your BoxFab administrator and export it:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
export BOXFAB_API_KEY="e2b_..."
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
(Keys keep the `e2b_` prefix of the underlying protocol.) You can also pass `api_key=` to any
|
|
32
|
+
call. The SDK reads only `BOXFAB_*` variables; `E2B_*` variables are ignored, so a BoxFab
|
|
33
|
+
program never picks up an E2B key and never talks to E2B's service by accident.
|
|
34
|
+
|
|
35
|
+
## Quick start
|
|
36
|
+
|
|
37
|
+
```python
|
|
38
|
+
from boxfab import Sandbox
|
|
39
|
+
|
|
40
|
+
with Sandbox.create() as sandbox: # killed when the block exits
|
|
41
|
+
result = sandbox.commands.run("echo Hello from BoxFab")
|
|
42
|
+
print(result.stdout)
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
`Sandbox.create("base", timeout=600)` picks a template and a lifetime in seconds (default 300).
|
|
46
|
+
|
|
47
|
+
### Commands
|
|
48
|
+
|
|
49
|
+
```python
|
|
50
|
+
from boxfab import CommandExitException
|
|
51
|
+
|
|
52
|
+
result = sandbox.commands.run("ls -la /home/user")
|
|
53
|
+
print(result.exit_code, result.stdout, result.stderr)
|
|
54
|
+
|
|
55
|
+
try:
|
|
56
|
+
sandbox.commands.run("exit 3")
|
|
57
|
+
except CommandExitException as e: # non-zero exit codes raise
|
|
58
|
+
print(e.exit_code, e.stderr)
|
|
59
|
+
|
|
60
|
+
server = sandbox.commands.run("python3 -m http.server 8080", background=True)
|
|
61
|
+
print(sandbox.get_host(8080)) # 8080-<sandbox id>.<domain>, served over HTTPS
|
|
62
|
+
server.kill()
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Files
|
|
66
|
+
|
|
67
|
+
```python
|
|
68
|
+
sandbox.files.write("/home/user/hello.txt", "hi")
|
|
69
|
+
print(sandbox.files.read("/home/user/hello.txt"))
|
|
70
|
+
print([e.name for e in sandbox.files.list("/home/user")])
|
|
71
|
+
data = sandbox.files.read("/home/user/hello.txt", format="bytes")
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Reconnect, pause and resume
|
|
75
|
+
|
|
76
|
+
```python
|
|
77
|
+
sandbox_id = sandbox.sandbox_id
|
|
78
|
+
sandbox.pause() # keeps memory and disk
|
|
79
|
+
sandbox = Sandbox.connect(sandbox_id) # resumes it
|
|
80
|
+
sandbox.kill()
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Async
|
|
84
|
+
|
|
85
|
+
```python
|
|
86
|
+
import asyncio
|
|
87
|
+
from boxfab import AsyncSandbox
|
|
88
|
+
|
|
89
|
+
async def main():
|
|
90
|
+
sandbox = await AsyncSandbox.create()
|
|
91
|
+
try:
|
|
92
|
+
result = await sandbox.commands.run("uname -a")
|
|
93
|
+
print(result.stdout)
|
|
94
|
+
finally:
|
|
95
|
+
await sandbox.kill()
|
|
96
|
+
|
|
97
|
+
asyncio.run(main())
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Explicit client
|
|
101
|
+
|
|
102
|
+
```python
|
|
103
|
+
from boxfab import BoxFab
|
|
104
|
+
|
|
105
|
+
client = BoxFab(api_key="e2b_...", domain="sandd.contextfab.io")
|
|
106
|
+
sandbox = client.Sandbox.create()
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## Configuration
|
|
110
|
+
|
|
111
|
+
| Variable | Default | Meaning |
|
|
112
|
+
|---|---|---|
|
|
113
|
+
| `BOXFAB_API_KEY` | none | API key |
|
|
114
|
+
| `BOXFAB_DOMAIN` | `sandd.contextfab.io` | BoxFab domain; the API is `https://api.<domain>`, sandbox ports are `https://<port>-<id>.<domain>` |
|
|
115
|
+
| `BOXFAB_DEBUG` | `false` | plain HTTP to a local development stack |
|
|
116
|
+
| `BOXFAB_HTTP_VERSION`, `BOXFAB_CONNECTION_RETRIES`, `BOXFAB_MAX_CONNECTIONS`, `BOXFAB_MAX_KEEPALIVE_CONNECTIONS`, `BOXFAB_KEEPALIVE_EXPIRY` | as upstream | transport tuning |
|
|
117
|
+
|
|
118
|
+
Every call also accepts `api_key=`, `domain=`, `request_timeout=` and the other connection
|
|
119
|
+
parameters directly.
|
|
120
|
+
|
|
121
|
+
**About the domain.** The alpha runs on BoxFab's current deployment at `sandd.contextfab.io`.
|
|
122
|
+
This is a temporary name; a BoxFab-branded domain will become the default in a later release,
|
|
123
|
+
and `BOXFAB_DOMAIN` lets you switch without upgrading.
|
|
124
|
+
|
|
125
|
+
## Known limitations
|
|
126
|
+
|
|
127
|
+
- Verified against the live service: sandbox create/connect/list/kill, commands (stdout,
|
|
128
|
+
stderr, exit codes, timeouts, background processes), files (read, write, list, remove,
|
|
129
|
+
signed upload/download URLs), port URLs, pause/resume, timeouts and info, async with
|
|
130
|
+
concurrency. Other upstream features (template builds, volumes, secrets, MCP, IAM tokens,
|
|
131
|
+
network rules, git helpers, PTY, filesystem watch) are included but not yet verified on
|
|
132
|
+
BoxFab; volumes, secrets and MCP depend on services the deployment may not run.
|
|
133
|
+
- E2B add-on packages (`e2b-code-interpreter`, `e2b-desktop`) build on the `e2b` package and do
|
|
134
|
+
not use `boxfab`.
|
|
135
|
+
- Docstrings still say "E2B" in places; behaviour is as documented here.
|
|
136
|
+
|
|
137
|
+
## Development
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
uv sync
|
|
141
|
+
uv run pytest tests tests_boxfab -n 8 # unit tests (offline)
|
|
142
|
+
SDK=boxfab BOXFAB_API_KEY=... uv run pytest integration # live tests, create a few sandboxes
|
|
143
|
+
uv build
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
`boxfab/` and `tests/` are generated from upstream by `scripts/sync_upstream.py`; change the
|
|
147
|
+
rules there, not the generated files. See [UPSTREAM.md](UPSTREAM.md).
|
|
148
|
+
Releases: see [RELEASING.md](RELEASING.md).
|
|
149
|
+
|
|
150
|
+
## License
|
|
151
|
+
|
|
152
|
+
MIT. See [LICENSE](LICENSE) and, for the upstream E2B SDK, [LICENSE-E2B](LICENSE-E2B).
|
|
153
|
+
|
|
154
|
+
BoxFab is a product of ContextFab, Inc.
|
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Secure sandboxed cloud environments made for AI agents and AI apps.
|
|
3
|
+
|
|
4
|
+
Check docs [here](https://e2b.dev/docs).
|
|
5
|
+
|
|
6
|
+
E2B Sandbox is a secure cloud sandbox environment made for AI agents and AI
|
|
7
|
+
apps.
|
|
8
|
+
Sandboxes allow AI agents and apps to have long running cloud secure environments.
|
|
9
|
+
In these environments, large language models can use the same tools as humans do.
|
|
10
|
+
|
|
11
|
+
E2B Python SDK supports both sync and async API:
|
|
12
|
+
|
|
13
|
+
```py
|
|
14
|
+
from boxfab import Sandbox
|
|
15
|
+
|
|
16
|
+
# Create sandbox
|
|
17
|
+
sandbox = Sandbox.create()
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
```py
|
|
21
|
+
from boxfab import AsyncSandbox
|
|
22
|
+
|
|
23
|
+
# Create sandbox
|
|
24
|
+
sandbox = await AsyncSandbox.create()
|
|
25
|
+
```
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
from .api import (
|
|
29
|
+
ApiClient,
|
|
30
|
+
client,
|
|
31
|
+
)
|
|
32
|
+
from .connection_config import (
|
|
33
|
+
ApiParams,
|
|
34
|
+
ConnectionConfig,
|
|
35
|
+
HttpVersion,
|
|
36
|
+
ProxyTypes,
|
|
37
|
+
Username,
|
|
38
|
+
)
|
|
39
|
+
from .volume.connection_config import VolumeApiParams, VolumeConnectionConfig
|
|
40
|
+
from .exceptions import (
|
|
41
|
+
AuthenticationException,
|
|
42
|
+
FileNotFoundException,
|
|
43
|
+
GitAuthException,
|
|
44
|
+
GitUpstreamException,
|
|
45
|
+
BuildException,
|
|
46
|
+
FileUploadException,
|
|
47
|
+
InvalidArgumentException,
|
|
48
|
+
NotEnoughSpaceException,
|
|
49
|
+
NotFoundException,
|
|
50
|
+
RateLimitException,
|
|
51
|
+
ServiceBusyException,
|
|
52
|
+
SandboxException,
|
|
53
|
+
SandboxNotFoundException,
|
|
54
|
+
SandboxNotRunningException,
|
|
55
|
+
SandboxUnreachableException,
|
|
56
|
+
TemplateException,
|
|
57
|
+
TimeoutException,
|
|
58
|
+
VolumeException,
|
|
59
|
+
VolumeNotFoundException,
|
|
60
|
+
VolumePathNotFoundException,
|
|
61
|
+
SecretException,
|
|
62
|
+
SecretNotFoundException,
|
|
63
|
+
)
|
|
64
|
+
from .sandbox.commands.command_handle import (
|
|
65
|
+
CommandExitException,
|
|
66
|
+
CommandResult,
|
|
67
|
+
PtyOutput,
|
|
68
|
+
PtySize,
|
|
69
|
+
Stderr,
|
|
70
|
+
Stdout,
|
|
71
|
+
)
|
|
72
|
+
from .sandbox.commands.main import ProcessInfo
|
|
73
|
+
from .sandbox.filesystem.filesystem import (
|
|
74
|
+
AsyncWriteData,
|
|
75
|
+
EntryInfo,
|
|
76
|
+
FileType,
|
|
77
|
+
WriteData,
|
|
78
|
+
WriteInfo,
|
|
79
|
+
)
|
|
80
|
+
from .sandbox.filesystem.watch_handle import (
|
|
81
|
+
FilesystemEvent,
|
|
82
|
+
FilesystemEventType,
|
|
83
|
+
)
|
|
84
|
+
from .sandbox._git import GitBranches, GitFileStatus, GitResetMode, GitStatus
|
|
85
|
+
from .sandbox_sync.git import Git
|
|
86
|
+
from .sandbox.network import ALL_TRAFFIC
|
|
87
|
+
from .sandbox.signature import get_signature
|
|
88
|
+
from .sandbox.sandbox_api import (
|
|
89
|
+
GitHubMcpServer,
|
|
90
|
+
GitHubMcpServerConfig,
|
|
91
|
+
McpServer,
|
|
92
|
+
SandboxEgressProxyInfo,
|
|
93
|
+
SandboxEgressProxyOpts,
|
|
94
|
+
SandboxEgressProxyTLSInfo,
|
|
95
|
+
SandboxEgressProxyTLSOpts,
|
|
96
|
+
SandboxIamOpts,
|
|
97
|
+
SandboxIamToken,
|
|
98
|
+
SandboxIamTokenType,
|
|
99
|
+
SandboxInfo,
|
|
100
|
+
SandboxInfoLifecycle,
|
|
101
|
+
SandboxMetrics,
|
|
102
|
+
SandboxLifecycle,
|
|
103
|
+
SandboxOnTimeout,
|
|
104
|
+
SandboxNetworkInfo,
|
|
105
|
+
SandboxNetworkOpts,
|
|
106
|
+
SandboxNetworkRule,
|
|
107
|
+
SandboxNetworkRuleInfo,
|
|
108
|
+
SandboxNetworkRules,
|
|
109
|
+
SandboxNetworkSelector,
|
|
110
|
+
SandboxNetworkSelectorContext,
|
|
111
|
+
SandboxNetworkTransform,
|
|
112
|
+
SandboxNetworkTransformContext,
|
|
113
|
+
SandboxNetworkTransformResolver,
|
|
114
|
+
SandboxNetworkUpdate,
|
|
115
|
+
SandboxOnResume,
|
|
116
|
+
SandboxListOrder,
|
|
117
|
+
SandboxQuery,
|
|
118
|
+
SandboxState,
|
|
119
|
+
SnapshotInfo,
|
|
120
|
+
SnapshotMode,
|
|
121
|
+
)
|
|
122
|
+
from .sandbox_async.commands.command_handle import AsyncCommandHandle
|
|
123
|
+
from .sandbox_async.commands.command_input_handle import AsyncCommandInputHandle
|
|
124
|
+
from .sandbox_async.filesystem.watch_handle import AsyncWatchHandle
|
|
125
|
+
from .sandbox_async.main import AsyncSandbox
|
|
126
|
+
from .sandbox_async.paginator import AsyncSandboxPaginator, AsyncSnapshotPaginator
|
|
127
|
+
from .sandbox_async.utils import OutputHandler
|
|
128
|
+
from .secret import (
|
|
129
|
+
AsyncSecret,
|
|
130
|
+
AsyncSecretPaginator,
|
|
131
|
+
Secret,
|
|
132
|
+
SecretInfo,
|
|
133
|
+
SecretPaginator,
|
|
134
|
+
)
|
|
135
|
+
from .sandbox_sync.commands.command_handle import CommandHandle
|
|
136
|
+
from .sandbox_sync.filesystem.watch_handle import WatchHandle
|
|
137
|
+
from .sandbox_sync.main import Sandbox
|
|
138
|
+
from .sandbox_sync.paginator import SandboxPaginator, SnapshotPaginator
|
|
139
|
+
from .template.logger import (
|
|
140
|
+
LogEntry,
|
|
141
|
+
LogEntryEnd,
|
|
142
|
+
LogEntryLevel,
|
|
143
|
+
LogEntryStart,
|
|
144
|
+
default_build_logger,
|
|
145
|
+
)
|
|
146
|
+
from .template.dockerfile_parser import DockerfileSyntaxError
|
|
147
|
+
from .template.main import TemplateBase, TemplateClass
|
|
148
|
+
from .template.readycmd import (
|
|
149
|
+
ReadyCmd,
|
|
150
|
+
wait_for_file,
|
|
151
|
+
wait_for_port,
|
|
152
|
+
wait_for_process,
|
|
153
|
+
wait_for_timeout,
|
|
154
|
+
wait_for_url,
|
|
155
|
+
)
|
|
156
|
+
from .template.types import (
|
|
157
|
+
BuildInfo,
|
|
158
|
+
BuildStatusReason,
|
|
159
|
+
CopyItem,
|
|
160
|
+
TemplateBuildStatus,
|
|
161
|
+
TemplateBuildStatusResponse,
|
|
162
|
+
TemplateTag,
|
|
163
|
+
TemplateTagInfo,
|
|
164
|
+
)
|
|
165
|
+
from .template_async.main import AsyncTemplate
|
|
166
|
+
from .template_sync.main import Template
|
|
167
|
+
|
|
168
|
+
from .volume.volume_sync import Volume
|
|
169
|
+
from .volume.volume_async import AsyncVolume
|
|
170
|
+
from .client import BoxFab, BoxFabClientParams, E2B, E2BClientParams
|
|
171
|
+
from .volume.types import (
|
|
172
|
+
VolumeInfo,
|
|
173
|
+
VolumeAndToken,
|
|
174
|
+
VolumeEntryStat,
|
|
175
|
+
VolumeFileType,
|
|
176
|
+
)
|
|
177
|
+
|
|
178
|
+
__all__ = [
|
|
179
|
+
# Client
|
|
180
|
+
"BoxFab",
|
|
181
|
+
"BoxFabClientParams",
|
|
182
|
+
"E2B",
|
|
183
|
+
"E2BClientParams",
|
|
184
|
+
# API
|
|
185
|
+
"ApiClient",
|
|
186
|
+
"client",
|
|
187
|
+
# Connection config
|
|
188
|
+
"ConnectionConfig",
|
|
189
|
+
"VolumeConnectionConfig",
|
|
190
|
+
"HttpVersion",
|
|
191
|
+
"ProxyTypes",
|
|
192
|
+
"ApiParams",
|
|
193
|
+
"VolumeApiParams",
|
|
194
|
+
"Username",
|
|
195
|
+
# Exceptions
|
|
196
|
+
"SandboxException",
|
|
197
|
+
"ServiceBusyException",
|
|
198
|
+
"TimeoutException",
|
|
199
|
+
"NotFoundException",
|
|
200
|
+
"FileNotFoundException",
|
|
201
|
+
"SandboxNotFoundException",
|
|
202
|
+
"SandboxNotRunningException",
|
|
203
|
+
"SandboxUnreachableException",
|
|
204
|
+
"AuthenticationException",
|
|
205
|
+
"GitAuthException",
|
|
206
|
+
"GitUpstreamException",
|
|
207
|
+
"InvalidArgumentException",
|
|
208
|
+
"NotEnoughSpaceException",
|
|
209
|
+
"TemplateException",
|
|
210
|
+
"DockerfileSyntaxError",
|
|
211
|
+
"BuildException",
|
|
212
|
+
"FileUploadException",
|
|
213
|
+
"RateLimitException",
|
|
214
|
+
"VolumeException",
|
|
215
|
+
"VolumeNotFoundException",
|
|
216
|
+
"VolumePathNotFoundException",
|
|
217
|
+
# Sandbox API
|
|
218
|
+
"SandboxInfo",
|
|
219
|
+
"SandboxInfoLifecycle",
|
|
220
|
+
"SandboxMetrics",
|
|
221
|
+
"ProcessInfo",
|
|
222
|
+
"SandboxListOrder",
|
|
223
|
+
"SandboxQuery",
|
|
224
|
+
"SandboxState",
|
|
225
|
+
"SandboxMetrics",
|
|
226
|
+
"GitStatus",
|
|
227
|
+
"GitBranches",
|
|
228
|
+
"GitFileStatus",
|
|
229
|
+
"GitResetMode",
|
|
230
|
+
# Command handle
|
|
231
|
+
"CommandResult",
|
|
232
|
+
"Stderr",
|
|
233
|
+
"Stdout",
|
|
234
|
+
"CommandExitException",
|
|
235
|
+
"PtyOutput",
|
|
236
|
+
"PtySize",
|
|
237
|
+
# Filesystem
|
|
238
|
+
"FilesystemEvent",
|
|
239
|
+
"FilesystemEventType",
|
|
240
|
+
"EntryInfo",
|
|
241
|
+
"WriteInfo",
|
|
242
|
+
"WriteData",
|
|
243
|
+
"AsyncWriteData",
|
|
244
|
+
"FileType",
|
|
245
|
+
# Network
|
|
246
|
+
"SandboxEgressProxyOpts",
|
|
247
|
+
"SandboxEgressProxyInfo",
|
|
248
|
+
"SandboxEgressProxyTLSOpts",
|
|
249
|
+
"SandboxEgressProxyTLSInfo",
|
|
250
|
+
"SandboxNetworkOpts",
|
|
251
|
+
"SandboxNetworkInfo",
|
|
252
|
+
"SandboxNetworkSelector",
|
|
253
|
+
"SandboxNetworkSelectorContext",
|
|
254
|
+
"SandboxNetworkRule",
|
|
255
|
+
"SandboxNetworkRuleInfo",
|
|
256
|
+
"SandboxNetworkRules",
|
|
257
|
+
"SandboxNetworkTransform",
|
|
258
|
+
"SandboxNetworkTransformContext",
|
|
259
|
+
"SandboxNetworkTransformResolver",
|
|
260
|
+
"SandboxNetworkUpdate",
|
|
261
|
+
"SandboxLifecycle",
|
|
262
|
+
"SandboxOnTimeout",
|
|
263
|
+
"SandboxOnResume",
|
|
264
|
+
"ALL_TRAFFIC",
|
|
265
|
+
# IAM
|
|
266
|
+
"SandboxIamOpts",
|
|
267
|
+
"SandboxIamToken",
|
|
268
|
+
"SandboxIamTokenType",
|
|
269
|
+
"Secret",
|
|
270
|
+
"AsyncSecret",
|
|
271
|
+
"SecretInfo",
|
|
272
|
+
"SecretPaginator",
|
|
273
|
+
"AsyncSecretPaginator",
|
|
274
|
+
"SecretException",
|
|
275
|
+
"SecretNotFoundException",
|
|
276
|
+
# Snapshot
|
|
277
|
+
"SnapshotInfo",
|
|
278
|
+
"SnapshotMode",
|
|
279
|
+
"SnapshotPaginator",
|
|
280
|
+
"AsyncSnapshotPaginator",
|
|
281
|
+
# Signature
|
|
282
|
+
"get_signature",
|
|
283
|
+
# Sync sandbox
|
|
284
|
+
"Sandbox",
|
|
285
|
+
"SandboxPaginator",
|
|
286
|
+
"WatchHandle",
|
|
287
|
+
"CommandHandle",
|
|
288
|
+
# Async sandbox
|
|
289
|
+
"OutputHandler",
|
|
290
|
+
"AsyncSandboxPaginator",
|
|
291
|
+
"AsyncSandbox",
|
|
292
|
+
"AsyncWatchHandle",
|
|
293
|
+
"AsyncCommandHandle",
|
|
294
|
+
"AsyncCommandInputHandle",
|
|
295
|
+
# Template
|
|
296
|
+
"Template",
|
|
297
|
+
"AsyncTemplate",
|
|
298
|
+
"TemplateBase",
|
|
299
|
+
"TemplateClass",
|
|
300
|
+
"CopyItem",
|
|
301
|
+
"BuildInfo",
|
|
302
|
+
"BuildStatusReason",
|
|
303
|
+
"TemplateBuildStatus",
|
|
304
|
+
"TemplateBuildStatusResponse",
|
|
305
|
+
"TemplateTag",
|
|
306
|
+
"TemplateTagInfo",
|
|
307
|
+
"ReadyCmd",
|
|
308
|
+
"wait_for_file",
|
|
309
|
+
"wait_for_url",
|
|
310
|
+
"wait_for_port",
|
|
311
|
+
"wait_for_process",
|
|
312
|
+
"wait_for_timeout",
|
|
313
|
+
"LogEntry",
|
|
314
|
+
"LogEntryStart",
|
|
315
|
+
"LogEntryEnd",
|
|
316
|
+
"LogEntryLevel",
|
|
317
|
+
"default_build_logger",
|
|
318
|
+
# MCP
|
|
319
|
+
"McpServer",
|
|
320
|
+
"GitHubMcpServer",
|
|
321
|
+
"GitHubMcpServerConfig",
|
|
322
|
+
# Git
|
|
323
|
+
"Git",
|
|
324
|
+
# Volume
|
|
325
|
+
"Volume",
|
|
326
|
+
"AsyncVolume",
|
|
327
|
+
"VolumeInfo",
|
|
328
|
+
"VolumeAndToken",
|
|
329
|
+
"VolumeEntryStat",
|
|
330
|
+
"VolumeFileType",
|
|
331
|
+
]
|