e2b 2.56.0__tar.gz → 2.58.0__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.
- {e2b-2.56.0 → e2b-2.58.0}/PKG-INFO +3 -3
- {e2b-2.56.0 → e2b-2.58.0}/e2b/__init__.py +6 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/api/templates/get_templates_template_id_files_hash.py +4 -4
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/__init__.py +2 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/sandbox_egress_proxy_config_type_0.py +53 -1
- e2b-2.58.0/e2b/api/client/models/sandbox_egress_proxy_tls_config_type_0.py +87 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/template_step.py +1 -1
- {e2b-2.56.0 → e2b-2.58.0}/e2b/client.py +1 -3
- {e2b-2.56.0 → e2b-2.58.0}/e2b/connection_config.py +12 -3
- {e2b-2.56.0 → e2b-2.58.0}/e2b/envd/client_async/__init__.py +10 -8
- {e2b-2.56.0 → e2b-2.58.0}/e2b/envd/filesystem/filesystem_connect.py +44 -22
- {e2b-2.56.0 → e2b-2.58.0}/e2b/envd/filesystem/filesystem_pb.py +3 -3
- {e2b-2.56.0 → e2b-2.58.0}/e2b/envd/interceptors.py +48 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/envd/process/process_connect.py +58 -20
- {e2b-2.56.0 → e2b-2.58.0}/e2b/envd/process/process_pb.py +1 -1
- {e2b-2.56.0 → e2b-2.58.0}/e2b/envd/rpc.py +46 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/paginator.py +1 -3
- {e2b-2.56.0 → e2b-2.58.0}/e2b/sandbox/_git/types.py +1 -3
- e2b-2.58.0/e2b/sandbox/commands/stream_input.py +37 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/sandbox/filesystem/filesystem.py +1 -1
- {e2b-2.56.0 → e2b-2.58.0}/e2b/sandbox/sandbox_api.py +87 -4
- {e2b-2.56.0 → e2b-2.58.0}/e2b/sandbox_async/commands/command.py +35 -19
- e2b-2.58.0/e2b/sandbox_async/commands/command_input_handle.py +131 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/sandbox_async/commands/pty.py +35 -19
- {e2b-2.56.0 → e2b-2.58.0}/e2b/sandbox_async/filesystem/filesystem.py +1 -1
- {e2b-2.56.0 → e2b-2.58.0}/e2b/sandbox_async/main.py +1 -3
- {e2b-2.56.0 → e2b-2.58.0}/e2b/sandbox_async/paginator.py +1 -3
- {e2b-2.56.0 → e2b-2.58.0}/e2b/sandbox_async/sandbox_api.py +1 -3
- {e2b-2.56.0 → e2b-2.58.0}/e2b/sandbox_sync/commands/command.py +53 -20
- {e2b-2.56.0 → e2b-2.58.0}/e2b/sandbox_sync/commands/pty.py +53 -20
- {e2b-2.56.0 → e2b-2.58.0}/e2b/sandbox_sync/main.py +1 -3
- {e2b-2.56.0 → e2b-2.58.0}/e2b/sandbox_sync/paginator.py +1 -3
- {e2b-2.56.0 → e2b-2.58.0}/e2b/sandbox_sync/sandbox_api.py +1 -3
- {e2b-2.56.0 → e2b-2.58.0}/e2b/secret/secret_async.py +1 -3
- {e2b-2.56.0 → e2b-2.58.0}/e2b/secret/secret_sync.py +1 -3
- {e2b-2.56.0 → e2b-2.58.0}/e2b/template/types.py +1 -3
- {e2b-2.56.0 → e2b-2.58.0}/e2b/template_async/main.py +1 -3
- {e2b-2.56.0 → e2b-2.58.0}/e2b/template_sync/main.py +1 -3
- {e2b-2.56.0 → e2b-2.58.0}/e2b/volume/connection_config.py +1 -3
- {e2b-2.56.0 → e2b-2.58.0}/e2b/volume/volume_async.py +13 -4
- {e2b-2.56.0 → e2b-2.58.0}/e2b/volume/volume_sync.py +12 -3
- {e2b-2.56.0 → e2b-2.58.0}/pyproject.toml +5 -5
- {e2b-2.56.0 → e2b-2.58.0}/README.md +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/__init__.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/__init__.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/api/__init__.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/api/sandboxes/__init__.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/api/sandboxes/delete_sandboxes_sandbox_id.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/api/sandboxes/get_sandboxes.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/api/sandboxes/get_sandboxes_metrics.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/api/sandboxes/get_sandboxes_sandbox_id.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/api/sandboxes/get_sandboxes_sandbox_id_logs.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/api/sandboxes/get_sandboxes_sandbox_id_metrics.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/api/sandboxes/get_v2_sandboxes.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/api/sandboxes/get_v_2_sandboxes_sandbox_id_logs.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/api/sandboxes/post_sandboxes.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_connect.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_fork.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_pause.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_refreshes.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_resume.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_snapshots.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_timeout.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/api/sandboxes/post_v2_sandboxes.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/api/sandboxes/post_v_2_sandboxes_sandbox_id_connect.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/api/sandboxes/put_sandboxes_sandbox_id_network.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/api/secrets/__init__.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/api/secrets/delete_secrets_secret_id.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/api/secrets/get_secrets.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/api/secrets/get_secrets_secret_id.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/api/secrets/post_secrets.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/api/secrets/post_secrets_secret_id.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/api/snapshots/__init__.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/api/snapshots/get_snapshots.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/api/tags/__init__.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/api/tags/delete_templates_tags.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/api/tags/get_templates_template_id_tags.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/api/tags/post_templates_tags.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/api/templates/__init__.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/api/templates/delete_templates_template_id.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/api/templates/get_templates.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/api/templates/get_templates_aliases_alias.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/api/templates/get_templates_template_id.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/api/templates/get_templates_template_id_builds_build_id_logs.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/api/templates/get_templates_template_id_builds_build_id_status.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/api/templates/get_v2_templates.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/api/templates/patch_templates_template_id.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/api/templates/patch_v_2_templates_template_id.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/api/templates/post_v3_templates.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/api/templates/post_v_2_templates_template_id_builds_build_id.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/api/volumes/__init__.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/api/volumes/delete_volumes_volume_id.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/api/volumes/get_volumes.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/api/volumes/get_volumes_volume_id.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/api/volumes/post_volumes.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/client.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/errors.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/assign_template_tags_request.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/assigned_template_tags.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/aws_registry.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/aws_registry_type.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/build_log_entry.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/build_status_reason.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/connect_sandbox.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/connect_sandbox_v2.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/delete_template_tags_request.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/error.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/gcp_registry.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/gcp_registry_type.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/general_registry.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/general_registry_type.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/listed_sandbox.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/log_level.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/logs_direction.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/logs_source.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/mcp_type_0.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/new_sandbox.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/new_sandbox_v2.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/new_secret.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/new_volume.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/order_direction.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/resumed_sandbox.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/sandbox.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/sandbox_auto_resume_config.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/sandbox_detail.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/sandbox_fork_request.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/sandbox_fork_result.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/sandbox_iam.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/sandbox_iam_token.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/sandbox_iam_tokens.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/sandbox_lifecycle.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/sandbox_log.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/sandbox_log_entry.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/sandbox_log_entry_fields.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/sandbox_logs.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/sandbox_logs_v2_response.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/sandbox_metric.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/sandbox_network_config.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/sandbox_network_config_rules.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/sandbox_network_rule.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/sandbox_network_transform.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/sandbox_network_transform_headers.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/sandbox_network_update_config.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/sandbox_network_update_config_rules.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/sandbox_on_timeout.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/sandbox_pause_request.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/sandbox_refresh_request.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/sandbox_snapshot_request.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/sandbox_state.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/sandbox_timeout_request.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/sandbox_volume_mount.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/sandboxes_with_metrics.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/secret.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/secret_metadata.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/secret_update.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/snapshot_info.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/team_user.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/template.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/template_alias_response.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/template_build.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/template_build_file_upload.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/template_build_file_upload_headers.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/template_build_info.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/template_build_logs_response.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/template_build_request_v3.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/template_build_start_v2.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/template_build_status.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/template_request_response_v3.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/template_tag.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/template_update_request.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/template_update_response.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/template_with_builds.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/volume.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/models/volume_and_token.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/py.typed +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/types.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client_async/__init__.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/client_sync/__init__.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/api/metadata.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/envd/__init__.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/envd/api.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/envd/client_shared.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/envd/client_sync/__init__.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/envd/filesystem/__init__.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/envd/process/__init__.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/envd/utils.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/envd/versions.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/exceptions.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/io_utils.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/py.typed +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/retry.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/sandbox/_git/__init__.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/sandbox/_git/args.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/sandbox/_git/auth.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/sandbox/_git/config.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/sandbox/_git/parse.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/sandbox/commands/command_handle.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/sandbox/commands/main.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/sandbox/filesystem/watch_handle.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/sandbox/iam.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/sandbox/main.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/sandbox/mcp.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/sandbox/network.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/sandbox/signature.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/sandbox/utils.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/sandbox_async/commands/command_handle.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/sandbox_async/filesystem/watch_handle.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/sandbox_async/git.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/sandbox_async/utils.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/sandbox_domains.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/sandbox_sync/commands/command_handle.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/sandbox_sync/filesystem/filesystem.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/sandbox_sync/filesystem/watch_handle.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/sandbox_sync/git.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/secret/__init__.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/secret/base.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/secret/types.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/template/consts.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/template/dockerfile_parser.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/template/logger.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/template/main.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/template/readycmd.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/template/utils.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/template_async/build_api.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/template_sync/build_api.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/volume/client/__init__.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/volume/client/api/__init__.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/volume/client/api/volumes/__init__.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/volume/client/api/volumes/delete_volumecontent_volume_id_path.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/volume/client/api/volumes/get_volumecontent_volume_id_dir.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/volume/client/api/volumes/get_volumecontent_volume_id_file.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/volume/client/api/volumes/get_volumecontent_volume_id_path.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/volume/client/api/volumes/patch_volumecontent_volume_id_path.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/volume/client/api/volumes/post_volumecontent_volume_id_dir.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/volume/client/api/volumes/put_volumecontent_volume_id_file.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/volume/client/client.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/volume/client/errors.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/volume/client/models/__init__.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/volume/client/models/error.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/volume/client/models/patch_volumecontent_volume_id_path_body.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/volume/client/models/volume_entry_stat.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/volume/client/models/volume_entry_stat_type.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/volume/client/py.typed +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/volume/client/types.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/volume/client_async/__init__.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/volume/client_sync/__init__.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/volume/types.py +0 -0
- {e2b-2.56.0 → e2b-2.58.0}/e2b/volume/utils.py +0 -0
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: e2b
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.58.0
|
|
4
4
|
Summary: E2B SDK that give agents cloud environments
|
|
5
5
|
Author: e2b
|
|
6
6
|
Author-email: e2b <hello@e2b.dev>
|
|
7
7
|
License-Expression: MIT
|
|
8
8
|
Requires-Dist: python-dateutil>=2.8.2
|
|
9
9
|
Requires-Dist: wcmatch>=10.1,<12
|
|
10
|
-
Requires-Dist: protobuf-py>=0.
|
|
10
|
+
Requires-Dist: protobuf-py>=0.6.0,<0.7
|
|
11
11
|
Requires-Dist: httpx>=0.27.0,<1.0.0
|
|
12
12
|
Requires-Dist: h2>=4.4.1,<5
|
|
13
13
|
Requires-Dist: attrs>=23.2.0
|
|
14
14
|
Requires-Dist: packaging>=24.1
|
|
15
15
|
Requires-Dist: typing-extensions>=4.10.0
|
|
16
16
|
Requires-Dist: rich>=14.0.0
|
|
17
|
-
Requires-Dist: connectrpc>=0.
|
|
17
|
+
Requires-Dist: connectrpc>=0.12.1,<0.13
|
|
18
18
|
Requires-Dist: pyqwest>=0.12.0,<0.13
|
|
19
19
|
Requires-Dist: e2b-dockerfile-utils>=0.1.0,<0.2
|
|
20
20
|
Requires-Python: >=3.11
|
|
@@ -85,6 +85,8 @@ from .sandbox.sandbox_api import (
|
|
|
85
85
|
McpServer,
|
|
86
86
|
SandboxEgressProxyInfo,
|
|
87
87
|
SandboxEgressProxyOpts,
|
|
88
|
+
SandboxEgressProxyTLSInfo,
|
|
89
|
+
SandboxEgressProxyTLSOpts,
|
|
88
90
|
SandboxIamOpts,
|
|
89
91
|
SandboxIamToken,
|
|
90
92
|
SandboxIamTokenType,
|
|
@@ -112,6 +114,7 @@ from .sandbox.sandbox_api import (
|
|
|
112
114
|
SnapshotMode,
|
|
113
115
|
)
|
|
114
116
|
from .sandbox_async.commands.command_handle import AsyncCommandHandle
|
|
117
|
+
from .sandbox_async.commands.command_input_handle import AsyncCommandInputHandle
|
|
115
118
|
from .sandbox_async.filesystem.watch_handle import AsyncWatchHandle
|
|
116
119
|
from .sandbox_async.main import AsyncSandbox
|
|
117
120
|
from .sandbox_async.paginator import AsyncSandboxPaginator, AsyncSnapshotPaginator
|
|
@@ -232,6 +235,8 @@ __all__ = [
|
|
|
232
235
|
# Network
|
|
233
236
|
"SandboxEgressProxyOpts",
|
|
234
237
|
"SandboxEgressProxyInfo",
|
|
238
|
+
"SandboxEgressProxyTLSOpts",
|
|
239
|
+
"SandboxEgressProxyTLSInfo",
|
|
235
240
|
"SandboxNetworkOpts",
|
|
236
241
|
"SandboxNetworkInfo",
|
|
237
242
|
"SandboxNetworkSelector",
|
|
@@ -276,6 +281,7 @@ __all__ = [
|
|
|
276
281
|
"AsyncSandbox",
|
|
277
282
|
"AsyncWatchHandle",
|
|
278
283
|
"AsyncCommandHandle",
|
|
284
|
+
"AsyncCommandInputHandle",
|
|
279
285
|
# Template
|
|
280
286
|
"Template",
|
|
281
287
|
"AsyncTemplate",
|
{e2b-2.56.0 → e2b-2.58.0}/e2b/api/client/api/templates/get_templates_template_id_files_hash.py
RENAMED
|
@@ -78,7 +78,7 @@ def sync_detailed(
|
|
|
78
78
|
|
|
79
79
|
Args:
|
|
80
80
|
template_id (str):
|
|
81
|
-
hash_ (str): Hash of the files
|
|
81
|
+
hash_ (str): Hash of the files (lowercase hex SHA-256)
|
|
82
82
|
|
|
83
83
|
Raises:
|
|
84
84
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
@@ -112,7 +112,7 @@ def sync(
|
|
|
112
112
|
|
|
113
113
|
Args:
|
|
114
114
|
template_id (str):
|
|
115
|
-
hash_ (str): Hash of the files
|
|
115
|
+
hash_ (str): Hash of the files (lowercase hex SHA-256)
|
|
116
116
|
|
|
117
117
|
Raises:
|
|
118
118
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
@@ -141,7 +141,7 @@ async def asyncio_detailed(
|
|
|
141
141
|
|
|
142
142
|
Args:
|
|
143
143
|
template_id (str):
|
|
144
|
-
hash_ (str): Hash of the files
|
|
144
|
+
hash_ (str): Hash of the files (lowercase hex SHA-256)
|
|
145
145
|
|
|
146
146
|
Raises:
|
|
147
147
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
@@ -173,7 +173,7 @@ async def asyncio(
|
|
|
173
173
|
|
|
174
174
|
Args:
|
|
175
175
|
template_id (str):
|
|
176
|
-
hash_ (str): Hash of the files
|
|
176
|
+
hash_ (str): Hash of the files (lowercase hex SHA-256)
|
|
177
177
|
|
|
178
178
|
Raises:
|
|
179
179
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
@@ -29,6 +29,7 @@ from .sandbox import Sandbox
|
|
|
29
29
|
from .sandbox_auto_resume_config import SandboxAutoResumeConfig
|
|
30
30
|
from .sandbox_detail import SandboxDetail
|
|
31
31
|
from .sandbox_egress_proxy_config_type_0 import SandboxEgressProxyConfigType0
|
|
32
|
+
from .sandbox_egress_proxy_tls_config_type_0 import SandboxEgressProxyTLSConfigType0
|
|
32
33
|
from .sandbox_fork_request import SandboxForkRequest
|
|
33
34
|
from .sandbox_fork_result import SandboxForkResult
|
|
34
35
|
from .sandbox_iam import SandboxIam
|
|
@@ -110,6 +111,7 @@ __all__ = (
|
|
|
110
111
|
"SandboxAutoResumeConfig",
|
|
111
112
|
"SandboxDetail",
|
|
112
113
|
"SandboxEgressProxyConfigType0",
|
|
114
|
+
"SandboxEgressProxyTLSConfigType0",
|
|
113
115
|
"SandboxesWithMetrics",
|
|
114
116
|
"SandboxForkRequest",
|
|
115
117
|
"SandboxForkResult",
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
from collections.abc import Mapping
|
|
2
|
-
from typing import Any, TypeVar, Union
|
|
2
|
+
from typing import TYPE_CHECKING, Any, TypeVar, Union, cast
|
|
3
3
|
|
|
4
4
|
from attrs import define as _attrs_define
|
|
5
5
|
from attrs import field as _attrs_field
|
|
6
6
|
|
|
7
7
|
from ..types import UNSET, Unset
|
|
8
8
|
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
from ..models.sandbox_egress_proxy_tls_config_type_0 import (
|
|
11
|
+
SandboxEgressProxyTLSConfigType0,
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
|
|
9
15
|
T = TypeVar("T", bound="SandboxEgressProxyConfigType0")
|
|
10
16
|
|
|
11
17
|
|
|
@@ -18,20 +24,38 @@ class SandboxEgressProxyConfigType0:
|
|
|
18
24
|
address (str): SOCKS5 proxy address in host:port format (e.g. "proxy.example.com:1080").
|
|
19
25
|
username (Union[Unset, str]): Optional SOCKS5 username (RFC 1929), max 255 bytes.
|
|
20
26
|
password (Union[Unset, str]): Optional SOCKS5 password (RFC 1929), max 255 bytes.
|
|
27
|
+
tls (Union['SandboxEgressProxyTLSConfigType0', None, Unset]): TLS for the connection to the SOCKS5 proxy. The
|
|
28
|
+
SOCKS5 negotiation and the tunneled traffic both run inside the TLS session, so the proxy credentials are not
|
|
29
|
+
sent in the clear. This secures only the hop to the proxy; what the proxy does onward is its own concern. A
|
|
30
|
+
half-close from the sandbox reaches the proxy as a TLS close_notify, not a TCP FIN, and a proxy that treats
|
|
31
|
+
close_notify as a full close cuts the reply short.
|
|
21
32
|
"""
|
|
22
33
|
|
|
23
34
|
address: str
|
|
24
35
|
username: Union[Unset, str] = UNSET
|
|
25
36
|
password: Union[Unset, str] = UNSET
|
|
37
|
+
tls: Union["SandboxEgressProxyTLSConfigType0", None, Unset] = UNSET
|
|
26
38
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
27
39
|
|
|
28
40
|
def to_dict(self) -> dict[str, Any]:
|
|
41
|
+
from ..models.sandbox_egress_proxy_tls_config_type_0 import (
|
|
42
|
+
SandboxEgressProxyTLSConfigType0,
|
|
43
|
+
)
|
|
44
|
+
|
|
29
45
|
address = self.address
|
|
30
46
|
|
|
31
47
|
username = self.username
|
|
32
48
|
|
|
33
49
|
password = self.password
|
|
34
50
|
|
|
51
|
+
tls: Union[None, Unset, dict[str, Any]]
|
|
52
|
+
if isinstance(self.tls, Unset):
|
|
53
|
+
tls = UNSET
|
|
54
|
+
elif isinstance(self.tls, SandboxEgressProxyTLSConfigType0):
|
|
55
|
+
tls = self.tls.to_dict()
|
|
56
|
+
else:
|
|
57
|
+
tls = self.tls
|
|
58
|
+
|
|
35
59
|
field_dict: dict[str, Any] = {}
|
|
36
60
|
field_dict.update(self.additional_properties)
|
|
37
61
|
field_dict.update(
|
|
@@ -43,11 +67,17 @@ class SandboxEgressProxyConfigType0:
|
|
|
43
67
|
field_dict["username"] = username
|
|
44
68
|
if password is not UNSET:
|
|
45
69
|
field_dict["password"] = password
|
|
70
|
+
if tls is not UNSET:
|
|
71
|
+
field_dict["tls"] = tls
|
|
46
72
|
|
|
47
73
|
return field_dict
|
|
48
74
|
|
|
49
75
|
@classmethod
|
|
50
76
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
77
|
+
from ..models.sandbox_egress_proxy_tls_config_type_0 import (
|
|
78
|
+
SandboxEgressProxyTLSConfigType0,
|
|
79
|
+
)
|
|
80
|
+
|
|
51
81
|
d = dict(src_dict)
|
|
52
82
|
address = d.pop("address")
|
|
53
83
|
|
|
@@ -55,10 +85,32 @@ class SandboxEgressProxyConfigType0:
|
|
|
55
85
|
|
|
56
86
|
password = d.pop("password", UNSET)
|
|
57
87
|
|
|
88
|
+
def _parse_tls(
|
|
89
|
+
data: object,
|
|
90
|
+
) -> Union["SandboxEgressProxyTLSConfigType0", None, Unset]:
|
|
91
|
+
if data is None:
|
|
92
|
+
return data
|
|
93
|
+
if isinstance(data, Unset):
|
|
94
|
+
return data
|
|
95
|
+
try:
|
|
96
|
+
if not isinstance(data, dict):
|
|
97
|
+
raise TypeError()
|
|
98
|
+
componentsschemas_sandbox_egress_proxy_tls_config_type_0 = (
|
|
99
|
+
SandboxEgressProxyTLSConfigType0.from_dict(data)
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
return componentsschemas_sandbox_egress_proxy_tls_config_type_0
|
|
103
|
+
except: # noqa: E722
|
|
104
|
+
pass
|
|
105
|
+
return cast(Union["SandboxEgressProxyTLSConfigType0", None, Unset], data)
|
|
106
|
+
|
|
107
|
+
tls = _parse_tls(d.pop("tls", UNSET))
|
|
108
|
+
|
|
58
109
|
sandbox_egress_proxy_config_type_0 = cls(
|
|
59
110
|
address=address,
|
|
60
111
|
username=username,
|
|
61
112
|
password=password,
|
|
113
|
+
tls=tls,
|
|
62
114
|
)
|
|
63
115
|
|
|
64
116
|
sandbox_egress_proxy_config_type_0.additional_properties = d
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import Any, TypeVar, Union
|
|
3
|
+
|
|
4
|
+
from attrs import define as _attrs_define
|
|
5
|
+
from attrs import field as _attrs_field
|
|
6
|
+
|
|
7
|
+
from ..types import UNSET, Unset
|
|
8
|
+
|
|
9
|
+
T = TypeVar("T", bound="SandboxEgressProxyTLSConfigType0")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class SandboxEgressProxyTLSConfigType0:
|
|
14
|
+
"""TLS for the connection to the SOCKS5 proxy. The SOCKS5 negotiation and the tunneled traffic both run inside the TLS
|
|
15
|
+
session, so the proxy credentials are not sent in the clear. This secures only the hop to the proxy; what the proxy
|
|
16
|
+
does onward is its own concern. A half-close from the sandbox reaches the proxy as a TLS close_notify, not a TCP
|
|
17
|
+
FIN, and a proxy that treats close_notify as a full close cuts the reply short.
|
|
18
|
+
|
|
19
|
+
Attributes:
|
|
20
|
+
enabled (bool): Connect to the proxy over TLS. When false, no other field in this object may be set.
|
|
21
|
+
server_name (Union[Unset, str]): Name to verify the proxy certificate against, and to send as SNI. Defaults to
|
|
22
|
+
the host part of address. Set this only when the certificate does not match the address the proxy is reached at.
|
|
23
|
+
ca_cert (Union[Unset, str]): One or more PEM-encoded certificates to verify the proxy against, for a proxy
|
|
24
|
+
fronted by a private CA. These replace the system trust store, which is what is used when this is omitted. The
|
|
25
|
+
system trust store depends on the host the orchestrator runs on, so set this to get the same verification
|
|
26
|
+
everywhere.
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
enabled: bool
|
|
30
|
+
server_name: Union[Unset, str] = UNSET
|
|
31
|
+
ca_cert: Union[Unset, str] = UNSET
|
|
32
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
33
|
+
|
|
34
|
+
def to_dict(self) -> dict[str, Any]:
|
|
35
|
+
enabled = self.enabled
|
|
36
|
+
|
|
37
|
+
server_name = self.server_name
|
|
38
|
+
|
|
39
|
+
ca_cert = self.ca_cert
|
|
40
|
+
|
|
41
|
+
field_dict: dict[str, Any] = {}
|
|
42
|
+
field_dict.update(self.additional_properties)
|
|
43
|
+
field_dict.update(
|
|
44
|
+
{
|
|
45
|
+
"enabled": enabled,
|
|
46
|
+
}
|
|
47
|
+
)
|
|
48
|
+
if server_name is not UNSET:
|
|
49
|
+
field_dict["serverName"] = server_name
|
|
50
|
+
if ca_cert is not UNSET:
|
|
51
|
+
field_dict["caCert"] = ca_cert
|
|
52
|
+
|
|
53
|
+
return field_dict
|
|
54
|
+
|
|
55
|
+
@classmethod
|
|
56
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
57
|
+
d = dict(src_dict)
|
|
58
|
+
enabled = d.pop("enabled")
|
|
59
|
+
|
|
60
|
+
server_name = d.pop("serverName", UNSET)
|
|
61
|
+
|
|
62
|
+
ca_cert = d.pop("caCert", UNSET)
|
|
63
|
+
|
|
64
|
+
sandbox_egress_proxy_tls_config_type_0 = cls(
|
|
65
|
+
enabled=enabled,
|
|
66
|
+
server_name=server_name,
|
|
67
|
+
ca_cert=ca_cert,
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
sandbox_egress_proxy_tls_config_type_0.additional_properties = d
|
|
71
|
+
return sandbox_egress_proxy_tls_config_type_0
|
|
72
|
+
|
|
73
|
+
@property
|
|
74
|
+
def additional_keys(self) -> list[str]:
|
|
75
|
+
return list(self.additional_properties.keys())
|
|
76
|
+
|
|
77
|
+
def __getitem__(self, key: str) -> Any:
|
|
78
|
+
return self.additional_properties[key]
|
|
79
|
+
|
|
80
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
81
|
+
self.additional_properties[key] = value
|
|
82
|
+
|
|
83
|
+
def __delitem__(self, key: str) -> None:
|
|
84
|
+
del self.additional_properties[key]
|
|
85
|
+
|
|
86
|
+
def __contains__(self, key: str) -> bool:
|
|
87
|
+
return key in self.additional_properties
|
|
@@ -16,7 +16,7 @@ class TemplateStep:
|
|
|
16
16
|
Attributes:
|
|
17
17
|
type_ (str): Type of the step
|
|
18
18
|
args (Union[Unset, list[str]]): Arguments for the step
|
|
19
|
-
files_hash (Union[Unset, str]): Hash of the files used in the step
|
|
19
|
+
files_hash (Union[Unset, str]): Hash of the files used in the step (lowercase hex SHA-256)
|
|
20
20
|
force (Union[Unset, bool]): Whether the step should be forced to run regardless of the cache Default: False.
|
|
21
21
|
"""
|
|
22
22
|
|
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
import logging
|
|
2
2
|
import os
|
|
3
3
|
|
|
4
|
-
from typing import
|
|
4
|
+
from typing import (
|
|
5
|
+
cast,
|
|
6
|
+
Literal,
|
|
7
|
+
Mapping,
|
|
8
|
+
Optional,
|
|
9
|
+
Dict,
|
|
10
|
+
Tuple,
|
|
11
|
+
TypedDict,
|
|
12
|
+
Union,
|
|
13
|
+
Unpack,
|
|
14
|
+
)
|
|
5
15
|
|
|
6
16
|
import httpx
|
|
7
|
-
from typing_extensions import Unpack
|
|
8
|
-
|
|
9
17
|
from e2b.exceptions import InvalidArgumentException
|
|
10
18
|
from e2b.retry import resolve_max_retries
|
|
11
19
|
from e2b.api.metadata import package_version
|
|
@@ -22,6 +30,7 @@ narrows it to what the pyqwest REST transports take.
|
|
|
22
30
|
"""
|
|
23
31
|
|
|
24
32
|
REQUEST_TIMEOUT: float = 60.0 # 60 seconds
|
|
33
|
+
STREAM_INPUT_TIMEOUT: float = 60.0 # 60 seconds
|
|
25
34
|
DEFAULT_RETRIES = 3
|
|
26
35
|
|
|
27
36
|
# Idle bound for every read on the streaming envd file-transfer transport:
|
|
@@ -124,24 +124,26 @@ async def first_event(
|
|
|
124
124
|
"""
|
|
125
125
|
if not request_timeout:
|
|
126
126
|
return await events.__anext__()
|
|
127
|
+
task = asyncio.current_task()
|
|
128
|
+
cancelling_before = task.cancelling() if task is not None else 0
|
|
127
129
|
try:
|
|
128
130
|
return await asyncio.wait_for(events.__anext__(), request_timeout)
|
|
129
|
-
except
|
|
131
|
+
except TimeoutError as e:
|
|
130
132
|
raise _request_timeout_exception(request_timeout) from e
|
|
131
133
|
except ConnectError as e:
|
|
132
134
|
# wait_for's expiry cancels the __anext__ task, but connectrpc
|
|
133
135
|
# converts the delivered CancelledError into ConnectError(CANCELED)
|
|
134
136
|
# before wait_for can turn it into TimeoutError. A caller cancelling
|
|
135
|
-
# the surrounding task surfaces identically, so
|
|
136
|
-
#
|
|
137
|
-
#
|
|
138
|
-
#
|
|
139
|
-
#
|
|
140
|
-
cancelling = getattr(asyncio.current_task(), "cancelling", None)
|
|
137
|
+
# the surrounding task surfaces identically, so compare the pending-
|
|
138
|
+
# cancellation count with its entry value: wait_for uncancels its own
|
|
139
|
+
# expiry back to that value, while an external cancel leaves it above
|
|
140
|
+
# it. Comparing against zero would misclassify a timer expiry when the
|
|
141
|
+
# caller had an already-pending, swallowed cancellation.
|
|
141
142
|
if (
|
|
142
143
|
e.code is Code.CANCELED
|
|
143
144
|
and isinstance(e.__cause__, asyncio.CancelledError)
|
|
144
|
-
and
|
|
145
|
+
and task is not None
|
|
146
|
+
and task.cancelling() == cancelling_before
|
|
145
147
|
):
|
|
146
148
|
raise _request_timeout_exception(request_timeout) from e
|
|
147
149
|
raise
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Generated from filesystem/filesystem.proto. DO NOT EDIT.
|
|
2
|
-
# Generated by protoc-gen-connectrpc-py v0.
|
|
2
|
+
# Generated by protoc-gen-connectrpc-py v0.12.1 with parameter "".
|
|
3
3
|
# ruff: noqa: PGH004
|
|
4
4
|
# ruff: noqa
|
|
5
5
|
# fmt: off
|
|
@@ -12,8 +12,10 @@ from connectrpc.client import ConnectClient, ConnectClientSync
|
|
|
12
12
|
from connectrpc.code import Code
|
|
13
13
|
from connectrpc.errors import ConnectError
|
|
14
14
|
from connectrpc.method import IdempotencyLevel, MethodInfo
|
|
15
|
-
from connectrpc.server import ConnectASGIApplication, ConnectWSGIApplication, Endpoint, EndpointSync
|
|
15
|
+
from connectrpc.server import ConnectASGIApplication, ConnectWSGIApplication, DEFAULT_READ_MAX_BYTES, Endpoint, EndpointSync
|
|
16
|
+
from protobuf import DescService
|
|
16
17
|
|
|
18
|
+
from . import filesystem_pb
|
|
17
19
|
from .filesystem_pb import CreateWatcherRequest, CreateWatcherResponse, GetWatcherEventsRequest, GetWatcherEventsResponse, ListDirRequest, ListDirResponse, MakeDirRequest, MakeDirResponse, MoveRequest, MoveResponse, RemoveRequest, RemoveResponse, RemoveWatcherRequest, RemoveWatcherResponse, StatRequest, StatResponse, WatchDirRequest, WatchDirResponse
|
|
18
20
|
|
|
19
21
|
if TYPE_CHECKING:
|
|
@@ -26,33 +28,40 @@ if TYPE_CHECKING:
|
|
|
26
28
|
|
|
27
29
|
|
|
28
30
|
class Filesystem(Protocol):
|
|
29
|
-
async def stat(self, request: StatRequest, ctx: RequestContext[StatRequest, StatResponse]) -> StatResponse:
|
|
31
|
+
async def stat(self, request: StatRequest, ctx: RequestContext[StatRequest, StatResponse], /) -> StatResponse:
|
|
30
32
|
raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')
|
|
31
33
|
|
|
32
|
-
async def make_dir(self, request: MakeDirRequest, ctx: RequestContext[MakeDirRequest, MakeDirResponse]) -> MakeDirResponse:
|
|
34
|
+
async def make_dir(self, request: MakeDirRequest, ctx: RequestContext[MakeDirRequest, MakeDirResponse], /) -> MakeDirResponse:
|
|
33
35
|
raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')
|
|
34
36
|
|
|
35
|
-
async def move(self, request: MoveRequest, ctx: RequestContext[MoveRequest, MoveResponse]) -> MoveResponse:
|
|
37
|
+
async def move(self, request: MoveRequest, ctx: RequestContext[MoveRequest, MoveResponse], /) -> MoveResponse:
|
|
36
38
|
raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')
|
|
37
39
|
|
|
38
|
-
async def list_dir(self, request: ListDirRequest, ctx: RequestContext[ListDirRequest, ListDirResponse]) -> ListDirResponse:
|
|
40
|
+
async def list_dir(self, request: ListDirRequest, ctx: RequestContext[ListDirRequest, ListDirResponse], /) -> ListDirResponse:
|
|
39
41
|
raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')
|
|
40
42
|
|
|
41
|
-
async def remove(self, request: RemoveRequest, ctx: RequestContext[RemoveRequest, RemoveResponse]) -> RemoveResponse:
|
|
43
|
+
async def remove(self, request: RemoveRequest, ctx: RequestContext[RemoveRequest, RemoveResponse], /) -> RemoveResponse:
|
|
42
44
|
raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')
|
|
43
45
|
|
|
44
|
-
def watch_dir(self, request: WatchDirRequest, ctx: RequestContext[WatchDirRequest, WatchDirResponse]) -> AsyncIterator[WatchDirResponse]:
|
|
46
|
+
def watch_dir(self, request: WatchDirRequest, ctx: RequestContext[WatchDirRequest, WatchDirResponse], /) -> AsyncIterator[WatchDirResponse]:
|
|
45
47
|
raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')
|
|
46
48
|
|
|
47
|
-
async def create_watcher(self, request: CreateWatcherRequest, ctx: RequestContext[CreateWatcherRequest, CreateWatcherResponse]) -> CreateWatcherResponse:
|
|
49
|
+
async def create_watcher(self, request: CreateWatcherRequest, ctx: RequestContext[CreateWatcherRequest, CreateWatcherResponse], /) -> CreateWatcherResponse:
|
|
50
|
+
"""
|
|
51
|
+
Non-streaming versions of WatchDir
|
|
52
|
+
"""
|
|
48
53
|
raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')
|
|
49
54
|
|
|
50
|
-
async def get_watcher_events(self, request: GetWatcherEventsRequest, ctx: RequestContext[GetWatcherEventsRequest, GetWatcherEventsResponse]) -> GetWatcherEventsResponse:
|
|
55
|
+
async def get_watcher_events(self, request: GetWatcherEventsRequest, ctx: RequestContext[GetWatcherEventsRequest, GetWatcherEventsResponse], /) -> GetWatcherEventsResponse:
|
|
51
56
|
raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')
|
|
52
57
|
|
|
53
|
-
async def remove_watcher(self, request: RemoveWatcherRequest, ctx: RequestContext[RemoveWatcherRequest, RemoveWatcherResponse]) -> RemoveWatcherResponse:
|
|
58
|
+
async def remove_watcher(self, request: RemoveWatcherRequest, ctx: RequestContext[RemoveWatcherRequest, RemoveWatcherResponse], /) -> RemoveWatcherResponse:
|
|
54
59
|
raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')
|
|
55
60
|
|
|
61
|
+
@classmethod
|
|
62
|
+
def desc(cls) -> DescService:
|
|
63
|
+
"""Returns the descriptor for this service."""
|
|
64
|
+
return next(s for s in filesystem_pb.desc().services if s.type_name == 'filesystem.Filesystem')
|
|
56
65
|
|
|
57
66
|
class FilesystemASGIApplication(ConnectASGIApplication[Filesystem]):
|
|
58
67
|
def __init__(
|
|
@@ -60,7 +69,7 @@ class FilesystemASGIApplication(ConnectASGIApplication[Filesystem]):
|
|
|
60
69
|
service: Filesystem | AsyncGenerator[Filesystem],
|
|
61
70
|
*,
|
|
62
71
|
interceptors: Iterable[Interceptor] = (),
|
|
63
|
-
read_max_bytes: int | None =
|
|
72
|
+
read_max_bytes: int | None = DEFAULT_READ_MAX_BYTES,
|
|
64
73
|
compressions: Iterable[Compression] | None = None,
|
|
65
74
|
codecs: Iterable[Codec] | None = None,
|
|
66
75
|
) -> None:
|
|
@@ -298,6 +307,9 @@ class FilesystemClient(ConnectClient):
|
|
|
298
307
|
headers: Headers | Mapping[str, str] | None = None,
|
|
299
308
|
timeout_ms: int | None = None,
|
|
300
309
|
) -> CreateWatcherResponse:
|
|
310
|
+
"""
|
|
311
|
+
Non-streaming versions of WatchDir
|
|
312
|
+
"""
|
|
301
313
|
return await self.execute_unary(
|
|
302
314
|
request=request,
|
|
303
315
|
method=MethodInfo(
|
|
@@ -352,40 +364,47 @@ class FilesystemClient(ConnectClient):
|
|
|
352
364
|
)
|
|
353
365
|
|
|
354
366
|
class FilesystemSync(Protocol):
|
|
355
|
-
def stat(self, request: StatRequest, ctx: RequestContext[StatRequest, StatResponse]) -> StatResponse:
|
|
367
|
+
def stat(self, request: StatRequest, ctx: RequestContext[StatRequest, StatResponse], /) -> StatResponse:
|
|
356
368
|
raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')
|
|
357
369
|
|
|
358
|
-
def make_dir(self, request: MakeDirRequest, ctx: RequestContext[MakeDirRequest, MakeDirResponse]) -> MakeDirResponse:
|
|
370
|
+
def make_dir(self, request: MakeDirRequest, ctx: RequestContext[MakeDirRequest, MakeDirResponse], /) -> MakeDirResponse:
|
|
359
371
|
raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')
|
|
360
372
|
|
|
361
|
-
def move(self, request: MoveRequest, ctx: RequestContext[MoveRequest, MoveResponse]) -> MoveResponse:
|
|
373
|
+
def move(self, request: MoveRequest, ctx: RequestContext[MoveRequest, MoveResponse], /) -> MoveResponse:
|
|
362
374
|
raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')
|
|
363
375
|
|
|
364
|
-
def list_dir(self, request: ListDirRequest, ctx: RequestContext[ListDirRequest, ListDirResponse]) -> ListDirResponse:
|
|
376
|
+
def list_dir(self, request: ListDirRequest, ctx: RequestContext[ListDirRequest, ListDirResponse], /) -> ListDirResponse:
|
|
365
377
|
raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')
|
|
366
378
|
|
|
367
|
-
def remove(self, request: RemoveRequest, ctx: RequestContext[RemoveRequest, RemoveResponse]) -> RemoveResponse:
|
|
379
|
+
def remove(self, request: RemoveRequest, ctx: RequestContext[RemoveRequest, RemoveResponse], /) -> RemoveResponse:
|
|
368
380
|
raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')
|
|
369
381
|
|
|
370
|
-
def watch_dir(self, request: WatchDirRequest, ctx: RequestContext[WatchDirRequest, WatchDirResponse]) -> Iterator[WatchDirResponse]:
|
|
382
|
+
def watch_dir(self, request: WatchDirRequest, ctx: RequestContext[WatchDirRequest, WatchDirResponse], /) -> Iterator[WatchDirResponse]:
|
|
371
383
|
raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')
|
|
372
384
|
|
|
373
|
-
def create_watcher(self, request: CreateWatcherRequest, ctx: RequestContext[CreateWatcherRequest, CreateWatcherResponse]) -> CreateWatcherResponse:
|
|
385
|
+
def create_watcher(self, request: CreateWatcherRequest, ctx: RequestContext[CreateWatcherRequest, CreateWatcherResponse], /) -> CreateWatcherResponse:
|
|
386
|
+
"""
|
|
387
|
+
Non-streaming versions of WatchDir
|
|
388
|
+
"""
|
|
374
389
|
raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')
|
|
375
390
|
|
|
376
|
-
def get_watcher_events(self, request: GetWatcherEventsRequest, ctx: RequestContext[GetWatcherEventsRequest, GetWatcherEventsResponse]) -> GetWatcherEventsResponse:
|
|
391
|
+
def get_watcher_events(self, request: GetWatcherEventsRequest, ctx: RequestContext[GetWatcherEventsRequest, GetWatcherEventsResponse], /) -> GetWatcherEventsResponse:
|
|
377
392
|
raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')
|
|
378
393
|
|
|
379
|
-
def remove_watcher(self, request: RemoveWatcherRequest, ctx: RequestContext[RemoveWatcherRequest, RemoveWatcherResponse]) -> RemoveWatcherResponse:
|
|
394
|
+
def remove_watcher(self, request: RemoveWatcherRequest, ctx: RequestContext[RemoveWatcherRequest, RemoveWatcherResponse], /) -> RemoveWatcherResponse:
|
|
380
395
|
raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')
|
|
381
396
|
|
|
397
|
+
@classmethod
|
|
398
|
+
def desc(cls) -> DescService:
|
|
399
|
+
"""Returns the descriptor for this service."""
|
|
400
|
+
return next(s for s in filesystem_pb.desc().services if s.type_name == 'filesystem.Filesystem')
|
|
382
401
|
|
|
383
402
|
class FilesystemWSGIApplication(ConnectWSGIApplication):
|
|
384
403
|
def __init__(
|
|
385
404
|
self,
|
|
386
405
|
service: FilesystemSync,
|
|
387
406
|
interceptors: Iterable[InterceptorSync] = (),
|
|
388
|
-
read_max_bytes: int | None =
|
|
407
|
+
read_max_bytes: int | None = DEFAULT_READ_MAX_BYTES,
|
|
389
408
|
compressions: Iterable[Compression] | None = None,
|
|
390
409
|
codecs: Iterable[Codec] | None = None,
|
|
391
410
|
) -> None:
|
|
@@ -616,6 +635,9 @@ class FilesystemClientSync(ConnectClientSync):
|
|
|
616
635
|
headers: Headers | Mapping[str, str] | None = None,
|
|
617
636
|
timeout_ms: int | None = None,
|
|
618
637
|
) -> CreateWatcherResponse:
|
|
638
|
+
"""
|
|
639
|
+
Non-streaming versions of WatchDir
|
|
640
|
+
"""
|
|
619
641
|
return self.execute_unary(
|
|
620
642
|
request=request,
|
|
621
643
|
method=MethodInfo(
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Generated from filesystem/filesystem.proto. DO NOT EDIT.
|
|
2
|
-
# Generated by protoc-gen-py v0.
|
|
2
|
+
# Generated by protoc-gen-py v0.6.0 with parameter "".
|
|
3
3
|
# ruff: noqa: PGH004
|
|
4
4
|
# ruff: noqa
|
|
5
5
|
# fmt: off
|
|
@@ -10,11 +10,11 @@ from typing import Literal, NoReturn, TYPE_CHECKING, TypeAlias
|
|
|
10
10
|
|
|
11
11
|
from protobuf import Enum, Message
|
|
12
12
|
from protobuf._codegen import file_desc
|
|
13
|
-
from protobuf.wkt import timestamp_pb
|
|
13
|
+
from protobuf.wkt.google.protobuf import timestamp_pb
|
|
14
14
|
|
|
15
15
|
if TYPE_CHECKING:
|
|
16
16
|
from protobuf import DescFile, Oneof
|
|
17
|
-
from protobuf.wkt import Timestamp
|
|
17
|
+
from protobuf.wkt.google.protobuf.timestamp_pb import Timestamp
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
_MoveRequestFields: TypeAlias = Literal["source", "destination"]
|
|
@@ -79,6 +79,24 @@ class DefaultHeadersInterceptor:
|
|
|
79
79
|
self._apply(ctx)
|
|
80
80
|
return await call_next(request, ctx)
|
|
81
81
|
|
|
82
|
+
def intercept_client_stream_sync(
|
|
83
|
+
self,
|
|
84
|
+
call_next: Callable[[Iterator[REQ], RequestContext], RES],
|
|
85
|
+
request: Iterator[REQ],
|
|
86
|
+
ctx: RequestContext,
|
|
87
|
+
) -> RES:
|
|
88
|
+
self._apply(ctx)
|
|
89
|
+
return call_next(request, ctx)
|
|
90
|
+
|
|
91
|
+
async def intercept_client_stream(
|
|
92
|
+
self,
|
|
93
|
+
call_next: Callable[[AsyncIterator[REQ], RequestContext], Awaitable[RES]],
|
|
94
|
+
request: AsyncIterator[REQ],
|
|
95
|
+
ctx: RequestContext,
|
|
96
|
+
) -> RES:
|
|
97
|
+
self._apply(ctx)
|
|
98
|
+
return await call_next(request, ctx)
|
|
99
|
+
|
|
82
100
|
def intercept_server_stream_sync(
|
|
83
101
|
self,
|
|
84
102
|
call_next: Callable[[REQ, RequestContext], Iterator[RES]],
|
|
@@ -161,6 +179,36 @@ class LoggingInterceptor:
|
|
|
161
179
|
self._log_response(ctx, None)
|
|
162
180
|
return response
|
|
163
181
|
|
|
182
|
+
def intercept_client_stream_sync(
|
|
183
|
+
self,
|
|
184
|
+
call_next: Callable[[Iterator[REQ], RequestContext], RES],
|
|
185
|
+
request: Iterator[REQ],
|
|
186
|
+
ctx: RequestContext,
|
|
187
|
+
) -> RES:
|
|
188
|
+
self._log_request(ctx)
|
|
189
|
+
try:
|
|
190
|
+
response = call_next(request, ctx)
|
|
191
|
+
except Exception as e:
|
|
192
|
+
self._log_response(ctx, e)
|
|
193
|
+
raise
|
|
194
|
+
self._log_response(ctx, None)
|
|
195
|
+
return response
|
|
196
|
+
|
|
197
|
+
async def intercept_client_stream(
|
|
198
|
+
self,
|
|
199
|
+
call_next: Callable[[AsyncIterator[REQ], RequestContext], Awaitable[RES]],
|
|
200
|
+
request: AsyncIterator[REQ],
|
|
201
|
+
ctx: RequestContext,
|
|
202
|
+
) -> RES:
|
|
203
|
+
self._log_request(ctx)
|
|
204
|
+
try:
|
|
205
|
+
response = await call_next(request, ctx)
|
|
206
|
+
except Exception as e:
|
|
207
|
+
self._log_response(ctx, e)
|
|
208
|
+
raise
|
|
209
|
+
self._log_response(ctx, None)
|
|
210
|
+
return response
|
|
211
|
+
|
|
164
212
|
def intercept_server_stream_sync(
|
|
165
213
|
self,
|
|
166
214
|
call_next: Callable[[REQ, RequestContext], Iterator[RES]],
|