E2B
E2B copied to clipboard
Python Async sandbox
Is your feature request related to a problem? Please describe. Deploying as part of a webserver so would like async functionality of sandbox
Describe the solution you'd like async methods for sandbox usage
Describe alternatives you've considered Considered using modal
Might be missing something here on usage so happy for any pointers.
Hey @PrathamSoni, we currently don't have async version but it's usually possible to wrap our SDK in async code.
- What kind of Python webserver framework are you using?
- What made you use E2B instead of Modal?
using a fastapi server. would prefer to have async native code but sure yes i can manually wrap things. Was just facing some bugs with their sandbox; however, I will say there documentation is somewhat nicer.
Also, quick follow up, are the sandboxes designed to handle multiple incoming requests? For example, if I want to read multiple files concurrently, would it be able to do that or would each file read be synchronous on the server-side
Hi @PrathamSoni,
Also, quick follow up, are the sandboxes designed to handle multiple incoming requests? For example, if I want to read multiple files concurrently, would it be able to do that or would each file read be synchronous on the server-side
Yes, when using download_file
you should be able to be download multiple files concurrently.
however, I will say there documentation is somewhat nicer.
Please bear with us, we're a new company and a small team — things will get better. DX and docs is our main focus right now. Can I ask what about the Modal documentation did you like better?
Hey @PrathamSoni, were you able to make it work without using async?
hey working with simple run in threadpool concurrency but would appreciate native solution