Open-source, secure environment with real-world tools for enterprise-grade agents.
Python agentaiai-agentai-agentscode-interpretercopilotdevelopmentdevtoolsgptgpt-4javascriptllmnextjsopenaipythonreactsoftwaretypescript
Python file handling
Tomas Valentac18ada0b9db2
diff --git a/packages/js-sdk/src/envd/schema.gen.ts b/packages/js-sdk/src/envd/schema.gen.tsindex c91618de5..d753c582f 100644--- a/packages/js-sdk/src/envd/schema.gen.ts+++ b/packages/js-sdk/src/envd/schema.gen.ts@@ -25,7 +25,7 @@ export interface paths {};};/** Upload a file and ensure the parent directories exist. If the file exists, it will be overwritten. */- put: {+ post: {parameters: {query: {username: components["parameters"]["User"];@@ -84,18 +84,12 @@ export interface components {};/** @description Entire file downloaded successfully. */DownloadSuccess: {- headers: {- "Cache-Control"?: string;- };content: {"application/octet-stream": string;};};/** @description The file was updated successfully. */ExistingFileUploadSuccess: {- headers: {- "Cache-Control"?: string;- };content: never;};/** @description File not found */@@ -112,11 +106,6 @@ export interface components {};/** @description The file was created successfully. */NewFileUploadSuccess: {- headers: {- "Cache-Control"?: string;- /** @description The URL of the uploaded file */- Location?: string;- };content: never;};/** @description Not enough disk space */diff --git a/packages/js-sdk/src/sandbox/filesystem/index.ts b/packages/js-sdk/src/sandbox/filesystem/index.tsindex eeb3afdcd..344370591 100644--- a/packages/js-sdk/src/sandbox/filesystem/index.ts+++ b/packages/js-sdk/src/sandbox/filesystem/index.ts@@ -23,8 +23,6 @@ export interface FilesystemRequestOpts extends Partial<Pick<ConnectionOpts, 'requser?: Username}-type BodyData = string | ArrayBuffer | Blob | ReadableStream<ArrayBuffer> | ReadableStream<Uint8Array>-export class Filesystem {private readonly rpc: PromiseClient<typeof FilesystemService>private readonly envdApi: EnvdApiClient@@ -65,15 +63,11 @@ export class Filesystem {return response.data}- async write(path: string, data: string, opts?: FilesystemRequestOpts): Promise<void>- async write(path: string, data: ArrayBuffer, opts?: FilesystemRequestOpts): Promise<void>- async write(path: string, data: Blob, opts?: FilesystemRequestOpts): Promise<void>- async write(path: string, data: ReadableStream<ArrayBuffer> | ReadableStream<Uint8Array>, opts?: FilesystemRequestOpts): Promise<void>- async write(path: string, data: BodyData, opts?: FilesystemRequestOpts): Promise<void> {+ async write(path: string, data: string | ArrayBuffer | Blob | ReadableStream, opts?: FilesystemRequestOpts): Promise<void> {const requestTimeoutMs = opts?.requestTimeoutMs ?? this.connectionConfig.requestTimeoutMsconst blob = await new Response(data).blob()- await this.envdApi.api.PUT('/files/{path}', {+ await this.envdApi.api.POST('/files/{path}', {params: {path: {path,diff --git a/packages/js-sdk/src/sandbox/index.ts b/packages/js-sdk/src/sandbox/index.tsindex bd4e663cc..2ead3bfff 100644--- a/packages/js-sdk/src/sandbox/index.ts+++ b/packages/js-sdk/src/sandbox/index.ts@@ -47,7 +47,7 @@ export class Sandbox extends SandboxApi {get uploadUrl() {const url = new URL('/files', this.envdApiUrl)- url.searchParams.set('user', defaultUsername)+ url.searchParams.set('username', defaultUsername)return url.toString()}diff --git a/packages/js-sdk/src/sandbox/process/index.ts b/packages/js-sdk/src/sandbox/process/index.tsindex 47a12d825..2575dba8d 100644--- a/packages/js-sdk/src/sandbox/process/index.ts+++ b/packages/js-sdk/src/sandbox/process/index.ts@@ -107,7 +107,7 @@ export class Process {): Promise<ProcessHandle>async run(cmd: string,- opts: ProcessStartOpts = {},+ opts?: ProcessStartOpts,): Promise<unknown> {const proc = await this.start(cmd, opts)diff --git a/packages/js-sdk/src/sandbox/process/processHandle.ts b/packages/js-sdk/src/sandbox/process/processHandle.tsindex 4cbfaca24..7583f24ec 100644--- a/packages/js-sdk/src/sandbox/process/processHandle.ts+++ b/packages/js-sdk/src/sandbox/process/processHandle.ts@@ -14,30 +14,90 @@ interface ProcessStderr {export type ProcessOutput = ProcessStdout | ProcessStderr-export class ProcessHandle<T = ""> {++export class ProcessError extends Error {+ constructor(message: any) {+ super(message)+ this.name = 'ProcessError'+ }+}++export class ProcessExitError extends ProcessError implements ProcessResult {+ constructor(private readonly result: ProcessResult) {+ super(result.error)+ this.name = 'ProcessExitError'+ }++ get exitCode() {+ return this.result.exitCode+ }++ get error() {+ return this.result.error+ }++ get stdout() {+ return this.result.stdout+ }++ get stderr() {+ return this.result.stderr+ }+}+++export class ProcessHandle implements ProcessResult {private rawStdout = new Uint8Array()private rawStderr = new Uint8Array()- private _result?: ProcessResult+ private result?: ProcessResultconstructor(readonly pid: number,private readonly handleDisconnect: () => void,private readonly handleKill: () => Promise<void>,- private readonly outputs: OutputType[],private readonly events: AsyncIterable<ConnectResponse | StartResponse>,) { }- get result() {- return this._result+ get exitCode() {+ return this.result?.exitCode+ }++ get stderr() {+ return this.rawStderr.toString()+ }++ get stdout() {+ return this.rawStdout.toString()+ }++ private static isProcessStdout(event: ProcessOutput | ProcessResult | undefined): event is ProcessStdout {+ return event !== undefined && 'stdout' in event}- async wait(- onStdout?: ((data: string) => void | Promise<void>),- onStderr?: ((data: string) => void | Promise<void>),- ): Promise<ProcessResult> {+ private static isProcessStderr(event: ProcessOutput | ProcessResult | undefined): event is ProcessStderr {+ return event !== undefined && 'stderr' in event+ }++ async wait({ onStderr, onStdout }: {+ onStdout?: (data: string) => void | Promise<void>,+ onStderr?: (data: string) => void | Promise<void>,+ } = {}): Promise<ProcessResult> {for await (const event of this) {- event+ if (ProcessHandle.isProcessStdout(event)) {+ onStdout?.(event.stdout)+ } else if (ProcessHandle.isProcessStderr(event)) {+ onStderr?.(event.stderr)+ }+ }++ if (!this.result) {+ throw new ProcessError('Process ended without an end event')+ }+++ if (this.result.exitCode !== 0) {+ throw new ProcessExitError(this.result)}return this.result@@ -73,9 +133,9 @@ export class ProcessHandle<T = ""> {}breakcase 'end':- this._result = {- exitCode: event.value.exitCode,- error: event.value.error,+ this.result = {+ exitCode: value.event.event.value.exitCode,+ error: value.event.event.value.error,stdout: this.stdout,stderr: this.stderr,}diff --git a/packages/python-sdk/Makefile b/packages/python-sdk/Makefileindex 1a77d17e1..9dbd08ec6 100644--- a/packages/python-sdk/Makefile+++ b/packages/python-sdk/Makefile@@ -43,49 +43,3 @@ generate-v1:.PHONY: generategenerate: generate-v1 generate-v2--.PHONY: generate-envd-api-v2-generate-envd-api-v2:- mv ./e2b/envd/__init__.py ./e2b/envd/__init__.py.bck- rm -rf ./e2b/envd/v2- npx -yes @openapitools/openapi-generator-cli@latest version-manager set 7.1.0- npx -yes @openapitools/openapi-generator-cli generate \- -i ../../spec/envd/envd.yaml \- -g python \- -o ./e2b/envd \- --global-property apis="files",models,supportingFiles,modelDocs=false \- --additional-properties=generateSourceCodeOnly=true \- --additional-properties=disallowAdditionalPropertiesIfNotPresent=false \- --additional-properties=usePydanticV2=true \- --additional-properties=packageName=e2b.envd.v2.client- mv ./e2b/envd/e2b/envd/* ./e2b/envd/- rm -r ./e2b/envd/e2b- rm -rf ./e2b/envd/v2/client/docs- rm -rf ./e2b/envd/v2/client/test- rm -r ./e2b/envd/.openapi-generator- mv ./e2b/envd/__init__.py.bck ./e2b/envd/__init__.py- black .--.PHONY: generate-envd-api-v1-generate-envd-api-v1:- mv ./e2b/envd/__init__.py ./e2b/envd/__init__.py.bck- rm -rf ./e2b/envd/v1- npx -yes @openapitools/openapi-generator-cli@latest version-manager set 7.1.0- npx -yes @openapitools/openapi-generator-cli generate \- -i ../../spec/envd/envd.yaml \- -g python-pydantic-v1 \- -o ./e2b/envd \- --global-property apis="files",models,supportingFiles,modelDocs=false \- --additional-properties=generateSourceCodeOnly=true \- --additional-properties=disallowAdditionalPropertiesIfNotPresent=false \- --additional-properties=packageName=e2b.envd.v1.client- mv ./e2b/envd/e2b/envd/* ./e2b/envd/- rm -r ./e2b/envd/e2b- rm -rf ./e2b/envd/v1/client/docs- rm -rf ./e2b/envd/v1/client/test- rm -r ./e2b/envd/.openapi-generator- mv ./e2b/envd/__init__.py.bck ./e2b/envd/__init__.py- black .--.PHONY: generate-envd-api-generate-envd-api: generate-envd-api-v1 generate-envd-api-v2diff --git a/packages/python-sdk/e2b/envd/.openapi-generator-ignore b/packages/python-sdk/e2b/envd/.openapi-generator-ignoredeleted file mode 100644index 7484ee590..000000000--- a/packages/python-sdk/e2b/envd/.openapi-generator-ignore+++ /dev/null@@ -1,23 +0,0 @@-# OpenAPI Generator Ignore-# Generated by openapi-generator https://github.com/openapitools/openapi-generator--# Use this file to prevent files from being overwritten by the generator.-# The patterns follow closely to .gitignore or .dockerignore.--# As an example, the C# client generator defines ApiClient.cs.-# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:-#ApiClient.cs--# You can match any string of characters against a directory, file or extension with a single asterisk (*):-#foo/*/qux-# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux--# You can recursively match patterns against a directory, file or extension with a double asterisk (**):-#foo/**/qux-# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux--# You can also negate patterns with an exclamation (!).-# For example, you can ignore all files in a docs folder with the file extension .md:-#docs/*.md-# Then explicitly reverse the ignore rule for a single file:-#!docs/README.mddiff --git a/packages/python-sdk/e2b/envd/__init__.py b/packages/python-sdk/e2b/envd/__init__.pydeleted file mode 100644index 44e01cf46..000000000--- a/packages/python-sdk/e2b/envd/__init__.py+++ /dev/null@@ -1,28 +0,0 @@-from importlib.metadata import version---pydantic_version = version("pydantic")-if pydantic_version < "2.0.0":- import e2b.envd.v1.client as client- import e2b.envd.v1.client.models as models- import e2b.envd.v1.client.exceptions as exceptions-else:- import e2b.envd.v2.client as client- import e2b.envd.v2.client.models as models- import e2b.envd.v2.client.exceptions as exceptions---class EnvdApiClient(client.ApiClient):- def __init__(- self,- api_url: str,- *args,- **kwargs,- ):- # See configuration.py for a list of all supported configuration parameters.- configuration = client.Configuration(host=api_url)-- super().__init__(configuration, *args, **kwargs)---__all__ = ["EnvdApiClient", "client", "models"]diff --git a/packages/python-sdk/e2b/envd/api.py b/packages/python-sdk/e2b/envd/api.pynew file mode 100644index 000000000..a7fff0603--- /dev/null+++ b/packages/python-sdk/e2b/envd/api.py@@ -0,0 +1 @@+ENVD_API_FILES_ROUTE = "/files"diff --git a/packages/python-sdk/e2b/envd/filesystem/filesystem_connect.py b/packages/python-sdk/e2b/envd/filesystem/filesystem_connect.pyindex 64605277a..624990353 100644--- a/packages/python-sdk/e2b/envd/filesystem/filesystem_connect.py+++ b/packages/python-sdk/e2b/envd/filesystem/filesystem_connect.py@@ -16,7 +16,7 @@ class FilesystemClient:response_type=filesystem_dot_filesystem__pb2.StatResponse,compressor=compressor,json=json,- **opts+ **opts,)self._make_dir = connect.Client(pool=pool,@@ -24,7 +24,7 @@ class FilesystemClient:response_type=filesystem_dot_filesystem__pb2.MakeDirResponse,compressor=compressor,json=json,- **opts+ **opts,)self._list = connect.Client(pool=pool,@@ -32,7 +32,7 @@ class FilesystemClient:response_type=filesystem_dot_filesystem__pb2.ListResponse,compressor=compressor,json=json,- **opts+ **opts,)self._watch = connect.Client(pool=pool,@@ -40,7 +40,7 @@ class FilesystemClient:response_type=filesystem_dot_filesystem__pb2.WatchResponse,compressor=compressor,json=json,- **opts+ **opts,)self._remove = connect.Client(pool=pool,@@ -48,20 +48,30 @@ class FilesystemClient:response_type=filesystem_dot_filesystem__pb2.RemoveResponse,compressor=compressor,json=json,- **opts+ **opts,)- def stat(self, req: filesystem_dot_filesystem__pb2.StatRequest, **opts) -> filesystem_dot_filesystem__pb2.StatResponse:+ def stat(+ self, req: filesystem_dot_filesystem__pb2.StatRequest, **opts+ ) -> filesystem_dot_filesystem__pb2.StatResponse:return self._stat.call_unary(req, **opts)- def make_dir(self, req: filesystem_dot_filesystem__pb2.MakeDirRequest, **opts) -> filesystem_dot_filesystem__pb2.MakeDirResponse:+ def make_dir(+ self, req: filesystem_dot_filesystem__pb2.MakeDirRequest, **opts+ ) -> filesystem_dot_filesystem__pb2.MakeDirResponse:return self._make_dir.call_unary(req, **opts)- def list(self, req: filesystem_dot_filesystem__pb2.ListRequest, **opts) -> filesystem_dot_filesystem__pb2.ListResponse:+ def list(+ self, req: filesystem_dot_filesystem__pb2.ListRequest, **opts+ ) -> filesystem_dot_filesystem__pb2.ListResponse:return self._list.call_unary(req, **opts)- def watch(self, req: filesystem_dot_filesystem__pb2.WatchRequest , **opts) -> Generator[filesystem_dot_filesystem__pb2.WatchResponse, Any, None]:+ def watch(+ self, req: filesystem_dot_filesystem__pb2.WatchRequest, **opts+ ) -> Generator[filesystem_dot_filesystem__pb2.WatchResponse, Any, None]:return self._watch.call_server_stream(req, **opts)- def remove(self, req: filesystem_dot_filesystem__pb2.RemoveRequest, **opts) -> filesystem_dot_filesystem__pb2.RemoveResponse:+ def remove(+ self, req: filesystem_dot_filesystem__pb2.RemoveRequest, **opts+ ) -> filesystem_dot_filesystem__pb2.RemoveResponse:return self._remove.call_unary(req, **opts)diff --git a/packages/python-sdk/e2b/envd/filesystem/filesystem_pb2.py b/packages/python-sdk/e2b/envd/filesystem/filesystem_pb2.pyindex 713c08762..b1c4d089e 100644--- a/packages/python-sdk/e2b/envd/filesystem/filesystem_pb2.py+++ b/packages/python-sdk/e2b/envd/filesystem/filesystem_pb2.py@@ -7,6 +7,7 @@ from google.protobuf import descriptor as _descriptorfrom google.protobuf import descriptor_pool as _descriptor_poolfrom google.protobuf import symbol_database as _symbol_databasefrom google.protobuf.internal import builder as _builder+# @@protoc_insertion_point(imports)_sym_db = _symbol_database.Default()@@ -15,42 +16,48 @@ _sym_db = _symbol_database.Default()from e2b.envd.permissions import permissions_pb2 as permissions_dot_permissions__pb2-DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1b\x66ilesystem/filesystem.proto\x12\nfilesystem\x1a\x1dpermissions/permissions.proto\"K\n\x0eMakeDirRequest\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path\x12%\n\x04user\x18\x02 \x01(\x0b\x32\x11.permissions.UserR\x04user\"\x11\n\x0fMakeDirResponse\"J\n\rRemoveRequest\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path\x12%\n\x04user\x18\x02 \x01(\x0b\x32\x11.permissions.UserR\x04user\"\x10\n\x0eRemoveResponse\"H\n\x0bStatRequest\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path\x12%\n\x04user\x18\x02 \x01(\x0b\x32\x11.permissions.UserR\x04user\";\n\x0cStatResponse\x12+\n\x05\x65ntry\x18\x01 \x01(\x0b\x32\x15.filesystem.EntryInfoR\x05\x65ntry\"I\n\tEntryInfo\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12(\n\x04type\x18\x02 \x01(\x0e\x32\x14.filesystem.FileTypeR\x04type\"H\n\x0bListRequest\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path\x12%\n\x04user\x18\x02 \x01(\x0b\x32\x11.permissions.UserR\x04user\"?\n\x0cListResponse\x12/\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\x15.filesystem.EntryInfoR\x07\x65ntries\"I\n\x0cWatchRequest\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path\x12%\n\x04user\x18\x02 \x01(\x0b\x32\x11.permissions.UserR\x04user\"B\n\rWatchResponse\x12\x31\n\x05\x65vent\x18\x01 \x01(\x0b\x32\x1b.filesystem.FilesystemEventR\x05\x65vent\"P\n\x0f\x46ilesystemEvent\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path\x12)\n\x04type\x18\x02 \x01(\x0e\x32\x15.filesystem.EventTypeR\x04type*R\n\x08\x46ileType\x12\x19\n\x15\x46ILE_TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x46ILE_TYPE_FILE\x10\x01\x12\x17\n\x13\x46ILE_TYPE_DIRECTORY\x10\x02*\x98\x01\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11\x45VENT_TYPE_CREATE\x10\x01\x12\x14\n\x10\x45VENT_TYPE_WRITE\x10\x02\x12\x15\n\x11\x45VENT_TYPE_REMOVE\x10\x03\x12\x15\n\x11\x45VENT_TYPE_RENAME\x10\x04\x12\x14\n\x10\x45VENT_TYPE_CHMOD\x10\x05\x32\xc7\x02\n\nFilesystem\x12\x39\n\x04Stat\x12\x17.filesystem.StatRequest\x1a\x18.filesystem.StatResponse\x12\x42\n\x07MakeDir\x12\x1a.filesystem.MakeDirRequest\x1a\x1b.filesystem.MakeDirResponse\x12\x39\n\x04List\x12\x17.filesystem.ListRequest\x1a\x18.filesystem.ListResponse\x12>\n\x05Watch\x12\x18.filesystem.WatchRequest\x1a\x19.filesystem.WatchResponse0\x01\x12?\n\x06Remove\x12\x19.filesystem.RemoveRequest\x1a\x1a.filesystem.RemoveResponseBi\n\x0e\x63om.filesystemB\x0f\x46ilesystemProtoP\x01\xa2\x02\x03\x46XX\xaa\x02\nFilesystem\xca\x02\nFilesystem\xe2\x02\x16\x46ilesystem\\GPBMetadata\xea\x02\nFilesystemb\x06proto3')+DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(+ b'\n\x1b\x66ilesystem/filesystem.proto\x12\nfilesystem\x1a\x1dpermissions/permissions.proto"K\n\x0eMakeDirRequest\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path\x12%\n\x04user\x18\x02 \x01(\x0b\x32\x11.permissions.UserR\x04user"\x11\n\x0fMakeDirResponse"J\n\rRemoveRequest\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path\x12%\n\x04user\x18\x02 \x01(\x0b\x32\x11.permissions.UserR\x04user"\x10\n\x0eRemoveResponse"H\n\x0bStatRequest\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path\x12%\n\x04user\x18\x02 \x01(\x0b\x32\x11.permissions.UserR\x04user";\n\x0cStatResponse\x12+\n\x05\x65ntry\x18\x01 \x01(\x0b\x32\x15.filesystem.EntryInfoR\x05\x65ntry"I\n\tEntryInfo\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12(\n\x04type\x18\x02 \x01(\x0e\x32\x14.filesystem.FileTypeR\x04type"H\n\x0bListRequest\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path\x12%\n\x04user\x18\x02 \x01(\x0b\x32\x11.permissions.UserR\x04user"?\n\x0cListResponse\x12/\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\x15.filesystem.EntryInfoR\x07\x65ntries"I\n\x0cWatchRequest\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path\x12%\n\x04user\x18\x02 \x01(\x0b\x32\x11.permissions.UserR\x04user"B\n\rWatchResponse\x12\x31\n\x05\x65vent\x18\x01 \x01(\x0b\x32\x1b.filesystem.FilesystemEventR\x05\x65vent"P\n\x0f\x46ilesystemEvent\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path\x12)\n\x04type\x18\x02 \x01(\x0e\x32\x15.filesystem.EventTypeR\x04type*R\n\x08\x46ileType\x12\x19\n\x15\x46ILE_TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x46ILE_TYPE_FILE\x10\x01\x12\x17\n\x13\x46ILE_TYPE_DIRECTORY\x10\x02*\x98\x01\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11\x45VENT_TYPE_CREATE\x10\x01\x12\x14\n\x10\x45VENT_TYPE_WRITE\x10\x02\x12\x15\n\x11\x45VENT_TYPE_REMOVE\x10\x03\x12\x15\n\x11\x45VENT_TYPE_RENAME\x10\x04\x12\x14\n\x10\x45VENT_TYPE_CHMOD\x10\x05\x32\xc7\x02\n\nFilesystem\x12\x39\n\x04Stat\x12\x17.filesystem.StatRequest\x1a\x18.filesystem.StatResponse\x12\x42\n\x07MakeDir\x12\x1a.filesystem.MakeDirRequest\x1a\x1b.filesystem.MakeDirResponse\x12\x39\n\x04List\x12\x17.filesystem.ListRequest\x1a\x18.filesystem.ListResponse\x12>\n\x05Watch\x12\x18.filesystem.WatchRequest\x1a\x19.filesystem.WatchResponse0\x01\x12?\n\x06Remove\x12\x19.filesystem.RemoveRequest\x1a\x1a.filesystem.RemoveResponseBi\n\x0e\x63om.filesystemB\x0f\x46ilesystemProtoP\x01\xa2\x02\x03\x46XX\xaa\x02\nFilesystem\xca\x02\nFilesystem\xe2\x02\x16\x46ilesystem\\GPBMetadata\xea\x02\nFilesystemb\x06proto3'+)_globals = globals()_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)-_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'filesystem.filesystem_pb2', _globals)+_builder.BuildTopDescriptorsAndMessages(+ DESCRIPTOR, "filesystem.filesystem_pb2", _globals+)if not _descriptor._USE_C_DESCRIPTORS:- _globals['DESCRIPTOR']._loaded_options = None- _globals['DESCRIPTOR']._serialized_options = b'\n\016com.filesystemB\017FilesystemProtoP\001\242\002\003FXX\252\002\nFilesystem\312\002\nFilesystem\342\002\026Filesystem\\GPBMetadata\352\002\nFilesystem'- _globals['_FILETYPE']._serialized_start=838- _globals['_FILETYPE']._serialized_end=920- _globals['_EVENTTYPE']._serialized_start=923- _globals['_EVENTTYPE']._serialized_end=1075- _globals['_MAKEDIRREQUEST']._serialized_start=74- _globals['_MAKEDIRREQUEST']._serialized_end=149- _globals['_MAKEDIRRESPONSE']._serialized_start=151- _globals['_MAKEDIRRESPONSE']._serialized_end=168- _globals['_REMOVEREQUEST']._serialized_start=170- _globals['_REMOVEREQUEST']._serialized_end=244- _globals['_REMOVERESPONSE']._serialized_start=246- _globals['_REMOVERESPONSE']._serialized_end=262- _globals['_STATREQUEST']._serialized_start=264- _globals['_STATREQUEST']._serialized_end=336- _globals['_STATRESPONSE']._serialized_start=338- _globals['_STATRESPONSE']._serialized_end=397- _globals['_ENTRYINFO']._serialized_start=399- _globals['_ENTRYINFO']._serialized_end=472- _globals['_LISTREQUEST']._serialized_start=474- _globals['_LISTREQUEST']._serialized_end=546- _globals['_LISTRESPONSE']._serialized_start=548- _globals['_LISTRESPONSE']._serialized_end=611- _globals['_WATCHREQUEST']._serialized_start=613- _globals['_WATCHREQUEST']._serialized_end=686- _globals['_WATCHRESPONSE']._serialized_start=688- _globals['_WATCHRESPONSE']._serialized_end=754- _globals['_FILESYSTEMEVENT']._serialized_start=756- _globals['_FILESYSTEMEVENT']._serialized_end=836- _globals['_FILESYSTEM']._serialized_start=1078- _globals['_FILESYSTEM']._serialized_end=1405+ _globals["DESCRIPTOR"]._loaded_options = None+ _globals[+ "DESCRIPTOR"+ ]._serialized_options = b"\n\016com.filesystemB\017FilesystemProtoP\001\242\002\003FXX\252\002\nFilesystem\312\002\nFilesystem\342\002\026Filesystem\\GPBMetadata\352\002\nFilesystem"+ _globals["_FILETYPE"]._serialized_start = 838+ _globals["_FILETYPE"]._serialized_end = 920+ _globals["_EVENTTYPE"]._serialized_start = 923+ _globals["_EVENTTYPE"]._serialized_end = 1075+ _globals["_MAKEDIRREQUEST"]._serialized_start = 74+ _globals["_MAKEDIRREQUEST"]._serialized_end = 149+ _globals["_MAKEDIRRESPONSE"]._serialized_start = 151+ _globals["_MAKEDIRRESPONSE"]._serialized_end = 168+ _globals["_REMOVEREQUEST"]._serialized_start = 170+ _globals["_REMOVEREQUEST"]._serialized_end = 244+ _globals["_REMOVERESPONSE"]._serialized_start = 246+ _globals["_REMOVERESPONSE"]._serialized_end = 262+ _globals["_STATREQUEST"]._serialized_start = 264+ _globals["_STATREQUEST"]._serialized_end = 336+ _globals["_STATRESPONSE"]._serialized_start = 338+ _globals["_STATRESPONSE"]._serialized_end = 397+ _globals["_ENTRYINFO"]._serialized_start = 399+ _globals["_ENTRYINFO"]._serialized_end = 472+ _globals["_LISTREQUEST"]._serialized_start = 474+ _globals["_LISTREQUEST"]._serialized_end = 546+ _globals["_LISTRESPONSE"]._serialized_start = 548+ _globals["_LISTRESPONSE"]._serialized_end = 611+ _globals["_WATCHREQUEST"]._serialized_start = 613+ _globals["_WATCHREQUEST"]._serialized_end = 686+ _globals["_WATCHRESPONSE"]._serialized_start = 688+ _globals["_WATCHRESPONSE"]._serialized_end = 754+ _globals["_FILESYSTEMEVENT"]._serialized_start = 756+ _globals["_FILESYSTEMEVENT"]._serialized_end = 836+ _globals["_FILESYSTEM"]._serialized_start = 1078+ _globals["_FILESYSTEM"]._serialized_end = 1405# @@protoc_insertion_point(module_scope)diff --git a/packages/python-sdk/e2b/envd/filesystem/filesystem_pb2.pyi b/packages/python-sdk/e2b/envd/filesystem/filesystem_pb2.pyiindex 5253a9274..0aabaffb0 100644--- a/packages/python-sdk/e2b/envd/filesystem/filesystem_pb2.pyi+++ b/packages/python-sdk/e2b/envd/filesystem/filesystem_pb2.pyi@@ -3,7 +3,13 @@ from google.protobuf.internal import containers as _containersfrom google.protobuf.internal import enum_type_wrapper as _enum_type_wrapperfrom google.protobuf import descriptor as _descriptorfrom google.protobuf import message as _message-from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union+from typing import (+ ClassVar as _ClassVar,+ Iterable as _Iterable,+ Mapping as _Mapping,+ Optional as _Optional,+ Union as _Union,+)DESCRIPTOR: _descriptor.FileDescriptor@@ -21,6 +27,7 @@ class EventType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):EVENT_TYPE_REMOVE: _ClassVar[EventType]EVENT_TYPE_RENAME: _ClassVar[EventType]EVENT_TYPE_CHMOD: _ClassVar[EventType]+FILE_TYPE_UNSPECIFIED: FileTypeFILE_TYPE_FILE: FileTypeFILE_TYPE_DIRECTORY: FileType@@ -37,7 +44,11 @@ class MakeDirRequest(_message.Message):USER_FIELD_NUMBER: _ClassVar[int]path: struser: _permissions_pb2.User- def __init__(self, path: _Optional[str] = ..., user: _Optional[_Union[_permissions_pb2.User, _Mapping]] = ...) -> None: ...+ def __init__(+ self,+ path: _Optional[str] = ...,+ user: _Optional[_Union[_permissions_pb2.User, _Mapping]] = ...,+ ) -> None: ...class MakeDirResponse(_message.Message):__slots__ = ()@@ -49,7 +60,11 @@ class RemoveRequest(_message.Message):USER_FIELD_NUMBER: _ClassVar[int]path: struser: _permissions_pb2.User- def __init__(self, path: _Optional[str] = ..., user: _Optional[_Union[_permissions_pb2.User, _Mapping]] = ...) -> None: ...+ def __init__(+ self,+ path: _Optional[str] = ...,+ user: _Optional[_Union[_permissions_pb2.User, _Mapping]] = ...,+ ) -> None: ...class RemoveResponse(_message.Message):__slots__ = ()@@ -61,7 +76,11 @@ class StatRequest(_message.Message):USER_FIELD_NUMBER: _ClassVar[int]path: struser: _permissions_pb2.User- def __init__(self, path: _Optional[str] = ..., user: _Optional[_Union[_permissions_pb2.User, _Mapping]] = ...) -> None: ...+ def __init__(+ self,+ path: _Optional[str] = ...,+ user: _Optional[_Union[_permissions_pb2.User, _Mapping]] = ...,+ ) -> None: ...class StatResponse(_message.Message):__slots__ = ("entry",)@@ -75,7 +94,9 @@ class EntryInfo(_message.Message):TYPE_FIELD_NUMBER: _ClassVar[int]name: strtype: FileType- def __init__(self, name: _Optional[str] = ..., type: _Optional[_Union[FileType, str]] = ...) -> None: ...+ def __init__(+ self, name: _Optional[str] = ..., type: _Optional[_Union[FileType, str]] = ...+ ) -> None: ...class ListRequest(_message.Message):__slots__ = ("path", "user")@@ -83,13 +104,19 @@ class ListRequest(_message.Message):USER_FIELD_NUMBER: _ClassVar[int]path: struser: _permissions_pb2.User- def __init__(self, path: _Optional[str] = ..., user: _Optional[_Union[_permissions_pb2.User, _Mapping]] = ...) -> None: ...+ def __init__(+ self,+ path: _Optional[str] = ...,+ user: _Optional[_Union[_permissions_pb2.User, _Mapping]] = ...,+ ) -> None: ...class ListResponse(_message.Message):__slots__ = ("entries",)ENTRIES_FIELD_NUMBER: _ClassVar[int]entries: _containers.RepeatedCompositeFieldContainer[EntryInfo]- def __init__(self, entries: _Optional[_Iterable[_Union[EntryInfo, _Mapping]]] = ...) -> None: ...+ def __init__(+ self, entries: _Optional[_Iterable[_Union[EntryInfo, _Mapping]]] = ...+ ) -> None: ...class WatchRequest(_message.Message):__slots__ = ("path", "user")@@ -97,13 +124,19 @@ class WatchRequest(_message.Message):USER_FIELD_NUMBER: _ClassVar[int]path: struser: _permissions_pb2.User- def __init__(self, path: _Optional[str] = ..., user: _Optional[_Union[_permissions_pb2.User, _Mapping]] = ...) -> None: ...+ def __init__(+ self,+ path: _Optional[str] = ...,+ user: _Optional[_Union[_permissions_pb2.User, _Mapping]] = ...,+ ) -> None: ...class WatchResponse(_message.Message):__slots__ = ("event",)EVENT_FIELD_NUMBER: _ClassVar[int]event: FilesystemEvent- def __init__(self, event: _Optional[_Union[FilesystemEvent, _Mapping]] = ...) -> None: ...+ def __init__(+ self, event: _Optional[_Union[FilesystemEvent, _Mapping]] = ...+ ) -> None: ...class FilesystemEvent(_message.Message):__slots__ = ("path", "type")@@ -111,4 +144,6 @@ class FilesystemEvent(_message.Message):TYPE_FIELD_NUMBER: _ClassVar[int]path: strtype: EventType- def __init__(self, path: _Optional[str] = ..., type: _Optional[_Union[EventType, str]] = ...) -> None: ...+ def __init__(+ self, path: _Optional[str] = ..., type: _Optional[_Union[EventType, str]] = ...+ ) -> None: ...diff --git a/packages/python-sdk/e2b/envd/permissions/permissions_pb2.py b/packages/python-sdk/e2b/envd/permissions/permissions_pb2.pyindex 41dcb86a1..f3c5ff50f 100644--- a/packages/python-sdk/e2b/envd/permissions/permissions_pb2.py+++ b/packages/python-sdk/e2b/envd/permissions/permissions_pb2.py@@ -7,21 +7,26 @@ from google.protobuf import descriptor as _descriptorfrom google.protobuf import descriptor_pool as _descriptor_poolfrom google.protobuf import symbol_database as _symbol_databasefrom google.protobuf.internal import builder as _builder+# @@protoc_insertion_point(imports)_sym_db = _symbol_database.Default()---DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1dpermissions/permissions.proto\x12\x0bpermissions\"0\n\x04User\x12\x1c\n\x08username\x18\x01 \x01(\tH\x00R\x08usernameB\n\n\x08selectorBo\n\x0f\x63om.permissionsB\x10PermissionsProtoP\x01\xa2\x02\x03PXX\xaa\x02\x0bPermissions\xca\x02\x0bPermissions\xe2\x02\x17Permissions\\GPBMetadata\xea\x02\x0bPermissionsb\x06proto3')+DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(+ b'\n\x1dpermissions/permissions.proto\x12\x0bpermissions"0\n\x04User\x12\x1c\n\x08username\x18\x01 \x01(\tH\x00R\x08usernameB\n\n\x08selectorBo\n\x0f\x63om.permissionsB\x10PermissionsProtoP\x01\xa2\x02\x03PXX\xaa\x02\x0bPermissions\xca\x02\x0bPermissions\xe2\x02\x17Permissions\\GPBMetadata\xea\x02\x0bPermissionsb\x06proto3'+)_globals = globals()_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)-_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'permissions.permissions_pb2', _globals)+_builder.BuildTopDescriptorsAndMessages(+ DESCRIPTOR, "permissions.permissions_pb2", _globals+)if not _descriptor._USE_C_DESCRIPTORS:- _globals['DESCRIPTOR']._loaded_options = None- _globals['DESCRIPTOR']._serialized_options = b'\n\017com.permissionsB\020PermissionsProtoP\001\242\002\003PXX\252\002\013Permissions\312\002\013Permissions\342\002\027Permissions\\GPBMetadata\352\002\013Permissions'- _globals['_USER']._serialized_start=46- _globals['_USER']._serialized_end=94+ _globals["DESCRIPTOR"]._loaded_options = None+ _globals[+ "DESCRIPTOR"+ ]._serialized_options = b"\n\017com.permissionsB\020PermissionsProtoP\001\242\002\003PXX\252\002\013Permissions\312\002\013Permissions\342\002\027Permissions\\GPBMetadata\352\002\013Permissions"+ _globals["_USER"]._serialized_start = 46+ _globals["_USER"]._serialized_end = 94# @@protoc_insertion_point(module_scope)diff --git a/packages/python-sdk/e2b/envd/process/process_connect.py b/packages/python-sdk/e2b/envd/process/process_connect.pyindex 7a1f8ab04..d9ef4ba1a 100644--- a/packages/python-sdk/e2b/envd/process/process_connect.py+++ b/packages/python-sdk/e2b/envd/process/process_connect.py@@ -16,7 +16,7 @@ class ProcessClient:response_type=process_dot_process__pb2.ListResponse,compressor=compressor,json=json,- **opts+ **opts,)self._connect = connect.Client(pool=pool,@@ -24,7 +24,7 @@ class ProcessClient:response_type=process_dot_process__pb2.ConnectResponse,compressor=compressor,json=json,- **opts+ **opts,)self._start = connect.Client(pool=pool,@@ -32,7 +32,7 @@ class ProcessClient:response_type=process_dot_process__pb2.StartResponse,compressor=compressor,json=json,- **opts+ **opts,)self._update = connect.Client(pool=pool,@@ -40,7 +40,7 @@ class ProcessClient:response_type=process_dot_process__pb2.UpdateResponse,compressor=compressor,json=json,- **opts+ **opts,)self._stream_input = connect.Client(pool=pool,@@ -48,7 +48,7 @@ class ProcessClient:response_type=process_dot_process__pb2.StreamInputResponse,compressor=compressor,json=json,- **opts+ **opts,)self._send_input = connect.Client(pool=pool,@@ -56,7 +56,7 @@ class ProcessClient:response_type=process_dot_process__pb2.SendInputResponse,compressor=compressor,json=json,- **opts+ **opts,)self._send_signal = connect.Client(pool=pool,@@ -64,26 +64,40 @@ class ProcessClient:response_type=process_dot_process__pb2.SendSignalResponse,compressor=compressor,json=json,- **opts+ **opts,)- def list(self, req: process_dot_process__pb2.ListRequest, **opts) -> process_dot_process__pb2.ListResponse:+ def list(+ self, req: process_dot_process__pb2.ListRequest, **opts+ ) -> process_dot_process__pb2.ListResponse:return self._list.call_unary(req, **opts)- def connect(self, req: process_dot_process__pb2.ConnectRequest , **opts) -> Generator[process_dot_process__pb2.ConnectResponse, Any, None]:+ def connect(+ self, req: process_dot_process__pb2.ConnectRequest, **opts+ ) -> Generator[process_dot_process__pb2.ConnectResponse, Any, None]:return self._connect.call_server_stream(req, **opts)- def start(self, req: process_dot_process__pb2.StartRequest , **opts) -> Generator[process_dot_process__pb2.StartResponse, Any, None]:+ def start(+ self, req: process_dot_process__pb2.StartRequest, **opts+ ) -> Generator[process_dot_process__pb2.StartResponse, Any, None]:return self._start.call_server_stream(req, **opts)- def update(self, req: process_dot_process__pb2.UpdateRequest, **opts) -> process_dot_process__pb2.UpdateResponse:+ def update(+ self, req: process_dot_process__pb2.UpdateRequest, **opts+ ) -> process_dot_process__pb2.UpdateResponse:return self._update.call_unary(req, **opts)- def stream_input(self, req: process_dot_process__pb2.StreamInputRequest, **opts) -> process_dot_process__pb2.StreamInputResponse:+ def stream_input(+ self, req: process_dot_process__pb2.StreamInputRequest, **opts+ ) -> process_dot_process__pb2.StreamInputResponse:return self._stream_input.call_client_stream(req, **opts)- def send_input(self, req: process_dot_process__pb2.SendInputRequest, **opts) -> process_dot_process__pb2.SendInputResponse:+ def send_input(+ self, req: process_dot_process__pb2.SendInputRequest, **opts+ ) -> process_dot_process__pb2.SendInputResponse:return self._send_input.call_unary(req, **opts)- def send_signal(self, req: process_dot_process__pb2.SendSignalRequest, **opts) -> process_dot_process__pb2.SendSignalResponse:+ def send_signal(+ self, req: process_dot_process__pb2.SendSignalRequest, **opts+ ) -> process_dot_process__pb2.SendSignalResponse:return self._send_signal.call_unary(req, **opts)diff --git a/packages/python-sdk/e2b/envd/process/process_pb2.py b/packages/python-sdk/e2b/envd/process/process_pb2.pyindex b58e7f235..4ec0c0a07 100644--- a/packages/python-sdk/e2b/envd/process/process_pb2.py+++ b/packages/python-sdk/e2b/envd/process/process_pb2.py@@ -7,6 +7,7 @@ from google.protobuf import descriptor as _descriptorfrom google.protobuf import descriptor_pool as _descriptor_poolfrom google.protobuf import symbol_database as _symbol_databasefrom google.protobuf.internal import builder as _builder+# @@protoc_insertion_point(imports)_sym_db = _symbol_database.Default()@@ -15,72 +16,76 @@ _sym_db = _symbol_database.Default()from e2b.envd.permissions import permissions_pb2 as permissions_dot_permissions__pb2-DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15process/process.proto\x12\x07process\x1a\x1dpermissions/permissions.proto\"\\\n\x03PTY\x12%\n\x04size\x18\x01 \x01(\x0b\x32\x11.process.PTY.SizeR\x04size\x1a.\n\x04Size\x12\x12\n\x04\x63ols\x18\x01 \x01(\rR\x04\x63ols\x12\x12\n\x04rows\x18\x02 \x01(\rR\x04rows\"\xc3\x01\n\rProcessConfig\x12\x10\n\x03\x63md\x18\x01 \x01(\tR\x03\x63md\x12\x12\n\x04\x61rgs\x18\x02 \x03(\tR\x04\x61rgs\x12\x34\n\x04\x65nvs\x18\x03 \x03(\x0b\x32 .process.ProcessConfig.EnvsEntryR\x04\x65nvs\x12\x15\n\x03\x63wd\x18\x04 \x01(\tH\x00R\x03\x63wd\x88\x01\x01\x1a\x37\n\tEnvsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\x42\x06\n\x04_cwd\"\r\n\x0bListRequest\"n\n\x0bProcessInfo\x12.\n\x06\x63onfig\x18\x01 \x01(\x0b\x32\x16.process.ProcessConfigR\x06\x63onfig\x12\x10\n\x03pid\x18\x02 \x01(\rR\x03pid\x12\x15\n\x03tag\x18\x03 \x01(\tH\x00R\x03tag\x88\x01\x01\x42\x06\n\x04_tag\"B\n\x0cListResponse\x12\x32\n\tprocesses\x18\x01 \x03(\x0b\x32\x14.process.ProcessInfoR\tprocesses\"\xb3\x01\n\x0cStartRequest\x12\x30\n\x07process\x18\x01 \x01(\x0b\x32\x16.process.ProcessConfigR\x07process\x12#\n\x03pty\x18\x02 \x01(\x0b\x32\x0c.process.PTYH\x00R\x03pty\x88\x01\x01\x12\x15\n\x03tag\x18\x03 \x01(\tH\x01R\x03tag\x88\x01\x01\x12%\n\x04user\x18\x04 \x01(\x0b\x32\x11.permissions.UserR\x04userB\x06\n\x04_ptyB\x06\n\x04_tag\"p\n\rUpdateRequest\x12\x32\n\x07process\x18\x01 \x01(\x0b\x32\x18.process.ProcessSelectorR\x07process\x12#\n\x03pty\x18\x02 \x01(\x0b\x32\x0c.process.PTYH\x00R\x03pty\x88\x01\x01\x42\x06\n\x04_pty\"\x10\n\x0eUpdateResponse\"\xb9\x03\n\x0cProcessEvent\x12\x38\n\x05start\x18\x01 \x01(\x0b\x32 .process.ProcessEvent.StartEventH\x00R\x05start\x12\x35\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x1f.process.ProcessEvent.DataEventH\x00R\x04\x64\x61ta\x12\x32\n\x03\x65nd\x18\x03 \x01(\x0b\x32\x1e.process.ProcessEvent.EndEventH\x00R\x03\x65nd\x1a\x1e\n\nStartEvent\x12\x10\n\x03pid\x18\x01 \x01(\rR\x03pid\x1a]\n\tDataEvent\x12\x18\n\x06stdout\x18\x01 \x01(\x0cH\x00R\x06stdout\x12\x18\n\x06stderr\x18\x02 \x01(\x0cH\x00R\x06stderr\x12\x12\n\x03pty\x18\x03 \x01(\x0cH\x00R\x03ptyB\x08\n\x06output\x1a|\n\x08\x45ndEvent\x12\x1b\n\texit_code\x18\x01 \x01(\x11R\x08\x65xitCode\x12\x16\n\x06\x65xited\x18\x02 \x01(\x08R\x06\x65xited\x12\x16\n\x06status\x18\x03 \x01(\tR\x06status\x12\x19\n\x05\x65rror\x18\x04 \x01(\tH\x00R\x05\x65rror\x88\x01\x01\x42\x08\n\x06_errorB\x07\n\x05\x65vent\"<\n\rStartResponse\x12+\n\x05\x65vent\x18\x01 \x01(\x0b\x32\x15.process.ProcessEventR\x05\x65vent\">\n\x0f\x43onnectResponse\x12+\n\x05\x65vent\x18\x01 \x01(\x0b\x32\x15.process.ProcessEventR\x05\x65vent\"s\n\x10SendInputRequest\x12\x32\n\x07process\x18\x01 \x01(\x0b\x32\x18.process.ProcessSelectorR\x07process\x12+\n\x05input\x18\x02 \x01(\x0b\x32\x15.process.ProcessInputR\x05input\"\x13\n\x11SendInputResponse\"C\n\x0cProcessInput\x12\x16\n\x05stdin\x18\x01 \x01(\x0cH\x00R\x05stdin\x12\x12\n\x03pty\x18\x02 \x01(\x0cH\x00R\x03ptyB\x07\n\x05input\"\x96\x02\n\x12StreamInputRequest\x12>\n\x05start\x18\x01 \x01(\x0b\x32&.process.StreamInputRequest.StartEventH\x00R\x05start\x12;\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32%.process.StreamInputRequest.DataEventH\x00R\x04\x64\x61ta\x1a@\n\nStartEvent\x12\x32\n\x07process\x18\x01 \x01(\x0b\x32\x18.process.ProcessSelectorR\x07process\x1a\x38\n\tDataEvent\x12+\n\x05input\x18\x02 \x01(\x0b\x32\x15.process.ProcessInputR\x05inputB\x07\n\x05\x65vent\"\x15\n\x13StreamInputResponse\"p\n\x11SendSignalRequest\x12\x32\n\x07process\x18\x01 \x01(\x0b\x32\x18.process.ProcessSelectorR\x07process\x12\'\n\x06signal\x18\x02 \x01(\x0e\x32\x0f.process.SignalR\x06signal\"\x14\n\x12SendSignalResponse\"D\n\x0e\x43onnectRequest\x12\x32\n\x07process\x18\x01 \x01(\x0b\x32\x18.process.ProcessSelectorR\x07process\"E\n\x0fProcessSelector\x12\x12\n\x03pid\x18\x01 \x01(\rH\x00R\x03pid\x12\x12\n\x03tag\x18\x02 \x01(\tH\x00R\x03tagB\n\n\x08selector*H\n\x06Signal\x12\x16\n\x12SIGNAL_UNSPECIFIED\x10\x00\x12\x12\n\x0eSIGNAL_SIGTERM\x10\x0f\x12\x12\n\x0eSIGNAL_SIGKILL\x10\t2\xca\x03\n\x07Process\x12\x33\n\x04List\x12\x14.process.ListRequest\x1a\x15.process.ListResponse\x12>\n\x07\x43onnect\x12\x17.process.ConnectRequest\x1a\x18.process.ConnectResponse0\x01\x12\x38\n\x05Start\x12\x15.process.StartRequest\x1a\x16.process.StartResponse0\x01\x12\x39\n\x06Update\x12\x16.process.UpdateRequest\x1a\x17.process.UpdateResponse\x12J\n\x0bStreamInput\x12\x1b.process.StreamInputRequest\x1a\x1c.process.StreamInputResponse(\x01\x12\x42\n\tSendInput\x12\x19.process.SendInputRequest\x1a\x1a.process.SendInputResponse\x12\x45\n\nSendSignal\x12\x1a.process.SendSignalRequest\x1a\x1b.process.SendSignalResponseBW\n\x0b\x63om.processB\x0cProcessProtoP\x01\xa2\x02\x03PXX\xaa\x02\x07Process\xca\x02\x07Process\xe2\x02\x13Process\\GPBMetadata\xea\x02\x07Processb\x06proto3')+DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(+ b'\n\x15process/process.proto\x12\x07process\x1a\x1dpermissions/permissions.proto"\\\n\x03PTY\x12%\n\x04size\x18\x01 \x01(\x0b\x32\x11.process.PTY.SizeR\x04size\x1a.\n\x04Size\x12\x12\n\x04\x63ols\x18\x01 \x01(\rR\x04\x63ols\x12\x12\n\x04rows\x18\x02 \x01(\rR\x04rows"\xc3\x01\n\rProcessConfig\x12\x10\n\x03\x63md\x18\x01 \x01(\tR\x03\x63md\x12\x12\n\x04\x61rgs\x18\x02 \x03(\tR\x04\x61rgs\x12\x34\n\x04\x65nvs\x18\x03 \x03(\x0b\x32 .process.ProcessConfig.EnvsEntryR\x04\x65nvs\x12\x15\n\x03\x63wd\x18\x04 \x01(\tH\x00R\x03\x63wd\x88\x01\x01\x1a\x37\n\tEnvsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\x42\x06\n\x04_cwd"\r\n\x0bListRequest"n\n\x0bProcessInfo\x12.\n\x06\x63onfig\x18\x01 \x01(\x0b\x32\x16.process.ProcessConfigR\x06\x63onfig\x12\x10\n\x03pid\x18\x02 \x01(\rR\x03pid\x12\x15\n\x03tag\x18\x03 \x01(\tH\x00R\x03tag\x88\x01\x01\x42\x06\n\x04_tag"B\n\x0cListResponse\x12\x32\n\tprocesses\x18\x01 \x03(\x0b\x32\x14.process.ProcessInfoR\tprocesses"\xb3\x01\n\x0cStartRequest\x12\x30\n\x07process\x18\x01 \x01(\x0b\x32\x16.process.ProcessConfigR\x07process\x12#\n\x03pty\x18\x02 \x01(\x0b\x32\x0c.process.PTYH\x00R\x03pty\x88\x01\x01\x12\x15\n\x03tag\x18\x03 \x01(\tH\x01R\x03tag\x88\x01\x01\x12%\n\x04user\x18\x04 \x01(\x0b\x32\x11.permissions.UserR\x04userB\x06\n\x04_ptyB\x06\n\x04_tag"p\n\rUpdateRequest\x12\x32\n\x07process\x18\x01 \x01(\x0b\x32\x18.process.ProcessSelectorR\x07process\x12#\n\x03pty\x18\x02 \x01(\x0b\x32\x0c.process.PTYH\x00R\x03pty\x88\x01\x01\x42\x06\n\x04_pty"\x10\n\x0eUpdateResponse"\xb9\x03\n\x0cProcessEvent\x12\x38\n\x05start\x18\x01 \x01(\x0b\x32 .process.ProcessEvent.StartEventH\x00R\x05start\x12\x35\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x1f.process.ProcessEvent.DataEventH\x00R\x04\x64\x61ta\x12\x32\n\x03\x65nd\x18\x03 \x01(\x0b\x32\x1e.process.ProcessEvent.EndEventH\x00R\x03\x65nd\x1a\x1e\n\nStartEvent\x12\x10\n\x03pid\x18\x01 \x01(\rR\x03pid\x1a]\n\tDataEvent\x12\x18\n\x06stdout\x18\x01 \x01(\x0cH\x00R\x06stdout\x12\x18\n\x06stderr\x18\x02 \x01(\x0cH\x00R\x06stderr\x12\x12\n\x03pty\x18\x03 \x01(\x0cH\x00R\x03ptyB\x08\n\x06output\x1a|\n\x08\x45ndEvent\x12\x1b\n\texit_code\x18\x01 \x01(\x11R\x08\x65xitCode\x12\x16\n\x06\x65xited\x18\x02 \x01(\x08R\x06\x65xited\x12\x16\n\x06status\x18\x03 \x01(\tR\x06status\x12\x19\n\x05\x65rror\x18\x04 \x01(\tH\x00R\x05\x65rror\x88\x01\x01\x42\x08\n\x06_errorB\x07\n\x05\x65vent"<\n\rStartResponse\x12+\n\x05\x65vent\x18\x01 \x01(\x0b\x32\x15.process.ProcessEventR\x05\x65vent">\n\x0f\x43onnectResponse\x12+\n\x05\x65vent\x18\x01 \x01(\x0b\x32\x15.process.ProcessEventR\x05\x65vent"s\n\x10SendInputRequest\x12\x32\n\x07process\x18\x01 \x01(\x0b\x32\x18.process.ProcessSelectorR\x07process\x12+\n\x05input\x18\x02 \x01(\x0b\x32\x15.process.ProcessInputR\x05input"\x13\n\x11SendInputResponse"C\n\x0cProcessInput\x12\x16\n\x05stdin\x18\x01 \x01(\x0cH\x00R\x05stdin\x12\x12\n\x03pty\x18\x02 \x01(\x0cH\x00R\x03ptyB\x07\n\x05input"\x96\x02\n\x12StreamInputRequest\x12>\n\x05start\x18\x01 \x01(\x0b\x32&.process.StreamInputRequest.StartEventH\x00R\x05start\x12;\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32%.process.StreamInputRequest.DataEventH\x00R\x04\x64\x61ta\x1a@\n\nStartEvent\x12\x32\n\x07process\x18\x01 \x01(\x0b\x32\x18.process.ProcessSelectorR\x07process\x1a\x38\n\tDataEvent\x12+\n\x05input\x18\x02 \x01(\x0b\x32\x15.process.ProcessInputR\x05inputB\x07\n\x05\x65vent"\x15\n\x13StreamInputResponse"p\n\x11SendSignalRequest\x12\x32\n\x07process\x18\x01 \x01(\x0b\x32\x18.process.ProcessSelectorR\x07process\x12\'\n\x06signal\x18\x02 \x01(\x0e\x32\x0f.process.SignalR\x06signal"\x14\n\x12SendSignalResponse"D\n\x0e\x43onnectRequest\x12\x32\n\x07process\x18\x01 \x01(\x0b\x32\x18.process.ProcessSelectorR\x07process"E\n\x0fProcessSelector\x12\x12\n\x03pid\x18\x01 \x01(\rH\x00R\x03pid\x12\x12\n\x03tag\x18\x02 \x01(\tH\x00R\x03tagB\n\n\x08selector*H\n\x06Signal\x12\x16\n\x12SIGNAL_UNSPECIFIED\x10\x00\x12\x12\n\x0eSIGNAL_SIGTERM\x10\x0f\x12\x12\n\x0eSIGNAL_SIGKILL\x10\t2\xca\x03\n\x07Process\x12\x33\n\x04List\x12\x14.process.ListRequest\x1a\x15.process.ListResponse\x12>\n\x07\x43onnect\x12\x17.process.ConnectRequest\x1a\x18.process.ConnectResponse0\x01\x12\x38\n\x05Start\x12\x15.process.StartRequest\x1a\x16.process.StartResponse0\x01\x12\x39\n\x06Update\x12\x16.process.UpdateRequest\x1a\x17.process.UpdateResponse\x12J\n\x0bStreamInput\x12\x1b.process.StreamInputRequest\x1a\x1c.process.StreamInputResponse(\x01\x12\x42\n\tSendInput\x12\x19.process.SendInputRequest\x1a\x1a.process.SendInputResponse\x12\x45\n\nSendSignal\x12\x1a.process.SendSignalRequest\x1a\x1b.process.SendSignalResponseBW\n\x0b\x63om.processB\x0cProcessProtoP\x01\xa2\x02\x03PXX\xaa\x02\x07Process\xca\x02\x07Process\xe2\x02\x13Process\\GPBMetadata\xea\x02\x07Processb\x06proto3'+)_globals = globals()_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)-_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'process.process_pb2', _globals)+_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "process.process_pb2", _globals)if not _descriptor._USE_C_DESCRIPTORS:- _globals['DESCRIPTOR']._loaded_options = None- _globals['DESCRIPTOR']._serialized_options = b'\n\013com.processB\014ProcessProtoP\001\242\002\003PXX\252\002\007Process\312\002\007Process\342\002\023Process\\GPBMetadata\352\002\007Process'- _globals['_PROCESSCONFIG_ENVSENTRY']._loaded_options = None- _globals['_PROCESSCONFIG_ENVSENTRY']._serialized_options = b'8\001'- _globals['_SIGNAL']._serialized_start=2224- _globals['_SIGNAL']._serialized_end=2296- _globals['_PTY']._serialized_start=65- _globals['_PTY']._serialized_end=157- _globals['_PTY_SIZE']._serialized_start=111- _globals['_PTY_SIZE']._serialized_end=157- _globals['_PROCESSCONFIG']._serialized_start=160- _globals['_PROCESSCONFIG']._serialized_end=355- _globals['_PROCESSCONFIG_ENVSENTRY']._serialized_start=292- _globals['_PROCESSCONFIG_ENVSENTRY']._serialized_end=347- _globals['_LISTREQUEST']._serialized_start=357- _globals['_LISTREQUEST']._serialized_end=370- _globals['_PROCESSINFO']._serialized_start=372- _globals['_PROCESSINFO']._serialized_end=482- _globals['_LISTRESPONSE']._serialized_start=484- _globals['_LISTRESPONSE']._serialized_end=550- _globals['_STARTREQUEST']._serialized_start=553- _globals['_STARTREQUEST']._serialized_end=732- _globals['_UPDATEREQUEST']._serialized_start=734- _globals['_UPDATEREQUEST']._serialized_end=846- _globals['_UPDATERESPONSE']._serialized_start=848- _globals['_UPDATERESPONSE']._serialized_end=864- _globals['_PROCESSEVENT']._serialized_start=867- _globals['_PROCESSEVENT']._serialized_end=1308- _globals['_PROCESSEVENT_STARTEVENT']._serialized_start=1048- _globals['_PROCESSEVENT_STARTEVENT']._serialized_end=1078- _globals['_PROCESSEVENT_DATAEVENT']._serialized_start=1080- _globals['_PROCESSEVENT_DATAEVENT']._serialized_end=1173- _globals['_PROCESSEVENT_ENDEVENT']._serialized_start=1175- _globals['_PROCESSEVENT_ENDEVENT']._serialized_end=1299- _globals['_STARTRESPONSE']._serialized_start=1310- _globals['_STARTRESPONSE']._serialized_end=1370- _globals['_CONNECTRESPONSE']._serialized_start=1372- _globals['_CONNECTRESPONSE']._serialized_end=1434- _globals['_SENDINPUTREQUEST']._serialized_start=1436- _globals['_SENDINPUTREQUEST']._serialized_end=1551- _globals['_SENDINPUTRESPONSE']._serialized_start=1553- _globals['_SENDINPUTRESPONSE']._serialized_end=1572- _globals['_PROCESSINPUT']._serialized_start=1574- _globals['_PROCESSINPUT']._serialized_end=1641- _globals['_STREAMINPUTREQUEST']._serialized_start=1644- _globals['_STREAMINPUTREQUEST']._serialized_end=1922- _globals['_STREAMINPUTREQUEST_STARTEVENT']._serialized_start=1791- _globals['_STREAMINPUTREQUEST_STARTEVENT']._serialized_end=1855- _globals['_STREAMINPUTREQUEST_DATAEVENT']._serialized_start=1857- _globals['_STREAMINPUTREQUEST_DATAEVENT']._serialized_end=1913- _globals['_STREAMINPUTRESPONSE']._serialized_start=1924- _globals['_STREAMINPUTRESPONSE']._serialized_end=1945- _globals['_SENDSIGNALREQUEST']._serialized_start=1947- _globals['_SENDSIGNALREQUEST']._serialized_end=2059- _globals['_SENDSIGNALRESPONSE']._serialized_start=2061- _globals['_SENDSIGNALRESPONSE']._serialized_end=2081- _globals['_CONNECTREQUEST']._serialized_start=2083- _globals['_CONNECTREQUEST']._serialized_end=2151- _globals['_PROCESSSELECTOR']._serialized_start=2153- _globals['_PROCESSSELECTOR']._serialized_end=2222- _globals['_PROCESS']._serialized_start=2299- _globals['_PROCESS']._serialized_end=2757+ _globals["DESCRIPTOR"]._loaded_options = None+ _globals[+ "DESCRIPTOR"+ ]._serialized_options = b"\n\013com.processB\014ProcessProtoP\001\242\002\003PXX\252\002\007Process\312\002\007Process\342\002\023Process\\GPBMetadata\352\002\007Process"+ _globals["_PROCESSCONFIG_ENVSENTRY"]._loaded_options = None+ _globals["_PROCESSCONFIG_ENVSENTRY"]._serialized_options = b"8\001"+ _globals["_SIGNAL"]._serialized_start = 2224+ _globals["_SIGNAL"]._serialized_end = 2296+ _globals["_PTY"]._serialized_start = 65+ _globals["_PTY"]._serialized_end = 157+ _globals["_PTY_SIZE"]._serialized_start = 111+ _globals["_PTY_SIZE"]._serialized_end = 157+ _globals["_PROCESSCONFIG"]._serialized_start = 160+ _globals["_PROCESSCONFIG"]._serialized_end = 355+ _globals["_PROCESSCONFIG_ENVSENTRY"]._serialized_start = 292+ _globals["_PROCESSCONFIG_ENVSENTRY"]._serialized_end = 347+ _globals["_LISTREQUEST"]._serialized_start = 357+ _globals["_LISTREQUEST"]._serialized_end = 370+ _globals["_PROCESSINFO"]._serialized_start = 372+ _globals["_PROCESSINFO"]._serialized_end = 482+ _globals["_LISTRESPONSE"]._serialized_start = 484+ _globals["_LISTRESPONSE"]._serialized_end = 550+ _globals["_STARTREQUEST"]._serialized_start = 553+ _globals["_STARTREQUEST"]._serialized_end = 732+ _globals["_UPDATEREQUEST"]._serialized_start = 734+ _globals["_UPDATEREQUEST"]._serialized_end = 846+ _globals["_UPDATERESPONSE"]._serialized_start = 848+ _globals["_UPDATERESPONSE"]._serialized_end = 864+ _globals["_PROCESSEVENT"]._serialized_start = 867+ _globals["_PROCESSEVENT"]._serialized_end = 1308+ _globals["_PROCESSEVENT_STARTEVENT"]._serialized_start = 1048+ _globals["_PROCESSEVENT_STARTEVENT"]._serialized_end = 1078+ _globals["_PROCESSEVENT_DATAEVENT"]._serialized_start = 1080+ _globals["_PROCESSEVENT_DATAEVENT"]._serialized_end = 1173+ _globals["_PROCESSEVENT_ENDEVENT"]._serialized_start = 1175+ _globals["_PROCESSEVENT_ENDEVENT"]._serialized_end = 1299+ _globals["_STARTRESPONSE"]._serialized_start = 1310+ _globals["_STARTRESPONSE"]._serialized_end = 1370+ _globals["_CONNECTRESPONSE"]._serialized_start = 1372+ _globals["_CONNECTRESPONSE"]._serialized_end = 1434+ _globals["_SENDINPUTREQUEST"]._serialized_start = 1436+ _globals["_SENDINPUTREQUEST"]._serialized_end = 1551+ _globals["_SENDINPUTRESPONSE"]._serialized_start = 1553+ _globals["_SENDINPUTRESPONSE"]._serialized_end = 1572+ _globals["_PROCESSINPUT"]._serialized_start = 1574+ _globals["_PROCESSINPUT"]._serialized_end = 1641+ _globals["_STREAMINPUTREQUEST"]._serialized_start = 1644+ _globals["_STREAMINPUTREQUEST"]._serialized_end = 1922+ _globals["_STREAMINPUTREQUEST_STARTEVENT"]._serialized_start = 1791+ _globals["_STREAMINPUTREQUEST_STARTEVENT"]._serialized_end = 1855+ _globals["_STREAMINPUTREQUEST_DATAEVENT"]._serialized_start = 1857+ _globals["_STREAMINPUTREQUEST_DATAEVENT"]._serialized_end = 1913+ _globals["_STREAMINPUTRESPONSE"]._serialized_start = 1924+ _globals["_STREAMINPUTRESPONSE"]._serialized_end = 1945+ _globals["_SENDSIGNALREQUEST"]._serialized_start = 1947+ _globals["_SENDSIGNALREQUEST"]._serialized_end = 2059+ _globals["_SENDSIGNALRESPONSE"]._serialized_start = 2061+ _globals["_SENDSIGNALRESPONSE"]._serialized_end = 2081+ _globals["_CONNECTREQUEST"]._serialized_start = 2083+ _globals["_CONNECTREQUEST"]._serialized_end = 2151+ _globals["_PROCESSSELECTOR"]._serialized_start = 2153+ _globals["_PROCESSSELECTOR"]._serialized_end = 2222+ _globals["_PROCESS"]._serialized_start = 2299+ _globals["_PROCESS"]._serialized_end = 2757# @@protoc_insertion_point(module_scope)diff --git a/packages/python-sdk/e2b/envd/process/process_pb2.pyi b/packages/python-sdk/e2b/envd/process/process_pb2.pyiindex f7ce0a5ae..ccc8b0667 100644--- a/packages/python-sdk/e2b/envd/process/process_pb2.pyi+++ b/packages/python-sdk/e2b/envd/process/process_pb2.pyi@@ -3,7 +3,13 @@ from google.protobuf.internal import containers as _containersfrom google.protobuf.internal import enum_type_wrapper as _enum_type_wrapperfrom google.protobuf import descriptor as _descriptorfrom google.protobuf import message as _message-from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union+from typing import (+ ClassVar as _ClassVar,+ Iterable as _Iterable,+ Mapping as _Mapping,+ Optional as _Optional,+ Union as _Union,+)DESCRIPTOR: _descriptor.FileDescriptor@@ -12,32 +18,39 @@ class Signal(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):SIGNAL_UNSPECIFIED: _ClassVar[Signal]SIGNAL_SIGTERM: _ClassVar[Signal]SIGNAL_SIGKILL: _ClassVar[Signal]+SIGNAL_UNSPECIFIED: SignalSIGNAL_SIGTERM: SignalSIGNAL_SIGKILL: Signalclass PTY(_message.Message):__slots__ = ("size",)+class Size(_message.Message):__slots__ = ("cols", "rows")COLS_FIELD_NUMBER: _ClassVar[int]ROWS_FIELD_NUMBER: _ClassVar[int]cols: introws: int- def __init__(self, cols: _Optional[int] = ..., rows: _Optional[int] = ...) -> None: ...+ def __init__(+ self, cols: _Optional[int] = ..., rows: _Optional[int] = ...+ ) -> None: ...SIZE_FIELD_NUMBER: _ClassVar[int]size: PTY.Sizedef __init__(self, size: _Optional[_Union[PTY.Size, _Mapping]] = ...) -> None: ...class ProcessConfig(_message.Message):__slots__ = ("cmd", "args", "envs", "cwd")+class EnvsEntry(_message.Message):__slots__ = ("key", "value")KEY_FIELD_NUMBER: _ClassVar[int]VALUE_FIELD_NUMBER: _ClassVar[int]key: strvalue: str- def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ...+ def __init__(+ self, key: _Optional[str] = ..., value: _Optional[str] = ...+ ) -> None: ...CMD_FIELD_NUMBER: _ClassVar[int]ARGS_FIELD_NUMBER: _ClassVar[int]ENVS_FIELD_NUMBER: _ClassVar[int]@@ -46,7 +59,13 @@ class ProcessConfig(_message.Message):args: _containers.RepeatedScalarFieldContainer[str]envs: _containers.ScalarMap[str, str]cwd: str- def __init__(self, cmd: _Optional[str] = ..., args: _Optional[_Iterable[str]] = ..., envs: _Optional[_Mapping[str, str]] = ..., cwd: _Optional[str] = ...) -> None: ...+ def __init__(+ self,+ cmd: _Optional[str] = ...,+ args: _Optional[_Iterable[str]] = ...,+ envs: _Optional[_Mapping[str, str]] = ...,+ cwd: _Optional[str] = ...,+ ) -> None: ...class ListRequest(_message.Message):__slots__ = ()@@ -60,13 +79,20 @@ class ProcessInfo(_message.Message):config: ProcessConfigpid: inttag: str- def __init__(self, config: _Optional[_Union[ProcessConfig, _Mapping]] = ..., pid: _Optional[int] = ..., tag: _Optional[str] = ...) -> None: ...+ def __init__(+ self,+ config: _Optional[_Union[ProcessConfig, _Mapping]] = ...,+ pid: _Optional[int] = ...,+ tag: _Optional[str] = ...,+ ) -> None: ...class ListResponse(_message.Message):__slots__ = ("processes",)PROCESSES_FIELD_NUMBER: _ClassVar[int]processes: _containers.RepeatedCompositeFieldContainer[ProcessInfo]- def __init__(self, processes: _Optional[_Iterable[_Union[ProcessInfo, _Mapping]]] = ...) -> None: ...+ def __init__(+ self, processes: _Optional[_Iterable[_Union[ProcessInfo, _Mapping]]] = ...+ ) -> None: ...class StartRequest(_message.Message):__slots__ = ("process", "pty", "tag", "user")@@ -78,7 +104,13 @@ class StartRequest(_message.Message):pty: PTYtag: struser: _permissions_pb2.User- def __init__(self, process: _Optional[_Union[ProcessConfig, _Mapping]] = ..., pty: _Optional[_Union[PTY, _Mapping]] = ..., tag: _Optional[str] = ..., user: _Optional[_Union[_permissions_pb2.User, _Mapping]] = ...) -> None: ...+ def __init__(+ self,+ process: _Optional[_Union[ProcessConfig, _Mapping]] = ...,+ pty: _Optional[_Union[PTY, _Mapping]] = ...,+ tag: _Optional[str] = ...,+ user: _Optional[_Union[_permissions_pb2.User, _Mapping]] = ...,+ ) -> None: ...class UpdateRequest(_message.Message):__slots__ = ("process", "pty")@@ -86,7 +118,11 @@ class UpdateRequest(_message.Message):PTY_FIELD_NUMBER: _ClassVar[int]process: ProcessSelectorpty: PTY- def __init__(self, process: _Optional[_Union[ProcessSelector, _Mapping]] = ..., pty: _Optional[_Union[PTY, _Mapping]] = ...) -> None: ...+ def __init__(+ self,+ process: _Optional[_Union[ProcessSelector, _Mapping]] = ...,+ pty: _Optional[_Union[PTY, _Mapping]] = ...,+ ) -> None: ...class UpdateResponse(_message.Message):__slots__ = ()@@ -94,11 +130,13 @@ class UpdateResponse(_message.Message):class ProcessEvent(_message.Message):__slots__ = ("start", "data", "end")+class StartEvent(_message.Message):__slots__ = ("pid",)PID_FIELD_NUMBER: _ClassVar[int]pid: intdef __init__(self, pid: _Optional[int] = ...) -> None: ...+class DataEvent(_message.Message):__slots__ = ("stdout", "stderr", "pty")STDOUT_FIELD_NUMBER: _ClassVar[int]@@ -107,7 +145,13 @@ class ProcessEvent(_message.Message):stdout: bytesstderr: bytespty: bytes- def __init__(self, stdout: _Optional[bytes] = ..., stderr: _Optional[bytes] = ..., pty: _Optional[bytes] = ...) -> None: ...+ def __init__(+ self,+ stdout: _Optional[bytes] = ...,+ stderr: _Optional[bytes] = ...,+ pty: _Optional[bytes] = ...,+ ) -> None: ...+class EndEvent(_message.Message):__slots__ = ("exit_code", "exited", "status", "error")EXIT_CODE_FIELD_NUMBER: _ClassVar[int]@@ -118,26 +162,41 @@ class ProcessEvent(_message.Message):exited: boolstatus: strerror: str- def __init__(self, exit_code: _Optional[int] = ..., exited: bool = ..., status: _Optional[str] = ..., error: _Optional[str] = ...) -> None: ...+ def __init__(+ self,+ exit_code: _Optional[int] = ...,+ exited: bool = ...,+ status: _Optional[str] = ...,+ error: _Optional[str] = ...,+ ) -> None: ...START_FIELD_NUMBER: _ClassVar[int]DATA_FIELD_NUMBER: _ClassVar[int]END_FIELD_NUMBER: _ClassVar[int]start: ProcessEvent.StartEventdata: ProcessEvent.DataEventend: ProcessEvent.EndEvent- def __init__(self, start: _Optional[_Union[ProcessEvent.StartEvent, _Mapping]] = ..., data: _Optional[_Union[ProcessEvent.DataEvent, _Mapping]] = ..., end: _Optional[_Union[ProcessEvent.EndEvent, _Mapping]] = ...) -> None: ...+ def __init__(+ self,+ start: _Optional[_Union[ProcessEvent.StartEvent, _Mapping]] = ...,+ data: _Optional[_Union[ProcessEvent.DataEvent, _Mapping]] = ...,+ end: _Optional[_Union[ProcessEvent.EndEvent, _Mapping]] = ...,+ ) -> None: ...class StartResponse(_message.Message):__slots__ = ("event",)EVENT_FIELD_NUMBER: _ClassVar[int]event: ProcessEvent- def __init__(self, event: _Optional[_Union[ProcessEvent, _Mapping]] = ...) -> None: ...+ def __init__(+ self, event: _Optional[_Union[ProcessEvent, _Mapping]] = ...+ ) -> None: ...class ConnectResponse(_message.Message):__slots__ = ("event",)EVENT_FIELD_NUMBER: _ClassVar[int]event: ProcessEvent- def __init__(self, event: _Optional[_Union[ProcessEvent, _Mapping]] = ...) -> None: ...+ def __init__(+ self, event: _Optional[_Union[ProcessEvent, _Mapping]] = ...+ ) -> None: ...class SendInputRequest(_message.Message):__slots__ = ("process", "input")@@ -145,7 +204,11 @@ class SendInputRequest(_message.Message):INPUT_FIELD_NUMBER: _ClassVar[int]process: ProcessSelectorinput: ProcessInput- def __init__(self, process: _Optional[_Union[ProcessSelector, _Mapping]] = ..., input: _Optional[_Union[ProcessInput, _Mapping]] = ...) -> None: ...+ def __init__(+ self,+ process: _Optional[_Union[ProcessSelector, _Mapping]] = ...,+ input: _Optional[_Union[ProcessInput, _Mapping]] = ...,+ ) -> None: ...class SendInputResponse(_message.Message):__slots__ = ()@@ -157,25 +220,37 @@ class ProcessInput(_message.Message):PTY_FIELD_NUMBER: _ClassVar[int]stdin: bytespty: bytes- def __init__(self, stdin: _Optional[bytes] = ..., pty: _Optional[bytes] = ...) -> None: ...+ def __init__(+ self, stdin: _Optional[bytes] = ..., pty: _Optional[bytes] = ...+ ) -> None: ...class StreamInputRequest(_message.Message):__slots__ = ("start", "data")+class StartEvent(_message.Message):__slots__ = ("process",)PROCESS_FIELD_NUMBER: _ClassVar[int]process: ProcessSelector- def __init__(self, process: _Optional[_Union[ProcessSelector, _Mapping]] = ...) -> None: ...+ def __init__(+ self, process: _Optional[_Union[ProcessSelector, _Mapping]] = ...+ ) -> None: ...+class DataEvent(_message.Message):__slots__ = ("input",)INPUT_FIELD_NUMBER: _ClassVar[int]input: ProcessInput- def __init__(self, input: _Optional[_Union[ProcessInput, _Mapping]] = ...) -> None: ...+ def __init__(+ self, input: _Optional[_Union[ProcessInput, _Mapping]] = ...+ ) -> None: ...START_FIELD_NUMBER: _ClassVar[int]DATA_FIELD_NUMBER: _ClassVar[int]start: StreamInputRequest.StartEventdata: StreamInputRequest.DataEvent- def __init__(self, start: _Optional[_Union[StreamInputRequest.StartEvent, _Mapping]] = ..., data: _Optional[_Union[StreamInputRequest.DataEvent, _Mapping]] = ...) -> None: ...+ def __init__(+ self,+ start: _Optional[_Union[StreamInputRequest.StartEvent, _Mapping]] = ...,+ data: _Optional[_Union[StreamInputRequest.DataEvent, _Mapping]] = ...,+ ) -> None: ...class StreamInputResponse(_message.Message):__slots__ = ()@@ -187,7 +262,11 @@ class SendSignalRequest(_message.Message):SIGNAL_FIELD_NUMBER: _ClassVar[int]process: ProcessSelectorsignal: Signal- def __init__(self, process: _Optional[_Union[ProcessSelector, _Mapping]] = ..., signal: _Optional[_Union[Signal, str]] = ...) -> None: ...+ def __init__(+ self,+ process: _Optional[_Union[ProcessSelector, _Mapping]] = ...,+ signal: _Optional[_Union[Signal, str]] = ...,+ ) -> None: ...class SendSignalResponse(_message.Message):__slots__ = ()@@ -197,7 +276,9 @@ class ConnectRequest(_message.Message):__slots__ = ("process",)PROCESS_FIELD_NUMBER: _ClassVar[int]process: ProcessSelector- def __init__(self, process: _Optional[_Union[ProcessSelector, _Mapping]] = ...) -> None: ...+ def __init__(+ self, process: _Optional[_Union[ProcessSelector, _Mapping]] = ...+ ) -> None: ...class ProcessSelector(_message.Message):__slots__ = ("pid", "tag")@@ -205,4 +286,6 @@ class ProcessSelector(_message.Message):TAG_FIELD_NUMBER: _ClassVar[int]pid: inttag: str- def __init__(self, pid: _Optional[int] = ..., tag: _Optional[str] = ...) -> None: ...+ def __init__(+ self, pid: _Optional[int] = ..., tag: _Optional[str] = ...+ ) -> None: ...diff --git a/packages/python-sdk/e2b/envd/v1/__init__.py b/packages/python-sdk/e2b/envd/v1/__init__.pydeleted file mode 100644index e69de29bb..000000000diff --git a/packages/python-sdk/e2b/envd/v1/client/__init__.py b/packages/python-sdk/e2b/envd/v1/client/__init__.pydeleted file mode 100644index f25315725..000000000--- a/packages/python-sdk/e2b/envd/v1/client/__init__.py+++ /dev/null@@ -1,34 +0,0 @@-# coding: utf-8--# flake8: noqa--"""- envd-- API for managing files' content and controlling envd-- The version of the OpenAPI document: 0.1.0- Generated by OpenAPI Generator (https://openapi-generator.tech)-- Do not edit the class manually.-""" # noqa: E501---__version__ = "1.0.0"--# import apis into sdk package-from e2b.envd.v1.client.api.files_api import FilesApi--# import ApiClient-from e2b.envd.v1.client.api_response import ApiResponse-from e2b.envd.v1.client.api_client import ApiClient-from e2b.envd.v1.client.configuration import Configuration-from e2b.envd.v1.client.exceptions import OpenApiException-from e2b.envd.v1.client.exceptions import ApiTypeError-from e2b.envd.v1.client.exceptions import ApiValueError-from e2b.envd.v1.client.exceptions import ApiKeyError-from e2b.envd.v1.client.exceptions import ApiAttributeError-from e2b.envd.v1.client.exceptions import ApiException--# import models into sdk package-from e2b.envd.v1.client.models.error import Errordiff --git a/packages/python-sdk/e2b/envd/v1/client/api/__init__.py b/packages/python-sdk/e2b/envd/v1/client/api/__init__.pydeleted file mode 100644index 8a52ee4be..000000000--- a/packages/python-sdk/e2b/envd/v1/client/api/__init__.py+++ /dev/null@@ -1,4 +0,0 @@-# flake8: noqa--# import apis into api package-from e2b.envd.v1.client.api.files_api import FilesApidiff --git a/packages/python-sdk/e2b/envd/v1/client/api/files_api.py b/packages/python-sdk/e2b/envd/v1/client/api/files_api.pydeleted file mode 100644index 1dcf97c8f..000000000--- a/packages/python-sdk/e2b/envd/v1/client/api/files_api.py+++ /dev/null@@ -1,424 +0,0 @@-# coding: utf-8--"""- envd-- API for managing files' content and controlling envd-- The version of the OpenAPI document: 0.1.0- Generated by OpenAPI Generator (https://openapi-generator.tech)-- Do not edit the class manually.-""" # noqa: E501---import re # noqa: F401-import io-import warnings--from pydantic import validate_arguments, ValidationError--from typing_extensions import Annotated-from pydantic import Field, StrictStr, constr, validator--from typing import Union--from e2b.envd.v1.client.models.files_path_put_request import FilesPathPutRequest--from e2b.envd.v1.client.api_client import ApiClient-from e2b.envd.v1.client.api_response import ApiResponse-from e2b.envd.v1.client.exceptions import ApiTypeError, ApiValueError # noqa: F401---class FilesApi:- """NOTE: This class is auto generated by OpenAPI Generator- Ref: https://openapi-generator.tech-- Do not edit the class manually.- """-- def __init__(self, api_client=None) -> None:- if api_client is None:- api_client = ApiClient.get_default()- self.api_client = api_client-- @validate_arguments- def files_path_get(- self,- path: Annotated[- StrictStr,- Field(- ...,- description="Path to the file, URL encoded. Can be relative to user's home directory.",- ),- ],- username: Annotated[- constr(strict=True),- Field(- ...,- description="User used for setting the owner, or resolving relative paths.",- ),- ],- **kwargs- ) -> bytearray: # noqa: E501- """Download a file # noqa: E501-- This method makes a synchronous HTTP request by default. To make an- asynchronous HTTP request, please pass async_req=True-- >>> thread = api.files_path_get(path, username, async_req=True)- >>> result = thread.get()-- :param path: Path to the file, URL encoded. Can be relative to user's home directory. (required)- :type path: str- :param username: User used for setting the owner, or resolving relative paths. (required)- :type username: str- :param async_req: Whether to execute the request asynchronously.- :type async_req: bool, optional- :param _request_timeout: timeout setting for this request.- If one number provided, it will be total request- timeout. It can also be a pair (tuple) of- (connection, read) timeouts.- :return: Returns the result object.- If the method is called asynchronously,- returns the request thread.- :rtype: bytearray- """- kwargs["_return_http_data_only"] = True- if "_preload_content" in kwargs:- message = "Error! Please call the files_path_get_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501- raise ValueError(message)- return self.files_path_get_with_http_info(- path, username, **kwargs- ) # noqa: E501-- @validate_arguments- def files_path_get_with_http_info(- self,- path: Annotated[- StrictStr,- Field(- ...,- description="Path to the file, URL encoded. Can be relative to user's home directory.",- ),- ],- username: Annotated[- constr(strict=True),- Field(- ...,- description="User used for setting the owner, or resolving relative paths.",- ),- ],- **kwargs- ) -> ApiResponse: # noqa: E501- """Download a file # noqa: E501-- This method makes a synchronous HTTP request by default. To make an- asynchronous HTTP request, please pass async_req=True-- >>> thread = api.files_path_get_with_http_info(path, username, async_req=True)- >>> result = thread.get()-- :param path: Path to the file, URL encoded. Can be relative to user's home directory. (required)- :type path: str- :param username: User used for setting the owner, or resolving relative paths. (required)- :type username: str- :param async_req: Whether to execute the request asynchronously.- :type async_req: bool, optional- :param _preload_content: if False, the ApiResponse.data will- be set to none and raw_data will store the- HTTP response body without reading/decoding.- Default is True.- :type _preload_content: bool, optional- :param _return_http_data_only: response data instead of ApiResponse- object with status code, headers, etc- :type _return_http_data_only: bool, optional- :param _request_timeout: timeout setting for this request. If one- number provided, it will be total request- timeout. It can also be a pair (tuple) of- (connection, read) timeouts.- :param _request_auth: set to override the auth_settings for an a single- request; this effectively ignores the authentication- in the spec for a single request.- :type _request_auth: dict, optional- :type _content_type: string, optional: force content-type for the request- :return: Returns the result object.- If the method is called asynchronously,- returns the request thread.- :rtype: tuple(bytearray, status_code(int), headers(HTTPHeaderDict))- """-- _params = locals()-- _all_params = ["path", "username"]- _all_params.extend(- [- "async_req",- "_return_http_data_only",- "_preload_content",- "_request_timeout",- "_request_auth",- "_content_type",- "_headers",- ]- )-- # validate the arguments- for _key, _val in _params["kwargs"].items():- if _key not in _all_params:- raise ApiTypeError(- "Got an unexpected keyword argument '%s'"- " to method files_path_get" % _key- )- _params[_key] = _val- del _params["kwargs"]-- _collection_formats = {}-- # process the path parameters- _path_params = {}- if _params["path"] is not None:- _path_params["path"] = _params["path"]-- # process the query parameters- _query_params = []- if _params.get("username") is not None: # noqa: E501- _query_params.append(("username", _params["username"]))-- # process the header parameters- _header_params = dict(_params.get("_headers", {}))- # process the form parameters- _form_params = []- _files = {}- # process the body parameter- _body_params = None- # set the HTTP header `Accept`- _header_params["Accept"] = self.api_client.select_header_accept(- ["application/octet-stream", "application/json"]- ) # noqa: E501-- # authentication setting- _auth_settings = [] # noqa: E501-- _response_types_map = {- "200": "bytearray",- "400": "Error",- "403": "Error",- "404": "Error",- "500": "Error",- }-- return self.api_client.call_api(- "/files/{path}",- "GET",- _path_params,- _query_params,- _header_params,- body=_body_params,- post_params=_form_params,- files=_files,- response_types_map=_response_types_map,- auth_settings=_auth_settings,- async_req=_params.get("async_req"),- _return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501- _preload_content=_params.get("_preload_content", True),- _request_timeout=_params.get("_request_timeout"),- collection_formats=_collection_formats,- _request_auth=_params.get("_request_auth"),- )-- @validate_arguments- def files_path_put(- self,- path: Annotated[- StrictStr,- Field(- ...,- description="Path to the file, URL encoded. Can be relative to user's home directory.",- ),- ],- username: Annotated[- constr(strict=True),- Field(- ...,- description="User used for setting the owner, or resolving relative paths.",- ),- ],- files_path_put_request: FilesPathPutRequest,- **kwargs- ) -> None: # noqa: E501- """Upload a file and ensure the parent directories exist. If the file exists, it will be overwritten. # noqa: E501-- This method makes a synchronous HTTP request by default. To make an- asynchronous HTTP request, please pass async_req=True-- >>> thread = api.files_path_put(path, username, files_path_put_request, async_req=True)- >>> result = thread.get()-- :param path: Path to the file, URL encoded. Can be relative to user's home directory. (required)- :type path: str- :param username: User used for setting the owner, or resolving relative paths. (required)- :type username: str- :param files_path_put_request: (required)- :type files_path_put_request: FilesPathPutRequest- :param async_req: Whether to execute the request asynchronously.- :type async_req: bool, optional- :param _request_timeout: timeout setting for this request.- If one number provided, it will be total request- timeout. It can also be a pair (tuple) of- (connection, read) timeouts.- :return: Returns the result object.- If the method is called asynchronously,- returns the request thread.- :rtype: None- """- kwargs["_return_http_data_only"] = True- if "_preload_content" in kwargs:- message = "Error! Please call the files_path_put_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501- raise ValueError(message)- return self.files_path_put_with_http_info(- path, username, files_path_put_request, **kwargs- ) # noqa: E501-- @validate_arguments- def files_path_put_with_http_info(- self,- path: Annotated[- StrictStr,- Field(- ...,- description="Path to the file, URL encoded. Can be relative to user's home directory.",- ),- ],- username: Annotated[- constr(strict=True),- Field(- ...,- description="User used for setting the owner, or resolving relative paths.",- ),- ],- files_path_put_request: FilesPathPutRequest,- **kwargs- ) -> ApiResponse: # noqa: E501- """Upload a file and ensure the parent directories exist. If the file exists, it will be overwritten. # noqa: E501-- This method makes a synchronous HTTP request by default. To make an- asynchronous HTTP request, please pass async_req=True-- >>> thread = api.files_path_put_with_http_info(path, username, files_path_put_request, async_req=True)- >>> result = thread.get()-- :param path: Path to the file, URL encoded. Can be relative to user's home directory. (required)- :type path: str- :param username: User used for setting the owner, or resolving relative paths. (required)- :type username: str- :param files_path_put_request: (required)- :type files_path_put_request: FilesPathPutRequest- :param async_req: Whether to execute the request asynchronously.- :type async_req: bool, optional- :param _preload_content: if False, the ApiResponse.data will- be set to none and raw_data will store the- HTTP response body without reading/decoding.- Default is True.- :type _preload_content: bool, optional- :param _return_http_data_only: response data instead of ApiResponse- object with status code, headers, etc- :type _return_http_data_only: bool, optional- :param _request_timeout: timeout setting for this request. If one- number provided, it will be total request- timeout. It can also be a pair (tuple) of- (connection, read) timeouts.- :param _request_auth: set to override the auth_settings for an a single- request; this effectively ignores the authentication- in the spec for a single request.- :type _request_auth: dict, optional- :type _content_type: string, optional: force content-type for the request- :return: Returns the result object.- If the method is called asynchronously,- returns the request thread.- :rtype: None- """-- _params = locals()-- _all_params = ["path", "username", "files_path_put_request"]- _all_params.extend(- [- "async_req",- "_return_http_data_only",- "_preload_content",- "_request_timeout",- "_request_auth",- "_content_type",- "_headers",- ]- )-- # validate the arguments- for _key, _val in _params["kwargs"].items():- if _key not in _all_params:- raise ApiTypeError(- "Got an unexpected keyword argument '%s'"- " to method files_path_put" % _key- )- _params[_key] = _val- del _params["kwargs"]-- _collection_formats = {}-- # process the path parameters- _path_params = {}- if _params["path"] is not None:- _path_params["path"] = _params["path"]-- # process the query parameters- _query_params = []- if _params.get("username") is not None: # noqa: E501- _query_params.append(("username", _params["username"]))-- # process the header parameters- _header_params = dict(_params.get("_headers", {}))- # process the form parameters- _form_params = []- _files = {}- # process the body parameter- _body_params = None- if _params["files_path_put_request"] is not None:- _body_params = _params["files_path_put_request"]-- # set the HTTP header `Accept`- _header_params["Accept"] = self.api_client.select_header_accept(- ["application/json"]- ) # noqa: E501-- # set the HTTP header `Content-Type`- _content_types_list = _params.get(- "_content_type",- self.api_client.select_header_content_type(["multipart/form-data"]),- )- if _content_types_list:- _header_params["Content-Type"] = _content_types_list-- # authentication setting- _auth_settings = [] # noqa: E501-- _response_types_map = {}-- return self.api_client.call_api(- "/files/{path}",- "PUT",- _path_params,- _query_params,- _header_params,- body=_body_params,- post_params=_form_params,- files=_files,- response_types_map=_response_types_map,- auth_settings=_auth_settings,- async_req=_params.get("async_req"),- _return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501- _preload_content=_params.get("_preload_content", True),- _request_timeout=_params.get("_request_timeout"),- collection_formats=_collection_formats,- _request_auth=_params.get("_request_auth"),- )diff --git a/packages/python-sdk/e2b/envd/v1/client/api_client.py b/packages/python-sdk/e2b/envd/v1/client/api_client.pydeleted file mode 100644index 6f5811cff..000000000--- a/packages/python-sdk/e2b/envd/v1/client/api_client.py+++ /dev/null@@ -1,827 +0,0 @@-# coding: utf-8--"""- envd-- API for managing files' content and controlling envd-- The version of the OpenAPI document: 0.1.0- Generated by OpenAPI Generator (https://openapi-generator.tech)-- Do not edit the class manually.-""" # noqa: E501---import atexit-import datetime-from dateutil.parser import parse-import json-import mimetypes-from multiprocessing.pool import ThreadPool-import os-import re-import tempfile--from urllib.parse import quote--from e2b.envd.v1.client.configuration import Configuration-from e2b.envd.v1.client.api_response import ApiResponse-import e2b.envd.v1.client.models-from e2b.envd.v1.client import rest-from e2b.envd.v1.client.exceptions import ApiValueError, ApiException---class ApiClient:- """Generic API client for OpenAPI client library builds.-- OpenAPI generic API client. This client handles the client-- server communication, and is invariant across implementations. Specifics of- the methods and models for each application are generated from the OpenAPI- templates.-- :param configuration: .Configuration object for this client- :param header_name: a header to pass when making calls to the API.- :param header_value: a header value to pass when making calls to- the API.- :param cookie: a cookie to include in the header when making calls- to the API- :param pool_threads: The number of threads to use for async requests- to the API. More threads means more concurrent API requests.- """-- PRIMITIVE_TYPES = (float, bool, bytes, str, int)- NATIVE_TYPES_MAPPING = {- "int": int,- "long": int, # TODO remove as only py3 is supported?- "float": float,- "str": str,- "bool": bool,- "date": datetime.date,- "datetime": datetime.datetime,- "object": object,- }- _pool = None-- def __init__(- self,- configuration=None,- header_name=None,- header_value=None,- cookie=None,- pool_threads=1,- ) -> None:- # use default configuration if none is provided- if configuration is None:- configuration = Configuration.get_default()- self.configuration = configuration- self.pool_threads = pool_threads-- self.rest_client = rest.RESTClientObject(configuration)- self.default_headers = {}- if header_name is not None:- self.default_headers[header_name] = header_value- self.cookie = cookie- # Set default User-Agent.- self.user_agent = "OpenAPI-Generator/1.0.0/python"- self.client_side_validation = configuration.client_side_validation-- def __enter__(self):- return self-- def __exit__(self, exc_type, exc_value, traceback):- self.close()-- def close(self):- if self._pool:- self._pool.close()- self._pool.join()- self._pool = None- if hasattr(atexit, "unregister"):- atexit.unregister(self.close)-- @property- def pool(self):- """Create thread pool on first request- avoids instantiating unused threadpool for blocking clients.- """- if self._pool is None:- atexit.register(self.close)- self._pool = ThreadPool(self.pool_threads)- return self._pool-- @property- def user_agent(self):- """User agent for this API client"""- return self.default_headers["User-Agent"]-- @user_agent.setter- def user_agent(self, value):- self.default_headers["User-Agent"] = value-- def set_default_header(self, header_name, header_value):- self.default_headers[header_name] = header_value-- _default = None-- @classmethod- def get_default(cls):- """Return new instance of ApiClient.-- This method returns newly created, based on default constructor,- object of ApiClient class or returns a copy of default- ApiClient.-- :return: The ApiClient object.- """- if cls._default is None:- cls._default = ApiClient()- return cls._default-- @classmethod- def set_default(cls, default):- """Set default instance of ApiClient.-- It stores default ApiClient.-- :param default: object of ApiClient.- """- cls._default = default-- def __call_api(- self,- resource_path,- method,- path_params=None,- query_params=None,- header_params=None,- body=None,- post_params=None,- files=None,- response_types_map=None,- auth_settings=None,- _return_http_data_only=None,- collection_formats=None,- _preload_content=True,- _request_timeout=None,- _host=None,- _request_auth=None,- ):- config = self.configuration-- # header parameters- header_params = header_params or {}- header_params.update(self.default_headers)- if self.cookie:- header_params["Cookie"] = self.cookie- if header_params:- header_params = self.sanitize_for_serialization(header_params)- header_params = dict(- self.parameters_to_tuples(header_params, collection_formats)- )-- # path parameters- if path_params:- path_params = self.sanitize_for_serialization(path_params)- path_params = self.parameters_to_tuples(path_params, collection_formats)- for k, v in path_params:- # specified safe chars, encode everything- resource_path = resource_path.replace(- "{%s}" % k, quote(str(v), safe=config.safe_chars_for_path_param)- )-- # post parameters- if post_params or files:- post_params = post_params if post_params else []- post_params = self.sanitize_for_serialization(post_params)- post_params = self.parameters_to_tuples(post_params, collection_formats)- post_params.extend(self.files_parameters(files))-- # auth setting- self.update_params_for_auth(- header_params,- query_params,- auth_settings,- resource_path,- method,- body,- request_auth=_request_auth,- )-- # body- if body:- body = self.sanitize_for_serialization(body)-- # request url- if _host is None:- url = self.configuration.host + resource_path- else:- # use server/host defined in path or operation instead- url = _host + resource_path-- # query parameters- if query_params:- query_params = self.sanitize_for_serialization(query_params)- url_query = self.parameters_to_url_query(query_params, collection_formats)- url += "?" + url_query-- try:- # perform request and return response- response_data = self.request(- method,- url,- query_params=query_params,- headers=header_params,- post_params=post_params,- body=body,- _preload_content=_preload_content,- _request_timeout=_request_timeout,- )- except ApiException as e:- if e.body:- e.body = e.body.decode("utf-8")- raise e-- self.last_response = response_data-- return_data = None # assuming deserialization is not needed- # data needs deserialization or returns HTTP data (deserialized) only- if _preload_content or _return_http_data_only:- response_type = response_types_map.get(str(response_data.status), None)- if (- not response_type- and isinstance(response_data.status, int)- and 100 <= response_data.status <= 599- ):- # if not found, look for '1XX', '2XX', etc.- response_type = response_types_map.get(- str(response_data.status)[0] + "XX", None- )-- if response_type == "bytearray":- response_data.data = response_data.data- else:- match = None- content_type = response_data.getheader("content-type")- if content_type is not None:- match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type)- encoding = match.group(1) if match else "utf-8"- response_data.data = response_data.data.decode(encoding)-- # deserialize response data- if response_type == "bytearray":- return_data = response_data.data- elif response_type:- return_data = self.deserialize(response_data, response_type)- else:- return_data = None-- if _return_http_data_only:- return return_data- else:- return ApiResponse(- status_code=response_data.status,- data=return_data,- headers=response_data.getheaders(),- raw_data=response_data.data,- )-- def sanitize_for_serialization(self, obj):- """Builds a JSON POST object.-- If obj is None, return None.- If obj is str, int, long, float, bool, return directly.- If obj is datetime.datetime, datetime.date- convert to string in iso8601 format.- If obj is list, sanitize each element in the list.- If obj is dict, return the dict.- If obj is OpenAPI model, return the properties dict.-- :param obj: The data to serialize.- :return: The serialized form of data.- """- if obj is None:- return None- elif isinstance(obj, self.PRIMITIVE_TYPES):- return obj- elif isinstance(obj, list):- return [self.sanitize_for_serialization(sub_obj) for sub_obj in obj]- elif isinstance(obj, tuple):- return tuple(self.sanitize_for_serialization(sub_obj) for sub_obj in obj)- elif isinstance(obj, (datetime.datetime, datetime.date)):- return obj.isoformat()-- if isinstance(obj, dict):- obj_dict = obj- else:- # Convert model obj to dict except- # attributes `openapi_types`, `attribute_map`- # and attributes which value is not None.- # Convert attribute name to json key in- # model definition for request.- obj_dict = obj.to_dict()-- return {- key: self.sanitize_for_serialization(val) for key, val in obj_dict.items()- }-- def deserialize(self, response, response_type):- """Deserializes response into an object.-- :param response: RESTResponse object to be deserialized.- :param response_type: class literal for- deserialized object, or string of class name.-- :return: deserialized object.- """- # handle file downloading- # save response body into a tmp file and return the instance- if response_type == "file":- return self.__deserialize_file(response)-- # fetch data from response object- try:- data = json.loads(response.data)- except ValueError:- data = response.data-- return self.__deserialize(data, response_type)-- def __deserialize(self, data, klass):- """Deserializes dict, list, str into an object.-- :param data: dict, list or str.- :param klass: class literal, or string of class name.-- :return: object.- """- if data is None:- return None-- if isinstance(klass, str):- if klass.startswith("List["):- sub_kls = re.match(r"List\[(.*)]", klass).group(1)- return [self.__deserialize(sub_data, sub_kls) for sub_data in data]-- if klass.startswith("Dict["):- sub_kls = re.match(r"Dict\[([^,]*), (.*)]", klass).group(2)- return {k: self.__deserialize(v, sub_kls) for k, v in data.items()}-- # convert str to class- if klass in self.NATIVE_TYPES_MAPPING:- klass = self.NATIVE_TYPES_MAPPING[klass]- else:- klass = getattr(e2b.envd.v1.client.models, klass)-- if klass in self.PRIMITIVE_TYPES:- return self.__deserialize_primitive(data, klass)- elif klass == object:- return self.__deserialize_object(data)- elif klass == datetime.date:- return self.__deserialize_date(data)- elif klass == datetime.datetime:- return self.__deserialize_datetime(data)- else:- return self.__deserialize_model(data, klass)-- def call_api(- self,- resource_path,- method,- path_params=None,- query_params=None,- header_params=None,- body=None,- post_params=None,- files=None,- response_types_map=None,- auth_settings=None,- async_req=None,- _return_http_data_only=None,- collection_formats=None,- _preload_content=True,- _request_timeout=None,- _host=None,- _request_auth=None,- ):- """Makes the HTTP request (synchronous) and returns deserialized data.-- To make an async_req request, set the async_req parameter.-- :param resource_path: Path to method endpoint.- :param method: Method to call.- :param path_params: Path parameters in the url.- :param query_params: Query parameters in the url.- :param header_params: Header parameters to be- placed in the request header.- :param body: Request body.- :param post_params dict: Request post form parameters,- for `application/x-www-form-urlencoded`, `multipart/form-data`.- :param auth_settings list: Auth Settings names for the request.- :param response: Response data type.- :param files dict: key -> filename, value -> filepath,- for `multipart/form-data`.- :param async_req bool: execute request asynchronously- :param _return_http_data_only: response data instead of ApiResponse- object with status code, headers, etc- :param _preload_content: if False, the ApiResponse.data will- be set to none and raw_data will store the- HTTP response body without reading/decoding.- Default is True.- :param collection_formats: dict of collection formats for path, query,- header, and post parameters.- :param _request_timeout: timeout setting for this request. If one- number provided, it will be total request- timeout. It can also be a pair (tuple) of- (connection, read) timeouts.- :param _request_auth: set to override the auth_settings for an a single- request; this effectively ignores the authentication- in the spec for a single request.- :type _request_token: dict, optional- :return:- If async_req parameter is True,- the request will be called asynchronously.- The method will return the request thread.- If parameter async_req is False or missing,- then the method will return the response directly.- """- args = (- resource_path,- method,- path_params,- query_params,- header_params,- body,- post_params,- files,- response_types_map,- auth_settings,- _return_http_data_only,- collection_formats,- _preload_content,- _request_timeout,- _host,- _request_auth,- )- if not async_req:- return self.__call_api(*args)-- return self.pool.apply_async(self.__call_api, args)-- def request(- self,- method,- url,- query_params=None,- headers=None,- post_params=None,- body=None,- _preload_content=True,- _request_timeout=None,- ):- """Makes the HTTP request using RESTClient."""- if method == "GET":- return self.rest_client.get_request(- url,- query_params=query_params,- _preload_content=_preload_content,- _request_timeout=_request_timeout,- headers=headers,- )- elif method == "HEAD":- return self.rest_client.head_request(- url,- query_params=query_params,- _preload_content=_preload_content,- _request_timeout=_request_timeout,- headers=headers,- )- elif method == "OPTIONS":- return self.rest_client.options_request(- url,- query_params=query_params,- headers=headers,- _preload_content=_preload_content,- _request_timeout=_request_timeout,- )- elif method == "POST":- return self.rest_client.post_request(- url,- query_params=query_params,- headers=headers,- post_params=post_params,- _preload_content=_preload_content,- _request_timeout=_request_timeout,- body=body,- )- elif method == "PUT":- return self.rest_client.put_request(- url,- query_params=query_params,- headers=headers,- post_params=post_params,- _preload_content=_preload_content,- _request_timeout=_request_timeout,- body=body,- )- elif method == "PATCH":- return self.rest_client.patch_request(- url,- query_params=query_params,- headers=headers,- post_params=post_params,- _preload_content=_preload_content,- _request_timeout=_request_timeout,- body=body,- )- elif method == "DELETE":- return self.rest_client.delete_request(- url,- query_params=query_params,- headers=headers,- _preload_content=_preload_content,- _request_timeout=_request_timeout,- body=body,- )- else:- raise ApiValueError(- "http method must be `GET`, `HEAD`, `OPTIONS`,"- " `POST`, `PATCH`, `PUT` or `DELETE`."- )-- def parameters_to_tuples(self, params, collection_formats):- """Get parameters as list of tuples, formatting collections.-- :param params: Parameters as dict or list of two-tuples- :param dict collection_formats: Parameter collection formats- :return: Parameters as list of tuples, collections formatted- """- new_params = []- if collection_formats is None:- collection_formats = {}- for k, v in (- params.items() if isinstance(params, dict) else params- ): # noqa: E501- if k in collection_formats:- collection_format = collection_formats[k]- if collection_format == "multi":- new_params.extend((k, value) for value in v)- else:- if collection_format == "ssv":- delimiter = " "- elif collection_format == "tsv":- delimiter = "\t"- elif collection_format == "pipes":- delimiter = "|"- else: # csv is the default- delimiter = ","- new_params.append((k, delimiter.join(str(value) for value in v)))- else:- new_params.append((k, v))- return new_params-- def parameters_to_url_query(self, params, collection_formats):- """Get parameters as list of tuples, formatting collections.-- :param params: Parameters as dict or list of two-tuples- :param dict collection_formats: Parameter collection formats- :return: URL query string (e.g. a=Hello%20World&b=123)- """- new_params = []- if collection_formats is None:- collection_formats = {}- for k, v in (- params.items() if isinstance(params, dict) else params- ): # noqa: E501- if isinstance(v, bool):- v = str(v).lower()- if isinstance(v, (int, float)):- v = str(v)- if isinstance(v, dict):- v = json.dumps(v)-- if k in collection_formats:- collection_format = collection_formats[k]- if collection_format == "multi":- new_params.extend((k, value) for value in v)- else:- if collection_format == "ssv":- delimiter = " "- elif collection_format == "tsv":- delimiter = "\t"- elif collection_format == "pipes":- delimiter = "|"- else: # csv is the default- delimiter = ","- new_params.append(- (k, delimiter.join(quote(str(value)) for value in v))- )- else:- new_params.append((k, quote(str(v))))-- return "&".join(["=".join(item) for item in new_params])-- def files_parameters(self, files=None):- """Builds form parameters.-- :param files: File parameters.- :return: Form parameters with files.- """- params = []-- if files:- for k, v in files.items():- if not v:- continue- file_names = v if type(v) is list else [v]- for n in file_names:- with open(n, "rb") as f:- filename = os.path.basename(f.name)- filedata = f.read()- mimetype = (- mimetypes.guess_type(filename)[0]- or "application/octet-stream"- )- params.append(tuple([k, tuple([filename, filedata, mimetype])]))-- return params-- def select_header_accept(self, accepts):- """Returns `Accept` based on an array of accepts provided.-- :param accepts: List of headers.- :return: Accept (e.g. application/json).- """- if not accepts:- return-- for accept in accepts:- if re.search("json", accept, re.IGNORECASE):- return accept-- return accepts[0]-- def select_header_content_type(self, content_types):- """Returns `Content-Type` based on an array of content_types provided.-- :param content_types: List of content-types.- :return: Content-Type (e.g. application/json).- """- if not content_types:- return None-- for content_type in content_types:- if re.search("json", content_type, re.IGNORECASE):- return content_type-- return content_types[0]-- def update_params_for_auth(- self,- headers,- queries,- auth_settings,- resource_path,- method,- body,- request_auth=None,- ):- """Updates header and query params based on authentication setting.-- :param headers: Header parameters dict to be updated.- :param queries: Query parameters tuple list to be updated.- :param auth_settings: Authentication setting identifiers list.- :resource_path: A string representation of the HTTP request resource path.- :method: A string representation of the HTTP request method.- :body: A object representing the body of the HTTP request.- The object type is the return value of sanitize_for_serialization().- :param request_auth: if set, the provided settings will- override the token in the configuration.- """- if not auth_settings:- return-- if request_auth:- self._apply_auth_params(- headers, queries, resource_path, method, body, request_auth- )- return-- for auth in auth_settings:- auth_setting = self.configuration.auth_settings().get(auth)- if auth_setting:- self._apply_auth_params(- headers, queries, resource_path, method, body, auth_setting- )-- def _apply_auth_params(- self, headers, queries, resource_path, method, body, auth_setting- ):- """Updates the request parameters based on a single auth_setting-- :param headers: Header parameters dict to be updated.- :param queries: Query parameters tuple list to be updated.- :resource_path: A string representation of the HTTP request resource path.- :method: A string representation of the HTTP request method.- :body: A object representing the body of the HTTP request.- The object type is the return value of sanitize_for_serialization().- :param auth_setting: auth settings for the endpoint- """- if auth_setting["in"] == "cookie":- headers["Cookie"] = auth_setting["value"]- elif auth_setting["in"] == "header":- if auth_setting["type"] != "http-signature":- headers[auth_setting["key"]] = auth_setting["value"]- elif auth_setting["in"] == "query":- queries.append((auth_setting["key"], auth_setting["value"]))- else:- raise ApiValueError("Authentication token must be in `query` or `header`")-- def __deserialize_file(self, response):- """Deserializes body to file-- Saves response body into a file in a temporary folder,- using the filename from the `Content-Disposition` header if provided.-- :param response: RESTResponse.- :return: file path.- """- fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path)- os.close(fd)- os.remove(path)-- content_disposition = response.getheader("Content-Disposition")- if content_disposition:- filename = re.search(- r'filename=[\'"]?([^\'"\s]+)[\'"]?', content_disposition- ).group(1)- path = os.path.join(os.path.dirname(path), filename)-- with open(path, "wb") as f:- f.write(response.data)-- return path-- def __deserialize_primitive(self, data, klass):- """Deserializes string to primitive type.-- :param data: str.- :param klass: class literal.-- :return: int, long, float, str, bool.- """- try:- return klass(data)- except UnicodeEncodeError:- return str(data)- except TypeError:- return data-- def __deserialize_object(self, value):- """Return an original value.-- :return: object.- """- return value-- def __deserialize_date(self, string):- """Deserializes string to date.-- :param string: str.- :return: date.- """- try:- return parse(string).date()- except ImportError:- return string- except ValueError:- raise rest.ApiException(- status=0, reason="Failed to parse `{0}` as date object".format(string)- )-- def __deserialize_datetime(self, string):- """Deserializes string to datetime.-- The string should be in iso8601 datetime format.-- :param string: str.- :return: datetime.- """- try:- return parse(string)- except ImportError:- return string- except ValueError:- raise rest.ApiException(- status=0,- reason=("Failed to parse `{0}` as datetime object".format(string)),- )-- def __deserialize_model(self, data, klass):- """Deserializes list or dict to model.-- :param data: dict, list.- :param klass: class literal.- :return: model object.- """-- return klass.from_dict(data)diff --git a/packages/python-sdk/e2b/envd/v1/client/api_response.py b/packages/python-sdk/e2b/envd/v1/client/api_response.pydeleted file mode 100644index bb7e40032..000000000--- a/packages/python-sdk/e2b/envd/v1/client/api_response.py+++ /dev/null@@ -1,28 +0,0 @@-"""API response object."""--from __future__ import annotations-from typing import Any, Dict, Optional-from pydantic import Field, StrictInt, StrictStr---class ApiResponse:- """- API response object- """-- status_code: Optional[StrictInt] = Field(None, description="HTTP status code")- headers: Optional[Dict[StrictStr, StrictStr]] = Field(- None, description="HTTP headers"- )- data: Optional[Any] = Field(- None, description="Deserialized data given the data type"- )- raw_data: Optional[Any] = Field(None, description="Raw data (HTTP response body)")-- def __init__(- self, status_code=None, headers=None, data=None, raw_data=None- ) -> None:- self.status_code = status_code- self.headers = headers- self.data = data- self.raw_data = raw_datadiff --git a/packages/python-sdk/e2b/envd/v1/client/configuration.py b/packages/python-sdk/e2b/envd/v1/client/configuration.pydeleted file mode 100644index d4c801dcc..000000000--- a/packages/python-sdk/e2b/envd/v1/client/configuration.py+++ /dev/null@@ -1,452 +0,0 @@-# coding: utf-8--"""- envd-- API for managing files' content and controlling envd-- The version of the OpenAPI document: 0.1.0- Generated by OpenAPI Generator (https://openapi-generator.tech)-- Do not edit the class manually.-""" # noqa: E501---import copy-import logging-import multiprocessing-import sys-import urllib3--import http.client as httplib--JSON_SCHEMA_VALIDATION_KEYWORDS = {- "multipleOf",- "maximum",- "exclusiveMaximum",- "minimum",- "exclusiveMinimum",- "maxLength",- "minLength",- "pattern",- "maxItems",- "minItems",-}---class Configuration:- """This class contains various settings of the API client.-- :param host: Base url.- :param api_key: Dict to store API key(s).- Each entry in the dict specifies an API key.- The dict key is the name of the security scheme in the OAS specification.- The dict value is the API key secret.- :param api_key_prefix: Dict to store API prefix (e.g. Bearer).- The dict key is the name of the security scheme in the OAS specification.- The dict value is an API key prefix when generating the auth data.- :param username: Username for HTTP basic authentication.- :param password: Password for HTTP basic authentication.- :param access_token: Access token.- :param server_index: Index to servers configuration.- :param server_variables: Mapping with string values to replace variables in- templated server configuration. The validation of enums is performed for- variables with defined enum values before.- :param server_operation_index: Mapping from operation ID to an index to server- configuration.- :param server_operation_variables: Mapping from operation ID to a mapping with- string values to replace variables in templated server configuration.- The validation of enums is performed for variables with defined enum- values before.- :param ssl_ca_cert: str - the path to a file of concatenated CA certificates- in PEM format.-- """-- _default = None-- def __init__(- self,- host=None,- api_key=None,- api_key_prefix=None,- username=None,- password=None,- access_token=None,- server_index=None,- server_variables=None,- server_operation_index=None,- server_operation_variables=None,- ssl_ca_cert=None,- ) -> None:- """Constructor"""- self._base_path = "http://localhost" if host is None else host- """Default Base url- """- self.server_index = 0 if server_index is None and host is None else server_index- self.server_operation_index = server_operation_index or {}- """Default server index- """- self.server_variables = server_variables or {}- self.server_operation_variables = server_operation_variables or {}- """Default server variables- """- self.temp_folder_path = None- """Temp file folder for downloading files- """- # Authentication Settings- self.api_key = {}- if api_key:- self.api_key = api_key- """dict to store API key(s)- """- self.api_key_prefix = {}- if api_key_prefix:- self.api_key_prefix = api_key_prefix- """dict to store API prefix (e.g. Bearer)- """- self.refresh_api_key_hook = None- """function hook to refresh API key if expired- """- self.username = username- """Username for HTTP basic authentication- """- self.password = password- """Password for HTTP basic authentication- """- self.access_token = access_token- """Access token- """- self.logger = {}- """Logging Settings- """- self.logger["package_logger"] = logging.getLogger("e2b.envd.v1.client")- self.logger["urllib3_logger"] = logging.getLogger("urllib3")- self.logger_format = "%(asctime)s %(levelname)s %(message)s"- """Log format- """- self.logger_stream_handler = None- """Log stream handler- """- self.logger_file_handler = None- """Log file handler- """- self.logger_file = None- """Debug file location- """- self.debug = False- """Debug switch- """-- self.verify_ssl = True- """SSL/TLS verification- Set this to false to skip verifying SSL certificate when calling API- from https server.- """- self.ssl_ca_cert = ssl_ca_cert- """Set this to customize the certificate file to verify the peer.- """- self.cert_file = None- """client certificate file- """- self.key_file = None- """client key file- """- self.assert_hostname = None- """Set this to True/False to enable/disable SSL hostname verification.- """- self.tls_server_name = None- """SSL/TLS Server Name Indication (SNI)- Set this to the SNI value expected by the server.- """-- self.connection_pool_maxsize = multiprocessing.cpu_count() * 5- """urllib3 connection pool's maximum number of connections saved- per pool. urllib3 uses 1 connection as default value, but this is- not the best value when you are making a lot of possibly parallel- requests to the same host, which is often the case here.- cpu_count * 5 is used as default value to increase performance.- """-- self.proxy = None- """Proxy URL- """- self.proxy_headers = None- """Proxy headers- """- self.safe_chars_for_path_param = ""- """Safe chars for path_param- """- self.retries = None- """Adding retries to override urllib3 default value 3- """- # Enable client side validation- self.client_side_validation = True-- self.socket_options = None- """Options to pass down to the underlying urllib3 socket- """-- self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z"- """datetime format- """-- self.date_format = "%Y-%m-%d"- """date format- """-- def __deepcopy__(self, memo):- cls = self.__class__- result = cls.__new__(cls)- memo[id(self)] = result- for k, v in self.__dict__.items():- if k not in ("logger", "logger_file_handler"):- setattr(result, k, copy.deepcopy(v, memo))- # shallow copy of loggers- result.logger = copy.copy(self.logger)- # use setters to configure loggers- result.logger_file = self.logger_file- result.debug = self.debug- return result-- def __setattr__(self, name, value):- object.__setattr__(self, name, value)-- @classmethod- def set_default(cls, default):- """Set default instance of configuration.-- It stores default configuration, which can be- returned by get_default_copy method.-- :param default: object of Configuration- """- cls._default = default-- @classmethod- def get_default_copy(cls):- """Deprecated. Please use `get_default` instead.-- Deprecated. Please use `get_default` instead.-- :return: The configuration object.- """- return cls.get_default()-- @classmethod- def get_default(cls):- """Return the default configuration.-- This method returns newly created, based on default constructor,- object of Configuration class or returns a copy of default- configuration.-- :return: The configuration object.- """- if cls._default is None:- cls._default = Configuration()- return cls._default-- @property- def logger_file(self):- """The logger file.-- If the logger_file is None, then add stream handler and remove file- handler. Otherwise, add file handler and remove stream handler.-- :param value: The logger_file path.- :type: str- """- return self.__logger_file-- @logger_file.setter- def logger_file(self, value):- """The logger file.-- If the logger_file is None, then add stream handler and remove file- handler. Otherwise, add file handler and remove stream handler.-- :param value: The logger_file path.- :type: str- """- self.__logger_file = value- if self.__logger_file:- # If set logging file,- # then add file handler and remove stream handler.- self.logger_file_handler = logging.FileHandler(self.__logger_file)- self.logger_file_handler.setFormatter(self.logger_formatter)- for _, logger in self.logger.items():- logger.addHandler(self.logger_file_handler)-- @property- def debug(self):- """Debug status-- :param value: The debug status, True or False.- :type: bool- """- return self.__debug-- @debug.setter- def debug(self, value):- """Debug status-- :param value: The debug status, True or False.- :type: bool- """- self.__debug = value- if self.__debug:- # if debug status is True, turn on debug logging- for _, logger in self.logger.items():- logger.setLevel(logging.DEBUG)- # turn on httplib debug- httplib.HTTPConnection.debuglevel = 1- else:- # if debug status is False, turn off debug logging,- # setting log level to default `logging.WARNING`- for _, logger in self.logger.items():- logger.setLevel(logging.WARNING)- # turn off httplib debug- httplib.HTTPConnection.debuglevel = 0-- @property- def logger_format(self):- """The logger format.-- The logger_formatter will be updated when sets logger_format.-- :param value: The format string.- :type: str- """- return self.__logger_format-- @logger_format.setter- def logger_format(self, value):- """The logger format.-- The logger_formatter will be updated when sets logger_format.-- :param value: The format string.- :type: str- """- self.__logger_format = value- self.logger_formatter = logging.Formatter(self.__logger_format)-- def get_api_key_with_prefix(self, identifier, alias=None):- """Gets API key (with prefix if set).-- :param identifier: The identifier of apiKey.- :param alias: The alternative identifier of apiKey.- :return: The token for api key authentication.- """- if self.refresh_api_key_hook is not None:- self.refresh_api_key_hook(self)- key = self.api_key.get(- identifier, self.api_key.get(alias) if alias is not None else None- )- if key:- prefix = self.api_key_prefix.get(identifier)- if prefix:- return "%s %s" % (prefix, key)- else:- return key-- def get_basic_auth_token(self):- """Gets HTTP basic authentication header (string).-- :return: The token for basic HTTP authentication.- """- username = ""- if self.username is not None:- username = self.username- password = ""- if self.password is not None:- password = self.password- return urllib3.util.make_headers(basic_auth=username + ":" + password).get(- "authorization"- )-- def auth_settings(self):- """Gets Auth Settings dict for api client.-- :return: The Auth Settings information dict.- """- auth = {}- return auth-- def to_debug_report(self):- """Gets the essential information for debugging.-- :return: The report for debugging.- """- return (- "Python SDK Debug Report:\n"- "OS: {env}\n"- "Python Version: {pyversion}\n"- "Version of the API: 0.1.0\n"- "SDK Package Version: 1.0.0".format(env=sys.platform, pyversion=sys.version)- )-- def get_host_settings(self):- """Gets an array of host settings-- :return: An array of host settings- """- return [- {- "url": "",- "description": "No description provided",- }- ]-- def get_host_from_settings(self, index, variables=None, servers=None):- """Gets host URL based on the index and variables- :param index: array index of the host settings- :param variables: hash of variable and the corresponding value- :param servers: an array of host settings or None- :return: URL based on host settings- """- if index is None:- return self._base_path-- variables = {} if variables is None else variables- servers = self.get_host_settings() if servers is None else servers-- try:- server = servers[index]- except IndexError:- raise ValueError(- "Invalid index {0} when selecting the host settings. "- "Must be less than {1}".format(index, len(servers))- )-- url = server["url"]-- # go through variables and replace placeholders- for variable_name, variable in server.get("variables", {}).items():- used_value = variables.get(variable_name, variable["default_value"])-- if "enum_values" in variable and used_value not in variable["enum_values"]:- raise ValueError(- "The variable `{0}` in the host URL has invalid value "- "{1}. Must be {2}.".format(- variable_name, variables[variable_name], variable["enum_values"]- )- )-- url = url.replace("{" + variable_name + "}", used_value)-- return url-- @property- def host(self):- """Return generated host."""- return self.get_host_from_settings(- self.server_index, variables=self.server_variables- )-- @host.setter- def host(self, value):- """Fix base path."""- self._base_path = value- self.server_index = Nonediff --git a/packages/python-sdk/e2b/envd/v1/client/exceptions.py b/packages/python-sdk/e2b/envd/v1/client/exceptions.pydeleted file mode 100644index 3a04898fb..000000000--- a/packages/python-sdk/e2b/envd/v1/client/exceptions.py+++ /dev/null@@ -1,161 +0,0 @@-# coding: utf-8--"""- envd-- API for managing files' content and controlling envd-- The version of the OpenAPI document: 0.1.0- Generated by OpenAPI Generator (https://openapi-generator.tech)-- Do not edit the class manually.-""" # noqa: E501---class OpenApiException(Exception):- """The base exception class for all OpenAPIExceptions"""---class ApiTypeError(OpenApiException, TypeError):- def __init__(- self, msg, path_to_item=None, valid_classes=None, key_type=None- ) -> None:- """Raises an exception for TypeErrors-- Args:- msg (str): the exception message-- Keyword Args:- path_to_item (list): a list of keys an indices to get to the- current_item- None if unset- valid_classes (tuple): the primitive classes that current item- should be an instance of- None if unset- key_type (bool): False if our value is a value in a dict- True if it is a key in a dict- False if our item is an item in a list- None if unset- """- self.path_to_item = path_to_item- self.valid_classes = valid_classes- self.key_type = key_type- full_msg = msg- if path_to_item:- full_msg = "{0} at {1}".format(msg, render_path(path_to_item))- super(ApiTypeError, self).__init__(full_msg)---class ApiValueError(OpenApiException, ValueError):- def __init__(self, msg, path_to_item=None) -> None:- """- Args:- msg (str): the exception message-- Keyword Args:- path_to_item (list) the path to the exception in the- received_data dict. None if unset- """-- self.path_to_item = path_to_item- full_msg = msg- if path_to_item:- full_msg = "{0} at {1}".format(msg, render_path(path_to_item))- super(ApiValueError, self).__init__(full_msg)---class ApiAttributeError(OpenApiException, AttributeError):- def __init__(self, msg, path_to_item=None) -> None:- """- Raised when an attribute reference or assignment fails.-- Args:- msg (str): the exception message-- Keyword Args:- path_to_item (None/list) the path to the exception in the- received_data dict- """- self.path_to_item = path_to_item- full_msg = msg- if path_to_item:- full_msg = "{0} at {1}".format(msg, render_path(path_to_item))- super(ApiAttributeError, self).__init__(full_msg)---class ApiKeyError(OpenApiException, KeyError):- def __init__(self, msg, path_to_item=None) -> None:- """- Args:- msg (str): the exception message-- Keyword Args:- path_to_item (None/list) the path to the exception in the- received_data dict- """- self.path_to_item = path_to_item- full_msg = msg- if path_to_item:- full_msg = "{0} at {1}".format(msg, render_path(path_to_item))- super(ApiKeyError, self).__init__(full_msg)---class ApiException(OpenApiException):- def __init__(self, status=None, reason=None, http_resp=None) -> None:- if http_resp:- self.status = http_resp.status- self.reason = http_resp.reason- self.body = http_resp.data- self.headers = http_resp.getheaders()- else:- self.status = status- self.reason = reason- self.body = None- self.headers = None-- def __str__(self):- """Custom error messages for exception"""- error_message = "({0})\n" "Reason: {1}\n".format(self.status, self.reason)- if self.headers:- error_message += "HTTP response headers: {0}\n".format(self.headers)-- if self.body:- error_message += "HTTP response body: {0}\n".format(self.body)-- return error_message---class BadRequestException(ApiException):- def __init__(self, status=None, reason=None, http_resp=None) -> None:- super(BadRequestException, self).__init__(status, reason, http_resp)---class NotFoundException(ApiException):- def __init__(self, status=None, reason=None, http_resp=None) -> None:- super(NotFoundException, self).__init__(status, reason, http_resp)---class UnauthorizedException(ApiException):- def __init__(self, status=None, reason=None, http_resp=None) -> None:- super(UnauthorizedException, self).__init__(status, reason, http_resp)---class ForbiddenException(ApiException):- def __init__(self, status=None, reason=None, http_resp=None) -> None:- super(ForbiddenException, self).__init__(status, reason, http_resp)---class ServiceException(ApiException):- def __init__(self, status=None, reason=None, http_resp=None) -> None:- super(ServiceException, self).__init__(status, reason, http_resp)---def render_path(path_to_item):- """Returns a string representation of a path"""- result = ""- for pth in path_to_item:- if isinstance(pth, int):- result += "[{0}]".format(pth)- else:- result += "['{0}']".format(pth)- return resultdiff --git a/packages/python-sdk/e2b/envd/v1/client/models/__init__.py b/packages/python-sdk/e2b/envd/v1/client/models/__init__.pydeleted file mode 100644index d24c96748..000000000--- a/packages/python-sdk/e2b/envd/v1/client/models/__init__.py+++ /dev/null@@ -1,17 +0,0 @@-# coding: utf-8--# flake8: noqa-"""- envd-- API for managing files' content and controlling envd-- The version of the OpenAPI document: 0.1.0- Generated by OpenAPI Generator (https://openapi-generator.tech)-- Do not edit the class manually.-""" # noqa: E501---# import models into model package-from e2b.envd.v1.client.models.error import Errordiff --git a/packages/python-sdk/e2b/envd/v1/client/models/error.py b/packages/python-sdk/e2b/envd/v1/client/models/error.pydeleted file mode 100644index 8d8d5dd76..000000000--- a/packages/python-sdk/e2b/envd/v1/client/models/error.py+++ /dev/null@@ -1,81 +0,0 @@-# coding: utf-8--"""- envd-- API for managing files' content and controlling envd-- The version of the OpenAPI document: 0.1.0- Generated by OpenAPI Generator (https://openapi-generator.tech)-- Do not edit the class manually.-""" # noqa: E501---from __future__ import annotations-import pprint-import re # noqa: F401-import json---from typing import Any, Dict-from pydantic import BaseModel, Field, StrictInt, StrictStr---class Error(BaseModel):- """- Error- """-- message: StrictStr = Field(..., description="Error message")- code: StrictInt = Field(..., description="Error code")- additional_properties: Dict[str, Any] = {}- __properties = ["message", "code"]-- class Config:- """Pydantic configuration"""-- allow_population_by_field_name = True- validate_assignment = True-- def to_str(self) -> str:- """Returns the string representation of the model using alias"""- return pprint.pformat(self.dict(by_alias=True))-- def to_json(self) -> str:- """Returns the JSON representation of the model using alias"""- return json.dumps(self.to_dict())-- @classmethod- def from_json(cls, json_str: str) -> Error:- """Create an instance of Error from a JSON string"""- return cls.from_dict(json.loads(json_str))-- def to_dict(self):- """Returns the dictionary representation of the model using alias"""- _dict = self.dict(- by_alias=True, exclude={"additional_properties"}, exclude_none=True- )- # puts key-value pairs in additional_properties in the top level- if self.additional_properties is not None:- for _key, _value in self.additional_properties.items():- _dict[_key] = _value-- return _dict-- @classmethod- def from_dict(cls, obj: dict) -> Error:- """Create an instance of Error from a dict"""- if obj is None:- return None-- if not isinstance(obj, dict):- return Error.parse_obj(obj)-- _obj = Error.parse_obj({"message": obj.get("message"), "code": obj.get("code")})- # store additional fields in additional_properties- for _key in obj.keys():- if _key not in cls.__properties:- _obj.additional_properties[_key] = obj.get(_key)-- return _objdiff --git a/packages/python-sdk/e2b/envd/v1/client/rest.py b/packages/python-sdk/e2b/envd/v1/client/rest.pydeleted file mode 100644index fde450024..000000000--- a/packages/python-sdk/e2b/envd/v1/client/rest.py+++ /dev/null@@ -1,403 +0,0 @@-# coding: utf-8--"""- envd-- API for managing files' content and controlling envd-- The version of the OpenAPI document: 0.1.0- Generated by OpenAPI Generator (https://openapi-generator.tech)-- Do not edit the class manually.-""" # noqa: E501---import io-import json-import logging-import re-import ssl--from urllib.parse import urlencode, quote_plus-import urllib3--from e2b.envd.v1.client.exceptions import (- ApiException,- UnauthorizedException,- ForbiddenException,- NotFoundException,- ServiceException,- ApiValueError,- BadRequestException,-)---logger = logging.getLogger(__name__)---class RESTResponse(io.IOBase):- def __init__(self, resp) -> None:- self.urllib3_response = resp- self.status = resp.status- self.reason = resp.reason- self.data = resp.data-- def getheaders(self):- """Returns a dictionary of the response headers."""- return self.urllib3_response.headers-- def getheader(self, name, default=None):- """Returns a given response header."""- return self.urllib3_response.headers.get(name, default)---class RESTClientObject:- def __init__(self, configuration, pools_size=4, maxsize=None) -> None:- # urllib3.PoolManager will pass all kw parameters to connectionpool- # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501- # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501- # maxsize is the number of requests to host that are allowed in parallel # noqa: E501- # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501-- # cert_reqs- if configuration.verify_ssl:- cert_reqs = ssl.CERT_REQUIRED- else:- cert_reqs = ssl.CERT_NONE-- addition_pool_args = {}- if configuration.assert_hostname is not None:- addition_pool_args[- "assert_hostname"- ] = configuration.assert_hostname # noqa: E501-- if configuration.retries is not None:- addition_pool_args["retries"] = configuration.retries-- if configuration.tls_server_name:- addition_pool_args["server_hostname"] = configuration.tls_server_name-- if configuration.socket_options is not None:- addition_pool_args["socket_options"] = configuration.socket_options-- if maxsize is None:- if configuration.connection_pool_maxsize is not None:- maxsize = configuration.connection_pool_maxsize- else:- maxsize = 4-- # https pool manager- if configuration.proxy:- self.pool_manager = urllib3.ProxyManager(- num_pools=pools_size,- maxsize=maxsize,- cert_reqs=cert_reqs,- ca_certs=configuration.ssl_ca_cert,- cert_file=configuration.cert_file,- key_file=configuration.key_file,- proxy_url=configuration.proxy,- proxy_headers=configuration.proxy_headers,- **addition_pool_args- )- else:- self.pool_manager = urllib3.PoolManager(- num_pools=pools_size,- maxsize=maxsize,- cert_reqs=cert_reqs,- ca_certs=configuration.ssl_ca_cert,- cert_file=configuration.cert_file,- key_file=configuration.key_file,- **addition_pool_args- )-- def request(- self,- method,- url,- query_params=None,- headers=None,- body=None,- post_params=None,- _preload_content=True,- _request_timeout=None,- ):- """Perform requests.-- :param method: http request method- :param url: http request url- :param query_params: query parameters in the url- :param headers: http request headers- :param body: request json body, for `application/json`- :param post_params: request post parameters,- `application/x-www-form-urlencoded`- and `multipart/form-data`- :param _preload_content: if False, the urllib3.HTTPResponse object will- be returned without reading/decoding response- data. Default is True.- :param _request_timeout: timeout setting for this request. If one- number provided, it will be total request- timeout. It can also be a pair (tuple) of- (connection, read) timeouts.- """- method = method.upper()- assert method in ["GET", "HEAD", "DELETE", "POST", "PUT", "PATCH", "OPTIONS"]-- if post_params and body:- raise ApiValueError(- "body parameter cannot be used with post_params parameter."- )-- post_params = post_params or {}- headers = headers or {}- # url already contains the URL query string- # so reset query_params to empty dict- query_params = {}-- timeout = None- if _request_timeout:- if isinstance(_request_timeout, (int, float)): # noqa: E501,F821- timeout = urllib3.Timeout(total=_request_timeout)- elif isinstance(_request_timeout, tuple) and len(_request_timeout) == 2:- timeout = urllib3.Timeout(- connect=_request_timeout[0], read=_request_timeout[1]- )-- try:- # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE`- if method in ["POST", "PUT", "PATCH", "OPTIONS", "DELETE"]:- # no content type provided or payload is json- if not headers.get("Content-Type") or re.search(- "json", headers["Content-Type"], re.IGNORECASE- ):- request_body = None- if body is not None:- request_body = json.dumps(body)- r = self.pool_manager.request(- method,- url,- body=request_body,- preload_content=_preload_content,- timeout=timeout,- headers=headers,- )- elif (- headers["Content-Type"] == "application/x-www-form-urlencoded"- ): # noqa: E501- r = self.pool_manager.request(- method,- url,- fields=post_params,- encode_multipart=False,- preload_content=_preload_content,- timeout=timeout,- headers=headers,- )- elif headers["Content-Type"] == "multipart/form-data":- # must del headers['Content-Type'], or the correct- # Content-Type which generated by urllib3 will be- # overwritten.- del headers["Content-Type"]- r = self.pool_manager.request(- method,- url,- fields=post_params,- encode_multipart=True,- preload_content=_preload_content,- timeout=timeout,- headers=headers,- )- # Pass a `string` parameter directly in the body to support- # other content types than Json when `body` argument is- # provided in serialized form- elif isinstance(body, str) or isinstance(body, bytes):- request_body = body- r = self.pool_manager.request(- method,- url,- body=request_body,- preload_content=_preload_content,- timeout=timeout,- headers=headers,- )- else:- # Cannot generate the request from given parameters- msg = """Cannot prepare a request message for provided- arguments. Please check that your arguments match- declared content type."""- raise ApiException(status=0, reason=msg)- # For `GET`, `HEAD`- else:- r = self.pool_manager.request(- method,- url,- fields={},- preload_content=_preload_content,- timeout=timeout,- headers=headers,- )- except urllib3.exceptions.SSLError as e:- msg = "{0}\n{1}".format(type(e).__name__, str(e))- raise ApiException(status=0, reason=msg)-- if _preload_content:- r = RESTResponse(r)-- # log response body- logger.debug("response body: %s", r.data)-- if not 200 <= r.status <= 299:- if r.status == 400:- raise BadRequestException(http_resp=r)-- if r.status == 401:- raise UnauthorizedException(http_resp=r)-- if r.status == 403:- raise ForbiddenException(http_resp=r)-- if r.status == 404:- raise NotFoundException(http_resp=r)-- if 500 <= r.status <= 599:- raise ServiceException(http_resp=r)-- raise ApiException(http_resp=r)-- return r-- def get_request(- self,- url,- headers=None,- query_params=None,- _preload_content=True,- _request_timeout=None,- ):- return self.request(- "GET",- url,- headers=headers,- _preload_content=_preload_content,- _request_timeout=_request_timeout,- query_params=query_params,- )-- def head_request(- self,- url,- headers=None,- query_params=None,- _preload_content=True,- _request_timeout=None,- ):- return self.request(- "HEAD",- url,- headers=headers,- _preload_content=_preload_content,- _request_timeout=_request_timeout,- query_params=query_params,- )-- def options_request(- self,- url,- headers=None,- query_params=None,- post_params=None,- body=None,- _preload_content=True,- _request_timeout=None,- ):- return self.request(- "OPTIONS",- url,- headers=headers,- query_params=query_params,- post_params=post_params,- _preload_content=_preload_content,- _request_timeout=_request_timeout,- body=body,- )-- def delete_request(- self,- url,- headers=None,- query_params=None,- body=None,- _preload_content=True,- _request_timeout=None,- ):- return self.request(- "DELETE",- url,- headers=headers,- query_params=query_params,- _preload_content=_preload_content,- _request_timeout=_request_timeout,- body=body,- )-- def post_request(- self,- url,- headers=None,- query_params=None,- post_params=None,- body=None,- _preload_content=True,- _request_timeout=None,- ):- return self.request(- "POST",- url,- headers=headers,- query_params=query_params,- post_params=post_params,- _preload_content=_preload_content,- _request_timeout=_request_timeout,- body=body,- )-- def put_request(- self,- url,- headers=None,- query_params=None,- post_params=None,- body=None,- _preload_content=True,- _request_timeout=None,- ):- return self.request(- "PUT",- url,- headers=headers,- query_params=query_params,- post_params=post_params,- _preload_content=_preload_content,- _request_timeout=_request_timeout,- body=body,- )-- def patch_request(- self,- url,- headers=None,- query_params=None,- post_params=None,- body=None,- _preload_content=True,- _request_timeout=None,- ):- return self.request(- "PATCH",- url,- headers=headers,- query_params=query_params,- post_params=post_params,- _preload_content=_preload_content,- _request_timeout=_request_timeout,- body=body,- )diff --git a/packages/python-sdk/e2b/envd/v1/client_README.md b/packages/python-sdk/e2b/envd/v1/client_README.mddeleted file mode 100644index 36a0985c0..000000000--- a/packages/python-sdk/e2b/envd/v1/client_README.md+++ /dev/null@@ -1,87 +0,0 @@-# e2b.envd.v1.client-API for managing files' content and controlling envd--The `e2b.envd.v1.client` package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:--- API version: 0.1.0-- Package version: 1.0.0-- Build package: org.openapitools.codegen.languages.PythonPydanticV1ClientCodegen--## Requirements.--Python 3.7+--## Installation & Usage--This python library package is generated without supporting files like setup.py or requirements files--To be able to use it, you will need these dependencies in your own package that uses this library:--* urllib3 >= 1.25.3-* python-dateutil-* pydantic-* aenum--## Getting Started--In your own code, to use this library to connect and interact with e2b.envd.v1.client,-you can run the following:--```python--import time-import e2b.envd.v1.client-from e2b.envd.v1.client.rest import ApiException-from pprint import pprint--# Defining the host is optional and defaults to http://localhost-# See configuration.py for a list of all supported configuration parameters.-configuration = e2b.envd.v1.client.Configuration(- host = "http://localhost"-)----# Enter a context with an instance of the API client-with e2b.envd.v1.client.ApiClient(configuration) as api_client:- # Create an instance of the API class- api_instance = e2b.envd.v1.client.FilesApi(api_client)- path = 'path_example' # str | Path to the file, URL encoded. Can be relative to user's home directory.- username = 'username_example' # str | User used for setting the owner, or resolving relative paths.-- try:- # Download a file- api_response = api_instance.files_path_get(path, username)- print("The response of FilesApi->files_path_get:\n")- pprint(api_response)- except ApiException as e:- print("Exception when calling FilesApi->files_path_get: %s\n" % e)--```--## Documentation for API Endpoints--All URIs are relative to *http://localhost*--Class | Method | HTTP request | Description------------- | ------------- | ------------- | --------------*FilesApi* | [**files_path_get**](e2b/envd/v1/client/docs/FilesApi.md#files_path_get) | **GET** /files/{path} | Download a file-*FilesApi* | [**files_path_put**](e2b/envd/v1/client/docs/FilesApi.md#files_path_put) | **PUT** /files/{path} | Upload a file and ensure the parent directories exist. If the file exists, it will be overwritten.---## Documentation For Models-- - [Error](e2b/envd/v1/client/docs/Error.md)---<a id="documentation-for-authorization"></a>-## Documentation For Authorization--Endpoints do not require authorization.---## Author----diff --git a/packages/python-sdk/e2b/envd/v2/__init__.py b/packages/python-sdk/e2b/envd/v2/__init__.pydeleted file mode 100644index e69de29bb..000000000diff --git a/packages/python-sdk/e2b/envd/v2/client/__init__.py b/packages/python-sdk/e2b/envd/v2/client/__init__.pydeleted file mode 100644index 33f204138..000000000--- a/packages/python-sdk/e2b/envd/v2/client/__init__.py+++ /dev/null@@ -1,34 +0,0 @@-# coding: utf-8--# flake8: noqa--"""- envd-- API for managing files' content and controlling envd-- The version of the OpenAPI document: 0.1.0- Generated by OpenAPI Generator (https://openapi-generator.tech)-- Do not edit the class manually.-""" # noqa: E501---__version__ = "1.0.0"--# import apis into sdk package-from e2b.envd.v2.client.api.files_api import FilesApi--# import ApiClient-from e2b.envd.v2.client.api_response import ApiResponse-from e2b.envd.v2.client.api_client import ApiClient-from e2b.envd.v2.client.configuration import Configuration-from e2b.envd.v2.client.exceptions import OpenApiException-from e2b.envd.v2.client.exceptions import ApiTypeError-from e2b.envd.v2.client.exceptions import ApiValueError-from e2b.envd.v2.client.exceptions import ApiKeyError-from e2b.envd.v2.client.exceptions import ApiAttributeError-from e2b.envd.v2.client.exceptions import ApiException--# import models into sdk package-from e2b.envd.v2.client.models.error import Errordiff --git a/packages/python-sdk/e2b/envd/v2/client/api/__init__.py b/packages/python-sdk/e2b/envd/v2/client/api/__init__.pydeleted file mode 100644index 09f5284cb..000000000--- a/packages/python-sdk/e2b/envd/v2/client/api/__init__.py+++ /dev/null@@ -1,4 +0,0 @@-# flake8: noqa--# import apis into api package-from e2b.envd.v2.client.api.files_api import FilesApidiff --git a/packages/python-sdk/e2b/envd/v2/client/api/files_api.py b/packages/python-sdk/e2b/envd/v2/client/api/files_api.pydeleted file mode 100644index 7bf6dda1b..000000000--- a/packages/python-sdk/e2b/envd/v2/client/api/files_api.py+++ /dev/null@@ -1,648 +0,0 @@-# coding: utf-8--"""- envd-- API for managing files' content and controlling envd-- The version of the OpenAPI document: 0.1.0- Generated by OpenAPI Generator (https://openapi-generator.tech)-- Do not edit the class manually.-""" # noqa: E501---import io-import warnings--from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt-from typing import Dict, List, Optional, Tuple, Union, Any--try:- from typing import Annotated-except ImportError:- from typing_extensions import Annotated--from pydantic import Field-from typing_extensions import Annotated-from pydantic import StrictStr, field_validator--from typing import Union--from e2b.envd.v2.client.models.files_path_put_request import FilesPathPutRequest--from e2b.envd.v2.client.api_client import ApiClient-from e2b.envd.v2.client.api_response import ApiResponse-from e2b.envd.v2.client.rest import RESTResponseType---class FilesApi:- """NOTE: This class is auto generated by OpenAPI Generator- Ref: https://openapi-generator.tech-- Do not edit the class manually.- """-- def __init__(self, api_client=None) -> None:- if api_client is None:- api_client = ApiClient.get_default()- self.api_client = api_client-- @validate_call- def files_path_get(- self,- path: Annotated[- StrictStr,- Field(- description="Path to the file, URL encoded. Can be relative to user's home directory."- ),- ],- username: Annotated[- str,- Field(- strict=True,- description="User used for setting the owner, or resolving relative paths.",- ),- ],- _request_timeout: Union[- None,- Annotated[StrictFloat, Field(gt=0)],- Tuple[- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]- ],- ] = None,- _request_auth: Optional[Dict[StrictStr, Any]] = None,- _content_type: Optional[StrictStr] = None,- _headers: Optional[Dict[StrictStr, Any]] = None,- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,- ) -> bytearray:- """Download a file--- :param path: Path to the file, URL encoded. Can be relative to user's home directory. (required)- :type path: str- :param username: User used for setting the owner, or resolving relative paths. (required)- :type username: str- :param _request_timeout: timeout setting for this request. If one- number provided, it will be total request- timeout. It can also be a pair (tuple) of- (connection, read) timeouts.- :type _request_timeout: int, tuple(int, int), optional- :param _request_auth: set to override the auth_settings for an a single- request; this effectively ignores the- authentication in the spec for a single request.- :type _request_auth: dict, optional- :param _content_type: force content-type for the request.- :type _content_type: str, Optional- :param _headers: set to override the headers for a single- request; this effectively ignores the headers- in the spec for a single request.- :type _headers: dict, optional- :param _host_index: set to override the host_index for a single- request; this effectively ignores the host_index- in the spec for a single request.- :type _host_index: int, optional- :return: Returns the result object.- """ # noqa: E501-- _param = self._files_path_get_serialize(- path=path,- username=username,- _request_auth=_request_auth,- _content_type=_content_type,- _headers=_headers,- _host_index=_host_index,- )-- _response_types_map: Dict[str, Optional[str]] = {- "200": "bytearray",- "400": "Error",- "403": "Error",- "404": "Error",- "500": "Error",- }- response_data = self.api_client.call_api(- *_param, _request_timeout=_request_timeout- )- response_data.read()- return self.api_client.response_deserialize(- response_data=response_data,- response_types_map=_response_types_map,- ).data-- @validate_call- def files_path_get_with_http_info(- self,- path: Annotated[- StrictStr,- Field(- description="Path to the file, URL encoded. Can be relative to user's home directory."- ),- ],- username: Annotated[- str,- Field(- strict=True,- description="User used for setting the owner, or resolving relative paths.",- ),- ],- _request_timeout: Union[- None,- Annotated[StrictFloat, Field(gt=0)],- Tuple[- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]- ],- ] = None,- _request_auth: Optional[Dict[StrictStr, Any]] = None,- _content_type: Optional[StrictStr] = None,- _headers: Optional[Dict[StrictStr, Any]] = None,- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,- ) -> ApiResponse[bytearray]:- """Download a file--- :param path: Path to the file, URL encoded. Can be relative to user's home directory. (required)- :type path: str- :param username: User used for setting the owner, or resolving relative paths. (required)- :type username: str- :param _request_timeout: timeout setting for this request. If one- number provided, it will be total request- timeout. It can also be a pair (tuple) of- (connection, read) timeouts.- :type _request_timeout: int, tuple(int, int), optional- :param _request_auth: set to override the auth_settings for an a single- request; this effectively ignores the- authentication in the spec for a single request.- :type _request_auth: dict, optional- :param _content_type: force content-type for the request.- :type _content_type: str, Optional- :param _headers: set to override the headers for a single- request; this effectively ignores the headers- in the spec for a single request.- :type _headers: dict, optional- :param _host_index: set to override the host_index for a single- request; this effectively ignores the host_index- in the spec for a single request.- :type _host_index: int, optional- :return: Returns the result object.- """ # noqa: E501-- _param = self._files_path_get_serialize(- path=path,- username=username,- _request_auth=_request_auth,- _content_type=_content_type,- _headers=_headers,- _host_index=_host_index,- )-- _response_types_map: Dict[str, Optional[str]] = {- "200": "bytearray",- "400": "Error",- "403": "Error",- "404": "Error",- "500": "Error",- }- response_data = self.api_client.call_api(- *_param, _request_timeout=_request_timeout- )- response_data.read()- return self.api_client.response_deserialize(- response_data=response_data,- response_types_map=_response_types_map,- )-- @validate_call- def files_path_get_without_preload_content(- self,- path: Annotated[- StrictStr,- Field(- description="Path to the file, URL encoded. Can be relative to user's home directory."- ),- ],- username: Annotated[- str,- Field(- strict=True,- description="User used for setting the owner, or resolving relative paths.",- ),- ],- _request_timeout: Union[- None,- Annotated[StrictFloat, Field(gt=0)],- Tuple[- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]- ],- ] = None,- _request_auth: Optional[Dict[StrictStr, Any]] = None,- _content_type: Optional[StrictStr] = None,- _headers: Optional[Dict[StrictStr, Any]] = None,- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,- ) -> RESTResponseType:- """Download a file--- :param path: Path to the file, URL encoded. Can be relative to user's home directory. (required)- :type path: str- :param username: User used for setting the owner, or resolving relative paths. (required)- :type username: str- :param _request_timeout: timeout setting for this request. If one- number provided, it will be total request- timeout. It can also be a pair (tuple) of- (connection, read) timeouts.- :type _request_timeout: int, tuple(int, int), optional- :param _request_auth: set to override the auth_settings for an a single- request; this effectively ignores the- authentication in the spec for a single request.- :type _request_auth: dict, optional- :param _content_type: force content-type for the request.- :type _content_type: str, Optional- :param _headers: set to override the headers for a single- request; this effectively ignores the headers- in the spec for a single request.- :type _headers: dict, optional- :param _host_index: set to override the host_index for a single- request; this effectively ignores the host_index- in the spec for a single request.- :type _host_index: int, optional- :return: Returns the result object.- """ # noqa: E501-- _param = self._files_path_get_serialize(- path=path,- username=username,- _request_auth=_request_auth,- _content_type=_content_type,- _headers=_headers,- _host_index=_host_index,- )-- _response_types_map: Dict[str, Optional[str]] = {- "200": "bytearray",- "400": "Error",- "403": "Error",- "404": "Error",- "500": "Error",- }- response_data = self.api_client.call_api(- *_param, _request_timeout=_request_timeout- )- return response_data.response-- def _files_path_get_serialize(- self,- path,- username,- _request_auth,- _content_type,- _headers,- _host_index,- ) -> Tuple:- _host = None-- _collection_formats: Dict[str, str] = {}-- _path_params: Dict[str, str] = {}- _query_params: List[Tuple[str, str]] = []- _header_params: Dict[str, Optional[str]] = _headers or {}- _form_params: List[Tuple[str, str]] = []- _files: Dict[str, str] = {}- _body_params: Optional[bytes] = None-- # process the path parameters- if path is not None:- _path_params["path"] = path- # process the query parameters- if username is not None:- _query_params.append(("username", username))-- # process the header parameters- # process the form parameters- # process the body parameter-- # set the HTTP header `Accept`- _header_params["Accept"] = self.api_client.select_header_accept(- ["application/octet-stream", "application/json"]- )-- # authentication setting- _auth_settings: List[str] = []-- return self.api_client.param_serialize(- method="GET",- resource_path="/files/{path}",- path_params=_path_params,- query_params=_query_params,- header_params=_header_params,- body=_body_params,- post_params=_form_params,- files=_files,- auth_settings=_auth_settings,- collection_formats=_collection_formats,- _host=_host,- _request_auth=_request_auth,- )-- @validate_call- def files_path_put(- self,- path: Annotated[- StrictStr,- Field(- description="Path to the file, URL encoded. Can be relative to user's home directory."- ),- ],- username: Annotated[- str,- Field(- strict=True,- description="User used for setting the owner, or resolving relative paths.",- ),- ],- files_path_put_request: FilesPathPutRequest,- _request_timeout: Union[- None,- Annotated[StrictFloat, Field(gt=0)],- Tuple[- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]- ],- ] = None,- _request_auth: Optional[Dict[StrictStr, Any]] = None,- _content_type: Optional[StrictStr] = None,- _headers: Optional[Dict[StrictStr, Any]] = None,- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,- ) -> None:- """Upload a file and ensure the parent directories exist. If the file exists, it will be overwritten.--- :param path: Path to the file, URL encoded. Can be relative to user's home directory. (required)- :type path: str- :param username: User used for setting the owner, or resolving relative paths. (required)- :type username: str- :param files_path_put_request: (required)- :type files_path_put_request: FilesPathPutRequest- :param _request_timeout: timeout setting for this request. If one- number provided, it will be total request- timeout. It can also be a pair (tuple) of- (connection, read) timeouts.- :type _request_timeout: int, tuple(int, int), optional- :param _request_auth: set to override the auth_settings for an a single- request; this effectively ignores the- authentication in the spec for a single request.- :type _request_auth: dict, optional- :param _content_type: force content-type for the request.- :type _content_type: str, Optional- :param _headers: set to override the headers for a single- request; this effectively ignores the headers- in the spec for a single request.- :type _headers: dict, optional- :param _host_index: set to override the host_index for a single- request; this effectively ignores the host_index- in the spec for a single request.- :type _host_index: int, optional- :return: Returns the result object.- """ # noqa: E501-- _param = self._files_path_put_serialize(- path=path,- username=username,- files_path_put_request=files_path_put_request,- _request_auth=_request_auth,- _content_type=_content_type,- _headers=_headers,- _host_index=_host_index,- )-- _response_types_map: Dict[str, Optional[str]] = {}- response_data = self.api_client.call_api(- *_param, _request_timeout=_request_timeout- )- response_data.read()- return self.api_client.response_deserialize(- response_data=response_data,- response_types_map=_response_types_map,- ).data-- @validate_call- def files_path_put_with_http_info(- self,- path: Annotated[- StrictStr,- Field(- description="Path to the file, URL encoded. Can be relative to user's home directory."- ),- ],- username: Annotated[- str,- Field(- strict=True,- description="User used for setting the owner, or resolving relative paths.",- ),- ],- files_path_put_request: FilesPathPutRequest,- _request_timeout: Union[- None,- Annotated[StrictFloat, Field(gt=0)],- Tuple[- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]- ],- ] = None,- _request_auth: Optional[Dict[StrictStr, Any]] = None,- _content_type: Optional[StrictStr] = None,- _headers: Optional[Dict[StrictStr, Any]] = None,- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,- ) -> ApiResponse[None]:- """Upload a file and ensure the parent directories exist. If the file exists, it will be overwritten.--- :param path: Path to the file, URL encoded. Can be relative to user's home directory. (required)- :type path: str- :param username: User used for setting the owner, or resolving relative paths. (required)- :type username: str- :param files_path_put_request: (required)- :type files_path_put_request: FilesPathPutRequest- :param _request_timeout: timeout setting for this request. If one- number provided, it will be total request- timeout. It can also be a pair (tuple) of- (connection, read) timeouts.- :type _request_timeout: int, tuple(int, int), optional- :param _request_auth: set to override the auth_settings for an a single- request; this effectively ignores the- authentication in the spec for a single request.- :type _request_auth: dict, optional- :param _content_type: force content-type for the request.- :type _content_type: str, Optional- :param _headers: set to override the headers for a single- request; this effectively ignores the headers- in the spec for a single request.- :type _headers: dict, optional- :param _host_index: set to override the host_index for a single- request; this effectively ignores the host_index- in the spec for a single request.- :type _host_index: int, optional- :return: Returns the result object.- """ # noqa: E501-- _param = self._files_path_put_serialize(- path=path,- username=username,- files_path_put_request=files_path_put_request,- _request_auth=_request_auth,- _content_type=_content_type,- _headers=_headers,- _host_index=_host_index,- )-- _response_types_map: Dict[str, Optional[str]] = {}- response_data = self.api_client.call_api(- *_param, _request_timeout=_request_timeout- )- response_data.read()- return self.api_client.response_deserialize(- response_data=response_data,- response_types_map=_response_types_map,- )-- @validate_call- def files_path_put_without_preload_content(- self,- path: Annotated[- StrictStr,- Field(- description="Path to the file, URL encoded. Can be relative to user's home directory."- ),- ],- username: Annotated[- str,- Field(- strict=True,- description="User used for setting the owner, or resolving relative paths.",- ),- ],- files_path_put_request: FilesPathPutRequest,- _request_timeout: Union[- None,- Annotated[StrictFloat, Field(gt=0)],- Tuple[- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]- ],- ] = None,- _request_auth: Optional[Dict[StrictStr, Any]] = None,- _content_type: Optional[StrictStr] = None,- _headers: Optional[Dict[StrictStr, Any]] = None,- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,- ) -> RESTResponseType:- """Upload a file and ensure the parent directories exist. If the file exists, it will be overwritten.--- :param path: Path to the file, URL encoded. Can be relative to user's home directory. (required)- :type path: str- :param username: User used for setting the owner, or resolving relative paths. (required)- :type username: str- :param files_path_put_request: (required)- :type files_path_put_request: FilesPathPutRequest- :param _request_timeout: timeout setting for this request. If one- number provided, it will be total request- timeout. It can also be a pair (tuple) of- (connection, read) timeouts.- :type _request_timeout: int, tuple(int, int), optional- :param _request_auth: set to override the auth_settings for an a single- request; this effectively ignores the- authentication in the spec for a single request.- :type _request_auth: dict, optional- :param _content_type: force content-type for the request.- :type _content_type: str, Optional- :param _headers: set to override the headers for a single- request; this effectively ignores the headers- in the spec for a single request.- :type _headers: dict, optional- :param _host_index: set to override the host_index for a single- request; this effectively ignores the host_index- in the spec for a single request.- :type _host_index: int, optional- :return: Returns the result object.- """ # noqa: E501-- _param = self._files_path_put_serialize(- path=path,- username=username,- files_path_put_request=files_path_put_request,- _request_auth=_request_auth,- _content_type=_content_type,- _headers=_headers,- _host_index=_host_index,- )-- _response_types_map: Dict[str, Optional[str]] = {}- response_data = self.api_client.call_api(- *_param, _request_timeout=_request_timeout- )- return response_data.response-- def _files_path_put_serialize(- self,- path,- username,- files_path_put_request,- _request_auth,- _content_type,- _headers,- _host_index,- ) -> Tuple:- _host = None-- _collection_formats: Dict[str, str] = {}-- _path_params: Dict[str, str] = {}- _query_params: List[Tuple[str, str]] = []- _header_params: Dict[str, Optional[str]] = _headers or {}- _form_params: List[Tuple[str, str]] = []- _files: Dict[str, str] = {}- _body_params: Optional[bytes] = None-- # process the path parameters- if path is not None:- _path_params["path"] = path- # process the query parameters- if username is not None:- _query_params.append(("username", username))-- # process the header parameters- # process the form parameters- # process the body parameter- if files_path_put_request is not None:- _body_params = files_path_put_request-- # set the HTTP header `Accept`- _header_params["Accept"] = self.api_client.select_header_accept(- ["application/json"]- )-- # set the HTTP header `Content-Type`- if _content_type:- _header_params["Content-Type"] = _content_type- else:- _default_content_type = self.api_client.select_header_content_type(- ["multipart/form-data"]- )- if _default_content_type is not None:- _header_params["Content-Type"] = _default_content_type-- # authentication setting- _auth_settings: List[str] = []-- return self.api_client.param_serialize(- method="PUT",- resource_path="/files/{path}",- path_params=_path_params,- query_params=_query_params,- header_params=_header_params,- body=_body_params,- post_params=_form_params,- files=_files,- auth_settings=_auth_settings,- collection_formats=_collection_formats,- _host=_host,- _request_auth=_request_auth,- )diff --git a/packages/python-sdk/e2b/envd/v2/client/api_client.py b/packages/python-sdk/e2b/envd/v2/client/api_client.pydeleted file mode 100644index e8b7d74fe..000000000--- a/packages/python-sdk/e2b/envd/v2/client/api_client.py+++ /dev/null@@ -1,697 +0,0 @@-# coding: utf-8--"""- envd-- API for managing files' content and controlling envd-- The version of the OpenAPI document: 0.1.0- Generated by OpenAPI Generator (https://openapi-generator.tech)-- Do not edit the class manually.-""" # noqa: E501---import atexit-import datetime-from dateutil.parser import parse-import json-import mimetypes-import os-import re-import tempfile--from urllib.parse import quote-from typing import Tuple, Optional, List--from e2b.envd.v2.client.configuration import Configuration-from e2b.envd.v2.client.api_response import ApiResponse-import e2b.envd.v2.client.models-from e2b.envd.v2.client import rest-from e2b.envd.v2.client.exceptions import (- ApiValueError,- ApiException,- BadRequestException,- UnauthorizedException,- ForbiddenException,- NotFoundException,- ServiceException,-)---class ApiClient:- """Generic API client for OpenAPI client library builds.-- OpenAPI generic API client. This client handles the client-- server communication, and is invariant across implementations. Specifics of- the methods and models for each application are generated from the OpenAPI- templates.-- :param configuration: .Configuration object for this client- :param header_name: a header to pass when making calls to the API.- :param header_value: a header value to pass when making calls to- the API.- :param cookie: a cookie to include in the header when making calls- to the API- """-- PRIMITIVE_TYPES = (float, bool, bytes, str, int)- NATIVE_TYPES_MAPPING = {- "int": int,- "long": int, # TODO remove as only py3 is supported?- "float": float,- "str": str,- "bool": bool,- "date": datetime.date,- "datetime": datetime.datetime,- "object": object,- }- _pool = None-- def __init__(- self, configuration=None, header_name=None, header_value=None, cookie=None- ) -> None:- # use default configuration if none is provided- if configuration is None:- configuration = Configuration.get_default()- self.configuration = configuration-- self.rest_client = rest.RESTClientObject(configuration)- self.default_headers = {}- if header_name is not None:- self.default_headers[header_name] = header_value- self.cookie = cookie- # Set default User-Agent.- self.user_agent = "OpenAPI-Generator/1.0.0/python"- self.client_side_validation = configuration.client_side_validation-- def __enter__(self):- return self-- def __exit__(self, exc_type, exc_value, traceback):- pass-- @property- def user_agent(self):- """User agent for this API client"""- return self.default_headers["User-Agent"]-- @user_agent.setter- def user_agent(self, value):- self.default_headers["User-Agent"] = value-- def set_default_header(self, header_name, header_value):- self.default_headers[header_name] = header_value-- _default = None-- @classmethod- def get_default(cls):- """Return new instance of ApiClient.-- This method returns newly created, based on default constructor,- object of ApiClient class or returns a copy of default- ApiClient.-- :return: The ApiClient object.- """- if cls._default is None:- cls._default = ApiClient()- return cls._default-- @classmethod- def set_default(cls, default):- """Set default instance of ApiClient.-- It stores default ApiClient.-- :param default: object of ApiClient.- """- cls._default = default-- def param_serialize(- self,- method,- resource_path,- path_params=None,- query_params=None,- header_params=None,- body=None,- post_params=None,- files=None,- auth_settings=None,- collection_formats=None,- _host=None,- _request_auth=None,- ) -> Tuple:- """Builds the HTTP request params needed by the request.- :param method: Method to call.- :param resource_path: Path to method endpoint.- :param path_params: Path parameters in the url.- :param query_params: Query parameters in the url.- :param header_params: Header parameters to be- placed in the request header.- :param body: Request body.- :param post_params dict: Request post form parameters,- for `application/x-www-form-urlencoded`, `multipart/form-data`.- :param auth_settings list: Auth Settings names for the request.- :param files dict: key -> filename, value -> filepath,- for `multipart/form-data`.- :param collection_formats: dict of collection formats for path, query,- header, and post parameters.- :param _request_auth: set to override the auth_settings for an a single- request; this effectively ignores the authentication- in the spec for a single request.- :return: tuple of form (path, http_method, query_params, header_params,- body, post_params, files)- """-- config = self.configuration-- # header parameters- header_params = header_params or {}- header_params.update(self.default_headers)- if self.cookie:- header_params["Cookie"] = self.cookie- if header_params:- header_params = self.sanitize_for_serialization(header_params)- header_params = dict(- self.parameters_to_tuples(header_params, collection_formats)- )-- # path parameters- if path_params:- path_params = self.sanitize_for_serialization(path_params)- path_params = self.parameters_to_tuples(path_params, collection_formats)- for k, v in path_params:- # specified safe chars, encode everything- resource_path = resource_path.replace(- "{%s}" % k, quote(str(v), safe=config.safe_chars_for_path_param)- )-- # post parameters- if post_params or files:- post_params = post_params if post_params else []- post_params = self.sanitize_for_serialization(post_params)- post_params = self.parameters_to_tuples(post_params, collection_formats)- post_params.extend(self.files_parameters(files))-- # auth setting- self.update_params_for_auth(- header_params,- query_params,- auth_settings,- resource_path,- method,- body,- request_auth=_request_auth,- )-- # body- if body:- body = self.sanitize_for_serialization(body)-- # request url- if _host is None:- url = self.configuration.host + resource_path- else:- # use server/host defined in path or operation instead- url = _host + resource_path-- # query parameters- if query_params:- query_params = self.sanitize_for_serialization(query_params)- url_query = self.parameters_to_url_query(query_params, collection_formats)- url += "?" + url_query-- return method, url, header_params, body, post_params-- def call_api(- self,- method,- url,- header_params=None,- body=None,- post_params=None,- _request_timeout=None,- ) -> rest.RESTResponse:- """Makes the HTTP request (synchronous)- :param method: Method to call.- :param url: Path to method endpoint.- :param header_params: Header parameters to be- placed in the request header.- :param body: Request body.- :param post_params dict: Request post form parameters,- for `application/x-www-form-urlencoded`, `multipart/form-data`.- :param _request_timeout: timeout setting for this request.- :return: RESTResponse- """-- try:- # perform request and return response- response_data = self.rest_client.request(- method,- url,- headers=header_params,- body=body,- post_params=post_params,- _request_timeout=_request_timeout,- )-- except ApiException as e:- if e.body:- e.body = e.body.decode("utf-8")- raise e-- return response_data-- def response_deserialize(- self, response_data=None, response_types_map=None- ) -> ApiResponse:- """Deserializes response into an object.- :param response_data: RESTResponse object to be deserialized.- :param response_types_map: dict of response types.- :return: ApiResponse- """-- response_type = response_types_map.get(str(response_data.status), None)- if (- not response_type- and isinstance(response_data.status, int)- and 100 <= response_data.status <= 599- ):- # if not found, look for '1XX', '2XX', etc.- response_type = response_types_map.get(- str(response_data.status)[0] + "XX", None- )-- if not 200 <= response_data.status <= 299:- if response_data.status == 400:- raise BadRequestException(http_resp=response_data)-- if response_data.status == 401:- raise UnauthorizedException(http_resp=response_data)-- if response_data.status == 403:- raise ForbiddenException(http_resp=response_data)-- if response_data.status == 404:- raise NotFoundException(http_resp=response_data)-- if 500 <= response_data.status <= 599:- raise ServiceException(http_resp=response_data)- raise ApiException(http_resp=response_data)-- # deserialize response data-- if response_type == "bytearray":- return_data = response_data.data- elif response_type is None:- return_data = None- elif response_type == "file":- return_data = self.__deserialize_file(response_data)- else:- match = None- content_type = response_data.getheader("content-type")- if content_type is not None:- match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type)- encoding = match.group(1) if match else "utf-8"- response_text = response_data.data.decode(encoding)- return_data = self.deserialize(response_text, response_type)-- return ApiResponse(- status_code=response_data.status,- data=return_data,- headers=response_data.getheaders(),- raw_data=response_data.data,- )-- def sanitize_for_serialization(self, obj):- """Builds a JSON POST object.-- If obj is None, return None.- If obj is str, int, long, float, bool, return directly.- If obj is datetime.datetime, datetime.date- convert to string in iso8601 format.- If obj is list, sanitize each element in the list.- If obj is dict, return the dict.- If obj is OpenAPI model, return the properties dict.-- :param obj: The data to serialize.- :return: The serialized form of data.- """- if obj is None:- return None- elif isinstance(obj, self.PRIMITIVE_TYPES):- return obj- elif isinstance(obj, list):- return [self.sanitize_for_serialization(sub_obj) for sub_obj in obj]- elif isinstance(obj, tuple):- return tuple(self.sanitize_for_serialization(sub_obj) for sub_obj in obj)- elif isinstance(obj, (datetime.datetime, datetime.date)):- return obj.isoformat()-- elif isinstance(obj, dict):- obj_dict = obj- else:- # Convert model obj to dict except- # attributes `openapi_types`, `attribute_map`- # and attributes which value is not None.- # Convert attribute name to json key in- # model definition for request.- obj_dict = obj.to_dict()-- return {- key: self.sanitize_for_serialization(val) for key, val in obj_dict.items()- }-- def deserialize(self, response_text, response_type):- """Deserializes response into an object.-- :param response: RESTResponse object to be deserialized.- :param response_type: class literal for- deserialized object, or string of class name.-- :return: deserialized object.- """-- # fetch data from response object- try:- data = json.loads(response_text)- except ValueError:- data = response_text-- return self.__deserialize(data, response_type)-- def __deserialize(self, data, klass):- """Deserializes dict, list, str into an object.-- :param data: dict, list or str.- :param klass: class literal, or string of class name.-- :return: object.- """- if data is None:- return None-- if isinstance(klass, str):- if klass.startswith("List["):- sub_kls = re.match(r"List\[(.*)]", klass).group(1)- return [self.__deserialize(sub_data, sub_kls) for sub_data in data]-- if klass.startswith("Dict["):- sub_kls = re.match(r"Dict\[([^,]*), (.*)]", klass).group(2)- return {k: self.__deserialize(v, sub_kls) for k, v in data.items()}-- # convert str to class- if klass in self.NATIVE_TYPES_MAPPING:- klass = self.NATIVE_TYPES_MAPPING[klass]- else:- klass = getattr(e2b.envd.v2.client.models, klass)-- if klass in self.PRIMITIVE_TYPES:- return self.__deserialize_primitive(data, klass)- elif klass == object:- return self.__deserialize_object(data)- elif klass == datetime.date:- return self.__deserialize_date(data)- elif klass == datetime.datetime:- return self.__deserialize_datetime(data)- else:- return self.__deserialize_model(data, klass)-- def parameters_to_tuples(self, params, collection_formats):- """Get parameters as list of tuples, formatting collections.-- :param params: Parameters as dict or list of two-tuples- :param dict collection_formats: Parameter collection formats- :return: Parameters as list of tuples, collections formatted- """- new_params = []- if collection_formats is None:- collection_formats = {}- for k, v in params.items() if isinstance(params, dict) else params:- if k in collection_formats:- collection_format = collection_formats[k]- if collection_format == "multi":- new_params.extend((k, value) for value in v)- else:- if collection_format == "ssv":- delimiter = " "- elif collection_format == "tsv":- delimiter = "\t"- elif collection_format == "pipes":- delimiter = "|"- else: # csv is the default- delimiter = ","- new_params.append((k, delimiter.join(str(value) for value in v)))- else:- new_params.append((k, v))- return new_params-- def parameters_to_url_query(self, params, collection_formats):- """Get parameters as list of tuples, formatting collections.-- :param params: Parameters as dict or list of two-tuples- :param dict collection_formats: Parameter collection formats- :return: URL query string (e.g. a=Hello%20World&b=123)- """- new_params = []- if collection_formats is None:- collection_formats = {}- for k, v in params.items() if isinstance(params, dict) else params:- if isinstance(v, bool):- v = str(v).lower()- if isinstance(v, (int, float)):- v = str(v)- if isinstance(v, dict):- v = json.dumps(v)-- if k in collection_formats:- collection_format = collection_formats[k]- if collection_format == "multi":- new_params.extend((k, value) for value in v)- else:- if collection_format == "ssv":- delimiter = " "- elif collection_format == "tsv":- delimiter = "\t"- elif collection_format == "pipes":- delimiter = "|"- else: # csv is the default- delimiter = ","- new_params.append(- (k, delimiter.join(quote(str(value)) for value in v))- )- else:- new_params.append((k, quote(str(v))))-- return "&".join(["=".join(item) for item in new_params])-- def files_parameters(self, files=None):- """Builds form parameters.-- :param files: File parameters.- :return: Form parameters with files.- """- params = []-- if files:- for k, v in files.items():- if not v:- continue- file_names = v if type(v) is list else [v]- for n in file_names:- with open(n, "rb") as f:- filename = os.path.basename(f.name)- filedata = f.read()- mimetype = (- mimetypes.guess_type(filename)[0]- or "application/octet-stream"- )- params.append(tuple([k, tuple([filename, filedata, mimetype])]))-- return params-- def select_header_accept(self, accepts: List[str]) -> Optional[str]:- """Returns `Accept` based on an array of accepts provided.-- :param accepts: List of headers.- :return: Accept (e.g. application/json).- """- if not accepts:- return None-- for accept in accepts:- if re.search("json", accept, re.IGNORECASE):- return accept-- return accepts[0]-- def select_header_content_type(self, content_types):- """Returns `Content-Type` based on an array of content_types provided.-- :param content_types: List of content-types.- :return: Content-Type (e.g. application/json).- """- if not content_types:- return None-- for content_type in content_types:- if re.search("json", content_type, re.IGNORECASE):- return content_type-- return content_types[0]-- def update_params_for_auth(- self,- headers,- queries,- auth_settings,- resource_path,- method,- body,- request_auth=None,- ) -> None:- """Updates header and query params based on authentication setting.-- :param headers: Header parameters dict to be updated.- :param queries: Query parameters tuple list to be updated.- :param auth_settings: Authentication setting identifiers list.- :resource_path: A string representation of the HTTP request resource path.- :method: A string representation of the HTTP request method.- :body: A object representing the body of the HTTP request.- The object type is the return value of sanitize_for_serialization().- :param request_auth: if set, the provided settings will- override the token in the configuration.- """- if not auth_settings:- return-- if request_auth:- self._apply_auth_params(- headers, queries, resource_path, method, body, request_auth- )- else:- for auth in auth_settings:- auth_setting = self.configuration.auth_settings().get(auth)- if auth_setting:- self._apply_auth_params(- headers, queries, resource_path, method, body, auth_setting- )-- def _apply_auth_params(- self, headers, queries, resource_path, method, body, auth_setting- ) -> None:- """Updates the request parameters based on a single auth_setting-- :param headers: Header parameters dict to be updated.- :param queries: Query parameters tuple list to be updated.- :resource_path: A string representation of the HTTP request resource path.- :method: A string representation of the HTTP request method.- :body: A object representing the body of the HTTP request.- The object type is the return value of sanitize_for_serialization().- :param auth_setting: auth settings for the endpoint- """- if auth_setting["in"] == "cookie":- headers["Cookie"] = auth_setting["value"]- elif auth_setting["in"] == "header":- if auth_setting["type"] != "http-signature":- headers[auth_setting["key"]] = auth_setting["value"]- elif auth_setting["in"] == "query":- queries.append((auth_setting["key"], auth_setting["value"]))- else:- raise ApiValueError("Authentication token must be in `query` or `header`")-- def __deserialize_file(self, response):- """Deserializes body to file-- Saves response body into a file in a temporary folder,- using the filename from the `Content-Disposition` header if provided.-- handle file downloading- save response body into a tmp file and return the instance-- :param response: RESTResponse.- :return: file path.- """- fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path)- os.close(fd)- os.remove(path)-- content_disposition = response.getheader("Content-Disposition")- if content_disposition:- filename = re.search(- r'filename=[\'"]?([^\'"\s]+)[\'"]?', content_disposition- ).group(1)- path = os.path.join(os.path.dirname(path), filename)-- with open(path, "wb") as f:- f.write(response.data)-- return path-- def __deserialize_primitive(self, data, klass):- """Deserializes string to primitive type.-- :param data: str.- :param klass: class literal.-- :return: int, long, float, str, bool.- """- try:- return klass(data)- except UnicodeEncodeError:- return str(data)- except TypeError:- return data-- def __deserialize_object(self, value):- """Return an original value.-- :return: object.- """- return value-- def __deserialize_date(self, string):- """Deserializes string to date.-- :param string: str.- :return: date.- """- try:- return parse(string).date()- except ImportError:- return string- except ValueError:- raise rest.ApiException(- status=0, reason="Failed to parse `{0}` as date object".format(string)- )-- def __deserialize_datetime(self, string):- """Deserializes string to datetime.-- The string should be in iso8601 datetime format.-- :param string: str.- :return: datetime.- """- try:- return parse(string)- except ImportError:- return string- except ValueError:- raise rest.ApiException(- status=0,- reason=("Failed to parse `{0}` as datetime object".format(string)),- )-- def __deserialize_model(self, data, klass):- """Deserializes list or dict to model.-- :param data: dict, list.- :param klass: class literal.- :return: model object.- """-- return klass.from_dict(data)diff --git a/packages/python-sdk/e2b/envd/v2/client/api_response.py b/packages/python-sdk/e2b/envd/v2/client/api_response.pydeleted file mode 100644index f38555668..000000000--- a/packages/python-sdk/e2b/envd/v2/client/api_response.py+++ /dev/null@@ -1,22 +0,0 @@-"""API response object."""--from __future__ import annotations-from typing import Any, Dict, Optional, Generic, TypeVar-from pydantic import Field, StrictInt, StrictStr, StrictBytes, BaseModel--T = TypeVar("T")---class ApiResponse(BaseModel, Generic[T]):- """- API response object- """-- status_code: StrictInt = Field(description="HTTP status code")- headers: Optional[Dict[StrictStr, StrictStr]] = Field(- None, description="HTTP headers"- )- data: T = Field(description="Deserialized data given the data type")- raw_data: StrictBytes = Field(description="Raw data (HTTP response body)")-- model_config = {"arbitrary_types_allowed": True}diff --git a/packages/python-sdk/e2b/envd/v2/client/configuration.py b/packages/python-sdk/e2b/envd/v2/client/configuration.pydeleted file mode 100644index a1279aa12..000000000--- a/packages/python-sdk/e2b/envd/v2/client/configuration.py+++ /dev/null@@ -1,443 +0,0 @@-# coding: utf-8--"""- envd-- API for managing files' content and controlling envd-- The version of the OpenAPI document: 0.1.0- Generated by OpenAPI Generator (https://openapi-generator.tech)-- Do not edit the class manually.-""" # noqa: E501---import copy-import logging-import sys-import urllib3--import http.client as httplib--JSON_SCHEMA_VALIDATION_KEYWORDS = {- "multipleOf",- "maximum",- "exclusiveMaximum",- "minimum",- "exclusiveMinimum",- "maxLength",- "minLength",- "pattern",- "maxItems",- "minItems",-}---class Configuration:- """This class contains various settings of the API client.-- :param host: Base url.- :param api_key: Dict to store API key(s).- Each entry in the dict specifies an API key.- The dict key is the name of the security scheme in the OAS specification.- The dict value is the API key secret.- :param api_key_prefix: Dict to store API prefix (e.g. Bearer).- The dict key is the name of the security scheme in the OAS specification.- The dict value is an API key prefix when generating the auth data.- :param username: Username for HTTP basic authentication.- :param password: Password for HTTP basic authentication.- :param access_token: Access token.- :param server_index: Index to servers configuration.- :param server_variables: Mapping with string values to replace variables in- templated server configuration. The validation of enums is performed for- variables with defined enum values before.- :param server_operation_index: Mapping from operation ID to an index to server- configuration.- :param server_operation_variables: Mapping from operation ID to a mapping with- string values to replace variables in templated server configuration.- The validation of enums is performed for variables with defined enum- values before.- :param ssl_ca_cert: str - the path to a file of concatenated CA certificates- in PEM format.-- """-- _default = None-- def __init__(- self,- host=None,- api_key=None,- api_key_prefix=None,- username=None,- password=None,- access_token=None,- server_index=None,- server_variables=None,- server_operation_index=None,- server_operation_variables=None,- ssl_ca_cert=None,- ) -> None:- """Constructor"""- self._base_path = "http://localhost" if host is None else host- """Default Base url- """- self.server_index = 0 if server_index is None and host is None else server_index- self.server_operation_index = server_operation_index or {}- """Default server index- """- self.server_variables = server_variables or {}- self.server_operation_variables = server_operation_variables or {}- """Default server variables- """- self.temp_folder_path = None- """Temp file folder for downloading files- """- # Authentication Settings- self.api_key = {}- if api_key:- self.api_key = api_key- """dict to store API key(s)- """- self.api_key_prefix = {}- if api_key_prefix:- self.api_key_prefix = api_key_prefix- """dict to store API prefix (e.g. Bearer)- """- self.refresh_api_key_hook = None- """function hook to refresh API key if expired- """- self.username = username- """Username for HTTP basic authentication- """- self.password = password- """Password for HTTP basic authentication- """- self.access_token = access_token- """Access token- """- self.logger = {}- """Logging Settings- """- self.logger["package_logger"] = logging.getLogger("e2b.envd.v2.client")- self.logger["urllib3_logger"] = logging.getLogger("urllib3")- self.logger_format = "%(asctime)s %(levelname)s %(message)s"- """Log format- """- self.logger_stream_handler = None- """Log stream handler- """- self.logger_file_handler = None- """Log file handler- """- self.logger_file = None- """Debug file location- """- self.debug = False- """Debug switch- """-- self.verify_ssl = True- """SSL/TLS verification- Set this to false to skip verifying SSL certificate when calling API- from https server.- """- self.ssl_ca_cert = ssl_ca_cert- """Set this to customize the certificate file to verify the peer.- """- self.cert_file = None- """client certificate file- """- self.key_file = None- """client key file- """- self.assert_hostname = None- """Set this to True/False to enable/disable SSL hostname verification.- """- self.tls_server_name = None- """SSL/TLS Server Name Indication (SNI)- Set this to the SNI value expected by the server.- """-- self.proxy = None- """Proxy URL- """- self.proxy_headers = None- """Proxy headers- """- self.safe_chars_for_path_param = ""- """Safe chars for path_param- """- self.retries = None- """Adding retries to override urllib3 default value 3- """- # Enable client side validation- self.client_side_validation = True-- self.socket_options = None- """Options to pass down to the underlying urllib3 socket- """-- self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z"- """datetime format- """-- self.date_format = "%Y-%m-%d"- """date format- """-- def __deepcopy__(self, memo):- cls = self.__class__- result = cls.__new__(cls)- memo[id(self)] = result- for k, v in self.__dict__.items():- if k not in ("logger", "logger_file_handler"):- setattr(result, k, copy.deepcopy(v, memo))- # shallow copy of loggers- result.logger = copy.copy(self.logger)- # use setters to configure loggers- result.logger_file = self.logger_file- result.debug = self.debug- return result-- def __setattr__(self, name, value):- object.__setattr__(self, name, value)-- @classmethod- def set_default(cls, default):- """Set default instance of configuration.-- It stores default configuration, which can be- returned by get_default_copy method.-- :param default: object of Configuration- """- cls._default = default-- @classmethod- def get_default_copy(cls):- """Deprecated. Please use `get_default` instead.-- Deprecated. Please use `get_default` instead.-- :return: The configuration object.- """- return cls.get_default()-- @classmethod- def get_default(cls):- """Return the default configuration.-- This method returns newly created, based on default constructor,- object of Configuration class or returns a copy of default- configuration.-- :return: The configuration object.- """- if cls._default is None:- cls._default = Configuration()- return cls._default-- @property- def logger_file(self):- """The logger file.-- If the logger_file is None, then add stream handler and remove file- handler. Otherwise, add file handler and remove stream handler.-- :param value: The logger_file path.- :type: str- """- return self.__logger_file-- @logger_file.setter- def logger_file(self, value):- """The logger file.-- If the logger_file is None, then add stream handler and remove file- handler. Otherwise, add file handler and remove stream handler.-- :param value: The logger_file path.- :type: str- """- self.__logger_file = value- if self.__logger_file:- # If set logging file,- # then add file handler and remove stream handler.- self.logger_file_handler = logging.FileHandler(self.__logger_file)- self.logger_file_handler.setFormatter(self.logger_formatter)- for _, logger in self.logger.items():- logger.addHandler(self.logger_file_handler)-- @property- def debug(self):- """Debug status-- :param value: The debug status, True or False.- :type: bool- """- return self.__debug-- @debug.setter- def debug(self, value):- """Debug status-- :param value: The debug status, True or False.- :type: bool- """- self.__debug = value- if self.__debug:- # if debug status is True, turn on debug logging- for _, logger in self.logger.items():- logger.setLevel(logging.DEBUG)- # turn on httplib debug- httplib.HTTPConnection.debuglevel = 1- else:- # if debug status is False, turn off debug logging,- # setting log level to default `logging.WARNING`- for _, logger in self.logger.items():- logger.setLevel(logging.WARNING)- # turn off httplib debug- httplib.HTTPConnection.debuglevel = 0-- @property- def logger_format(self):- """The logger format.-- The logger_formatter will be updated when sets logger_format.-- :param value: The format string.- :type: str- """- return self.__logger_format-- @logger_format.setter- def logger_format(self, value):- """The logger format.-- The logger_formatter will be updated when sets logger_format.-- :param value: The format string.- :type: str- """- self.__logger_format = value- self.logger_formatter = logging.Formatter(self.__logger_format)-- def get_api_key_with_prefix(self, identifier, alias=None):- """Gets API key (with prefix if set).-- :param identifier: The identifier of apiKey.- :param alias: The alternative identifier of apiKey.- :return: The token for api key authentication.- """- if self.refresh_api_key_hook is not None:- self.refresh_api_key_hook(self)- key = self.api_key.get(- identifier, self.api_key.get(alias) if alias is not None else None- )- if key:- prefix = self.api_key_prefix.get(identifier)- if prefix:- return "%s %s" % (prefix, key)- else:- return key-- def get_basic_auth_token(self):- """Gets HTTP basic authentication header (string).-- :return: The token for basic HTTP authentication.- """- username = ""- if self.username is not None:- username = self.username- password = ""- if self.password is not None:- password = self.password- return urllib3.util.make_headers(basic_auth=username + ":" + password).get(- "authorization"- )-- def auth_settings(self):- """Gets Auth Settings dict for api client.-- :return: The Auth Settings information dict.- """- auth = {}- return auth-- def to_debug_report(self):- """Gets the essential information for debugging.-- :return: The report for debugging.- """- return (- "Python SDK Debug Report:\n"- "OS: {env}\n"- "Python Version: {pyversion}\n"- "Version of the API: 0.1.0\n"- "SDK Package Version: 1.0.0".format(env=sys.platform, pyversion=sys.version)- )-- def get_host_settings(self):- """Gets an array of host settings-- :return: An array of host settings- """- return [- {- "url": "",- "description": "No description provided",- }- ]-- def get_host_from_settings(self, index, variables=None, servers=None):- """Gets host URL based on the index and variables- :param index: array index of the host settings- :param variables: hash of variable and the corresponding value- :param servers: an array of host settings or None- :return: URL based on host settings- """- if index is None:- return self._base_path-- variables = {} if variables is None else variables- servers = self.get_host_settings() if servers is None else servers-- try:- server = servers[index]- except IndexError:- raise ValueError(- "Invalid index {0} when selecting the host settings. "- "Must be less than {1}".format(index, len(servers))- )-- url = server["url"]-- # go through variables and replace placeholders- for variable_name, variable in server.get("variables", {}).items():- used_value = variables.get(variable_name, variable["default_value"])-- if "enum_values" in variable and used_value not in variable["enum_values"]:- raise ValueError(- "The variable `{0}` in the host URL has invalid value "- "{1}. Must be {2}.".format(- variable_name, variables[variable_name], variable["enum_values"]- )- )-- url = url.replace("{" + variable_name + "}", used_value)-- return url-- @property- def host(self):- """Return generated host."""- return self.get_host_from_settings(- self.server_index, variables=self.server_variables- )-- @host.setter- def host(self, value):- """Fix base path."""- self._base_path = value- self.server_index = Nonediff --git a/packages/python-sdk/e2b/envd/v2/client/exceptions.py b/packages/python-sdk/e2b/envd/v2/client/exceptions.pydeleted file mode 100644index 8358aa520..000000000--- a/packages/python-sdk/e2b/envd/v2/client/exceptions.py+++ /dev/null@@ -1,161 +0,0 @@-# coding: utf-8--"""- envd-- API for managing files' content and controlling envd-- The version of the OpenAPI document: 0.1.0- Generated by OpenAPI Generator (https://openapi-generator.tech)-- Do not edit the class manually.-""" # noqa: E501---class OpenApiException(Exception):- """The base exception class for all OpenAPIExceptions"""---class ApiTypeError(OpenApiException, TypeError):- def __init__(- self, msg, path_to_item=None, valid_classes=None, key_type=None- ) -> None:- """Raises an exception for TypeErrors-- Args:- msg (str): the exception message-- Keyword Args:- path_to_item (list): a list of keys an indices to get to the- current_item- None if unset- valid_classes (tuple): the primitive classes that current item- should be an instance of- None if unset- key_type (bool): False if our value is a value in a dict- True if it is a key in a dict- False if our item is an item in a list- None if unset- """- self.path_to_item = path_to_item- self.valid_classes = valid_classes- self.key_type = key_type- full_msg = msg- if path_to_item:- full_msg = "{0} at {1}".format(msg, render_path(path_to_item))- super(ApiTypeError, self).__init__(full_msg)---class ApiValueError(OpenApiException, ValueError):- def __init__(self, msg, path_to_item=None) -> None:- """- Args:- msg (str): the exception message-- Keyword Args:- path_to_item (list) the path to the exception in the- received_data dict. None if unset- """-- self.path_to_item = path_to_item- full_msg = msg- if path_to_item:- full_msg = "{0} at {1}".format(msg, render_path(path_to_item))- super(ApiValueError, self).__init__(full_msg)---class ApiAttributeError(OpenApiException, AttributeError):- def __init__(self, msg, path_to_item=None) -> None:- """- Raised when an attribute reference or assignment fails.-- Args:- msg (str): the exception message-- Keyword Args:- path_to_item (None/list) the path to the exception in the- received_data dict- """- self.path_to_item = path_to_item- full_msg = msg- if path_to_item:- full_msg = "{0} at {1}".format(msg, render_path(path_to_item))- super(ApiAttributeError, self).__init__(full_msg)---class ApiKeyError(OpenApiException, KeyError):- def __init__(self, msg, path_to_item=None) -> None:- """- Args:- msg (str): the exception message-- Keyword Args:- path_to_item (None/list) the path to the exception in the- received_data dict- """- self.path_to_item = path_to_item- full_msg = msg- if path_to_item:- full_msg = "{0} at {1}".format(msg, render_path(path_to_item))- super(ApiKeyError, self).__init__(full_msg)---class ApiException(OpenApiException):- def __init__(self, status=None, reason=None, http_resp=None) -> None:- if http_resp:- self.status = http_resp.status- self.reason = http_resp.reason- self.body = http_resp.data.decode("utf-8")- self.headers = http_resp.getheaders()- else:- self.status = status- self.reason = reason- self.body = None- self.headers = None-- def __str__(self):- """Custom error messages for exception"""- error_message = "({0})\n" "Reason: {1}\n".format(self.status, self.reason)- if self.headers:- error_message += "HTTP response headers: {0}\n".format(self.headers)-- if self.body:- error_message += "HTTP response body: {0}\n".format(self.body)-- return error_message---class BadRequestException(ApiException):- def __init__(self, status=None, reason=None, http_resp=None) -> None:- super(BadRequestException, self).__init__(status, reason, http_resp)---class NotFoundException(ApiException):- def __init__(self, status=None, reason=None, http_resp=None) -> None:- super(NotFoundException, self).__init__(status, reason, http_resp)---class UnauthorizedException(ApiException):- def __init__(self, status=None, reason=None, http_resp=None) -> None:- super(UnauthorizedException, self).__init__(status, reason, http_resp)---class ForbiddenException(ApiException):- def __init__(self, status=None, reason=None, http_resp=None) -> None:- super(ForbiddenException, self).__init__(status, reason, http_resp)---class ServiceException(ApiException):- def __init__(self, status=None, reason=None, http_resp=None) -> None:- super(ServiceException, self).__init__(status, reason, http_resp)---def render_path(path_to_item):- """Returns a string representation of a path"""- result = ""- for pth in path_to_item:- if isinstance(pth, int):- result += "[{0}]".format(pth)- else:- result += "['{0}']".format(pth)- return resultdiff --git a/packages/python-sdk/e2b/envd/v2/client/models/__init__.py b/packages/python-sdk/e2b/envd/v2/client/models/__init__.pydeleted file mode 100644index e2e097e18..000000000--- a/packages/python-sdk/e2b/envd/v2/client/models/__init__.py+++ /dev/null@@ -1,17 +0,0 @@-# coding: utf-8--# flake8: noqa-"""- envd-- API for managing files' content and controlling envd-- The version of the OpenAPI document: 0.1.0- Generated by OpenAPI Generator (https://openapi-generator.tech)-- Do not edit the class manually.-""" # noqa: E501---# import models into model package-from e2b.envd.v2.client.models.error import Errordiff --git a/packages/python-sdk/e2b/envd/v2/client/models/error.py b/packages/python-sdk/e2b/envd/v2/client/models/error.pydeleted file mode 100644index 992bfcd77..000000000--- a/packages/python-sdk/e2b/envd/v2/client/models/error.py+++ /dev/null@@ -1,99 +0,0 @@-# coding: utf-8--"""- envd-- API for managing files' content and controlling envd-- The version of the OpenAPI document: 0.1.0- Generated by OpenAPI Generator (https://openapi-generator.tech)-- Do not edit the class manually.-""" # noqa: E501---from __future__ import annotations-import pprint-import re # noqa: F401-import json---from typing import Any, ClassVar, Dict, List-from pydantic import BaseModel, StrictInt, StrictStr-from pydantic import Field--try:- from typing import Self-except ImportError:- from typing_extensions import Self---class Error(BaseModel):- """- Error- """ # noqa: E501-- message: StrictStr = Field(description="Error message")- code: StrictInt = Field(description="Error code")- additional_properties: Dict[str, Any] = {}- __properties: ClassVar[List[str]] = ["message", "code"]-- model_config = {"populate_by_name": True, "validate_assignment": True}-- def to_str(self) -> str:- """Returns the string representation of the model using alias"""- return pprint.pformat(self.model_dump(by_alias=True))-- def to_json(self) -> str:- """Returns the JSON representation of the model using alias"""- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead- return json.dumps(self.to_dict())-- @classmethod- def from_json(cls, json_str: str) -> Self:- """Create an instance of Error from a JSON string"""- return cls.from_dict(json.loads(json_str))-- def to_dict(self) -> Dict[str, Any]:- """Return the dictionary representation of the model using alias.-- This has the following differences from calling pydantic's- `self.model_dump(by_alias=True)`:-- * `None` is only added to the output dict for nullable fields that- were set at model initialization. Other fields with value `None`- are ignored.- * Fields in `self.additional_properties` are added to the output dict.- """- _dict = self.model_dump(- by_alias=True,- exclude={- "additional_properties",- },- exclude_none=True,- )- # puts key-value pairs in additional_properties in the top level- if self.additional_properties is not None:- for _key, _value in self.additional_properties.items():- _dict[_key] = _value-- return _dict-- @classmethod- def from_dict(cls, obj: Dict) -> Self:- """Create an instance of Error from a dict"""- if obj is None:- return None-- if not isinstance(obj, dict):- return cls.model_validate(obj)-- _obj = cls.model_validate(- {"message": obj.get("message"), "code": obj.get("code")}- )- # store additional fields in additional_properties- for _key in obj.keys():- if _key not in cls.__properties:- _obj.additional_properties[_key] = obj.get(_key)-- return _objdiff --git a/packages/python-sdk/e2b/envd/v2/client/rest.py b/packages/python-sdk/e2b/envd/v2/client/rest.pydeleted file mode 100644index 37da73407..000000000--- a/packages/python-sdk/e2b/envd/v2/client/rest.py+++ /dev/null@@ -1,211 +0,0 @@-# coding: utf-8--"""- envd-- API for managing files' content and controlling envd-- The version of the OpenAPI document: 0.1.0- Generated by OpenAPI Generator (https://openapi-generator.tech)-- Do not edit the class manually.-""" # noqa: E501---import io-import json-import re-import ssl--import urllib3--from e2b.envd.v2.client.exceptions import ApiException, ApiValueError--RESTResponseType = urllib3.HTTPResponse---class RESTResponse(io.IOBase):- def __init__(self, resp) -> None:- self.response = resp- self.status = resp.status- self.reason = resp.reason- self.data = None-- def read(self):- if self.data is None:- self.data = self.response.data- return self.data-- def getheaders(self):- """Returns a dictionary of the response headers."""- return self.response.headers-- def getheader(self, name, default=None):- """Returns a given response header."""- return self.response.headers.get(name, default)---class RESTClientObject:- def __init__(self, configuration) -> None:- # urllib3.PoolManager will pass all kw parameters to connectionpool- # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501- # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501- # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501-- # cert_reqs- if configuration.verify_ssl:- cert_reqs = ssl.CERT_REQUIRED- else:- cert_reqs = ssl.CERT_NONE-- addition_pool_args = {}- if configuration.assert_hostname is not None:- addition_pool_args["assert_hostname"] = configuration.assert_hostname-- if configuration.retries is not None:- addition_pool_args["retries"] = configuration.retries-- if configuration.tls_server_name:- addition_pool_args["server_hostname"] = configuration.tls_server_name-- if configuration.socket_options is not None:- addition_pool_args["socket_options"] = configuration.socket_options-- # https pool manager- if configuration.proxy:- self.pool_manager = urllib3.ProxyManager(- cert_reqs=cert_reqs,- ca_certs=configuration.ssl_ca_cert,- cert_file=configuration.cert_file,- key_file=configuration.key_file,- proxy_url=configuration.proxy,- proxy_headers=configuration.proxy_headers,- **addition_pool_args- )- else:- self.pool_manager = urllib3.PoolManager(- cert_reqs=cert_reqs,- ca_certs=configuration.ssl_ca_cert,- cert_file=configuration.cert_file,- key_file=configuration.key_file,- **addition_pool_args- )-- def request(- self,- method,- url,- headers=None,- body=None,- post_params=None,- _request_timeout=None,- ):- """Perform requests.-- :param method: http request method- :param url: http request url- :param headers: http request headers- :param body: request json body, for `application/json`- :param post_params: request post parameters,- `application/x-www-form-urlencoded`- and `multipart/form-data`- :param _request_timeout: timeout setting for this request. If one- number provided, it will be total request- timeout. It can also be a pair (tuple) of- (connection, read) timeouts.- """- method = method.upper()- assert method in ["GET", "HEAD", "DELETE", "POST", "PUT", "PATCH", "OPTIONS"]-- if post_params and body:- raise ApiValueError(- "body parameter cannot be used with post_params parameter."- )-- post_params = post_params or {}- headers = headers or {}-- timeout = None- if _request_timeout:- if isinstance(_request_timeout, (int, float)):- timeout = urllib3.Timeout(total=_request_timeout)- elif isinstance(_request_timeout, tuple) and len(_request_timeout) == 2:- timeout = urllib3.Timeout(- connect=_request_timeout[0], read=_request_timeout[1]- )-- try:- # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE`- if method in ["POST", "PUT", "PATCH", "OPTIONS", "DELETE"]:- # no content type provided or payload is json- content_type = headers.get("Content-Type")- if not content_type or re.search("json", content_type, re.IGNORECASE):- request_body = None- if body is not None:- request_body = json.dumps(body)- r = self.pool_manager.request(- method,- url,- body=request_body,- timeout=timeout,- headers=headers,- preload_content=False,- )- elif content_type == "application/x-www-form-urlencoded":- r = self.pool_manager.request(- method,- url,- fields=post_params,- encode_multipart=False,- timeout=timeout,- headers=headers,- preload_content=False,- )- elif content_type == "multipart/form-data":- # must del headers['Content-Type'], or the correct- # Content-Type which generated by urllib3 will be- # overwritten.- del headers["Content-Type"]- r = self.pool_manager.request(- method,- url,- fields=post_params,- encode_multipart=True,- timeout=timeout,- headers=headers,- preload_content=False,- )- # Pass a `string` parameter directly in the body to support- # other content types than Json when `body` argument is- # provided in serialized form- elif isinstance(body, str) or isinstance(body, bytes):- request_body = body- r = self.pool_manager.request(- method,- url,- body=request_body,- timeout=timeout,- headers=headers,- preload_content=False,- )- else:- # Cannot generate the request from given parameters- msg = """Cannot prepare a request message for provided- arguments. Please check that your arguments match- declared content type."""- raise ApiException(status=0, reason=msg)- # For `GET`, `HEAD`- else:- r = self.pool_manager.request(- method,- url,- fields={},- timeout=timeout,- headers=headers,- preload_content=False,- )- except urllib3.exceptions.SSLError as e:- msg = "\n".join([type(e).__name__, str(e)])- raise ApiException(status=0, reason=msg)-- return RESTResponse(r)diff --git a/packages/python-sdk/e2b/envd/v2/client_README.md b/packages/python-sdk/e2b/envd/v2/client_README.mddeleted file mode 100644index 718dfae8a..000000000--- a/packages/python-sdk/e2b/envd/v2/client_README.md+++ /dev/null@@ -1,86 +0,0 @@-# e2b.envd.v2.client-API for managing files' content and controlling envd--The `e2b.envd.v2.client` package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:--- API version: 0.1.0-- Package version: 1.0.0-- Build package: org.openapitools.codegen.languages.PythonClientCodegen--## Requirements.--Python 3.7+--## Installation & Usage--This python library package is generated without supporting files like setup.py or requirements files--To be able to use it, you will need these dependencies in your own package that uses this library:--* urllib3 >= 1.25.3-* python-dateutil-* pydantic--## Getting Started--In your own code, to use this library to connect and interact with e2b.envd.v2.client,-you can run the following:--```python--import time-import e2b.envd.v2.client-from e2b.envd.v2.client.rest import ApiException-from pprint import pprint--# Defining the host is optional and defaults to http://localhost-# See configuration.py for a list of all supported configuration parameters.-configuration = e2b.envd.v2.client.Configuration(- host = "http://localhost"-)----# Enter a context with an instance of the API client-with e2b.envd.v2.client.ApiClient(configuration) as api_client:- # Create an instance of the API class- api_instance = e2b.envd.v2.client.FilesApi(api_client)- path = 'path_example' # str | Path to the file, URL encoded. Can be relative to user's home directory.- username = 'username_example' # str | User used for setting the owner, or resolving relative paths.-- try:- # Download a file- api_response = api_instance.files_path_get(path, username)- print("The response of FilesApi->files_path_get:\n")- pprint(api_response)- except ApiException as e:- print("Exception when calling FilesApi->files_path_get: %s\n" % e)--```--## Documentation for API Endpoints--All URIs are relative to *http://localhost*--Class | Method | HTTP request | Description------------- | ------------- | ------------- | --------------*FilesApi* | [**files_path_get**](e2b/envd/v2/client/docs/FilesApi.md#files_path_get) | **GET** /files/{path} | Download a file-*FilesApi* | [**files_path_put**](e2b/envd/v2/client/docs/FilesApi.md#files_path_put) | **PUT** /files/{path} | Upload a file and ensure the parent directories exist. If the file exists, it will be overwritten.---## Documentation For Models-- - [Error](e2b/envd/v2/client/docs/Error.md)---<a id="documentation-for-authorization"></a>-## Documentation For Authorization--Endpoints do not require authorization.---## Author----diff --git a/packages/python-sdk/e2b/sandbox/filesystem/filesystem.py b/packages/python-sdk/e2b/sandbox/filesystem/filesystem.pyindex d6ff36add..933cc4a9a 100644--- a/packages/python-sdk/e2b/sandbox/filesystem/filesystem.py+++ b/packages/python-sdk/e2b/sandbox/filesystem/filesystem.py@@ -1,21 +1,33 @@-from io import BytesIOimport connect+import requests+import urllib.parse++from io import IOBase+from typing import (+ Iterator,+ List,+ Optional,+ overload,+ Literal,+ Union,+ IO,+)-from typing import List, Optional, overload, Literal, Union--from e2b.envd import EnvdApiClient, clientfrom e2b.sandbox.filesystem.watch_handle import WatchHandlefrom e2b.connection_config import Usernamefrom e2b.envd.filesystem import filesystem_connect, filesystem_pb2from e2b.envd.permissions.permissions_pb2 import User+from e2b.envd.api import ENVD_API_FILES_ROUTEFileFormat = Literal["text", "bytes", "stream"]+READ_CHUNK_SIZE = 2 << 16 # 64KiB+class Filesystem:def __init__(self, envd_api_url: str) -> None:- self._envd_api = EnvdApiClient(api_url=envd_api_url)+ self._envd_api_url = envd_api_urlself._rpc = filesystem_connect.FilesystemClient(envd_api_url,@@ -47,7 +59,7 @@ class Filesystem:format: Literal["stream"],request_timeout: Optional[float] = None,user: Username = "user",- ) -> BytesIO: ...+ ) -> Iterator[bytes]: ...def read(self,@@ -56,57 +68,33 @@ class Filesystem:request_timeout: Optional[float] = None,user: Username = "user",):- res = client.FilesApi(self._envd_api).files_path_get(- path=path,- username=user,- _request_timeout=request_timeout,+ url = urllib.parse.urljoin(self._envd_api_url, f"/{ENVD_API_FILES_ROUTE}")+ r = requests.get(+ url,+ params={"path": path, "username": user},)if format == "text":- return res.decode()+ return r.text+ elif format == "bytes":+ return bytearray(r.content)+ elif format == "stream":+ iter: Iterator[bytes] = r.iter_content(chunk_size=READ_CHUNK_SIZE)+ return iter- return res-- @overloaddef write(self,path: str,- data: str,+ data: Union[str, bytes, IOBase, IO],request_timeout: Optional[float] = None,user: Username = "user",- ) -> None: ...-- @overload- def write(- self,- path: str,- data: bytes,- request_timeout: Optional[float] = None,- user: Username = "user",- ) -> None: ...-- @overload- def write(- self,- path: str,- data: BytesIO,- request_timeout: Optional[float] = None,- user: Username = "user",- ) -> None: ...-- def write(- self,- path: str,- data: Union[bytes, str, BytesIO],- request_timeout: Optional[float],- user: Username = "user",) -> None:- client.FilesApi(self._envd_api).files_path_put(- path=path,- user=user,- mode=mode,- data=data,- _request_timeout=request_timeout,+ url = urllib.parse.urljoin(self._envd_api_url, f"/{ENVD_API_FILES_ROUTE}")+ files = {"file": data}+ r = requests.post(+ url,+ files=files,+ params={"path": path, "username": user},)def list(@@ -164,39 +152,3 @@ class Filesystem:)return WatchHandle(events=events)-- # def upload_file(self, file: IO, timeout: Optional[float] = TIMEOUT) -> str:- # """- # Upload a file to the sandbox.- # The file will be uploaded to the user's home (`/home/user`) directory with the same name.- # If a file with the same name already exists, it will be overwritten.-- # :param file: The file to upload- # :param timeout: Specify the duration, in seconds to give the method to finish its execution before it times out (default is 60 seconds). If set to None, the method will continue to wait until it completes, regardless of time- # """- # files = {"file": file}- # r = requests.post(self.file_url(), files=files, timeout=timeout)- # if r.status_code != 200:- # raise Exception(f"Failed to upload file: {r.reason} {r.text}")-- # filename = path.basename(file.name)- # return f"/home/user/{filename}"-- # def download_file(- # self, remote_path: str, timeout: Optional[float] = TIMEOUT- # ) -> bytes:- # """- # Download a file from the sandbox and returns it's content as bytes.-- # :param remote_path: The path of the file to download- # :param timeout: Specify the duration, in seconds to give the method to finish its execution before it times out (default is 60 seconds). If set to None, the method will continue to wait until it completes, regardless of time- # """- # encoded_path = urllib.parse.quote(remote_path)- # url = f"{self.file_url()}?path={encoded_path}"- # r = requests.get(url, timeout=timeout)-- # if r.status_code != 200:- # raise Exception(- # f"Failed to download file '{remote_path}'. {r.reason} {r.text}"- # )- # return r.contentdiff --git a/packages/python-sdk/e2b/sandbox/main.py b/packages/python-sdk/e2b/sandbox/main.pyindex 3f4a71676..6a92ae30b 100644--- a/packages/python-sdk/e2b/sandbox/main.py+++ b/packages/python-sdk/e2b/sandbox/main.py@@ -6,6 +6,7 @@ from e2b.sandbox.filesystem.filesystem import Filesystemfrom e2b.sandbox.process.main import Processfrom e2b.sandbox.sandbox_api import SandboxApifrom e2b.connection_config import ConnectionConfig+from e2b.envd.api import ENVD_API_FILES_ROUTEclass Sandbox(SandboxApi):@@ -101,9 +102,9 @@ class Sandbox(SandboxApi):@propertydef upload_url(self) -> str:- url = urllib.parse.urljoin(self._envd_api_url, "/files?")+ url = urllib.parse.urljoin(self._envd_api_url, f"/{ENVD_API_FILES_ROUTE}?")params = urllib.parse.urlencode(- {"user": "user"},+ {"username": "user"},)url = urllib.parse.urljoin(url, params)diff --git a/packages/python-sdk/e2b/sandbox/process/main.py b/packages/python-sdk/e2b/sandbox/process/main.pyindex dcea309a9..472124a98 100644--- a/packages/python-sdk/e2b/sandbox/process/main.py+++ b/packages/python-sdk/e2b/sandbox/process/main.py@@ -39,7 +39,8 @@ class Process:cwd: Optional[str] = None,on_stdout: Optional[Callable[[str], None]] = None,on_stderr: Optional[Callable[[str], None]] = None,- ) -> ProcessResult: ...+ ) -> ProcessResult:+ ...@overloaddef run(@@ -49,7 +50,8 @@ class Process:envs: Optional[Dict[str, str]] = {},user: Username = "user",cwd: Optional[str] = None,- ) -> ProcessHandle: ...+ ) -> ProcessHandle:+ ...def run(self,diff --git a/packages/python-sdk/e2b/sandbox/process/process_handle.py b/packages/python-sdk/e2b/sandbox/process/process_handle.pyindex 54ede9d55..49571b58b 100644--- a/packages/python-sdk/e2b/sandbox/process/process_handle.py+++ b/packages/python-sdk/e2b/sandbox/process/process_handle.py@@ -23,6 +23,18 @@ class ProcessResult(BaseModel):error: Optional[str]+class ProcessExitException(Exception, ProcessResult):+ def __init__(self, result: ProcessResult):+ self._result = result++ def __str__(self):+ return f"Process exited with code {self._result.exit_code} and error: {self._result.error}"++ @property+ def exit_code(self):+ return self._result.exit_code++class ProcessHandle(Generator):@propertydef pid(self):@@ -79,11 +91,14 @@ class ProcessHandle(Generator):for output in self:if isinstance(output, ProcessStdout) and on_stdout:on_stdout(output.stdout)- if isinstance(output, ProcessStderr) and on_stderr:+ elif isinstance(output, ProcessStderr) and on_stderr:on_stderr(output.stderr)if self._result is None:- raise RuntimeError("Process has not ended")+ raise RuntimeError("Process ended without an end event")++ if self._result.exit_code != 0:+ raise ProcessExitException(self._result)return self._resultdiff --git a/packages/python-sdk/poetry.lock b/packages/python-sdk/poetry.lockindex 6b2dbdf09..d69204a8e 100644--- a/packages/python-sdk/poetry.lock+++ b/packages/python-sdk/poetry.lock@@ -72,6 +72,116 @@ d = ["aiohttp (>=3.7.4)", "aiohttp (>=3.7.4,!=3.9.0)"]jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"]uvloop = ["uvloop (>=0.15.2)"]+[[package]]+name = "certifi"+version = "2024.6.2"+description = "Python package for providing Mozilla's CA Bundle."+optional = false+python-versions = ">=3.6"+files = [+ {file = "certifi-2024.6.2-py3-none-any.whl", hash = "sha256:ddc6c8ce995e6987e7faf5e3f1b02b302836a0e5d98ece18392cb1a36c72ad56"},+ {file = "certifi-2024.6.2.tar.gz", hash = "sha256:3cd43f1c6fa7dedc5899d69d3ad0398fd018ad1a17fba83ddaf78aa46c747516"},+]++[[package]]+name = "charset-normalizer"+version = "3.3.2"+description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet."+optional = false+python-versions = ">=3.7.0"+files = [+ {file = "charset-normalizer-3.3.2.tar.gz", hash = "sha256:f30c3cb33b24454a82faecaf01b19c18562b1e89558fb6c56de4d9118a032fd5"},+ {file = "charset_normalizer-3.3.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:25baf083bf6f6b341f4121c2f3c548875ee6f5339300e08be3f2b2ba1721cdd3"},+ {file = "charset_normalizer-3.3.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:06435b539f889b1f6f4ac1758871aae42dc3a8c0e24ac9e60c2384973ad73027"},+ {file = "charset_normalizer-3.3.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9063e24fdb1e498ab71cb7419e24622516c4a04476b17a2dab57e8baa30d6e03"},+ {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6897af51655e3691ff853668779c7bad41579facacf5fd7253b0133308cf000d"},+ {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1d3193f4a680c64b4b6a9115943538edb896edc190f0b222e73761716519268e"},+ {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cd70574b12bb8a4d2aaa0094515df2463cb429d8536cfb6c7ce983246983e5a6"},+ {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8465322196c8b4d7ab6d1e049e4c5cb460d0394da4a27d23cc242fbf0034b6b5"},+ {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a9a8e9031d613fd2009c182b69c7b2c1ef8239a0efb1df3f7c8da66d5dd3d537"},+ {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:beb58fe5cdb101e3a055192ac291b7a21e3b7ef4f67fa1d74e331a7f2124341c"},+ {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:e06ed3eb3218bc64786f7db41917d4e686cc4856944f53d5bdf83a6884432e12"},+ {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:2e81c7b9c8979ce92ed306c249d46894776a909505d8f5a4ba55b14206e3222f"},+ {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:572c3763a264ba47b3cf708a44ce965d98555f618ca42c926a9c1616d8f34269"},+ {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:fd1abc0d89e30cc4e02e4064dc67fcc51bd941eb395c502aac3ec19fab46b519"},+ {file = "charset_normalizer-3.3.2-cp310-cp310-win32.whl", hash = "sha256:3d47fa203a7bd9c5b6cee4736ee84ca03b8ef23193c0d1ca99b5089f72645c73"},+ {file = "charset_normalizer-3.3.2-cp310-cp310-win_amd64.whl", hash = "sha256:10955842570876604d404661fbccbc9c7e684caf432c09c715ec38fbae45ae09"},+ {file = "charset_normalizer-3.3.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:802fe99cca7457642125a8a88a084cef28ff0cf9407060f7b93dca5aa25480db"},+ {file = "charset_normalizer-3.3.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:573f6eac48f4769d667c4442081b1794f52919e7edada77495aaed9236d13a96"},+ {file = "charset_normalizer-3.3.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:549a3a73da901d5bc3ce8d24e0600d1fa85524c10287f6004fbab87672bf3e1e"},+ {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f27273b60488abe721a075bcca6d7f3964f9f6f067c8c4c605743023d7d3944f"},+ {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1ceae2f17a9c33cb48e3263960dc5fc8005351ee19db217e9b1bb15d28c02574"},+ {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:65f6f63034100ead094b8744b3b97965785388f308a64cf8d7c34f2f2e5be0c4"},+ {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:753f10e867343b4511128c6ed8c82f7bec3bd026875576dfd88483c5c73b2fd8"},+ {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4a78b2b446bd7c934f5dcedc588903fb2f5eec172f3d29e52a9096a43722adfc"},+ {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:e537484df0d8f426ce2afb2d0f8e1c3d0b114b83f8850e5f2fbea0e797bd82ae"},+ {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:eb6904c354526e758fda7167b33005998fb68c46fbc10e013ca97f21ca5c8887"},+ {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:deb6be0ac38ece9ba87dea880e438f25ca3eddfac8b002a2ec3d9183a454e8ae"},+ {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:4ab2fe47fae9e0f9dee8c04187ce5d09f48eabe611be8259444906793ab7cbce"},+ {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:80402cd6ee291dcb72644d6eac93785fe2c8b9cb30893c1af5b8fdd753b9d40f"},+ {file = "charset_normalizer-3.3.2-cp311-cp311-win32.whl", hash = "sha256:7cd13a2e3ddeed6913a65e66e94b51d80a041145a026c27e6bb76c31a853c6ab"},+ {file = "charset_normalizer-3.3.2-cp311-cp311-win_amd64.whl", hash = "sha256:663946639d296df6a2bb2aa51b60a2454ca1cb29835324c640dafb5ff2131a77"},+ {file = "charset_normalizer-3.3.2-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:0b2b64d2bb6d3fb9112bafa732def486049e63de9618b5843bcdd081d8144cd8"},+ {file = "charset_normalizer-3.3.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:ddbb2551d7e0102e7252db79ba445cdab71b26640817ab1e3e3648dad515003b"},+ {file = "charset_normalizer-3.3.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:55086ee1064215781fff39a1af09518bc9255b50d6333f2e4c74ca09fac6a8f6"},+ {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8f4a014bc36d3c57402e2977dada34f9c12300af536839dc38c0beab8878f38a"},+ {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a10af20b82360ab00827f916a6058451b723b4e65030c5a18577c8b2de5b3389"},+ {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8d756e44e94489e49571086ef83b2bb8ce311e730092d2c34ca8f7d925cb20aa"},+ {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:90d558489962fd4918143277a773316e56c72da56ec7aa3dc3dbbe20fdfed15b"},+ {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6ac7ffc7ad6d040517be39eb591cac5ff87416c2537df6ba3cba3bae290c0fed"},+ {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:7ed9e526742851e8d5cc9e6cf41427dfc6068d4f5a3bb03659444b4cabf6bc26"},+ {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:8bdb58ff7ba23002a4c5808d608e4e6c687175724f54a5dade5fa8c67b604e4d"},+ {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_ppc64le.whl", hash = "sha256:6b3251890fff30ee142c44144871185dbe13b11bab478a88887a639655be1068"},+ {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_s390x.whl", hash = "sha256:b4a23f61ce87adf89be746c8a8974fe1c823c891d8f86eb218bb957c924bb143"},+ {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:efcb3f6676480691518c177e3b465bcddf57cea040302f9f4e6e191af91174d4"},+ {file = "charset_normalizer-3.3.2-cp312-cp312-win32.whl", hash = "sha256:d965bba47ddeec8cd560687584e88cf699fd28f192ceb452d1d7ee807c5597b7"},+ {file = "charset_normalizer-3.3.2-cp312-cp312-win_amd64.whl", hash = "sha256:96b02a3dc4381e5494fad39be677abcb5e6634bf7b4fa83a6dd3112607547001"},+ {file = "charset_normalizer-3.3.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:95f2a5796329323b8f0512e09dbb7a1860c46a39da62ecb2324f116fa8fdc85c"},+ {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c002b4ffc0be611f0d9da932eb0f704fe2602a9a949d1f738e4c34c75b0863d5"},+ {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a981a536974bbc7a512cf44ed14938cf01030a99e9b3a06dd59578882f06f985"},+ {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3287761bc4ee9e33561a7e058c72ac0938c4f57fe49a09eae428fd88aafe7bb6"},+ {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:42cb296636fcc8b0644486d15c12376cb9fa75443e00fb25de0b8602e64c1714"},+ {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0a55554a2fa0d408816b3b5cedf0045f4b8e1a6065aec45849de2d6f3f8e9786"},+ {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:c083af607d2515612056a31f0a8d9e0fcb5876b7bfc0abad3ecd275bc4ebc2d5"},+ {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:87d1351268731db79e0f8e745d92493ee2841c974128ef629dc518b937d9194c"},+ {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:bd8f7df7d12c2db9fab40bdd87a7c09b1530128315d047a086fa3ae3435cb3a8"},+ {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:c180f51afb394e165eafe4ac2936a14bee3eb10debc9d9e4db8958fe36afe711"},+ {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:8c622a5fe39a48f78944a87d4fb8a53ee07344641b0562c540d840748571b811"},+ {file = "charset_normalizer-3.3.2-cp37-cp37m-win32.whl", hash = "sha256:db364eca23f876da6f9e16c9da0df51aa4f104a972735574842618b8c6d999d4"},+ {file = "charset_normalizer-3.3.2-cp37-cp37m-win_amd64.whl", hash = "sha256:86216b5cee4b06df986d214f664305142d9c76df9b6512be2738aa72a2048f99"},+ {file = "charset_normalizer-3.3.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:6463effa3186ea09411d50efc7d85360b38d5f09b870c48e4600f63af490e56a"},+ {file = "charset_normalizer-3.3.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6c4caeef8fa63d06bd437cd4bdcf3ffefe6738fb1b25951440d80dc7df8c03ac"},+ {file = "charset_normalizer-3.3.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:37e55c8e51c236f95b033f6fb391d7d7970ba5fe7ff453dad675e88cf303377a"},+ {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fb69256e180cb6c8a894fee62b3afebae785babc1ee98b81cdf68bbca1987f33"},+ {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ae5f4161f18c61806f411a13b0310bea87f987c7d2ecdbdaad0e94eb2e404238"},+ {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b2b0a0c0517616b6869869f8c581d4eb2dd83a4d79e0ebcb7d373ef9956aeb0a"},+ {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:45485e01ff4d3630ec0d9617310448a8702f70e9c01906b0d0118bdf9d124cf2"},+ {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:eb00ed941194665c332bf8e078baf037d6c35d7c4f3102ea2d4f16ca94a26dc8"},+ {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:2127566c664442652f024c837091890cb1942c30937add288223dc895793f898"},+ {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:a50aebfa173e157099939b17f18600f72f84eed3049e743b68ad15bd69b6bf99"},+ {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:4d0d1650369165a14e14e1e47b372cfcb31d6ab44e6e33cb2d4e57265290044d"},+ {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:923c0c831b7cfcb071580d3f46c4baf50f174be571576556269530f4bbd79d04"},+ {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:06a81e93cd441c56a9b65d8e1d043daeb97a3d0856d177d5c90ba85acb3db087"},+ {file = "charset_normalizer-3.3.2-cp38-cp38-win32.whl", hash = "sha256:6ef1d82a3af9d3eecdba2321dc1b3c238245d890843e040e41e470ffa64c3e25"},+ {file = "charset_normalizer-3.3.2-cp38-cp38-win_amd64.whl", hash = "sha256:eb8821e09e916165e160797a6c17edda0679379a4be5c716c260e836e122f54b"},+ {file = "charset_normalizer-3.3.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:c235ebd9baae02f1b77bcea61bce332cb4331dc3617d254df3323aa01ab47bd4"},+ {file = "charset_normalizer-3.3.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:5b4c145409bef602a690e7cfad0a15a55c13320ff7a3ad7ca59c13bb8ba4d45d"},+ {file = "charset_normalizer-3.3.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:68d1f8a9e9e37c1223b656399be5d6b448dea850bed7d0f87a8311f1ff3dabb0"},+ {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:22afcb9f253dac0696b5a4be4a1c0f8762f8239e21b99680099abd9b2b1b2269"},+ {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e27ad930a842b4c5eb8ac0016b0a54f5aebbe679340c26101df33424142c143c"},+ {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1f79682fbe303db92bc2b1136016a38a42e835d932bab5b3b1bfcfbf0640e519"},+ {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b261ccdec7821281dade748d088bb6e9b69e6d15b30652b74cbbac25e280b796"},+ {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:122c7fa62b130ed55f8f285bfd56d5f4b4a5b503609d181f9ad85e55c89f4185"},+ {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:d0eccceffcb53201b5bfebb52600a5fb483a20b61da9dbc885f8b103cbe7598c"},+ {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:9f96df6923e21816da7e0ad3fd47dd8f94b2a5ce594e00677c0013018b813458"},+ {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:7f04c839ed0b6b98b1a7501a002144b76c18fb1c1850c8b98d458ac269e26ed2"},+ {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:34d1c8da1e78d2e001f363791c98a272bb734000fcef47a491c1e3b0505657a8"},+ {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:ff8fa367d09b717b2a17a052544193ad76cd49979c805768879cb63d9ca50561"},+ {file = "charset_normalizer-3.3.2-cp39-cp39-win32.whl", hash = "sha256:aed38f6e4fb3f5d6bf81bfa990a07806be9d83cf7bacef998ab1a9bd660a581f"},+ {file = "charset_normalizer-3.3.2-cp39-cp39-win_amd64.whl", hash = "sha256:b01b88d45a6fcb69667cd6d2f7a9aeb4bf53760d7fc536bf679ec94fe9f3ff3d"},+ {file = "charset_normalizer-3.3.2-py3-none-any.whl", hash = "sha256:3e4d1f6587322d2788836a99c69062fbb091331ec940e02d12d179c1d53e25fc"},+]+[[package]]name = "click"version = "8.1.7"@@ -125,6 +235,17 @@ files = [[package.extras]testing = ["hatch", "pre-commit", "pytest", "tox"]+[[package]]+name = "idna"+version = "3.7"+description = "Internationalized Domain Names in Applications (IDNA)"+optional = false+python-versions = ">=3.5"+files = [+ {file = "idna-3.7-py3-none-any.whl", hash = "sha256:82fee1fc78add43492d3a1898bfa6d8a904cc97d8427f683ed8e798d07761aa0"},+ {file = "idna-3.7.tar.gz", hash = "sha256:028ff3aadf0609c1fd278d8ea3089299412a7a8b9bd005dd08b9f8285bcb5cfc"},+]+[[package]]name = "iniconfig"version = "2.0.0"@@ -415,6 +536,27 @@ files = [[package.extras]cli = ["click (>=5.0)"]+[[package]]+name = "requests"+version = "2.32.3"+description = "Python HTTP for Humans."+optional = false+python-versions = ">=3.8"+files = [+ {file = "requests-2.32.3-py3-none-any.whl", hash = "sha256:70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6"},+ {file = "requests-2.32.3.tar.gz", hash = "sha256:55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760"},+]++[package.dependencies]+certifi = ">=2017.4.17"+charset-normalizer = ">=2,<4"+idna = ">=2.5,<4"+urllib3 = ">=1.21.1,<3"++[package.extras]+socks = ["PySocks (>=1.5.6,!=1.5.7)"]+use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"]+[[package]]name = "six"version = "1.16.0"@@ -468,4 +610,4 @@ zstd = ["zstandard (>=0.18.0)"][metadata]lock-version = "2.0"python-versions = "^3.8"-content-hash = "eb838071e30927583aeaa8ccca676513cfc2c095e715505e0b949627fdf32011"+content-hash = "c1bf27d4b69ccaf54aae2bb09c972c70c175cc2570d4cfbae534d67a33a48ee2"diff --git a/packages/python-sdk/pyproject.toml b/packages/python-sdk/pyproject.tomlindex 50a291b72..0d516fabe 100644--- a/packages/python-sdk/pyproject.toml+++ b/packages/python-sdk/pyproject.toml@@ -18,6 +18,7 @@ pydantic = "*"aenum = ">=3.1.11"typing-extensions = ">=4.8.0"protobuf = "^5.26.1"+requests = "^2.32.3"[tool.poetry.group.dev.dependencies]black = "^23.7.0"diff --git a/spec/envd/envd.yaml b/spec/envd/envd.yamlindex f5956ee8c..76d17f301 100644--- a/spec/envd/envd.yaml+++ b/spec/envd/envd.yaml@@ -33,7 +33,7 @@ paths:$ref: "#/components/responses/FileNotFound"500:$ref: "#/components/responses/InternalServerError"- put:+ post:summary: Upload a file and ensure the parent directories exist. If the file exists, it will be overwritten.tags: [files]parameters: