From 507e6a6fa09162a57ce18b92dc759ae169a7cf06 Mon Sep 17 00:00:00 2001 From: Tomas Beran Date: Fri, 10 Apr 2026 20:46:00 +0200 Subject: [PATCH 1/2] fix: correct write_files docstring about directory auto-creation The docstring incorrectly stated that writing to a non-existing directory would produce an error. The backend auto-creates parent directories, as confirmed by existing tests and consistent with the write() docstring. --- packages/python-sdk/e2b/sandbox_async/filesystem/filesystem.py | 2 +- packages/python-sdk/e2b/sandbox_sync/filesystem/filesystem.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/python-sdk/e2b/sandbox_async/filesystem/filesystem.py b/packages/python-sdk/e2b/sandbox_async/filesystem/filesystem.py index 8f70f58a1c..5b9f19a158 100644 --- a/packages/python-sdk/e2b/sandbox_async/filesystem/filesystem.py +++ b/packages/python-sdk/e2b/sandbox_async/filesystem/filesystem.py @@ -237,7 +237,7 @@ async def write_files( Writes a list of files to the filesystem. When writing to a file that doesn't exist, the file will get created. When writing to a file that already exists, the file will get overwritten. - When writing to a file that's in a directory that doesn't exist, you'll get an error. + When writing to a file at path that doesn't exist, the necessary directories will be created. :param files: list of files to write as `WriteEntry` objects, each containing `path` and `data` :param user: Run the operation as this user diff --git a/packages/python-sdk/e2b/sandbox_sync/filesystem/filesystem.py b/packages/python-sdk/e2b/sandbox_sync/filesystem/filesystem.py index 9b26a22d0f..8a5bc0aa85 100644 --- a/packages/python-sdk/e2b/sandbox_sync/filesystem/filesystem.py +++ b/packages/python-sdk/e2b/sandbox_sync/filesystem/filesystem.py @@ -233,7 +233,7 @@ def write_files( Writes a list of files to the filesystem. When writing to a file that doesn't exist, the file will get created. When writing to a file that already exists, the file will get overwritten. - When writing to a file that's in a directory that doesn't exist, you'll get an error. + When writing to a file at path that doesn't exist, the necessary directories will be created. :param files: list of files to write as `WriteEntry` objects, each containing `path` and `data` :param user: Run the operation as this user From d149e8b68ef5ed3852c84c1dcf8a9cf6f5d3adf0 Mon Sep 17 00:00:00 2001 From: Tomas Beran Date: Fri, 10 Apr 2026 21:36:28 +0200 Subject: [PATCH 2/2] chore: add changeset for write_files docstring fix --- .changeset/fix-write-files-docstring.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/fix-write-files-docstring.md diff --git a/.changeset/fix-write-files-docstring.md b/.changeset/fix-write-files-docstring.md new file mode 100644 index 0000000000..1147135ad8 --- /dev/null +++ b/.changeset/fix-write-files-docstring.md @@ -0,0 +1,5 @@ +--- +'@e2b/python-sdk': patch +--- + +fix write_files docstring to correctly state that parent directories are auto-created