"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m71.3/71.3 kB\u001b[0m \u001b[31m3.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
"\u001b[?25hRequirement already satisfied: aenum>=3.1.11 in /opt/homebrew/lib/python3.11/site-packages (from e2b==0.1.4) (3.1.15)\n",
"Requirement already satisfied: aiohttp>=3.8.4 in /opt/homebrew/lib/python3.11/site-packages (from e2b==0.1.4) (3.8.4)\n",
"Requirement already satisfied: jsonrpcclient<5.0.0,>=4.0.3 in /opt/homebrew/lib/python3.11/site-packages (from e2b==0.1.4) (4.0.3)\n",
"Requirement already satisfied: pydantic<2.0.0,>=1.10.5 in /opt/homebrew/lib/python3.11/site-packages (from e2b==0.1.4) (1.10.7)\n",
"Requirement already satisfied: python-dateutil>=2.8.2 in /opt/homebrew/lib/python3.11/site-packages (from e2b==0.1.4) (2.8.2)\n",
"Requirement already satisfied: urllib3>=1.25.3 in /opt/homebrew/lib/python3.11/site-packages (from e2b==0.1.4) (1.26.16)\n",
"Requirement already satisfied: websockets<12.0.0,>=11.0.3 in /opt/homebrew/lib/python3.11/site-packages (from e2b==0.1.4) (11.0.3)\n",
"Requirement already satisfied: attrs>=17.3.0 in /opt/homebrew/lib/python3.11/site-packages (from aiohttp>=3.8.4->e2b==0.1.4) (23.1.0)\n",
"Requirement already satisfied: charset-normalizer<4.0,>=2.0 in /opt/homebrew/lib/python3.11/site-packages (from aiohttp>=3.8.4->e2b==0.1.4) (3.1.0)\n",
"Requirement already satisfied: multidict<7.0,>=4.5 in /opt/homebrew/lib/python3.11/site-packages (from aiohttp>=3.8.4->e2b==0.1.4) (6.0.4)\n",
"Requirement already satisfied: async-timeout<5.0,>=4.0.0a3 in /opt/homebrew/lib/python3.11/site-packages (from aiohttp>=3.8.4->e2b==0.1.4) (4.0.2)\n",
"Requirement already satisfied: yarl<2.0,>=1.0 in /opt/homebrew/lib/python3.11/site-packages (from aiohttp>=3.8.4->e2b==0.1.4) (1.9.2)\n",
"Requirement already satisfied: frozenlist>=1.1.1 in /opt/homebrew/lib/python3.11/site-packages (from aiohttp>=3.8.4->e2b==0.1.4) (1.3.3)\n",
"Requirement already satisfied: aiosignal>=1.1.2 in /opt/homebrew/lib/python3.11/site-packages (from aiohttp>=3.8.4->e2b==0.1.4) (1.3.1)\n",
"Requirement already satisfied: typing-extensions>=4.2.0 in /opt/homebrew/lib/python3.11/site-packages (from pydantic<2.0.0,>=1.10.5->e2b==0.1.4) (4.5.0)\n",
"Requirement already satisfied: six>=1.5 in /opt/homebrew/lib/python3.11/site-packages (from python-dateutil>=2.8.2->e2b==0.1.4) (1.16.0)\n",
"Requirement already satisfied: idna>=2.0 in /opt/homebrew/lib/python3.11/site-packages (from yarl<2.0,>=1.0->aiohttp>=3.8.4->e2b==0.1.4) (3.4)\n",
"Installing collected packages: e2b\n",
" Attempting uninstall: e2b\n",
" Found existing installation: e2b 0.1.3\n",
" Uninstalling e2b-0.1.3:\n",
" Successfully uninstalled e2b-0.1.3\n",
"Successfully installed e2b-0.1.4\n",
"\n",
"\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m A new release of pip is available: \u001b[0m\u001b[31;49m23.0.1\u001b[0m\u001b[39;49m -> \u001b[0m\u001b[32;49m23.2.1\u001b[0m\n",
"\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m To update, run: \u001b[0m\u001b[32;49mpython3.11 -m pip install --upgrade pip\u001b[0m\n",
"Note: you may need to restart the kernel to use updated packages.\n"
]
}
],
"source": [
"pip install e2b==0.1.4"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Usage"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"from e2b import Session\n",
"\n",
"id = \"Nodejs\""
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Initialization"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"# You can use some of the predefined environments by using specific id:\n",