E2B/packages/python-sdk/example.py
2024-05-10 20:32:00 -07:00

24 lines
403 B
Python

import logging
from dotenv import load_dotenv
from e2b import Sandbox
import time
load_dotenv()
logging.basicConfig(level=logging.ERROR)
start = time.time()
with Sandbox(
template="i32b48xtmbk9w5vfad1l",
# _debug_hostname="localhost",
# _debug_port=49982,
# _debug_dev_env="local",
) as sandbox:
print(sandbox.id)
end = time.time()
print(f"Time taken: {end - start}")