__init__.py 528 B

12345678910111213141516171819202122232425
  1. from .e2b.sandbox import E2BBox
  2. from .sandbox import Sandbox
  3. def get_runtime_cls(name: str):
  4. # Local imports to avoid circular imports
  5. if name == 'eventstream':
  6. from .client.runtime import EventStreamRuntime
  7. return EventStreamRuntime
  8. elif name == 'e2b':
  9. from .e2b.runtime import E2BRuntime
  10. return E2BRuntime
  11. else:
  12. raise ValueError(f'Runtime {name} not supported')
  13. __all__ = [
  14. 'DockerSSHBox',
  15. 'E2BBox',
  16. 'LocalBox',
  17. 'Sandbox',
  18. 'get_runtime_cls',
  19. ]