Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider implementing Python pathlib.Path interface for e2b filesystem #465

Open
brendanator opened this issue Nov 1, 2024 · 1 comment
Labels
feature New feature or request

Comments

@brendanator
Copy link
Contributor

Is your feature request related to a problem? Please describe.
It'd be great if I could use python standard library to handle files in the sandbox

Describe the solution you'd like

with Sandbox() as sbx:
  # access the root directory
  root_path = sbx.Files.root_path()
  for path in root_path.iterdir():
      print(path)

  # access the user directory
  user_path = sbx.Files.user_path()
  example_path = user_path / "example.txt"
  example_path.write_text("hello sandbox")

Additional context
Additional awesomeness would be achieved if I could use things like shutil.copytree for bulk file transfers to and from the sandbox

@brendanator brendanator added the feature New feature or request label Nov 1, 2024
Copy link

linear bot commented Nov 1, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant