Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

New infra (#212)

Jakub Novák388309830b94
diff --git a/.changeset/quick-shoes-explode.md b/.changeset/quick-shoes-explode.md
new file mode 100644
index 000000000..2bac68ef0
--- /dev/null
+++ b/.changeset/quick-shoes-explode.md
@@ -0,0 +1,8 @@
+---
+"@e2b/python-sdk": minor
+"@e2b/sdk": minor
+"@e2b/cli": minor
+---
+
+- Add possibility to use custom sandboxes
+- Rename sessions to sandboxes
diff --git a/.github/workflows/cli_tests.yml b/.github/workflows/cli_tests.yml
index 70028d831..65433800e 100644
--- a/.github/workflows/cli_tests.yml
+++ b/.github/workflows/cli_tests.yml
@@ -1,10 +1,6 @@
name: Test CLI
on:
- push:
- paths:
- - packages/cli/**/*
- - .github/workflows/cli_tests.yml
workflow_call:
permissions:
@@ -30,7 +26,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v3
with:
- node-version: '16.x'
+ node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
diff --git a/.github/workflows/js_sdk_tests.yml b/.github/workflows/js_sdk_tests.yml
index f727309e5..d18958d2c 100644
--- a/.github/workflows/js_sdk_tests.yml
+++ b/.github/workflows/js_sdk_tests.yml
@@ -1,14 +1,6 @@
name: Test JS SDK
on:
- push:
- # Tests are already running on main before release
- branches:
- - '**'
- - '!main'
- paths:
- - packages/js-sdk/**/*
- - .github/workflows/js_sdk_tests.yml
workflow_call:
secrets:
E2B_API_KEY:
diff --git a/.github/workflows/python_sdk_tests.yml b/.github/workflows/python_sdk_tests.yml
index b03b5c8f6..171dd96cb 100644
--- a/.github/workflows/python_sdk_tests.yml
+++ b/.github/workflows/python_sdk_tests.yml
@@ -1,14 +1,6 @@
name: Test Python SDK
on:
- push:
- # Tests are already running on main before release
- branches:
- - '**'
- - '!main'
- paths:
- - packages/python-sdk/**/*
- - .github/workflows/python_sdk_tests.yml
workflow_call:
secrets:
E2B_API_KEY:
diff --git a/.gitignore b/.gitignore
index 35592cf01..2a42846a7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -255,9 +255,6 @@ celerybeat.pid
# Environments
.env
.venv
-env/
-venv/
-ENV/
env.bak/
venv.bak/
@@ -291,4 +288,3 @@ cython_debug/
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
.idea/
-
diff --git a/README.md b/README.md
index 2a49e9c53..89348bb72 100644
--- a/README.md
+++ b/README.md
@@ -18,11 +18,20 @@
</h4>
<h4 align="center">
+ <a href="https://twitter.com/e2b_dev">
+ <img src="https://img.shields.io/twitter/follow/infisical?label=Follow" alt="e2b Twitter" />
+ </a>
<a href="https://discord.gg/U7KEcGErtQ">
<img src="https://img.shields.io/badge/chat-on%20Discord-blue" alt="Discord community server" />
</a>
- <a href="https://twitter.com/e2b_dev">
- <img src="https://img.shields.io/twitter/follow/infisical?label=Follow" alt="e2b Twitter" />
+ <a href="https://pypi.org/project/e2b/">
+ <img alt="Last 1 month downloads for the Python SDK" loading="lazy" width="200" height="20" decoding="async" data-nimg="1"
+ style="color:transparent;width:auto;height:100%" src="https://img.shields.io/pypi/dm/e2b?label=PyPI%20Downloads">
+ </a>
+
+<a href="https://www.npmjs.com/package/@e2b/sdk">
+ <img alt="Last 1 month downloads for the Python SDK" loading="lazy" width="200" height="20" decoding="async" data-nimg="1"
+ style="color:transparent;width:auto;height:100%" src="https://img.shields.io/npm/dm/%40e2b/sdk?label=NPM%20Downloads">
</a>
</h4>
diff --git a/apps/docs/README.md b/apps/docs/README.md
index 67f6d6251..a08894c96 100644
--- a/apps/docs/README.md
+++ b/apps/docs/README.md
@@ -1,46 +1,3 @@
-# Protocol
+# E2B Docs
-Protocol is a [Tailwind UI](https://tailwindui.com) site template built using [Tailwind CSS](https://tailwindcss.com) and [Next.js](https://nextjs.org).
-
-## Getting started
-
-To get started with this template, first install the npm dependencies:
-
-```bash
-npm install
-```
-
-Next, run the development server:
-
-```bash
-npm run dev
-```
-
-Finally, open [http://localhost:3000](http://localhost:3000) in your browser to view the website.
-
-## Customizing
-
-You can start editing this template by modifying the files in the `/src` folder. The site will auto-update as you edit these files.
-
-## Global search
-
-This template includes a global search that's powered by the [FlexSearch](https://github.com/nextapps-de/flexsearch) library. It's available by clicking the search input or by using the `⌘K` shortcut.
-
-This feature requires no configuration, and works out of the box by automatically scanning your documentation pages to build its index. You can adjust the search parameters by editing the `/src/mdx/search.mjs` file.
-
-## License
-
-This site template is a commercial product and is licensed under the [Tailwind UI license](https://tailwindui.com/license).
-
-## Learn more
-
-To learn more about the technologies used in this site template, see the following resources:
-
-- [Tailwind CSS](https://tailwindcss.com/docs) - the official Tailwind CSS documentation
-- [Next.js](https://nextjs.org/docs) - the official Next.js documentation
-- [Headless UI](https://headlessui.dev) - the official Headless UI documentation
-- [Framer Motion](https://www.framer.com/docs/) - the official Framer Motion documentation
-- [MDX](https://mdxjs.com/) - the official MDX documentation
-- [Algolia Autocomplete](https://www.algolia.com/doc/ui-libraries/autocomplete/introduction/what-is-autocomplete/) - the official Algolia Autocomplete documentation
-- [FlexSearch](https://github.com/nextapps-de/flexsearch) - the official FlexSearch documentation
-- [Zustand](https://docs.pmnd.rs/zustand/getting-started/introduction) - the official Zustand documentation
+The official [E2B documentation](https://e2b.dev/docs).
diff --git a/apps/docs/package.json b/apps/docs/package.json
index 5a79aca29..50d605e76 100644
--- a/apps/docs/package.json
+++ b/apps/docs/package.json
@@ -13,7 +13,7 @@
"browserslist": "defaults, not ie <= 11",
"dependencies": {
"@algolia/autocomplete-core": "^1.7.3",
- "@e2b/sdk": "^0.7.5",
+ "@e2b/sdk": "0.8.0",
"@headlessui/react": "^1.7.15",
"@headlessui/tailwindcss": "^0.2.0",
"@mdx-js/loader": "^2.1.5",
diff --git a/apps/docs/src/app/api/cli/page.tsx b/apps/docs/src/app/api/cli/page.tsx
index f05cea930..f508865dd 100644
--- a/apps/docs/src/app/api/cli/page.tsx
+++ b/apps/docs/src/app/api/cli/page.tsx
@@ -6,6 +6,8 @@ import { DialogAnimated } from '@/components/DialogAnimated'
import { CloudIcon, LaptopIcon, Link2Icon } from 'lucide-react'
import { Button } from '@/components/Button'
import { useSignIn } from '@/utils/useSignIn'
+import { usePostHog } from 'posthog-js/react'
+import { useEffect } from 'react'
type UserConfig = {
email: string
@@ -16,6 +18,7 @@ type UserConfig = {
export default function Page() {
const signIn = useSignIn()
+ const posthog = usePostHog()
const { user, isLoading: userIsLoading } = useUser()
const apiKey = useApiKey()
const searchParams = useSearchParams()
@@ -23,9 +26,12 @@ export default function Page() {
const { next, state } = searchParamsObj
// TODO: Consider sending back onetime code to be used to get access token
- function redirectToCli() {
+ function redirectToCLI() {
if (!next) return
if (!(user?.email && apiKey)) return
+
+ posthog?.capture('started CLI authorization', { email: user.email })
+
const { email, accessToken, defaultTeamId } = user
const newUrl = new URL(next)
const searchParamsObj: UserConfig = {
@@ -38,13 +44,34 @@ export default function Page() {
window.location.href = newUrl.toString()
}
+ useEffect(
+ function sendAuthorizationStartAnalytics() {
+ posthog?.capture('opened CLI authorization page')
+ },
+ [posthog],
+ )
+
+ useEffect(
+ function sendAuthorizationAnalytics() {
+ if (state === 'success') {
+ posthog?.capture('successfully authorized CLI')
+ } else if (state === 'error') {
+ posthog?.capture('failed to authorize CLI', {
+ error: searchParamsObj.error,
+ })
+ }
+ },
+ [state, posthog, searchParamsObj.error],
+ )
+
let content
if (state === 'error') {
content = (
<>
<div className="font-bold text-red-500">Error</div>
<div>Something went wrong, please try again</div>
- <pre>{searchParamsObj.error}</pre> {/* TODO: Nicer, but it should never happen */}
+ <pre>{searchParamsObj.error}</pre>
+ {/* TODO: Nicer, but it should never happen */}
</>
)
} else if (state === 'success') {
@@ -74,7 +101,7 @@ export default function Page() {
} else {
content = (
<>
- <Button onClick={() => redirectToCli()}>
+ <Button onClick={() => redirectToCLI()}>
Authorize CLI to use your account
</Button>
</>
@@ -89,7 +116,8 @@ export default function Page() {
{/* https://github.com/vercel/next.js/issues/50591 */}
<DialogAnimated
open={true}
- setOpen={() => {}} // intentionally prevent closing
+ setOpen={() => {
+ }} // intentionally prevent closing
>
<div className="py-6 sm:py-12">
<div className="mx-auto px-6 lg:px-8">
@@ -101,13 +129,13 @@ export default function Page() {
"
>
<span className="text-gray-200">
- <LaptopIcon size={60} />
+ <LaptopIcon size={60}/>
</span>
<span className="text-gray-400">
- <Link2Icon size={30} />
+ <Link2Icon size={30}/>
</span>
<span className="text-gray-200">
- <CloudIcon size={60} />
+ <CloudIcon size={60}/>
</span>
</p>
<h2 className="mt-6 text-base font-semibold leading-7">
diff --git a/apps/docs/src/app/getting-started/api-key/page.mdx b/apps/docs/src/app/getting-started/api-key/page.mdx
index 342dfe8b0..86ab97388 100644
--- a/apps/docs/src/app/getting-started/api-key/page.mdx
+++ b/apps/docs/src/app/getting-started/api-key/page.mdx
@@ -7,8 +7,8 @@ import APIKey from './APIKey'
## Use API key
-To use the API key, you can:
+To use the API key, you either:
- **Set the API key as the `E2B_API_KEY` environment variable**
-- Or pass it directly to the `Session` constructor like this:
+- Or pass it directly to the `Sandbox` constructor like this:
<CodeGroupAutoload path="api_key/api_key" isRunnable={false}/>
diff --git a/apps/docs/src/app/getting-started/installation/page.mdx b/apps/docs/src/app/getting-started/installation/page.mdx
index 984c301ca..8697dde79 100644
--- a/apps/docs/src/app/getting-started/installation/page.mdx
+++ b/apps/docs/src/app/getting-started/installation/page.mdx
@@ -2,6 +2,7 @@ import { Libraries } from '@/components/Libraries'
# Installation
+You create and control LLM sandboxes with our SDKs.
We offer SDKs for [JavaScript / TypeScript](https://www.npmjs.com/package/@e2b/sdk), and [Python](https://pypi.org/project/e2b/).
<Libraries/>
@@ -21,7 +22,7 @@ pip install e2b
## Next steps
1. [Get your API key](/getting-started/api-key)
-1. [Follow the "Hello World" example](/guides/)
-1. [Check out the official guides](/guides/overview)
-1. [Explore the Sandbox API](/sandbox/overview)
-1. [Explore integrations with AI frameworks and LLMs](/integrations/overview)
+1. [Explore the Sandbox API](/sandbox/api/envs)
+{/* 1. [Follow the "Hello World" example](/guides/) */}
+{/* 1. [Check out the official guides](/guides/overview) */}
+{/* 1. [Explore integrations with AI frameworks and LLMs](/integrations/overview) */}
diff --git a/apps/docs/src/app/guide/custom-sandbox/page.mdx b/apps/docs/src/app/guide/custom-sandbox/page.mdx
new file mode 100644
index 000000000..ed4f06dc7
--- /dev/null
+++ b/apps/docs/src/app/guide/custom-sandbox/page.mdx
@@ -0,0 +1,133 @@
+import Image from 'next/image'
+
+# Creating Custom Sandbox
+
+In this guide, we'll build a custom E2B sandbox with preinstalled dependencies and files.
+Once the sandbox is built, we'll show how to spawn and control it with our SDK.
+
+## Prerequisites
+1. [Node.js](https://nodejs.org/) 18.0.0 or later
+1. [E2B CLI](https://www.npmjs.com/package/@e2b/cli)
+1. [Docker](https://www.docker.com/)
+
+## 1. Install E2B CLI
+
+```bash
+npm install -g @e2b/cli@latest
+```
+
+<Note>
+You need Node.js 18.0.0 or later to install the CLI.
+</Note>
+
+## 2. CLI login
+Before you create your first custom sandbox, you will need to authenticate in the CLI with your E2B account.
+Run the following command in your terminal.
+```bash
+e2b login
+```
+
+## 3. Create sandbox template file
+To describe how your custom sandbox will look like, you create a new Dockerfile and name it `e2b.Dockerfile`.
+We use this Dockerfile as the [sandbox template file](/sandbox/templates/template-file).
+
+<Note>
+Run `e2b init` to create a basic `e2b.Dockerfile` in the current directory.
+</Note>
+
+We want to have ffmpeg installed in our custom sandbox, so we'll create the `e2b.Dockerfile` with the following content.
+```bash
+# You can use most of the Debian-based base images
+FROM ubuntu:22.04
+
+# Install dependencies and customize sandbox
+RUN apt update \
+ && apt install -y sudo \\
+ && sudo apt install -y ffmpeg
+```
+
+## 4. Build custom sandbox
+Now it's time to create your custom sandbox based on the sandbox template file (the `e2b.Dockefile` file) you just created in the previous step.
+
+Run the following command inside the template file directory in your terminal.
+```bash
+e2b build
+```
+
+<Note>
+Use the `.dockerignore` file to exclude files from the sandbox template.
+</Note>
+
+The final output should look similar to this.
+```bash
+Preparing sandbox template building (113 files in Docker build context).
+Found ./e2b.Dockerfile that will be used to build the sandbox template.
+Started building the sandbox template 3y5bvra6kgq0kaumgztu
+
+Step 1/4 : FROM ubuntu:22.04
+ ---> e4c58958181a
+Step 2/4 : RUN apt update && apt install sudo
+ ---> Using cache
+ ---> 4762cc0db1ff
+Step 3/4 : RUN type -p curl >/dev/null || (sudo apt update && sudo apt install curl -y)
+ ---> Using cache
+ ---> 384706ddfe2f
+Step 4/4 : RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg && sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg && echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null sudo apt update sudo apt install gh -y
+ ---> Using cache
+ ---> b8649b84c829
+Successfully built b8649b84c829
+Successfully tagged us-central1-docker.pkg.dev/e2b-prod/custom-environments/3y5bvra6kgq0kaumgztu:b96935dc-fe87-45fb-229d-a3fba4fe160d
+
+Running postprocessing. It can take up to few minutes.
+
+✅ Building sandbox template 3y5bvra6kgq0kaumgztu finished.
+```
+
+
+This will create the `e2b.toml` file storing the sandbox config.
+```toml
+# This is a config for E2B sandbox template
+id = "3y5bvra6kgq0kaumgztu"
+dockerfile = "e2b.Dockerfile"
+```
+
+**Our custom sandbox ID is `3y5bvra6kgq0kaumgztu` in this case.**
+
+### Updating your sandbox
+If you want to update your sandbox, you run the same command you did to build it.
+This will rebuild the image and update your sandbox template.
+You don't need to specify the `--dockerfile` flag again.
+
+```bash
+e2b build
+```
+
+## 5. Spawn and control your sandbox
+
+Now you can use the [E2B SDK](/getting-started/installation) to control your new custom sandbox.
+
+Our custom sandbox ID is `3y5bvra6kgq0kaumgztu` from the previous step. We'll just pass it to the SDK.
+
+<CodeGroup isRunnable={false}>
+```js {{ language: 'js' }}
+import { Sandbox } from '@e2b/sdk'
+
+const sandboxID = '3y5bvra6kgq0kaumgztu'
+
+const sandbox = await Sandbox.create({
+ id: sandboxID,
+})
+
+await sandbox.close()
+```
+
+```python {{ language: 'python' }}
+from e2b import Sandbox
+
+sandbox_id = '3y5bvra6kgq0kaumgztu'
+
+sandbox = Sandbox(id=sandbox_id)
+
+sandbox.close()
+```
+</CodeGroup>
diff --git a/apps/docs/src/app/guide/simple-gpt4-code-interpreter/page.mdx b/apps/docs/src/app/guide/simple-gpt4-code-interpreter/page.mdx
index adb1a757b..16cae9480 100644
--- a/apps/docs/src/app/guide/simple-gpt4-code-interpreter/page.mdx
+++ b/apps/docs/src/app/guide/simple-gpt4-code-interpreter/page.mdx
@@ -45,8 +45,8 @@ First, install the required packages. We need to install the E2B package and Ope
<CodeGroup isRunnable={false}>
```bash {{ language: 'js' }}
-npm i @e2b/sdk
-npm i openai
+npm install @e2b/sdk
+npm install openai
```
```bash {{ language: 'python' }}
diff --git a/apps/docs/src/app/how-it-works/page.mdx b/apps/docs/src/app/how-it-works/page.mdx
deleted file mode 100644
index 0f6f8ed6b..000000000
--- a/apps/docs/src/app/how-it-works/page.mdx
+++ /dev/null
@@ -1,10 +0,0 @@
-
-export const metadata = {
- title: 'E2B Documentation - Cloud for AI Agents Apps',
- description:
- 'Sandboxed cloud environments for AI agents & apps with a single line of code',
-}
-
-# How E2B Works
-
-E2B automatically creates a cloud playground for your AI app in our cloud.
\ No newline at end of file
diff --git a/apps/docs/src/app/layout.tsx b/apps/docs/src/app/layout.tsx
index bea2c5a7c..72b51f37a 100644
--- a/apps/docs/src/app/layout.tsx
+++ b/apps/docs/src/app/layout.tsx
@@ -11,8 +11,17 @@ import { Section } from '@/components/SectionProvider'
export const metadata: Metadata = {
title: {
- template: '%s - E2B Documentation',
- default: 'E2B Documentation',
+ template: '%s - E2B Docs',
+ default: 'E2B Docs - Runtime Sandbox for LLM Apps',
+ },
+ description: 'Sandboxed cloud environments for AI-powered apps and agentic workflows',
+ twitter: {
+ title: 'E2B Docs - Runtime Sandbox for LLM Apps',
+ description: 'Sandboxed cloud environments for AI-powered apps and agentic workflows',
+ },
+ openGraph: {
+ title: 'E2B Docs - Runtime Sandbox for LLM Apps',
+ description: 'Sandboxed cloud environments for AI-powered apps and agentic workflows',
},
}
@@ -32,17 +41,17 @@ export default async function RootLayout({ children }) {
className="h-full"
suppressHydrationWarning
>
- <body className="flex min-h-full bg-white antialiased dark:bg-zinc-900">
- <Providers>
- <div className="w-full">
- <Layout allSections={allSections}>
- {children}
- <PostHogAnalytics />
- <Analytics />
- </Layout>
- </div>
- </Providers>
- </body>
+ <body className="flex min-h-full bg-white antialiased dark:bg-zinc-900">
+ <Providers>
+ <div className="w-full">
+ <Layout allSections={allSections}>
+ {children}
+ <PostHogAnalytics/>
+ <Analytics/>
+ </Layout>
+ </div>
+ </Providers>
+ </body>
</html>
)
}
diff --git a/apps/docs/src/app/not-found.tsx b/apps/docs/src/app/not-found.tsx
index d7f588626..b50152a9c 100644
--- a/apps/docs/src/app/not-found.tsx
+++ b/apps/docs/src/app/not-found.tsx
@@ -4,7 +4,7 @@ import { HeroPattern } from '@/components/HeroPattern'
export default function NotFound() {
return (
<>
- <HeroPattern />
+ <HeroPattern/>
<div className="mx-auto flex h-full max-w-xl flex-col items-center justify-center py-16 text-center">
<p className="text-sm font-semibold text-zinc-900 dark:text-white">404</p>
<h1 className="mt-2 text-2xl font-bold text-zinc-900 dark:text-white">
diff --git a/apps/docs/src/app/open-source/page.mdx b/apps/docs/src/app/open-source/page.mdx
index 7a373df5a..77036f198 100644
--- a/apps/docs/src/app/open-source/page.mdx
+++ b/apps/docs/src/app/open-source/page.mdx
@@ -3,7 +3,7 @@
The main E2B web app, CLI, and SDKs are open source.
- [E2B monorepo](https://github.com/e2b-dev/e2b)
-- [E2B cookbook](https://github.com/e2b-dev/e2b-cookbook)
- [Example code interpreter ChatGPT plugin](https://github.com/e2b-dev/llm-code-interpreter)
- [List of awesome SDKs for AI agents](https://github.com/e2b-dev/awesome-sdks-for-ai-agents)
-- [List of awesome AI agents](https://github.com/e2b-dev/awesome-ai-agents)
\ No newline at end of file
+- [List of awesome AI agents](https://github.com/e2b-dev/awesome-ai-agents)
+{/* - [E2B cookbook](https://github.com/e2b-dev/e2b-cookbook) */}
\ No newline at end of file
diff --git a/apps/docs/src/app/page.mdx b/apps/docs/src/app/page.mdx
index 8c08d46d3..904bbd2c2 100644
--- a/apps/docs/src/app/page.mdx
+++ b/apps/docs/src/app/page.mdx
@@ -28,14 +28,14 @@ Here are a few use cases:
<Button variant="textLink">Sign in</Button> with your GitHub acccount.
### 2. Get your API key
-After sign in, get [your API key](/getting-started/api-key).
+After sign in, get [your API key](/getting-started/api-key) and set it in the `E2B_API_KEY` environment variable.
### 3. Install the E2B SDK
We offer both JS and Python SDK.
<CodeGroup isRunnable={false}>
```bash {{ language: 'js' }}
-npm i @e2b/sdk
+npm install @e2b/sdk
```
```bash {{ language: 'python' }}
@@ -44,40 +44,44 @@ pip install e2b
</CodeGroup>
### 4. Start up the sandbox
+Sandbox is an isolated cloud environment for your AI app, agent, assistant, etc.
+
<CodeGroup isRunnable={false}>
```js {{ language: 'js' }}
// 1. Import E2B
-import { Session } from '@e2b/sdk'
+import { Sandbox } from '@e2b/sdk'
// 2. Get your Sandbox session
-const session = await Session({
- // or 'Bash', 'Python3', 'Java', 'Go', 'Rust', 'PHP', 'Perl', 'DotNET'
- id: 'Nodejs',
-})
+const sandbox = await Sandbox.create()
-// 3. Close the session once done
-await session.close()
+// 3. Close the sandbox once done
+await sandbox.close()
```
```python {{ language: 'python' }}
# 1. Import E2B
-from e2b import Session
+from e2b import Sandbox
# 2. Get your Sandbox session
-session = Session(
- # or "Bash", "Python3", "Java", "Go", "Rust", "PHP", "Perl", "DotNET"
- id: "Nodejs",
-)
+sandbox = Sandbox()
-# 3. Close the session once done
-session.close()
+# 3. Close the sandbox once done
+sandbox.close()
```
</CodeGroup>
+{/* <Note>
+By default the `base` sandbox supports NodeJS 20 and Python 3.10. If you want customize your sandbox (copy files, install dependencies, etc), check out [Sandbox Templates](/sandbox/templates/custom).
+</Note> */}
+
+### Custom sandboxes
+You can create a custom sandbox with preinstalled libraries and prepared files by creating your own [Sandbox Template](/sandbox/templates/overview).
+
+{/* We offer a few [premade sandbox templates](/sandbox/template/prebuilt) for common use cases such as building code interpreters or AI browser assistans. */}
### 🎉 Build your AI app
-Now you can let your AI app control the sandbox by using our [Sandbox API](/sandbox/overview).
+Now you can let your AI app control the sandbox by using [Sandbox API](/sandbox/api/envs).
{/* - [Run any code](/agents/exec) and terminal command in a sandboxed environment
- [Start any process](/playgrounds/process) (even long-running such as a database)
diff --git a/apps/docs/src/app/pricing/page.mdx b/apps/docs/src/app/pricing/page.mdx
index 5dde2aeb4..488a979de 100644
--- a/apps/docs/src/app/pricing/page.mdx
+++ b/apps/docs/src/app/pricing/page.mdx
@@ -1,6 +1,6 @@
# Pricing
**E2B is currently in beta and free to use.** {{ className: 'lead' }}
-We're going to offer both free and premium tiers in the future. Pricing will be based on usage of our [LLM sandboxes](/sandbox/overview) through the SDK.
+We're going to offer both free and premium tiers in the future. Pricing will be most likely based on usage of our [LLM sandboxes](/sandbox/overview) through the SDK and the [resources](/sandbox/resources) your sandbox requires.
-Our goal is to offer a free tier for hobbyists and personal projects and a premium tier for companies or projects with high usage. Similarly for example [Supabase](https://supabase.com/pricing) or [Vercel](https://vercel.com/pricing).
+Our goal is to offer a free tier for hobbyists and personal projects and a premium tier for companies or projects with high usage. Similarly for example to [Supabase](https://supabase.com/pricing) or [Vercel](https://vercel.com/pricing).
diff --git a/apps/docs/src/app/providers.tsx b/apps/docs/src/app/providers.tsx
index a7df28781..dea12f1b5 100644
--- a/apps/docs/src/app/providers.tsx
+++ b/apps/docs/src/app/providers.tsx
@@ -37,7 +37,7 @@ export function Providers({ children }) {
disableTransitionOnChange
forcedTheme="dark"
>
- <ThemeWatcher />
+ <ThemeWatcher/>
<CustomUserContextProvider>
<PostHogProvider>{children}</PostHogProvider>
</CustomUserContextProvider>
diff --git a/apps/docs/src/app/sandbox/cwd/page.mdx b/apps/docs/src/app/sandbox/api/cwd/page.mdx
similarity index 61%
rename from apps/docs/src/app/sandbox/cwd/page.mdx
rename to apps/docs/src/app/sandbox/api/cwd/page.mdx
index b30b3e1be..2ee3543dd 100644
--- a/apps/docs/src/app/sandbox/cwd/page.mdx
+++ b/apps/docs/src/app/sandbox/api/cwd/page.mdx
@@ -1,12 +1,12 @@
# Current Working Directory
-You can set a working directory either for the whole session, a filesystem operation, or a new process.
+You can set a working directory either for the whole sandbox, a filesystem operation, or a new process.
-## Session
+## Sandbox
-If the current working directory for the session is not set, it will default to the home directory - `/home/user`.
+If the current working directory for the sandbox is not set, it will default to the home directory - `/home/user`.
-<CodeGroupAutoload path="cwd/session" />
+<CodeGroupAutoload path="cwd/sandbox" />
## Filesystem
@@ -16,6 +16,6 @@ All filesystem operations with relative paths are relative to the current workin
## Process
-If you set a working directory for the session, all processes will inherit it. You can override it for each process.
+If you set a working directory for the sandbox, all processes will inherit it. You can override it for each process.
<CodeGroupAutoload path="cwd/process"/>
diff --git a/apps/docs/src/app/sandbox/debugging/page.mdx b/apps/docs/src/app/sandbox/api/debugging/page.mdx
similarity index 85%
rename from apps/docs/src/app/sandbox/debugging/page.mdx
rename to apps/docs/src/app/sandbox/api/debugging/page.mdx
index 06a20527e..f5a7daa80 100644
--- a/apps/docs/src/app/sandbox/debugging/page.mdx
+++ b/apps/docs/src/app/sandbox/api/debugging/page.mdx
@@ -1,8 +1,3 @@
-export const metadata = {
- title: 'E2B Documentation - Cloud for AI Agents Apps',
- description: 'AI Playgrounds Debugging',
-}
-
export const sections = [
{ title: 'Logging', id: 'logging' },
]
diff --git a/apps/docs/src/app/sandbox/download/page.mdx b/apps/docs/src/app/sandbox/api/download/page.mdx
similarity index 100%
rename from apps/docs/src/app/sandbox/download/page.mdx
rename to apps/docs/src/app/sandbox/api/download/page.mdx
diff --git a/apps/docs/src/app/sandbox/envs/page.mdx b/apps/docs/src/app/sandbox/api/envs/page.mdx
similarity index 63%
rename from apps/docs/src/app/sandbox/envs/page.mdx
rename to apps/docs/src/app/sandbox/api/envs/page.mdx
index 55b015e98..5db20d3ec 100644
--- a/apps/docs/src/app/sandbox/envs/page.mdx
+++ b/apps/docs/src/app/sandbox/api/envs/page.mdx
@@ -1,7 +1,7 @@
# Setting environment variables
## Global environment variables
-You can set the sandbox's global environment variables when you're initializing a new sandbox.
+You can set the sandbox's global environment variables when initializing a new sandbox.
<CodeGroupAutoload
path="basics/set_env_vars"
isRunnable={false}
@@ -12,7 +12,7 @@ You can set the sandbox's global environment variables when you're initializing
Alternatively, you can set environment variables when starting a new process. These environment variables are accessible only for this process.
<Note>
-Environment variables set when starting a a new process have precedence over the environment variables set when initializing the sandbox.
+Environment variables set when starting a new process have precedence over the environment variables set when initializing the sandbox.
</Note>
<CodeGroupAutoload
diff --git a/apps/docs/src/app/sandbox/execute/page.mdx b/apps/docs/src/app/sandbox/api/execute/page.mdx
similarity index 85%
rename from apps/docs/src/app/sandbox/execute/page.mdx
rename to apps/docs/src/app/sandbox/api/execute/page.mdx
index 98d0bb041..9fa7274e8 100644
--- a/apps/docs/src/app/sandbox/execute/page.mdx
+++ b/apps/docs/src/app/sandbox/api/execute/page.mdx
@@ -12,9 +12,9 @@ This approach is very straightforward and you don't need to worry about managing
isRunnable={true}
/>
-### 2. Run the LLM-generated code using the low-level [session.process](/sandbox/process) module {{ className: 'lead' }}
+### 2. Run the LLM-generated code using the low-level [sandbox.process](/sandbox/process) module {{ className: 'lead' }}
-This approach gives you more control over the underlying session and the running process. You can for example stream stdout and stderr, or kill the process that's running the code.
+This approach gives you more control over the underlying sandbox and the running process. You can for example stream stdout and stderr, or kill the process that's running the code.
<CodeGroupAutoload
path="code_exec/process"
diff --git a/apps/docs/src/app/sandbox/filesystem/page.mdx b/apps/docs/src/app/sandbox/api/filesystem/page.mdx
similarity index 100%
rename from apps/docs/src/app/sandbox/filesystem/page.mdx
rename to apps/docs/src/app/sandbox/api/filesystem/page.mdx
diff --git a/apps/docs/src/app/sandbox/process/page.mdx b/apps/docs/src/app/sandbox/api/process/page.mdx
similarity index 83%
rename from apps/docs/src/app/sandbox/process/page.mdx
rename to apps/docs/src/app/sandbox/api/process/page.mdx
index 9179e44ce..1bc78b78c 100644
--- a/apps/docs/src/app/sandbox/process/page.mdx
+++ b/apps/docs/src/app/sandbox/api/process/page.mdx
@@ -25,7 +25,7 @@ Here are the basic operations you can do with the process inside a LLM sandbox:
## Stream stdout
-Set either stdout handler for the whole session level or per process.
+Set either stdout handler for the whole sandbox level or per process.
<CodeGroupAutoload
path="basics/process_stream_stdout"
@@ -34,7 +34,7 @@ Set either stdout handler for the whole session level or per process.
## Stream stderr
-Set either stderr handler for the whole session level or per process.
+Set either stderr handler for the whole sandbox level or per process.
<CodeGroupAutoload
path="basics/process_stream_stderr"
@@ -43,7 +43,7 @@ Set either stderr handler for the whole session level or per process.
## On process exit
-Set either on exit handler for the whole session level or per process.
+Set either on exit handler for the whole sandbox level or per process.
<CodeGroupAutoload
path="basics/process_exit"
diff --git a/apps/docs/src/app/sandbox/timeouts/page.mdx b/apps/docs/src/app/sandbox/api/timeouts/page.mdx
similarity index 67%
rename from apps/docs/src/app/sandbox/timeouts/page.mdx
rename to apps/docs/src/app/sandbox/api/timeouts/page.mdx
index 5975b0c30..82809fb9e 100644
--- a/apps/docs/src/app/sandbox/timeouts/page.mdx
+++ b/apps/docs/src/app/sandbox/api/timeouts/page.mdx
@@ -2,8 +2,8 @@
The SDK has a number of timeouts that can be configured to control how long the SDK will wait for a response from the E2B servers. **The default is 60 seconds.**
-## Timeout creating session
-<CodeGroupAutoload path="timeout/timeout_session" />
+## Timeout creating sandbox
+<CodeGroupAutoload path="timeout/timeout_sandbox" />
## Timeout process
<CodeGroupAutoload path="timeout/timeout_process" />
diff --git a/apps/docs/src/app/sandbox/upload/page.mdx b/apps/docs/src/app/sandbox/api/upload/page.mdx
similarity index 100%
rename from apps/docs/src/app/sandbox/upload/page.mdx
rename to apps/docs/src/app/sandbox/api/upload/page.mdx
diff --git a/apps/docs/src/app/sandbox/url/page.mdx b/apps/docs/src/app/sandbox/api/url/page.mdx
similarity index 100%
rename from apps/docs/src/app/sandbox/url/page.mdx
rename to apps/docs/src/app/sandbox/api/url/page.mdx
diff --git a/apps/docs/src/app/sandbox/custom/page.mdx b/apps/docs/src/app/sandbox/custom/page.mdx
new file mode 100644
index 000000000..f20e0a7f2
--- /dev/null
+++ b/apps/docs/src/app/sandbox/custom/page.mdx
@@ -0,0 +1,7 @@
+# Customizing Sandbox
+You can build your own custom sandbox by creating the [Sandbox Template](/sandbox/templates/overview).
+
+Sandbox template is a Dockerfile that describes the environment of your sandbox.
+Once you build your custom sandbox with the CLI, you can then use our SDK to spawn and control your new sandbox.
+
+Checkout out [Sandbox Templates](/sandbox/templates/overview) if you want to create your own custom sandbox.
\ No newline at end of file
diff --git a/apps/docs/src/app/sandbox/overview/features.tsx b/apps/docs/src/app/sandbox/overview/features.tsx
new file mode 100644
index 000000000..0c040ac49
--- /dev/null
+++ b/apps/docs/src/app/sandbox/overview/features.tsx
@@ -0,0 +1,30 @@
+/* eslint-disable react/jsx-key */
+import Link from 'next/link';
+
+export const features = [
+ <span>
+ <Link href="https://github.com/e2b-dev/e2b" target="_blank" rel="noreferrer noopener">Open-source</Link> sandbox for LLM
+ </span>,
+ "A full VM environment",
+ "No need for orchestration or infrastructure management",
+ "Ability to give each user of your AI app their own isolated environment",
+ <span>
+ <Link href="/getting-started/installation">
+ Python & Node.js SDK
+ </Link>
+ {' '}for controling the sandbox&apos;s{' '}
+ <Link href="/sandbox/api/filesystem">
+ filesystem
+ </Link>
+ ,{' '}
+ <Link href="/sandbox/api/process">
+ processes
+ </Link>
+ , and more.
+ </span>,
+ "Support for up to 24h long-running sessions",
+ <span>
+ Ability to <Link href="/sandbox/api/upload">upload files</Link> to the sandbox and <Link href="/sandbox/api/download">download files </Link>from the sandbox,
+ </span>,
+ // "Premade sandbox for the Code Interpreter / Advanced Data Analysis and AI-powered browsers",
+]
diff --git a/apps/docs/src/app/sandbox/overview/page.mdx b/apps/docs/src/app/sandbox/overview/page.mdx
index 49216b535..dcb2c8891 100644
--- a/apps/docs/src/app/sandbox/overview/page.mdx
+++ b/apps/docs/src/app/sandbox/overview/page.mdx
@@ -1,16 +1,61 @@
+import Image from 'next/image'
+import imgModel from '@/images/ai-app-e2b-sandbox-model.png'
+import { Check } from 'lucide-react'
+
+import { features } from './features'
+
# Overview
+**The E2B's LLM sandboxes are isolated cloud environments made specifcially for AI apps.**
+
+LLM sandboxes are an ideal fit as a playground for AI assistants like coding copilots, code interpreters, AI data analysts, AI browser assistants, and other AI-powered apps.
+
+## Comparison to other services
+With LLMs, it's not safe to let the LLM run code and use tools in the same environment where your application is running.
-The E2B's LLM sandboxes are isolated cloud environments for your AI apps. These LLM sandboxes are an ideal fit for building AI assistants like coding copilots, code interpreters, AI data analysts, AI browser assistants, and similar.
+You need to isolate the LLM from the rest of your app and make sure that the LLM can't access your data, tools, and the internet without you knowing about it or giving it explicit access. You need to make sure that the LLM can run untrusted code safely and install libraries on fly.
+The AI apps also often need to run for a long time, and need to be resumable - for example, when waiting for user's consent to make an internet purchase, you need to be able to pause the AI app and resume it later without losing the whole state.
-Using the sandboxes allows for a secure way to run the unpredictable LLM-generated code and safe LLM tool usage without the potential harm to you and your users.
+Additionally, the AI apps present need for a new model:
+- How can every user of your AI app have the environment described above for themselves?
+- How can developers easily manage and orchestrate these environments?
+- How can developers easily debug these environments?
+- How to let LLMs use use the same tools as humans do on their computers (for example browser, code linters, autocomplete, etc)?
+- How can developers easily monitor what's happening inside these environments?
+- How to scale these environments to billions of instances?
-Additionally, each running instance of your AI app can have its own separate sandbox without you worrying about any infrastructure, networking, or security.
+<Image
+ src={imgModel}
+ className="rounded"
+ alt="Separate E2B Sandbox for each instance of your AI app"
+ unoptimized
+/>
+
+E2B Sandboxes are made exactly to solve these challenges. The sandbox is like an isolated runtime or playground for the LLM. **We give you our SDK to spawn and control these sandboxes.**
-## How sandboxes work under the hood
+### Features
+<div className="flex flex-col items-start space-y-2">
+ {features.map((feature, i) => (
+ <span key={i} className="flex items-center space-x-2">
+ <Check
+ className="w-4 h-4 text-brand-400"
+ />
+ <span className="text-brand-100">{feature}</span>
+ </span>
+ ))}
+</div>
+With more features coming in the future:
+- Out-of-the box working monitoring of what's happening inside the sandbox
+- LLM Access control to data, tools, and any internet requests
+- Statefull sandboxes
+- Resumable workflows (pause sandbox and load it later)
+- Unlimited long-running sessions
+
+## How sandboxes work under the hood
When you create a new sandbox session, we start a small VM in our cloud. This VM is running a Ubuntu OS and it takes about 400-600ms to start it.
-Inside this sandbox, your AI app can run any code, start any program, access the internet to download or upload data, use the filesystem, start a web server, and more.
+Inside this sandbox, your AI app can [run code and start any programs](/sandbox/api/process), access the internet to download or upload data, use the [filesystem](/sandbox/api/filesystem), start long running processes such as web servers, and more.
+You can also [upload](/sandbox/api/upload) to sandbox and [download](/sandbox/api/upload) from sandbox any file you want.
To start and control the LLM sandbox, use the [E2B SDK](/getting-started/installation) for Python or JavaScript.
@@ -19,7 +64,6 @@ To start and control the LLM sandbox, use the [E2B SDK](/getting-started/install
path="basics/init"
/>
-{/*
-## Next steps
-
-TODO */}
+<Note>
+Make sure you have the `E2B_API_KEY` environment variable set with your [API key](/getting-started/api-key).
+</Note>
diff --git a/apps/docs/src/app/sandbox/resources/page.mdx b/apps/docs/src/app/sandbox/resources/page.mdx
index 0f56e2931..81ff2159a 100644
--- a/apps/docs/src/app/sandbox/resources/page.mdx
+++ b/apps/docs/src/app/sandbox/resources/page.mdx
@@ -1,8 +1,19 @@
# Sandbox resources
-### Available resources
+## Hobby tier (free)
+- 2 vCPU {{ className: 'lead' }}
+- 512 MB RAM {{ className: 'lead' }}
+- 0.5 GB free disk storage {{ className: 'lead' }}
+- 24 hours max session length {{ className: 'lead' }}
+
+## Pro tier (paid)
- 4 vCPU {{ className: 'lead' }}
-- 1GB RAM {{ className: 'lead' }}
-- 2.5GB storage {{ className: 'lead' }}
+- 4 GB RAM {{ className: 'lead' }}
+- 5 GB free disk storage {{ className: 'lead' }}
+- 24 hours max session length {{ className: 'lead' }}
+
+<Note>
+Please [reach out](/getting-help) if you're interested in the Pro tier.
+</Note>
If you need more resources, please [reach out to us](/getting-help) with your use case.
diff --git a/apps/docs/src/app/sandbox/templates/data-analysis/page.mdx b/apps/docs/src/app/sandbox/templates/data-analysis/page.mdx
new file mode 100644
index 000000000..79e36bf5a
--- /dev/null
+++ b/apps/docs/src/app/sandbox/templates/data-analysis/page.mdx
@@ -0,0 +1,30 @@
+# Use premade data analysis sandbox template
+
+You can use our premade template to get started with your data analysis project.
+
+
+### Using data analysis template in your code
+
+<CodeGroup isRunnable={false}>
+```js {{ language: 'js' }}
+import { Sandbox } from '@e2b/sdk'
+
+const sandbox = await Sandbox.create({
+ id: 'Python3-DataAnalysis',
+})
+
+await sandbox.close()
+```
+
+```python {{ language: 'python' }}
+from e2b import Sandbox
+
+sandbox = Sandbox(
+ id: "Python3-DataAnalysis",
+)
+
+sandbox.close()
+```
+</CodeGroup>
+
+The Dockerfile and template files used to build the template are available [here](https://github.com/e2b-dev/e2b/blob/main/templates/data_analysis/).
diff --git a/apps/docs/src/app/sandbox/templates/overview/page.mdx b/apps/docs/src/app/sandbox/templates/overview/page.mdx
new file mode 100644
index 000000000..8d2186522
--- /dev/null
+++ b/apps/docs/src/app/sandbox/templates/overview/page.mdx
@@ -0,0 +1,37 @@
+# Sandbox Templates
+
+Sandbox is a cloud environment for your AI apps.
+Read [here](/sandbox/overview) about how E2B Sandbox is made exactly for AI apps.
+
+To build a custom sandbox, you create the [sandbox template file](/sandbox/templates/template-file) and then build your custom sandbox with the E2B CLI.
+
+<Note>
+Follow [our guide](/guide/custom-sandbox) on how to create a custom sandbox.
+</Note>
+
+
+<CodeGroup title="Using custom sandbox with SDK" isRunnable={false}>
+```js {{ language: 'js' }}
+import { Sandbox } from '@e2b/sdk'
+
+// Create new sandbox
+const sandbox = await Sandbox.create({
+ id: '<sandbox-id>', // You get sandbox ID from the CLI after you run `$ e2b build`
+})
+
+// Close sandbox once done
+await sandbox.close()
+```
+
+```python {{ language: 'python' }}
+from e2b import Sandbox
+
+# Create new sandbox
+sandbox = Sandbox(
+ id: "<sandbox-id>", # You get sandbox ID from the CLI after you run `$ e2b build`
+)
+
+# Close sandbox once done
+sandbox.close()
+```
+</CodeGroup>
\ No newline at end of file
diff --git a/apps/docs/src/app/sandbox/templates/template-file/page.mdx b/apps/docs/src/app/sandbox/templates/template-file/page.mdx
new file mode 100644
index 000000000..28bf0f4f9
--- /dev/null
+++ b/apps/docs/src/app/sandbox/templates/template-file/page.mdx
@@ -0,0 +1,39 @@
+# Template File
+
+The sandbox template file is a simple Dockerfile named `e2b.Dockerfile` that's used to build the sandbox. {{ className: 'lead' }}
+
+Follow [our guide](/guide/custom-sandbox) on how to create a template filed to builde your own custom sandbox.
+
+<Note>
+The Dockerfile must be Debian based (e.g. Ubuntu). Only the following [Dockerfile commands](https://docs.docker.com/engine/reference/builder/) are supported:
+ - `FROM`
+ - `ADD`
+ - `COPY`
+ - `RUN`
+ - `WORKDIR`
+</Note>
+
+
+## Example
+
+The following example template file defines a Ubuntu-based sandbox with installed GitHub CLI.
+
+
+<CodeGroup isRunnable={false}>
+```sh
+# You can use most of the Debian-based base images
+FROM ubuntu:22.04
+
+# Install dependencies and customize sandbox
+RUN apt update \
+ && apt install sudo
+
+# Install GitHub CLI
+RUN type -p curl >/dev/null || (sudo apt update && sudo apt install curl -y)
+RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \
+ && sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \
+ && echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
+ && sudo apt update \
+ && sudo apt install gh -y
+```
+</CodeGroup>
diff --git a/apps/docs/src/code/js/agents/clone_repo.js b/apps/docs/src/code/js/agents/clone_repo.js
index 9342c6452..e7c37fe26 100644
--- a/apps/docs/src/code/js/agents/clone_repo.js
+++ b/apps/docs/src/code/js/agents/clone_repo.js
@@ -1,34 +1,34 @@
-import { Session } from '@e2b/sdk'
+import { Sandbox } from '@e2b/sdk'
-// 1. Start the playground session
-const session = await Session.create({
- // 'Node', 'Bash', 'Python3', 'Java', 'Go', 'Rust', 'PHP', 'Perl', 'DotNET'
- id: 'Nodejs',
+// 1. Start the playground sandbox
+const sandbox = await Sandbox.create({
+ // You can pass your own sandbox template id
+ id: 'base',
apiKey: process.env.E2B_API_KEY,
})
// 2. Start a process that will clone a repository
-let proc = await session.process.start({
+let proc = await sandbox.process.start({
// $HighlightLine
cmd: 'git clone https://github.com/cruip/open-react-template.git /code/open-react-template', // $HighlightLine
- onStderr: data => console.log(data.line), // $HighlightLine
- onStdout: data => console.log(data.line), // $HighlightLine
+ onStderr: (data) => console.log(data.line), // $HighlightLine
+ onStdout: (data) => console.log(data.line), // $HighlightLine
}) // $HighlightLine
// 3. Wait for the process to finish
await proc.wait()
// Optional: 4. List the content of cloned repo
-const content = await session.filesystem.list('/code/open-react-template')
+const content = await sandbox.filesystem.list('/code/open-react-template')
console.log(content)
// Optional: 5. Install deps
console.log('Installing deps...')
-proc = await session.process.start({
+proc = await sandbox.process.start({
cmd: 'npm install',
cwd: '/code/open-react-template',
- onStdout: data => console.log(data.line),
- onStderr: data => console.log(data.line),
+ onStdout: (data) => console.log(data.line),
+ onStderr: (data) => console.log(data.line),
})
await proc.wait()
-await session.close()
+await sandbox.close()
diff --git a/apps/docs/src/code/js/agents/code_exec.js b/apps/docs/src/code/js/agents/code_exec.js
index c6779c738..5a2ab5363 100644
--- a/apps/docs/src/code/js/agents/code_exec.js
+++ b/apps/docs/src/code/js/agents/code_exec.js
@@ -1,10 +1,9 @@
-import { Session } from '@e2b/sdk'
+import { Sandbox } from '@e2b/sdk'
-// 1. Start the playground session
-const session = await Session.create({
- // Select the right runtime
- // 'Node', 'Bash', 'Python3', 'Java', 'Go', 'Rust', 'PHP', 'Perl', 'DotNET'
- id: 'Nodejs',
+// 1. Start the playground sandbox
+const sandbox = await Sandbox.create({
+ // You can pass your own sandbox template id
+ id: 'base',
})
// 2. Save the JavaScript code to a file inside the playground
@@ -15,15 +14,15 @@ const code = `
console.log('Root dir item inside playground:', item);
});
`
-await session.filesystem.write('/code/index.js', code)
+await sandbox.filesystem.write('/code/index.js', code)
// 3. Start the execution of the JavaScript file we saved
-const proc = await session.process.start({
+const proc = await sandbox.process.start({
// $HighlightLine
cmd: 'node /code/index.js', // $HighlightLine
// 4. Stream stdout, stderr
- onStdout: data => console.log(data.line), // $HighlightLine
- onStderr: data => console.log(data.line), // $HighlightLine
+ onStdout: (data) => console.log(data.line), // $HighlightLine
+ onStderr: (data) => console.log(data.line), // $HighlightLine
}) // $HighlightLine
// 4. Wait for the process to finish
@@ -32,4 +31,4 @@ await proc.wait()
// 5. Or you can access output after the process has finished
const output = proc.output
-await session.close()
+await sandbox.close()
diff --git a/apps/docs/src/code/js/agents/install_deps_npm.js b/apps/docs/src/code/js/agents/install_deps_npm.js
index 7045676a7..e7750712f 100644
--- a/apps/docs/src/code/js/agents/install_deps_npm.js
+++ b/apps/docs/src/code/js/agents/install_deps_npm.js
@@ -1,20 +1,18 @@
-import { Session } from '@e2b/sdk'
+import { Sandbox } from '@e2b/sdk'
-// 1. Start the playground session
-const session = await Session.create({
- // Note we're using the 'Nodejs' runtime here since we want to run Node.js code
- // and install NPM dependencies
- id: 'Nodejs', // $HighlightLine
+// 1. Start the playground sandbox
+const sandbox = await Sandbox.create({
+ id: 'base', // $HighlightLine
apiKey: process.env.E2B_API_KEY,
})
// 2. Install packages using NPM inside the /code directory
console.log('Installing lodash...')
-const proc = await session.process.start({
+const proc = await sandbox.process.start({
cmd: 'npm install lodash', // $HighlightLine
cwd: '/code', // $HighlightLine
- onStdout: data => console.log('[INFO] ', data.line),
- onStderr: data => console.log('[WARN | ERROR] ', data.line),
+ onStdout: (data) => console.log('[INFO] ', data.line),
+ onStderr: (data) => console.log('[WARN | ERROR] ', data.line),
})
// Wait for the process to finish
await proc.wait()
@@ -25,14 +23,14 @@ const code = `
'lodash');
console.log(_.camelCase('Hello World'));
`
-await session.filesystem.write('/code/index.js', code)
+await sandbox.filesystem.write('/code/index.js', code)
// Run the code
console.log('Running code...')
-const codeRun = await session.process.start({
+const codeRun = await sandbox.process.start({
cmd: 'node /code/index.js',
- onStdout: data => console.log('[INFO] ', data.line),
- onStderr: data => console.log('[WARN | ERROR] ', data.line),
+ onStdout: (data) => console.log('[INFO] ', data.line),
+ onStderr: (data) => console.log('[WARN | ERROR] ', data.line),
})
await codeRun.wait()
-await session.close()
+await sandbox.close()
diff --git a/apps/docs/src/code/js/agents/start_process.js b/apps/docs/src/code/js/agents/start_process.js
index a89135ea3..1f80e7dfa 100644
--- a/apps/docs/src/code/js/agents/start_process.js
+++ b/apps/docs/src/code/js/agents/start_process.js
@@ -1,20 +1,20 @@
-import { Session } from '@e2b/sdk'
+import { Sandbox } from '@e2b/sdk'
-// 1. Start the playground session
-const session = await Session.create({
- // 'Node', 'Bash', 'Python3', 'Java', 'Go', 'Rust', 'PHP', 'Perl', 'DotNET'
- id: 'Nodejs',
+// 1. Start the playground sandbox
+const sandbox = await Sandbox.create({
+ // You can pass your own sandbox template id
+ id: 'base',
apiKey: process.env.E2B_API_KEY,
})
// 2. Start the shell commdand
-let proc = await session.process.start({
+let proc = await sandbox.process.start({
// $HighlightLine
// Print names of all running processes
- cmd: "ps aux | tr -s ' ' | cut -d ' ' -f 11", // $HighlightLine
+ cmd: 'ps aux | tr -s \' \' | cut -d \' \' -f 11', // $HighlightLine
// Stream stdout and stderr
- onStderr: data => console.log(data.line), // $HighlightLine
- onStdout: data => console.log(data.line), // $HighlightLine
+ onStderr: (data) => console.log(data.line), // $HighlightLine
+ onStdout: (data) => console.log(data.line), // $HighlightLine
}) // $HighlightLine
// 3. Wait for the process to finish
@@ -23,4 +23,4 @@ await proc.wait()
// 4. Or you can access output after the process has finished
const output = proc.output
-await session.close()
+await sandbox.close()
diff --git a/apps/docs/src/code/js/api_key/api_key.js b/apps/docs/src/code/js/api_key/api_key.js
index c4e2295a0..5db7d2f00 100644
--- a/apps/docs/src/code/js/api_key/api_key.js
+++ b/apps/docs/src/code/js/api_key/api_key.js
@@ -1,7 +1,4 @@
-import { Session } from '@e2b/sdk'
+import { Sandbox } from '@e2b/sdk'
-const explicitAPIKey = await Session.create({
- id: 'Nodejs',
- apiKey: 'YOUR_API_KEY',
-})
-await explicitAPIKey.close()
+const sandbox = await Sandbox.create({ apiKey: 'YOUR_API_KEY' })
+await sandbox.close()
diff --git a/apps/docs/src/code/js/basics/download_file.js b/apps/docs/src/code/js/basics/download_file.js
index 200d63d7b..9f0dffa19 100644
--- a/apps/docs/src/code/js/basics/download_file.js
+++ b/apps/docs/src/code/js/basics/download_file.js
@@ -1,10 +1,10 @@
-import { Session } from '@e2b/sdk'
+import { Sandbox } from '@e2b/sdk'
import fs from 'node:fs'
-const session = await Session.create({ id: 'Nodejs' })
+const sandbox = await Sandbox.create({id: 'base'})
-const buffer = await session.downloadFile('path/to/remote/file/inside/sandbox') // $HighlightLine
+const buffer = await sandbox.downloadFile('path/to/remote/file/inside/sandbox') // $HighlightLine
// Save file to local filesystem
fs.writeFileSync('path/to/local/file', buffer)
-await session.close()
+await sandbox.close()
diff --git a/apps/docs/src/code/js/basics/fs_ls.js b/apps/docs/src/code/js/basics/fs_ls.js
index 001c039be..25d0280ab 100644
--- a/apps/docs/src/code/js/basics/fs_ls.js
+++ b/apps/docs/src/code/js/basics/fs_ls.js
@@ -1,12 +1,12 @@
-import { Session } from '@e2b/sdk'
+import { Sandbox } from '@e2b/sdk'
-const session = await Session.create({
- id: 'Nodejs',
+const sandbox = await Sandbox.create({
+ id: 'base',
})
-const dirContent = await session.filesystem.list('/') // $HighlightLine
-dirContent.forEach(item => {
+const dirContent = await sandbox.filesystem.list('/') // $HighlightLine
+dirContent.forEach((item) => {
console.log(item.name)
})
-await session.close()
+await sandbox.close()
diff --git a/apps/docs/src/code/js/basics/fs_mkdir.js b/apps/docs/src/code/js/basics/fs_mkdir.js
index cfaed52a0..3d6bbc681 100644
--- a/apps/docs/src/code/js/basics/fs_mkdir.js
+++ b/apps/docs/src/code/js/basics/fs_mkdir.js
@@ -1,9 +1,9 @@
-import { Session } from '@e2b/sdk'
+import { Sandbox } from '@e2b/sdk'
-const session = await Session.create({ id: 'Nodejs' })
+const sandbox = await Sandbox.create({id: 'base'})
// `filesystem.make_dir()` will fail if any directory in the path doesn't exist
// Create a new directory '/dir'
-await session.filesystem.makeDir('/dir') // $HighlightLine
+await sandbox.filesystem.makeDir('/dir') // $HighlightLine
-await session.close()
+await sandbox.close()
diff --git a/apps/docs/src/code/js/basics/fs_read.js b/apps/docs/src/code/js/basics/fs_read.js
index 893d405ef..ddb869910 100644
--- a/apps/docs/src/code/js/basics/fs_read.js
+++ b/apps/docs/src/code/js/basics/fs_read.js
@@ -1,8 +1,8 @@
-import { Session } from '@e2b/sdk'
+import { Sandbox } from '@e2b/sdk'
-const session = await Session.create({ id: 'Nodejs' })
+const sandbox = await Sandbox.create({id: 'base'})
-const fileContent = await session.filesystem.read('/etc/hosts') // $HighlightLine
+const fileContent = await sandbox.filesystem.read('/etc/hosts') // $HighlightLine
console.log(fileContent)
-await session.close()
+await sandbox.close()
diff --git a/apps/docs/src/code/js/basics/fs_read_bytes.js b/apps/docs/src/code/js/basics/fs_read_bytes.js
index 0a3886029..ab0091ef4 100644
--- a/apps/docs/src/code/js/basics/fs_read_bytes.js
+++ b/apps/docs/src/code/js/basics/fs_read_bytes.js
@@ -1,11 +1,11 @@
import fs from 'fs'
-import { Session } from '@e2b/sdk'
+import { Sandbox } from '@e2b/sdk'
-const session = await Session.create({ id: 'Nodejs' })
+const sandbox = await Sandbox.create({id: 'base'})
// File bytes will read file's content as bytes
// `fileBytes` as a Uint8Array
-const fileBytes = await session.filesystem.readBytes('/etc/hosts') // $HighlightLine
+const fileBytes = await sandbox.filesystem.readBytes('/etc/hosts') // $HighlightLine
// The output will look similar to this:
// <Buffer 31 32 37 2e 30 2e 30 2e 31 09 6c 6f 63 61 6c 68 6f 73 ...
@@ -14,4 +14,4 @@ console.log(fileBytes)
// We can save those bytes to a file locally like this:
fs.writeFileSync('hosts', fileBytes)
-await session.close()
+await sandbox.close()
diff --git a/apps/docs/src/code/js/basics/fs_watch.js b/apps/docs/src/code/js/basics/fs_watch.js
index 8bd61f51e..e89486129 100644
--- a/apps/docs/src/code/js/basics/fs_watch.js
+++ b/apps/docs/src/code/js/basics/fs_watch.js
@@ -1,10 +1,11 @@
-import { Session } from '@e2b/sdk'
+import { Sandbox } from '@e2b/sdk'
-const session = await Session.create({ id: 'Nodejs' })
+const sandbox = await Sandbox.create({id: 'base'})
// Start filesystem watcher for the /home directory
-const watcher = session.filesystem.watchDir('/home') // $HighlightLine
-watcher.addEventListener(event => { // $HighlightLine
+const watcher = sandbox.filesystem.watchDir('/home') // $HighlightLine
+watcher.addEventListener((event) => {
+ // $HighlightLine
console.log('Filesystem event', event) // $HighlightLine
}) // $HighlightLine
await watcher.start() // $HighlightLine
@@ -16,7 +17,7 @@ for (let i = 0; i < 10; i++) {
// `filesystem.write()` will trigger two events:
// 1. 'Create' when the file is created
// 2. 'Write' when the file is written to
- await session.filesystem.write(`/home/${i}.txt`, `Hello World ${i}!`)
+ await sandbox.filesystem.write(`/home/${i}.txt`, `Hello World ${i}!`)
}
-await session.close()
+await sandbox.close()
diff --git a/apps/docs/src/code/js/basics/fs_write.js b/apps/docs/src/code/js/basics/fs_write.js
index d650f0e50..55652af73 100644
--- a/apps/docs/src/code/js/basics/fs_write.js
+++ b/apps/docs/src/code/js/basics/fs_write.js
@@ -1,6 +1,6 @@
-import { Session } from '@e2b/sdk'
+import { Sandbox } from '@e2b/sdk'
-const session = await Session.create({ id: 'Nodejs' })
+const sandbox = await Sandbox.create({id: 'base'})
// `filesystem.write()` will:
// - create the file if it doesn't exist
@@ -8,9 +8,9 @@ const session = await Session.create({ id: 'Nodejs' })
// - overwrite the file if it exists
// Write the content of the file '/hello.txt'
-await session.filesystem.write('/hello.txt', 'Hello World!') // $HighlightLine
+await sandbox.filesystem.write('/hello.txt', 'Hello World!') // $HighlightLine
// The following would fail because '/dir' doesn't exist
-// await session.filesystem.write("/dir/hello.txt", "Hello World!")
+// await sandbox.filesystem.write("/dir/hello.txt", "Hello World!")
-await session.close()
+await sandbox.close()
diff --git a/apps/docs/src/code/js/basics/fs_write_bytes.js b/apps/docs/src/code/js/basics/fs_write_bytes.js
index 151e49971..5aac0ee62 100644
--- a/apps/docs/src/code/js/basics/fs_write_bytes.js
+++ b/apps/docs/src/code/js/basics/fs_write_bytes.js
@@ -1,18 +1,18 @@
-import { Session } from '@e2b/sdk'
+import { Sandbox } from '@e2b/sdk'
-const session = await Session.create({ id: 'Nodejs' })
+const sandbox = await Sandbox.create({id: 'base'})
// Let's convert string to bytes for testing purposes
const encoder = new TextEncoder('utf-8')
const contentInBytes = encoder.encode('Hello World!')
// `writeBytes` accepts a Uint8Array and saves it to a file inside the playground
-await session.filesystem.writeBytes('/file', contentInBytes) // $HighlightLine
+await sandbox.filesystem.writeBytes('/file', contentInBytes) // $HighlightLine
// We can read the file back to verify the content
-const fileContent = await session.filesystem.read('/file')
+const fileContent = await sandbox.filesystem.read('/file')
// This will print 'Hello World!'
console.log(fileContent)
-await session.close()
+await sandbox.close()
diff --git a/apps/docs/src/code/js/basics/get_url.js b/apps/docs/src/code/js/basics/get_url.js
index 32acdf4f0..820c0b01f 100644
--- a/apps/docs/src/code/js/basics/get_url.js
+++ b/apps/docs/src/code/js/basics/get_url.js
@@ -1,8 +1,8 @@
-import { Session } from '@e2b/sdk'
+import { Sandbox } from '@e2b/sdk'
-const session = await Session.create({ id: 'Nodejs' })
+const sandbox = await Sandbox.create({id: 'base'})
-const url = session.getHostname() // $HighlightLine
+const url = sandbox.getHostname() // $HighlightLine
console.log('https://' + url)
-await session.close()
+await sandbox.close()
diff --git a/apps/docs/src/code/js/basics/get_url_port.js b/apps/docs/src/code/js/basics/get_url_port.js
index 659f4100d..e6ed2f234 100644
--- a/apps/docs/src/code/js/basics/get_url_port.js
+++ b/apps/docs/src/code/js/basics/get_url_port.js
@@ -1,9 +1,9 @@
-import { Session } from '@e2b/sdk'
+import { Sandbox } from '@e2b/sdk'
-const session = await Session.create({ id: 'Nodejs' })
+const sandbox = await Sandbox.create({id: 'base'})
const openPort = 3000
-const url = session.getHostname(openPort) // $HighlightLine
+const url = sandbox.getHostname(openPort) // $HighlightLine
console.log('https://' + url)
-await session.close()
+await sandbox.close()
diff --git a/apps/docs/src/code/js/basics/init.js b/apps/docs/src/code/js/basics/init.js
index de70efbb6..981a6930b 100644
--- a/apps/docs/src/code/js/basics/init.js
+++ b/apps/docs/src/code/js/basics/init.js
@@ -1,7 +1,5 @@
-import { Session } from '@e2b/sdk'
+import { Sandbox } from '@e2b/sdk'
-const session = await Session.create({
- id: 'Nodejs', // or 'Bash', 'Python3', 'Java', 'Go', 'Rust', 'PHP', 'Perl', 'DotNET'
-})
+const sandbox = await Sandbox.create()
-await session.close()
+await sandbox.close()
diff --git a/apps/docs/src/code/js/basics/process_env_vars.js b/apps/docs/src/code/js/basics/process_env_vars.js
index a1af59ea7..12f822cd2 100644
--- a/apps/docs/src/code/js/basics/process_env_vars.js
+++ b/apps/docs/src/code/js/basics/process_env_vars.js
@@ -1,16 +1,16 @@
-import { Session } from '@e2b/sdk'
+import { Sandbox } from '@e2b/sdk'
-const session = await Session.create({
- id: 'Nodejs',
- envVars: { FOO: 'Hello' },
+const sandbox = await Sandbox.create({
+ id: 'base',
+ envVars: {FOO: 'Hello'},
})
-const proc = await session.process.start({
+const proc = await sandbox.process.start({
cmd: 'echo $FOO $BAR!',
- envVars: { BAR: 'World' }, // $HighlightLine
+ envVars: {BAR: 'World'}, // $HighlightLine
})
await proc.wait()
console.log(proc.output.stdout)
// output: Hello World!
-await session.close()
\ No newline at end of file
+await sandbox.close()
diff --git a/apps/docs/src/code/js/basics/process_exit.js b/apps/docs/src/code/js/basics/process_exit.js
index 20215d199..7aba32b03 100644
--- a/apps/docs/src/code/js/basics/process_exit.js
+++ b/apps/docs/src/code/js/basics/process_exit.js
@@ -1,19 +1,19 @@
-import { Session } from '@e2b/sdk'
+import { Sandbox } from '@e2b/sdk'
-const session = await Session.create({
- id: 'Nodejs',
- onExit: () => console.log('[session]', 'process ended'), // $HighlightLine
+const sandbox = await Sandbox.create({
+ id: 'base',
+ onExit: () => console.log('[sandbox]', 'process ended'), // $HighlightLine
})
-const proc = await session.process.start({ cmd: 'echo "Hello World!"' })
+const proc = await sandbox.process.start({cmd: 'echo "Hello World!"'})
await proc.wait()
-// output: [session] process ended
+// output: [sandbox] process ended
-const procWithCustomHandler = await session.process.start({
+const procWithCustomHandler = await sandbox.process.start({
cmd: 'echo "Hello World!"',
onExit: () => console.log('[process]', 'process ended'), // $HighlightLine
})
await procWithCustomHandler.wait()
// output: [process] process ended
-await session.close()
+await sandbox.close()
diff --git a/apps/docs/src/code/js/basics/process_start.js b/apps/docs/src/code/js/basics/process_start.js
index a453912e4..8e0e0af35 100644
--- a/apps/docs/src/code/js/basics/process_start.js
+++ b/apps/docs/src/code/js/basics/process_start.js
@@ -1,12 +1,12 @@
-import { Session } from '@e2b/sdk'
+import { Sandbox } from '@e2b/sdk'
-const session = await Session.create({ id: 'Nodejs' })
+const sandbox = await Sandbox.create({id: 'base'})
-const npmInit = await session.process.start({
+const npmInit = await sandbox.process.start({
cmd: 'npm init -y', // $HighlightLine
})
await npmInit.wait()
console.log(npmInit.output.stdout)
-await session.close()
+await sandbox.close()
diff --git a/apps/docs/src/code/js/basics/process_stop.js b/apps/docs/src/code/js/basics/process_stop.js
index b2b4309aa..01e3c4b8e 100644
--- a/apps/docs/src/code/js/basics/process_stop.js
+++ b/apps/docs/src/code/js/basics/process_stop.js
@@ -1,14 +1,14 @@
-import { Session } from '@e2b/sdk'
+import { Sandbox } from '@e2b/sdk'
-const session = await Session.create({
- id: 'Nodejs',
+const sandbox = await Sandbox.create({
+ id: 'base',
})
-const npmInit = await session.process.start({
+const npmInit = await sandbox.process.start({
cmd: 'npm init -y',
})
await npmInit.kill() // $HighlightLine
// There will be no output because we immediately kill the `npm_init` process
console.log(npmInit.output.stdout)
-await session.close()
+await sandbox.close()
diff --git a/apps/docs/src/code/js/basics/process_stream_stderr.js b/apps/docs/src/code/js/basics/process_stream_stderr.js
index ec48e825d..5295820fc 100644
--- a/apps/docs/src/code/js/basics/process_stream_stderr.js
+++ b/apps/docs/src/code/js/basics/process_stream_stderr.js
@@ -1,22 +1,22 @@
-import { Session } from '@e2b/sdk'
+import { Sandbox } from '@e2b/sdk'
-const session = await Session.create({
- id: 'Nodejs',
+const sandbox = await Sandbox.create({
+ id: 'base',
})
// This command will fail and output to stderr because Golang isn't installed in the cloud playground
-const golangVersion = await session.process.start({
+const golangVersion = await sandbox.process.start({
cmd: 'go version',
- onStderr: output => console.log('session', output.line), // $HighlightLine
+ onStderr: (output) => console.log('sandbox', output.line), // $HighlightLine
})
await golangVersion.wait()
-// output: [session] /bin/bash: line 1: go: command not found
+// output: [sandbox] /bin/bash: line 1: go: command not found
-const procWithCustomHandler = await session.process.start({
+const procWithCustomHandler = await sandbox.process.start({
cmd: 'go version',
- onStderr: data => console.log('process', data.line), // $HighlightLine
+ onStderr: (data) => console.log('process', data.line), // $HighlightLine
})
await procWithCustomHandler.wait()
// output: process /bin/bash: line 1: go: command not found
-await session.close()
+await sandbox.close()
diff --git a/apps/docs/src/code/js/basics/process_stream_stdout.js b/apps/docs/src/code/js/basics/process_stream_stdout.js
index 9b9a42589..f8a17caf9 100644
--- a/apps/docs/src/code/js/basics/process_stream_stdout.js
+++ b/apps/docs/src/code/js/basics/process_stream_stdout.js
@@ -1,21 +1,21 @@
-import { Session } from '@e2b/sdk'
+import { Sandbox } from '@e2b/sdk'
-const session = await Session.create({
- id: 'Nodejs',
- onStdout: output => console.log('session', output.line), // $HighlightLine
+const sandbox = await Sandbox.create({
+ id: 'base',
+ onStdout: (output) => console.log('sandbox', output.line), // $HighlightLine
})
-const proc = await session.process.start({
+const proc = await sandbox.process.start({
cmd: 'echo "Hello World!"',
})
await proc.wait()
-// output: session Hello World!
+// output: sandbox Hello World!
-const procWithCustomHandler = await session.process.start({
+const procWithCustomHandler = await sandbox.process.start({
cmd: 'echo "Hello World!"',
- onStdout: data => console.log('process', data.line), // $HighlightLine
+ onStdout: (data) => console.log('process', data.line), // $HighlightLine
})
await procWithCustomHandler.wait()
// output: process Hello World!
-await session.close()
+await sandbox.close()
diff --git a/apps/docs/src/code/js/basics/process_write_stdin.js b/apps/docs/src/code/js/basics/process_write_stdin.js
index 5300fe93d..87059f1f1 100644
--- a/apps/docs/src/code/js/basics/process_write_stdin.js
+++ b/apps/docs/src/code/js/basics/process_write_stdin.js
@@ -1,14 +1,14 @@
-import { Session } from '@e2b/sdk'
+import { Sandbox } from '@e2b/sdk'
-const session = await Session.create({ id: 'Nodejs' })
+const sandbox = await Sandbox.create({id: 'base'})
// This example will print back the string we send to the process using `sendStdin()`
-const proc = await session.process.start({
+const proc = await sandbox.process.start({
cmd: 'while IFS= read -r line; do echo "$line"; sleep 1; done',
- onStdout: output => console.log(output),
+ onStdout: (output) => console.log(output),
})
await proc.sendStdin('AI Playground\n') // $HighlightLine
await proc.kill()
-await session.close()
+await sandbox.close()
diff --git a/apps/docs/src/code/js/basics/scan_ports.js b/apps/docs/src/code/js/basics/scan_ports.js
index 8879b97dd..4e479de1f 100644
--- a/apps/docs/src/code/js/basics/scan_ports.js
+++ b/apps/docs/src/code/js/basics/scan_ports.js
@@ -1,6 +1,6 @@
-import { Session } from '@e2b/sdk'
+import { Sandbox } from '@e2b/sdk'
-const sleep = ms => new Promise(res => setTimeout(res, ms))
+const sleep = (ms) => new Promise((res) => setTimeout(res, ms))
// List of ports that have already been printed
const printedPorts = []
@@ -11,26 +11,28 @@ const printedPorts = []
// ip='169.254.0.21' port=49982 state='ESTABLISHED' https://49982-smob7j0j-fce131d5.ondevbook.com
// ip='127.0.0.53' port=53 state='LISTEN' https://53-smob7j0j-fce131d5.ondevbook.com
// ip='0.0.0.0' port=8000 state='LISTEN' https://8000-smob7j0j-fce131d5.ondevbook.com
-function printNewPortAndURL(openPorts, session) {
- openPorts.forEach(port => {
+function printNewPortAndURL(openPorts, sandbox) {
+ openPorts.forEach((port) => {
if (!printedPorts.includes(port.port)) {
printedPorts.push(port.port)
- console.log(port, `https://${session.getHostname(port.port)}`)
+ console.log(port, `https://${sandbox.getHostname(port.port)}`)
}
})
}
-const session = await Session.create({
- id: 'Python3',
- onScanPorts: openPorts => printNewPortAndURL(openPorts, session), // $HighlightLine
+const sandbox = await Sandbox.create({
+ id: 'base',
+ onScanPorts: (openPorts) => printNewPortAndURL(openPorts, sandbox), // $HighlightLine
})
// Start a new server on port 8000 inside the playground.
-const proc = await session.process.start({ cmd: 'python3 -m http.server 8000' }) // $HighlightLine
+const proc = await sandbox.process.start({
+ cmd: 'python3 -m http.server 8000',
+}) // $HighlightLine
-// Wait 10 seconds and then kill the server and close the session.
+// Wait 10 seconds and then kill the server and close the sandbox.
await sleep(10000)
await proc.kill()
-await session.close()
+await sandbox.close()
-await session.close()
+await sandbox.close()
diff --git a/apps/docs/src/code/js/basics/set_env_vars.js b/apps/docs/src/code/js/basics/set_env_vars.js
index a17bcf522..a51fbd55e 100644
--- a/apps/docs/src/code/js/basics/set_env_vars.js
+++ b/apps/docs/src/code/js/basics/set_env_vars.js
@@ -1,8 +1,8 @@
-import { Session } from '@e2b/sdk'
+import { Sandbox } from '@e2b/sdk'
-const session = await Session.create({
- id: 'Nodejs',
- envVars: { FOO: 'Hello' }, // $HighlightLine
+const sandbox = await Sandbox.create({
+ id: 'base',
+ envVars: {FOO: 'Hello'}, // $HighlightLine
})
-await session.close()
+await sandbox.close()
diff --git a/apps/docs/src/code/js/basics/upload_file.js b/apps/docs/src/code/js/basics/upload_file.js
index a68e53417..a736a2e68 100644
--- a/apps/docs/src/code/js/basics/upload_file.js
+++ b/apps/docs/src/code/js/basics/upload_file.js
@@ -1,12 +1,12 @@
-import { Session } from '@e2b/sdk'
+import { Sandbox } from '@e2b/sdk'
import fs from 'node:fs'
-const session = await Session.create({ id: 'Nodejs' })
+const sandbox = await Sandbox.create({id: 'base'})
// If you're in the server environment
const filename = 'data.csv' // $HighlightLine
const fileBuffer = fs.readFileSync('path/to/local/file') // $HighlightLine
-const remotePath = await session.uploadFile(fileBuffer, filename) // $HighlightLine
+const remotePath = await sandbox.uploadFile(fileBuffer, filename) // $HighlightLine
// If you're in the browser environment, you can use the Blob API
// const filename = 'data.csv'
@@ -16,8 +16,10 @@ const remotePath = await session.uploadFile(fileBuffer, filename) // $HighlightL
// '"3","val1","val2","val3","val4"'
// ].join('\n');
// const fileBlob = new Blob([csv], { type: 'text/csv' })
-// const remotePath = await session.uploadFile(fileBlob, 'data.csv')
+// const remotePath = await sandbox.uploadFile(fileBlob, 'data.csv')
-console.log(`The file was uploaded to '${remotePath}' path inside the sandbox `)
+console.log(
+ `The file was uploaded to '${remotePath}' path inside the sandbox `,
+)
-await session.close()
+await sandbox.close()
diff --git a/apps/docs/src/code/js/code_exec/process.js b/apps/docs/src/code/js/code_exec/process.js
index bbcf76c78..c7fff41ea 100644
--- a/apps/docs/src/code/js/code_exec/process.js
+++ b/apps/docs/src/code/js/code_exec/process.js
@@ -1,24 +1,23 @@
-import { Session } from '@e2b/sdk'
+import { Sandbox } from '@e2b/sdk'
-// 1. Start the playground session
-const session = await Session.create({
- // Select the right runtime
- // 'Node', 'Bash', 'Python3', 'Java', 'Go', 'Rust', 'PHP', 'Perl', 'DotNET'
- id: 'Python3',
+// 1. Start the playground sandbox
+const sandbox = await Sandbox.create({
+ // You can pass your own sandbox template id
+ id: 'base',
apiKey: process.env.E2B_API_KEY,
})
// 2. Save the LLM-generated code inside the playground
const llmGeneratedCode = 'print("This code was generated by LLM")'
-await session.filesystem.write('/main.py', llmGeneratedCode)
+await sandbox.filesystem.write('/main.py', llmGeneratedCode)
// 3. Start the execution of the JavaScript file we saved
-const proc = await session.process.start({
+const proc = await sandbox.process.start({
// $HighlightLine
cmd: 'python /main.py', // $HighlightLine
// 4. Stream stdout, stderr
- onStdout: data => console.log(data.line), // $HighlightLine
- onStderr: data => console.log(data.line), // $HighlightLine
+ onStdout: (data) => console.log(data.line), // $HighlightLine
+ onStderr: (data) => console.log(data.line), // $HighlightLine
}) // $HighlightLine
// 4. Wait for the process to finish
@@ -27,4 +26,4 @@ await proc.wait()
// 5. Or you can access output after the process has finished
const output = proc.output
-await session.close()
+await sandbox.close()
diff --git a/apps/docs/src/code/js/code_exec/run_code.js b/apps/docs/src/code/js/code_exec/run_code.js
index f9e14fc15..ac1143526 100644
--- a/apps/docs/src/code/js/code_exec/run_code.js
+++ b/apps/docs/src/code/js/code_exec/run_code.js
@@ -1,10 +1,10 @@
// 1. Import e2b
-import { runCode } from '@e2b/sdk'
+import {runCode} from '@e2b/sdk'
// 2. Save LLM-generated code
const llmGeneratedCode = 'print("This code was generated by LLM")'
// 3. Select runtime & run code in a sandboxed remote environment
-const { stdout, stderr } = await runCode('Python3', llmGeneratedCode) // $HighlightLine
+const {stdout, stderr} = await runCode('Python3', llmGeneratedCode) // $HighlightLine
console.log(stdout)
console.log(stderr)
diff --git a/apps/docs/src/code/js/cwd/filesystem.js b/apps/docs/src/code/js/cwd/filesystem.js
index d72e50810..dac0b420c 100644
--- a/apps/docs/src/code/js/cwd/filesystem.js
+++ b/apps/docs/src/code/js/cwd/filesystem.js
@@ -1,20 +1,22 @@
-import { Session } from '@e2b/sdk'
+import { Sandbox } from '@e2b/sdk'
-const session = await Session.create({
- id: 'Nodejs',
+const sandbox = await Sandbox.create({
+ id: 'base',
cwd: '/home/user/code', // $HighlightLine
})
-await session.filesystem.write('hello.txt', 'Welcome to E2B!') // $HighlightLine
-const proc = await session.process.start({ cmd: 'cat /home/user/code/hello.txt' })
+await sandbox.filesystem.write('hello.txt', 'Welcome to E2B!') // $HighlightLine
+const proc = await sandbox.process.start({
+ cmd: 'cat /home/user/code/hello.txt',
+})
await proc.wait()
console.log(proc.output.stdout)
// output: "Welcome to E2B!"
-await session.filesystem.write('../hello.txt', 'We hope you have a great day!') // $HighlightLine
-const proc2 = await session.process.start({ cmd: 'cat /home/user/hello.txt' })
+await sandbox.filesystem.write('../hello.txt', 'We hope you have a great day!') // $HighlightLine
+const proc2 = await sandbox.process.start({cmd: 'cat /home/user/hello.txt'})
await proc2.wait()
console.log(proc2.output.stdout)
// output: "We hope you have a great day!"
-await session.close()
+await sandbox.close()
diff --git a/apps/docs/src/code/js/cwd/process.js b/apps/docs/src/code/js/cwd/process.js
index daf60e997..98eeed2bd 100644
--- a/apps/docs/src/code/js/cwd/process.js
+++ b/apps/docs/src/code/js/cwd/process.js
@@ -1,18 +1,18 @@
-import { Session } from '@e2b/sdk'
+import { Sandbox } from '@e2b/sdk'
-const session = await Session.create({
- id: 'Nodejs',
+const sandbox = await Sandbox.create({
+ id: 'base',
cwd: '/code', // $HighlightLine
})
-const sessionCwd = await session.process.start({ cmd: 'pwd' }) // $HighlightLine
-await sessionCwd.wait()
-console.log(sessionCwd.output.stdout)
+const sandboxCwd = await sandbox.process.start({cmd: 'pwd'}) // $HighlightLine
+await sandboxCwd.wait()
+console.log(sandboxCwd.output.stdout)
// output: /code
-const processCwd = await session.process.start({ cmd: 'pwd', cwd: '/home' }) // $HighlightLine
+const processCwd = await sandbox.process.start({cmd: 'pwd', cwd: '/home'}) // $HighlightLine
await processCwd.wait()
console.log(processCwd.output.stdout)
// output: /home
-await session.close()
+await sandbox.close()
diff --git a/apps/docs/src/code/js/cwd/sandbox.js b/apps/docs/src/code/js/cwd/sandbox.js
new file mode 100644
index 000000000..1e9a0da73
--- /dev/null
+++ b/apps/docs/src/code/js/cwd/sandbox.js
@@ -0,0 +1,11 @@
+import { Sandbox } from '@e2b/sdk'
+
+const sandbox = await Sandbox.create({
+ id: 'base',
+ cwd: '/code', // $HighlightLine
+})
+
+// You can also change the cwd of an existing sandbox
+sandbox.cwd = '/home' // $HighlightLine
+
+await sandbox.close()
diff --git a/apps/docs/src/code/js/cwd/session.js b/apps/docs/src/code/js/cwd/session.js
deleted file mode 100644
index 1b61b14d5..000000000
--- a/apps/docs/src/code/js/cwd/session.js
+++ /dev/null
@@ -1,11 +0,0 @@
-import { Session } from '@e2b/sdk'
-
-const session = await Session.create({
- id: 'Nodejs',
- cwd: '/code', // $HighlightLine
-})
-
-// You can also change the cwd of an existing session
-session.cwd = '/home' // $HighlightLine
-
-await session.close()
diff --git a/apps/docs/src/code/js/logging/e2b_logging.js b/apps/docs/src/code/js/logging/e2b_logging.js
index e92bee1e1..87ec6ecea 100644
--- a/apps/docs/src/code/js/logging/e2b_logging.js
+++ b/apps/docs/src/code/js/logging/e2b_logging.js
@@ -1,4 +1,4 @@
-import { Session } from '@e2b/sdk'
+import { Sandbox } from '@e2b/sdk'
const logger = {
debug: console.debug, // log debug messages, in default logger this is noop
@@ -8,8 +8,8 @@ const logger = {
error: console.error,
}
-const session = await Session.create({
- id: 'Nodejs',
+const sandbox = await Sandbox.create({
+ id: 'base',
apiKey: process.env.E2B_API_KEY,
logger, // $HighlightLine
})
diff --git a/apps/docs/src/code/js/processes/background_processes.js b/apps/docs/src/code/js/processes/background_processes.js
index 7b09d7093..ece37170b 100644
--- a/apps/docs/src/code/js/processes/background_processes.js
+++ b/apps/docs/src/code/js/processes/background_processes.js
@@ -1,27 +1,29 @@
-import { Session } from '@e2b/sdk'
+import { Sandbox } from '@e2b/sdk'
-const session = await Session.create({
- id: 'Python3',
+const sandbox = await Sandbox.create({
+ id: 'base',
apiKey: process.env.E2B_API_KEY,
})
function sleep(ms) {
- return new Promise(resolve => setTimeout(resolve, ms))
+ return new Promise((resolve) => setTimeout(resolve, ms))
}
// Start a server process in the background
// We are not calling `await backgroundServer` - that would wait for the process to finish running
-const backgroundServer = await session.process.start({
+const backgroundServer = await sandbox.process.start({
// $HighlightLine
cmd: 'python3 -m http.server 8000', // $HighlightLine
- onStdout: output => console.log(output), // $HighlightLine
+ onStdout: (output) => console.log(output), // $HighlightLine
}) // $HighlightLine
// Wait for the server to be accessible
await sleep(1000)
// Start another process that creates a request to server
-const serverRequest = await session.process.start({ cmd: 'curl localhost:8000' })
+const serverRequest = await sandbox.process.start({
+ cmd: 'curl localhost:8000',
+})
// Wait for the server request to finish running
const requestOutput = await serverRequest.wait()
@@ -32,4 +34,4 @@ await backgroundServer.kill() // $HighlightLine
// Access the server output after the server process is killed
const serverOutput = backgroundServer.output // $HighlightLine
-await session.close()
+await sandbox.close()
diff --git a/apps/docs/src/code/js/quickstart.js b/apps/docs/src/code/js/quickstart.js
index 81377de7c..cbe6bbe33 100644
--- a/apps/docs/src/code/js/quickstart.js
+++ b/apps/docs/src/code/js/quickstart.js
@@ -1,19 +1,20 @@
-import { Session } from '@e2b/sdk'
+import { Sandbox } from '@e2b/sdk'
// 1. Start cloud playground
-const session = await Session.create({ // $HighlightLine
- id: 'Nodejs', // or 'Bash', 'Python3', 'Java', 'Go', 'Rust', 'PHP', 'Perl', 'DotNET'
+const sandbox = await Sandbox.create({
+ // $HighlightLine
+ id: 'base', // or you can pass your own sandbox template id
apiKey: process.env.E2B_API_KEY,
})
// 2. Use filesystem
-session.filesystem // $HighlightLine
+sandbox.filesystem // $HighlightLine
// 3. Start processes
-session.process.start() // $HighlightLine
+sandbox.process.start() // $HighlightLine
// 4. Upload/download files
-session.read_bytes() // $HighlightLine
-session.write_bytes() // $HighlightLine
+sandbox.read_bytes() // $HighlightLine
+sandbox.write_bytes() // $HighlightLine
-await session.close()
+await sandbox.close()
diff --git a/apps/docs/src/code/js/run_all.js b/apps/docs/src/code/js/run_all.js
index 4876dd423..689e9c666 100644
--- a/apps/docs/src/code/js/run_all.js
+++ b/apps/docs/src/code/js/run_all.js
@@ -1,26 +1,3 @@
/* eslint-disable unused-imports/no-unused-imports,@typescript-eslint/no-unused-vars */
-import * as quickstart from './quickstart.js'
-import * as get_url from './basics/get_url.js'
-import * as get_url_port from './basics/get_url_port.js'
-import * as scan_ports from './basics/scan_ports.js'
-import * as init from './basics/init.js'
-import * as fs_ls from './basics/fs_ls.js'
-import * as fs_mkdir from './basics/fs_mkdir.js'
-import * as fs_read from './basics/fs_read.js'
-import * as fs_watch from './basics/fs_watch.js'
-import * as fs_write from './basics/fs_write.js'
-import * as process_start from './basics/process_start.js'
-import * as process_stop from './basics/process_stop.js'
-import * as process_stream_stdout from './basics/process_stream_stdout.js'
-import * as process_stream_stderr from './basics/process_stream_stderr.js'
-import * as process_write_stdin from './basics/process_write_stdin.js'
-import * as timeout_session from './timeout/timeout_session.js'
-import * as timeout_process from './timeout/timeout_process.js'
-import * as timeout_filesystem from './timeout/timeout_filesystem.js'
-import * as background_processes from './processes/background_processes.js'
-
-import * as agents_code_exec from './agents/code_exec.js'
-import * as agents_clone_repo from './agents/clone_repo.js'
-import * as agents_start_process from './agents/start_process.js'
console.log('Done')
diff --git a/apps/docs/src/code/js/timeout/timeout_filesystem.js b/apps/docs/src/code/js/timeout/timeout_filesystem.js
index 0bdc21a4a..6cbe4b130 100644
--- a/apps/docs/src/code/js/timeout/timeout_filesystem.js
+++ b/apps/docs/src/code/js/timeout/timeout_filesystem.js
@@ -1,16 +1,16 @@
-import { Session } from '@e2b/sdk'
+import { Sandbox } from '@e2b/sdk'
-const session = await Session.create({ id: 'Nodejs' })
+const sandbox = await Sandbox.create({id: 'base'})
// Timeout 3s for the write operation
-await session.filesystem.write('hello.txt', 'Hello World!', { timeout: 3000 }) // $HighlightLine
+await sandbox.filesystem.write('hello.txt', 'Hello World!', {timeout: 3000}) // $HighlightLine
// Timeout 3s for the list operation
-const files = await session.filesystem.list('.', { timeout: 3000 }) // $HighlightLine
+const files = await sandbox.filesystem.list('.', {timeout: 3000}) // $HighlightLine
console.log(files)
// Timeout 3s for the read operation
-const content = await session.filesystem.read('hello.txt', { timeout: 3000 }) // $HighlightLine
+const content = await sandbox.filesystem.read('hello.txt', {timeout: 3000}) // $HighlightLine
console.log(content)
-await session.close()
+await sandbox.close()
diff --git a/apps/docs/src/code/js/timeout/timeout_process.js b/apps/docs/src/code/js/timeout/timeout_process.js
index 341646956..81ce58eb7 100644
--- a/apps/docs/src/code/js/timeout/timeout_process.js
+++ b/apps/docs/src/code/js/timeout/timeout_process.js
@@ -1,12 +1,12 @@
-import { Session } from '@e2b/sdk'
+import { Sandbox } from '@e2b/sdk'
-const session = await Session.create({ id: 'Nodejs' })
+const sandbox = await Sandbox.create({id: 'base'})
// Timeout 3s for the process to start
-const npmInit = await session.process.start({
+const npmInit = await sandbox.process.start({
cmd: 'npm init -y',
timeout: 3000, // $HighlightLine
})
await npmInit.wait()
-await session.close()
+await sandbox.close()
diff --git a/apps/docs/src/code/js/timeout/timeout_sandbox.js b/apps/docs/src/code/js/timeout/timeout_sandbox.js
new file mode 100644
index 000000000..d2bc2464e
--- /dev/null
+++ b/apps/docs/src/code/js/timeout/timeout_sandbox.js
@@ -0,0 +1,9 @@
+import { Sandbox } from '@e2b/sdk'
+
+// Timeout 3s for the sandbox to open
+const sandbox = await Sandbox.create({
+ id: 'base',
+ timeout: 3000, // $HighlightLine
+})
+
+await sandbox.close()
diff --git a/apps/docs/src/code/js/timeout/timeout_session.js b/apps/docs/src/code/js/timeout/timeout_session.js
deleted file mode 100644
index 03c6d359a..000000000
--- a/apps/docs/src/code/js/timeout/timeout_session.js
+++ /dev/null
@@ -1,9 +0,0 @@
-import { Session } from '@e2b/sdk'
-
-// Timeout 3s for the session to open
-const session = await Session.create({
- id: 'Nodejs',
- timeout: 3000, // $HighlightLine
-})
-
-await session.close()
diff --git a/apps/docs/src/code/python/_run_all.py b/apps/docs/src/code/python/_run_all.py
index ffecee753..ec100cde2 100644
--- a/apps/docs/src/code/python/_run_all.py
+++ b/apps/docs/src/code/python/_run_all.py
@@ -1,27 +1 @@
-from quickstart import main as quickstart_main
-from basics.init import main as init_main
-from basics.get_url import main as get_url_main
-from basics.get_url_port import main as get_url_port_main
-from basics.scan_ports import main as scan_ports_main
-from basics.fs_ls import main as fs_ls_main
-from basics.fs_mkdir import main as fs_mkdir_main
-from basics.fs_read import main as fs_read_main
-from basics.fs_write import main as fs_write_main
-from basics.fs_read_bytes import main as fs_read_bytes_main
-from basics.fs_write_bytes import main as fs_write_bytes_main
-from basics.fs_watch import main as fs_watch_main
-from basics.process_start import main as process_start_main
-from basics.process_stop import main as process_stop_main
-from basics.process_stream_stderr import main as process_stream_stderr_main
-from basics.process_stream_stdout import main as process_stream_stdout_main
-from basics.process_write_stdin import main as process_write_stdin_main
-from timeout.timeout_session import main as timeout_session_main
-from timeout.timeout_process import main as timeout_process_main
-from timeout.timeout_filesystem import main as timeout_filesystem_main
-from processes.background_processes import main as background_processes_main
-
-from agents.code_exec import main as code_exec_main
-from agents.clone_repo import main as clone_repo_main
-from agents.start_process import main as start_process_main
-
-print("Done")
\ No newline at end of file
+print("Done")
diff --git a/apps/docs/src/code/python/agents/clone_repo.py b/apps/docs/src/code/python/agents/clone_repo.py
index bd5477e80..8af9823f7 100644
--- a/apps/docs/src/code/python/agents/clone_repo.py
+++ b/apps/docs/src/code/python/agents/clone_repo.py
@@ -1,43 +1,47 @@
from os import getenv
-from e2b import Session
+
+from e2b import Sandbox
E2B_API_KEY = getenv("E2B_API_KEY")
+
def print_out(output):
- print(output.line)
+ print(output.line)
+
def main():
- # 1. Start the playground session
- session = Session.create(
- # Select the right runtime
- id="Nodejs",
- api_key=E2B_API_KEY,
- )
-
- # 2. Start a process that will clone a repository
- proc = session.process.start( # $HighlightLine
- cmd="git clone https://github.com/cruip/open-react-template.git /code/open-react-template", # $HighlightLine
- on_stdout=print_out, # $HighlightLine
- on_stderr=print_out, # $HighlightLine
- ) # $HighlightLine
- # 3. Wait for the process to finish
- proc.wait()
-
- # Optional: 4. List the cntent of cloned repo
- content = session.filesystem.list('/code/open-react-template')
- print(content)
-
- # Optional: 5. Install deps
- print("Installing deps...")
- proc = session.process.start(
- cmd="npm install",
- on_stdout=print_out,
- on_stderr=print_out,
- cwd="/code/open-react-template"
- )
-
- proc.wait()
-
- session.close()
+ # 1. Start the playground sandbox
+ sandbox = Sandbox(
+ # Select the right runtime
+ id="base",
+ api_key=E2B_API_KEY,
+ )
+
+ # 2. Start a process that will clone a repository
+ proc = sandbox.process.start( # $HighlightLine
+ cmd="git clone https://github.com/cruip/open-react-template.git /code/open-react-template", # $HighlightLine
+ on_stdout=print_out, # $HighlightLine
+ on_stderr=print_out, # $HighlightLine
+ ) # $HighlightLine
+ # 3. Wait for the process to finish
+ proc.wait()
+
+ # Optional: 4. List the cntent of cloned repo
+ content = sandbox.filesystem.list("/code/open-react-template")
+ print(content)
+
+ # Optional: 5. Install deps
+ print("Installing deps...")
+ proc = sandbox.process.start(
+ cmd="npm install",
+ on_stdout=print_out,
+ on_stderr=print_out,
+ cwd="/code/open-react-template",
+ )
+
+ proc.wait()
+
+ sandbox.close()
+
main()
diff --git a/apps/docs/src/code/python/agents/code_exec.py b/apps/docs/src/code/python/agents/code_exec.py
index db90c769a..56b0eee4d 100644
--- a/apps/docs/src/code/python/agents/code_exec.py
+++ b/apps/docs/src/code/python/agents/code_exec.py
@@ -1,13 +1,14 @@
-from e2b import Session
+from e2b import Sandbox
+
def print_out(output):
- print(output.line)
+ print(output.line)
+
-# 1. Start the playground session
-session = Session.create(
- # Select the right runtime
- # 'Node', 'Bash', 'Python3', 'Java', 'Go', 'Rust', 'PHP', 'Perl', 'DotNET'
- id="Nodejs",
+# 1. Start the playground sandbox
+sandbox = Sandbox(
+ # You can pass your own sandbox template id
+ id="base",
)
# 2. Save the JavaScript code to a file inside the playground
@@ -18,15 +19,15 @@ code = """
console.log('Root dir item inside playground:', item);
});
"""
-session.filesystem.write('/code/index.js', code)
+sandbox.filesystem.write("/code/index.js", code)
# 3. Start the execution of the JavaScript file we saved
-proc = session.process.start( # $HighlightLine
- cmd="node /code/index.js", # $HighlightLine
- # 4. Stream stdout, stderr
- on_stdout=print_out, # $HighlightLine
- on_stderr=print_out, # $HighlightLine
-) # $HighlightLine
+proc = sandbox.process.start( # $HighlightLine
+ cmd="node /code/index.js", # $HighlightLine
+ # 4. Stream stdout, stderr
+ on_stdout=print_out, # $HighlightLine
+ on_stderr=print_out, # $HighlightLine
+) # $HighlightLine
# 4. Wait for the process to finish
proc.wait()
@@ -34,4 +35,4 @@ proc.wait()
# 5. Or you can access output after the process has finished
output = proc.output
-session.close()
\ No newline at end of file
+sandbox.close()
diff --git a/apps/docs/src/code/python/agents/start_process.py b/apps/docs/src/code/python/agents/start_process.py
index 17728afba..4e5ba1028 100644
--- a/apps/docs/src/code/python/agents/start_process.py
+++ b/apps/docs/src/code/python/agents/start_process.py
@@ -1,33 +1,37 @@
from os import getenv
-from e2b import Session
+
+from e2b import Sandbox
E2B_API_KEY = getenv("E2B_API_KEY")
+
def print_out(output):
- print(output.line)
+ print(output.line)
+
def main():
- # 1. Start the playground session
- session = Session.create(
- # Select the right runtime
- id="Nodejs",
- api_key=E2B_API_KEY,
- )
-
- # 2. Start the shell commdand
- proc = session.process.start( # $HighlightLine
- # Print names of all running processes
- cmd="ps aux | tr -s ' ' | cut -d ' ' -f 11", # $HighlightLine
- on_stdout=print_out, # $HighlightLine
- on_stderr=print_out, # $HighlightLine
- ) # $HighlightLine
-
- # 3. Wait for the process to finish
- proc.wait()
-
- # 4. Or you can access output after the process has finished
- output = proc.output
-
- session.close()
-
-main()
\ No newline at end of file
+ # 1. Start the playground sandbox
+ sandbox = Sandbox(
+ # Select the right runtime
+ id="base",
+ api_key=E2B_API_KEY,
+ )
+
+ # 2. Start the shell commdand
+ proc = sandbox.process.start( # $HighlightLine
+ # Print names of all running processes
+ cmd="ps aux | tr -s ' ' | cut -d ' ' -f 11", # $HighlightLine
+ on_stdout=print_out, # $HighlightLine
+ on_stderr=print_out, # $HighlightLine
+ ) # $HighlightLine
+
+ # 3. Wait for the process to finish
+ proc.wait()
+
+ # 4. Or you can access output after the process has finished
+ output = proc.output
+
+ sandbox.close()
+
+
+main()
diff --git a/apps/docs/src/code/python/api_key/api_key.py b/apps/docs/src/code/python/api_key/api_key.py
index ec558e1a7..65a7fa1c1 100644
--- a/apps/docs/src/code/python/api_key/api_key.py
+++ b/apps/docs/src/code/python/api_key/api_key.py
@@ -1,6 +1,4 @@
-from e2b import Session
+from e2b import Sandbox
-def main():
- explicit_api_key = Session(id="Nodejs", api_key="YOUR_API_KEY")
- explicit_api_key.close()
-main()
+sandbox = Sandbox(api_key="YOUR_API_KEY")
+sandbox.close()
diff --git a/apps/docs/src/code/python/basics/download_file.py b/apps/docs/src/code/python/basics/download_file.py
index 5e6d60ac0..a645132cc 100644
--- a/apps/docs/src/code/python/basics/download_file.py
+++ b/apps/docs/src/code/python/basics/download_file.py
@@ -1,10 +1,10 @@
-from e2b import Session
+from e2b import Sandbox
-session = Session.create(id="Nodejs")
+sandbox = Sandbox(id="base")
-file_in_bytes = session.download_file('path/to/remote/file/inside/sandbox') # $HighlightLine
+file_in_bytes = sandbox.download_file("path/to/remote/file/inside/sandbox") # $HighlightLine
# Save file to local filesystem
-with open('path/to/local/file', 'wb') as f: # $HighlightLine
- f.write(file_in_bytes) # $HighlightLine
+with open("path/to/local/file", "wb") as f: # $HighlightLine
+ f.write(file_in_bytes) # $HighlightLine
-session.close()
+sandbox.close()
diff --git a/apps/docs/src/code/python/basics/fs_ls.py b/apps/docs/src/code/python/basics/fs_ls.py
index b8b2583ea..b9dcd11dc 100644
--- a/apps/docs/src/code/python/basics/fs_ls.py
+++ b/apps/docs/src/code/python/basics/fs_ls.py
@@ -1,10 +1,10 @@
-from e2b import Session
+from e2b import Sandbox
-session = Session.create(id="Nodejs")
+sandbox = Sandbox(id="base")
# List the root directory
-content = session.filesystem.list("/") # $HighlightLine
+content = sandbox.filesystem.list("/") # $HighlightLine
for item in content:
- print(f"Is '{item.name}' directory?", item.is_dir)
+ print(f"Is '{item.name}' directory?", item.is_dir)
-session.close()
+sandbox.close()
diff --git a/apps/docs/src/code/python/basics/fs_mkdir.py b/apps/docs/src/code/python/basics/fs_mkdir.py
index 4527be58a..b35144111 100644
--- a/apps/docs/src/code/python/basics/fs_mkdir.py
+++ b/apps/docs/src/code/python/basics/fs_mkdir.py
@@ -1,10 +1,10 @@
-from e2b import Session
+from e2b import Sandbox
-session = Session.create(id="Nodejs")
+sandbox = Sandbox(id="base")
# `filesystem.make_dir()` will fail if any directory in the path doesn't exist
# Create a new directory '/dir'
-session.filesystem.make_dir("/dir") # $HighlightLine
+sandbox.filesystem.make_dir("/dir") # $HighlightLine
-session.close()
\ No newline at end of file
+sandbox.close()
diff --git a/apps/docs/src/code/python/basics/fs_read.py b/apps/docs/src/code/python/basics/fs_read.py
index 8514f3182..3a025204d 100644
--- a/apps/docs/src/code/python/basics/fs_read.py
+++ b/apps/docs/src/code/python/basics/fs_read.py
@@ -1,13 +1,12 @@
-from os import getenv
-from e2b import Session
+from e2b import Sandbox
-session = Session.create(id="Nodejs")
+sandbox = Sandbox(id="base")
# Read the '/etc/hosts' file
-file_content = session.filesystem.read('/etc/hosts') # $HighlightLine
+file_content = sandbox.filesystem.read("/etc/hosts") # $HighlightLine
# Prints something like:
# 127.0.0.1 localhost
print(file_content)
-session.close()
+sandbox.close()
diff --git a/apps/docs/src/code/python/basics/fs_read_bytes.py b/apps/docs/src/code/python/basics/fs_read_bytes.py
index 18304c823..e40387ade 100644
--- a/apps/docs/src/code/python/basics/fs_read_bytes.py
+++ b/apps/docs/src/code/python/basics/fs_read_bytes.py
@@ -1,17 +1,17 @@
-from e2b import Session
+from e2b import Sandbox
-session = Session.create(id="Nodejs")
+sandbox = Sandbox(id="base")
# File bytes will read file's content as bytes
# `file_bytes` as a bytearray
-file_bytes = session.filesystem.read_bytes('/etc/hosts') # $HighlightLine
+file_bytes = sandbox.filesystem.read_bytes("/etc/hosts") # $HighlightLine
# The output will look similar to this:
# b'127.0.0.1\tlocalhost\n::1\tlocalhost ip6-localhost ip6-loopback\nfe00::0\tip6-localnet\nff00::0\tip6-mcastprefix\nff02::1\tip6-allnodes\nff02::2\tip6-allrouters\n172.17.0.17\t77c7a543226b\n'
print(file_bytes)
# We can save those bytes to a file locally like this:
-with open('./hosts.txt', 'wb') as f:
- f.write(file_bytes)
+with open("./hosts.txt", "wb") as f:
+ f.write(file_bytes)
-session.close()
+sandbox.close()
diff --git a/apps/docs/src/code/python/basics/fs_watch.py b/apps/docs/src/code/python/basics/fs_watch.py
index 10abfdd29..d7bb474f1 100644
--- a/apps/docs/src/code/python/basics/fs_watch.py
+++ b/apps/docs/src/code/python/basics/fs_watch.py
@@ -1,24 +1,28 @@
import time
-from e2b import Session
+
+from e2b import Sandbox
watcher = None
-def create_watcher(session): # $HighlightLine
- # Start filesystem watcher for the /home directory
- watcher = session.filesystem.watch_dir("/home") # $HighlightLine
- watcher.add_event_listener(lambda event: print(event)) # $HighlightLine
- watcher.start() # $HighlightLine
-session = Session.create(id="Nodejs")
-create_watcher(session) # $HighlightLine
+def create_watcher(sandbox): # $HighlightLine
+ # Start filesystem watcher for the /home directory
+ watcher = sandbox.filesystem.watch_dir("/home") # $HighlightLine
+ watcher.add_event_listener(lambda event: print(event)) # $HighlightLine
+ watcher.start() # $HighlightLine
+
+
+sandbox = Sandbox(id="base")
+
+create_watcher(sandbox) # $HighlightLine
# Create files in the /home directory inside the playground
# We'll receive notifications for these events through the watcher we created above.
for i in range(10):
- # `filesystem.write()` will trigger two events:
- # 1. 'Create' when the file is created
- # 2. 'Write' when the file is written to
- session.filesystem.write(f"/home/file{i}.txt", f"Hello World {i}!")
- time.sleep(1)
+ # `filesystem.write()` will trigger two events:
+ # 1. 'Create' when the file is created
+ # 2. 'Write' when the file is written to
+ sandbox.filesystem.write(f"/home/file{i}.txt", f"Hello World {i}!")
+ time.sleep(1)
-session.close()
\ No newline at end of file
+sandbox.close()
diff --git a/apps/docs/src/code/python/basics/fs_write.py b/apps/docs/src/code/python/basics/fs_write.py
index 2f42f017e..48ffac64c 100644
--- a/apps/docs/src/code/python/basics/fs_write.py
+++ b/apps/docs/src/code/python/basics/fs_write.py
@@ -1,6 +1,6 @@
-from e2b import Session
+from e2b import Sandbox
-session = Session.create(id="Nodejs")
+sandbox = Sandbox(id="base")
# `filesystem.write()` will:
# - create the file if it doesn't exist
@@ -8,9 +8,9 @@ session = Session.create(id="Nodejs")
# - overwrite the file if it exists
# Write the content of the file '/hello.txt'
-session.filesystem.write("/hello.txt", "Hello World!") # $HighlightLine
+sandbox.filesystem.write("/hello.txt", "Hello World!") # $HighlightLine
# The following would fail because '/dir' doesn't exist
-# session.filesystem.write("/dir/hello.txt", "Hello World!")
+# sandbox.filesystem.write("/dir/hello.txt", "Hello World!")
-session.close()
+sandbox.close()
diff --git a/apps/docs/src/code/python/basics/fs_write_bytes.py b/apps/docs/src/code/python/basics/fs_write_bytes.py
index e7f8261ce..6f38b9ed0 100644
--- a/apps/docs/src/code/python/basics/fs_write_bytes.py
+++ b/apps/docs/src/code/python/basics/fs_write_bytes.py
@@ -1,15 +1,14 @@
-from os import getenv
-from e2b import Session
+from e2b import Sandbox
-session = Session.create(id="Nodejs")
+sandbox = Sandbox(id="base")
content_in_bytes = bytearray(b"Hello world")
# `write_bytes` will write bytearray to a file inside the playground.
-session.filesystem.write_bytes('/file', content_in_bytes) # $HighlightLine
+sandbox.filesystem.write_bytes("/file", content_in_bytes) # $HighlightLine
# We can read the file back to verify the content
-file_content = session.filesystem.read('/file')
+file_content = sandbox.filesystem.read("/file")
print(file_content)
-session.close()
+sandbox.close()
diff --git a/apps/docs/src/code/python/basics/get_url.py b/apps/docs/src/code/python/basics/get_url.py
index 34a4df103..b425b2613 100644
--- a/apps/docs/src/code/python/basics/get_url.py
+++ b/apps/docs/src/code/python/basics/get_url.py
@@ -1,8 +1,8 @@
-from e2b import Session
+from e2b import Sandbox
-session = Session.create(id="Nodejs")
+sandbox = Sandbox(id="base")
-url = session.get_hostname() # $HighlightLine
+url = sandbox.get_hostname() # $HighlightLine
print("https://" + url)
-session.close()
+sandbox.close()
diff --git a/apps/docs/src/code/python/basics/get_url_port.py b/apps/docs/src/code/python/basics/get_url_port.py
index 2dd0d9544..a005e8e35 100644
--- a/apps/docs/src/code/python/basics/get_url_port.py
+++ b/apps/docs/src/code/python/basics/get_url_port.py
@@ -1,9 +1,9 @@
-from e2b import Session
+from e2b import Sandbox
-session = Session.create(id="Nodejs")
+sandbox = Sandbox(id="base")
open_port = 3000
-url = session.get_hostname(open_port) # $HighlightLine
+url = sandbox.get_hostname(open_port) # $HighlightLine
print("https://" + url)
-session.close()
+sandbox.close()
diff --git a/apps/docs/src/code/python/basics/init.py b/apps/docs/src/code/python/basics/init.py
index 83dc85713..729870fff 100644
--- a/apps/docs/src/code/python/basics/init.py
+++ b/apps/docs/src/code/python/basics/init.py
@@ -1,11 +1,4 @@
-from os import getenv
-from e2b import Session
+from e2b import Sandbox
-
-def main():
- # `id` can also be one of:
- # 'Nodejs', 'Bash', 'Python3', 'Java', 'Go', 'Rust', 'PHP', 'Perl', 'DotNET'
- session = Session(id="Nodejs")
- session.close()
-
-main()
\ No newline at end of file
+sandbox = Sandbox()
+sandbox.close()
diff --git a/apps/docs/src/code/python/basics/process_env_vars.py b/apps/docs/src/code/python/basics/process_env_vars.py
index 316e7ae51..b707567ee 100644
--- a/apps/docs/src/code/python/basics/process_env_vars.py
+++ b/apps/docs/src/code/python/basics/process_env_vars.py
@@ -1,11 +1,11 @@
-from e2b import Session
+from e2b import Sandbox
-session = Session.create(
- id="Nodejs",
+sandbox = Sandbox(
+ id="base",
env_vars={"FOO": "Hello"}
)
-proc = session.process.start(
+proc = sandbox.process.start(
"echo $FOO $BAR!",
env_vars={"BAR": "World"}, # $HighlightLine
)
@@ -14,4 +14,4 @@ proc.wait()
print(proc.output.stdout)
# output: Hello World!
-session.close()
\ No newline at end of file
+sandbox.close()
diff --git a/apps/docs/src/code/python/basics/process_exit.py b/apps/docs/src/code/python/basics/process_exit.py
index c3320e847..ce6e1f11c 100644
--- a/apps/docs/src/code/python/basics/process_exit.py
+++ b/apps/docs/src/code/python/basics/process_exit.py
@@ -1,19 +1,19 @@
-from e2b import Session
+from e2b import Sandbox
-session = Session.create(
- id="Nodejs",
- on_exit=lambda: print("[session]", "process ended"), # $HighlightLine
+sandbox = Sandbox(
+ id="base",
+ on_exit=lambda: print("[sandbox]", "process ended"), # $HighlightLine
)
-proc = session.process.start('echo "Hello World!"')
+proc = sandbox.process.start('echo "Hello World!"')
proc.wait()
-# output: [session] process ended
+# output: [sandbox] process ended
-proc_with_custom_handler = session.process.start(
+proc_with_custom_handler = sandbox.process.start(
'echo "Hello World!"',
- on_exit=lambda: print("[process]", "process ended"), # $HighlightLine
+ on_exit=lambda: print("[process]", "process ended"), # $HighlightLine
)
proc_with_custom_handler.wait()
# output: [process] process ended
-session.close()
+sandbox.close()
diff --git a/apps/docs/src/code/python/basics/process_start.py b/apps/docs/src/code/python/basics/process_start.py
index b988f2792..7a38d9383 100644
--- a/apps/docs/src/code/python/basics/process_start.py
+++ b/apps/docs/src/code/python/basics/process_start.py
@@ -1,9 +1,9 @@
-from e2b import Session
+from e2b import Sandbox
-session = Session.create(id="Nodejs")
+sandbox = Sandbox(id="base")
-npm_init = session.process.start("npm init -y") # $HighlightLine
+npm_init = sandbox.process.start("npm init -y") # $HighlightLine
npm_init.wait()
print(npm_init.stdout)
-session.close()
\ No newline at end of file
+sandbox.close()
diff --git a/apps/docs/src/code/python/basics/process_stop.py b/apps/docs/src/code/python/basics/process_stop.py
index 102cffd4e..072c1808f 100644
--- a/apps/docs/src/code/python/basics/process_stop.py
+++ b/apps/docs/src/code/python/basics/process_stop.py
@@ -1,11 +1,11 @@
-from e2b import Session
+from e2b import Sandbox
-session = Session.create(id="Nodejs")
+sandbox = Sandbox(id="base")
-npm_init = session.process.start("npm init -y")
-npm_init.kill() # $HighlightLine
+npm_init = sandbox.process.start("npm init -y")
+npm_init.kill() # $HighlightLine
# There will be no output because we immediately kill the `npm_init` process
print(npm_init.stdout)
-session.close()
+sandbox.close()
diff --git a/apps/docs/src/code/python/basics/process_stream_stderr.py b/apps/docs/src/code/python/basics/process_stream_stderr.py
index f2f756b23..c40d4e445 100644
--- a/apps/docs/src/code/python/basics/process_stream_stderr.py
+++ b/apps/docs/src/code/python/basics/process_stream_stderr.py
@@ -1,20 +1,20 @@
-from e2b import Session
+from e2b import Sandbox
-session = Session.create(
- id="Nodejs",
- on_stderr=lambda output: print("[session]", output.line), # $HighlightLine
+sandbox = Sandbox(
+ id="base",
+ on_stderr=lambda output: print("[sandbox]", output.line), # $HighlightLine
)
# This command will fail and output to stderr because Golang isn't installed in the cloud playground
-proc = session.process.start("go version")
+proc = sandbox.process.start("go version")
proc.wait()
-# output: [session] /bin/bash: line 1: go: command not found
+# output: [sandbox] /bin/bash: line 1: go: command not found
-proc_with_custom_handler = session.process.start(
+proc_with_custom_handler = sandbox.process.start(
"go version",
on_stderr=lambda output: print("[process]", output.line), # $HighlightLine
)
proc_with_custom_handler.wait()
# output: [process] /bin/bash: line 1: go: command not found
-session.close()
\ No newline at end of file
+sandbox.close()
diff --git a/apps/docs/src/code/python/basics/process_stream_stdout.py b/apps/docs/src/code/python/basics/process_stream_stdout.py
index 579f80b50..4838cafc8 100644
--- a/apps/docs/src/code/python/basics/process_stream_stdout.py
+++ b/apps/docs/src/code/python/basics/process_stream_stdout.py
@@ -1,19 +1,19 @@
-from e2b import Session
+from e2b import Sandbox
-session = Session.create(
- id="Nodejs",
- on_stdout=lambda output: print("session", output.line), # $HighlightLine
+sandbox = Sandbox(
+ id="base",
+ on_stdout=lambda output: print("sandbox", output.line), # $HighlightLine
)
-proc = session.process.start('echo "Hello World!"')
+proc = sandbox.process.start('echo "Hello World!"')
proc.wait()
-# output: session Hello World!
+# output: sandbox Hello World!
-proc_with_custom_handler = session.process.start(
+proc_with_custom_handler = sandbox.process.start(
'echo "Hello World!"',
on_stdout=lambda output: print("process", output.line), # $HighlightLine
)
proc_with_custom_handler.wait()
# output: process Hello World!
-session.close()
\ No newline at end of file
+sandbox.close()
diff --git a/apps/docs/src/code/python/basics/process_write_stdin.py b/apps/docs/src/code/python/basics/process_write_stdin.py
index 4d3698591..50c7c53b9 100644
--- a/apps/docs/src/code/python/basics/process_write_stdin.py
+++ b/apps/docs/src/code/python/basics/process_write_stdin.py
@@ -1,14 +1,14 @@
-from e2b import Session
+from e2b import Sandbox
-session = Session.create(id="Nodejs")
+sandbox = Sandbox(id="base")
# This example will print back the string we send to the process using `send_stdin()`
-proc = session.process.start(
- "while IFS= read -r line; do echo \"$line\"; sleep 1; done",
+proc = sandbox.process.start(
+ 'while IFS= read -r line; do echo "$line"; sleep 1; done',
on_stdout=print,
)
-proc.send_stdin("AI Playground\n") # $HighlightLine
+proc.send_stdin("AI Playground\n") # $HighlightLine
proc.kill()
-session.close()
+sandbox.close()
diff --git a/apps/docs/src/code/python/basics/scan_ports.py b/apps/docs/src/code/python/basics/scan_ports.py
index 98d09b677..24433424d 100644
--- a/apps/docs/src/code/python/basics/scan_ports.py
+++ b/apps/docs/src/code/python/basics/scan_ports.py
@@ -1,33 +1,36 @@
import time
-from e2b import Session
+
+from e2b import Sandbox
# List of ports that have already been printed
printed_ports = []
+
# The logs will look similar to this:
# ip='0.0.0.0' port=49982 state='LISTEN' https://49982-smob7j0j-fce131d5.ondevbook.com
# ip='0.0.0.0' port=22 state='LISTEN' https://22-smob7j0j-fce131d5.ondevbook.com
# ip='169.254.0.21' port=49982 state='ESTABLISHED' https://49982-smob7j0j-fce131d5.ondevbook.com
# ip='127.0.0.53' port=53 state='LISTEN' https://53-smob7j0j-fce131d5.ondevbook.com
# ip='0.0.0.0' port=8000 state='LISTEN' https://8000-smob7j0j-fce131d5.ondevbook.com
-def print_new_port_and_url(open_ports, session):
- for port in open_ports:
- if port not in printed_ports:
- printed_ports.append(port)
-
- host = session.get_hostname(port.port)
- port_url = f"https://{host}"
- print(port, port_url)
-
-session = Session.create(
- id="Python3",
- on_scan_ports=lambda open_ports: print_new_port_and_url(open_ports, session) # $HighlightLine
+def print_new_port_and_url(open_ports, sandbox):
+ for port in open_ports:
+ if port not in printed_ports:
+ printed_ports.append(port)
+
+ host = sandbox.get_hostname(port.port)
+ port_url = f"https://{host}"
+ print(port, port_url)
+
+
+sandbox = Sandbox(
+ id="base",
+ on_scan_ports=lambda open_ports: print_new_port_and_url(open_ports, sandbox) # $HighlightLine
)
# Start a new server on port 8000 inside the playground.
-proc = session.process.start("python3 -m http.server 8000")
+proc = sandbox.process.start("python3 -m http.server 8000")
-# Wait 10 seconds and then kill the server and close the session.
+# Wait 10 seconds and then kill the server and close the sandbox.
time.sleep(10)
proc.kill()
-session.close()
+sandbox.close()
diff --git a/apps/docs/src/code/python/basics/set_env_vars.py b/apps/docs/src/code/python/basics/set_env_vars.py
index e197ef153..be3a3e004 100644
--- a/apps/docs/src/code/python/basics/set_env_vars.py
+++ b/apps/docs/src/code/python/basics/set_env_vars.py
@@ -1,8 +1,8 @@
-from e2b import Session
+from e2b import Sandbox
-session = Session.create(
- id="Nodejs",
- env_vars={"FOO": "Hello"} # $HighlightLine
+sandbox = Sandbox(
+ id="base",
+ env_vars={"FOO": "Hello"}, # $HighlightLine
)
-session.close()
\ No newline at end of file
+sandbox.close()
diff --git a/apps/docs/src/code/python/basics/upload_file.py b/apps/docs/src/code/python/basics/upload_file.py
index edf645f7f..c8eb0199d 100644
--- a/apps/docs/src/code/python/basics/upload_file.py
+++ b/apps/docs/src/code/python/basics/upload_file.py
@@ -1,8 +1,8 @@
-from e2b import Session
+from e2b import Sandbox
-session = Session.create(id="Nodejs")
+sandbox = Sandbox(id="base")
-with open('path/to/local/file', 'rb') as f:
- remote_path = session.upload_file(f) # $HighlightLine
+with open("path/to/local/file", "rb") as f:
+ remote_path = sandbox.upload_file(f) # $HighlightLine
-session.close()
+sandbox.close()
diff --git a/apps/docs/src/code/python/code_exec/process.py b/apps/docs/src/code/python/code_exec/process.py
index 0b81d0773..bf52a6d81 100644
--- a/apps/docs/src/code/python/code_exec/process.py
+++ b/apps/docs/src/code/python/code_exec/process.py
@@ -1,38 +1,41 @@
from os import getenv
-from e2b import Session
+
+from e2b import Sandbox
E2B_API_KEY = getenv("E2B_API_KEY")
+
def print_out(output):
- print(output.line)
+ print(output.line)
+
def main():
- # 1. Start the playground session
- session = Session.create(
- # Select the right runtime
- # 'Node', 'Bash', 'Python3', 'Java', 'Go', 'Rust', 'PHP', 'Perl', 'DotNET'
- id="Python3",
- api_key=E2B_API_KEY,
- )
-
- # 2. Save the LLM-generated code inside the playground
- llm_generated_code = """print("This code was generated by LLM")"""
- session.filesystem.write('/main.py', llm_generated_code)
-
- # 3. Start the execution of the JavaScript file we saved
- proc = session.process.start( # $HighlightLine
- cmd="python3 /main.py", # $HighlightLine
- # 4. Stream stdout, stderr
- on_stdout=print_out, # $HighlightLine
- on_stderr=print_out, # $HighlightLine
- ) # $HighlightLine
-
- # 4. Wait for the process to finish
- proc.wait()
-
- # 5. Or you can access output after the process has finished
- output = proc.output
-
- session.close()
-
-main()
\ No newline at end of file
+ # 1. Start the playground sandbox
+ sandbox = Sandbox(
+ # You can pass your own sandbox template id
+ id="base",
+ api_key=E2B_API_KEY,
+ )
+
+ # 2. Save the LLM-generated code inside the playground
+ llm_generated_code = """print("This code was generated by LLM")"""
+ sandbox.filesystem.write("/main.py", llm_generated_code)
+
+ # 3. Start the execution of the JavaScript file we saved
+ proc = sandbox.process.start( # $HighlightLine
+ cmd="python3 /main.py", # $HighlightLine
+ # 4. Stream stdout, stderr
+ on_stdout=print_out, # $HighlightLine
+ on_stderr=print_out, # $HighlightLine
+ ) # $HighlightLine
+
+ # 4. Wait for the process to finish
+ proc.wait()
+
+ # 5. Or you can access output after the process has finished
+ output = proc.output
+
+ sandbox.close()
+
+
+main()
diff --git a/apps/docs/src/code/python/code_exec/run_code.py b/apps/docs/src/code/python/code_exec/run_code.py
index dfae8e64d..7c80f7b20 100644
--- a/apps/docs/src/code/python/code_exec/run_code.py
+++ b/apps/docs/src/code/python/code_exec/run_code.py
@@ -2,9 +2,11 @@ from e2b import run_code
llm_generated_code = 'print("This code was generated by LLM")'
+
def main():
- stdout, stderr = run_code('Python3', llm_generated_code) # $HighlightLine
- print(stdout)
- print(stderr)
+ stdout, stderr = run_code('Python3', llm_generated_code) # $HighlightLine
+ print(stdout)
+ print(stderr)
+
-main()
\ No newline at end of file
+main()
diff --git a/apps/docs/src/code/python/cwd/filesystem.py b/apps/docs/src/code/python/cwd/filesystem.py
index 6604bf679..a80c01331 100644
--- a/apps/docs/src/code/python/cwd/filesystem.py
+++ b/apps/docs/src/code/python/cwd/filesystem.py
@@ -1,19 +1,19 @@
-from e2b import Session
+from e2b import Sandbox
-session = Session.create(
- id="Python3",
+sandbox = Sandbox(
+ id="base",
cwd="/home/user/code" # $HighlightLine
)
-session.filesystem.write("hello.txt", "Welcome to E2B!") # $HighlightLine
-proc = session.process.start("cat /home/user/code/hello.txt")
+sandbox.filesystem.write("hello.txt", "Welcome to E2B!") # $HighlightLine
+proc = sandbox.process.start("cat /home/user/code/hello.txt")
proc.wait()
print(proc.output.stdout)
# output: "Welcome to E2B!"
-session.filesystem.write("../hello.txt", "We hope you have a great day!") # $HighlightLine
-proc2 = session.process.start("cat /home/user/hello.txt")
+sandbox.filesystem.write("../hello.txt", "We hope you have a great day!") # $HighlightLine
+proc2 = sandbox.process.start("cat /home/user/hello.txt")
proc2.wait()
print(proc2.output.stdout)
# output: "We hope you have a great day!"
-session.close()
+sandbox.close()
diff --git a/apps/docs/src/code/python/cwd/process.py b/apps/docs/src/code/python/cwd/process.py
index 77c137ce7..5a512f380 100644
--- a/apps/docs/src/code/python/cwd/process.py
+++ b/apps/docs/src/code/python/cwd/process.py
@@ -1,15 +1,14 @@
-from e2b import Session
+from e2b import Sandbox
-session = Session.create(id="Python3", cwd="/code") # $HighlightLine
-session_cwd = session.process.start("pwd") # $HighlightLine
-session_cwd.wait()
-print(session_cwd.output.stdout)
+sandbox = Sandbox(id="base", cwd="/code") # $HighlightLine
+sandbox_cwd = sandbox.process.start("pwd") # $HighlightLine
+sandbox_cwd.wait()
+print(sandbox_cwd.output.stdout)
# output: "/code"
-process_cwd = session.process.start("pwd", cwd="/home") # $HighlightLine
+process_cwd = sandbox.process.start("pwd", cwd="/home") # $HighlightLine
process_cwd.wait()
print(process_cwd.output.stdout)
# output: "/home"
-session.close()
-
+sandbox.close()
diff --git a/apps/docs/src/code/python/cwd/sandbox.py b/apps/docs/src/code/python/cwd/sandbox.py
new file mode 100644
index 000000000..4fb8836cc
--- /dev/null
+++ b/apps/docs/src/code/python/cwd/sandbox.py
@@ -0,0 +1,11 @@
+from e2b import Sandbox
+
+sandbox = Sandbox(
+ id="base",
+ cwd="/code", # $HighlightLine
+)
+
+# You can also change the cwd of an existing sandbox
+sandbox.cwd = "/home" # $HighlightLine
+
+sandbox.close()
diff --git a/apps/docs/src/code/python/cwd/session.py b/apps/docs/src/code/python/cwd/session.py
deleted file mode 100644
index 17f146ee7..000000000
--- a/apps/docs/src/code/python/cwd/session.py
+++ /dev/null
@@ -1,11 +0,0 @@
-from e2b import Session
-
-session = Session.create(
- id="Python3",
- cwd="/code", # $HighlightLine
-)
-
-# You can also change the cwd of an existing session
-session.cwd = "/home" # $HighlightLine
-
-session.close()
\ No newline at end of file
diff --git a/apps/docs/src/code/python/logging/e2b_logging.py b/apps/docs/src/code/python/logging/e2b_logging.py
index 8a8482b74..eaa36809b 100644
--- a/apps/docs/src/code/python/logging/e2b_logging.py
+++ b/apps/docs/src/code/python/logging/e2b_logging.py
@@ -1,35 +1,38 @@
import logging
from os import getenv
-from e2b import Session
+
+from e2b import Sandbox
E2B_API_KEY = getenv("E2B_API_KEY")
# Global logging configuration
-logging.basicConfig(level=logging.INFO, format="GLOBAL - [%(asctime)s] - %(name)-32s - %(levelname)7s: %(message)s", datefmt="%Y-%m-%d %H:%M:%S") # $HighlightLine
-
+logging.basicConfig(level=logging.INFO, format="GLOBAL - [%(asctime)s] - %(name)-32s - %(levelname)7s: %(message)s",
+ datefmt="%Y-%m-%d %H:%M:%S") # $HighlightLine
# Or configure only e2b logger
# Get e2b logger
-e2b_logger = logging.getLogger("e2b") # $HighlightLine
+e2b_logger = logging.getLogger("e2b") # $HighlightLine
# Set e2b logger level to INFO
-e2b_logger.setLevel(logging.INFO) # $HighlightLine
+e2b_logger.setLevel(logging.INFO) # $HighlightLine
# Setup formatter
-formatter = logging.Formatter("E2B - [%(asctime)s] - %(name)-32s - %(levelname)7s: %(message)s", datefmt="%Y-%m-%d %H:%M:%S")
+formatter = logging.Formatter("E2B - [%(asctime)s] - %(name)-32s - %(levelname)7s: %(message)s",
+ datefmt="%Y-%m-%d %H:%M:%S")
# Setup handler
handler = logging.StreamHandler()
handler.setFormatter(formatter)
# Add handler to e2b logger
-e2b_logger.addHandler(handler) # $HighlightLine
+e2b_logger.addHandler(handler) # $HighlightLine
def main():
- session = Session.create(id="Nodejs", api_key=E2B_API_KEY)
- session.filesystem.write("test.txt", "Hello World")
- session.close()
+ sandbox = Sandbox(id="base", api_key=E2B_API_KEY)
+ sandbox.filesystem.write("test.txt", "Hello World")
+ sandbox.close()
+
main()
diff --git a/apps/docs/src/code/python/poetry.lock b/apps/docs/src/code/python/poetry.lock
index 90e8a65e8..aafaf5d7f 100644
--- a/apps/docs/src/code/python/poetry.lock
+++ b/apps/docs/src/code/python/poetry.lock
@@ -7,9 +7,9 @@ description = "Advanced Enumerations (compatible with Python's stdlib Enum), Nam
optional = false
python-versions = "*"
files = [
- {file = "aenum-3.1.15-py2-none-any.whl", hash = "sha256:27b1710b9d084de6e2e695dab78fe9f269de924b51ae2850170ee7e1ca6288a5"},
- {file = "aenum-3.1.15-py3-none-any.whl", hash = "sha256:e0dfaeea4c2bd362144b87377e2c61d91958c5ed0b4daf89cb6f45ae23af6288"},
- {file = "aenum-3.1.15.tar.gz", hash = "sha256:8cbd76cd18c4f870ff39b24284d3ea028fbe8731a58df3aa581e434c575b9559"},
+ { file = "aenum-3.1.15-py2-none-any.whl", hash = "sha256:27b1710b9d084de6e2e695dab78fe9f269de924b51ae2850170ee7e1ca6288a5" },
+ { file = "aenum-3.1.15-py3-none-any.whl", hash = "sha256:e0dfaeea4c2bd362144b87377e2c61d91958c5ed0b4daf89cb6f45ae23af6288" },
+ { file = "aenum-3.1.15.tar.gz", hash = "sha256:8cbd76cd18c4f870ff39b24284d3ea028fbe8731a58df3aa581e434c575b9559" },
]
[[package]]
@@ -19,93 +19,93 @@ description = "Async http client/server framework (asyncio)"
optional = false
python-versions = ">=3.6"
files = [
- {file = "aiohttp-3.8.6-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:41d55fc043954cddbbd82503d9cc3f4814a40bcef30b3569bc7b5e34130718c1"},
- {file = "aiohttp-3.8.6-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:1d84166673694841d8953f0a8d0c90e1087739d24632fe86b1a08819168b4566"},
- {file = "aiohttp-3.8.6-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:253bf92b744b3170eb4c4ca2fa58f9c4b87aeb1df42f71d4e78815e6e8b73c9e"},
- {file = "aiohttp-3.8.6-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3fd194939b1f764d6bb05490987bfe104287bbf51b8d862261ccf66f48fb4096"},
- {file = "aiohttp-3.8.6-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:6c5f938d199a6fdbdc10bbb9447496561c3a9a565b43be564648d81e1102ac22"},
- {file = "aiohttp-3.8.6-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2817b2f66ca82ee699acd90e05c95e79bbf1dc986abb62b61ec8aaf851e81c93"},
- {file = "aiohttp-3.8.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0fa375b3d34e71ccccf172cab401cd94a72de7a8cc01847a7b3386204093bb47"},
- {file = "aiohttp-3.8.6-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9de50a199b7710fa2904be5a4a9b51af587ab24c8e540a7243ab737b45844543"},
- {file = "aiohttp-3.8.6-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:e1d8cb0b56b3587c5c01de3bf2f600f186da7e7b5f7353d1bf26a8ddca57f965"},
- {file = "aiohttp-3.8.6-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:8e31e9db1bee8b4f407b77fd2507337a0a80665ad7b6c749d08df595d88f1cf5"},
- {file = "aiohttp-3.8.6-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:7bc88fc494b1f0311d67f29fee6fd636606f4697e8cc793a2d912ac5b19aa38d"},
- {file = "aiohttp-3.8.6-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:ec00c3305788e04bf6d29d42e504560e159ccaf0be30c09203b468a6c1ccd3b2"},
- {file = "aiohttp-3.8.6-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:ad1407db8f2f49329729564f71685557157bfa42b48f4b93e53721a16eb813ed"},
- {file = "aiohttp-3.8.6-cp310-cp310-win32.whl", hash = "sha256:ccc360e87341ad47c777f5723f68adbb52b37ab450c8bc3ca9ca1f3e849e5fe2"},
- {file = "aiohttp-3.8.6-cp310-cp310-win_amd64.whl", hash = "sha256:93c15c8e48e5e7b89d5cb4613479d144fda8344e2d886cf694fd36db4cc86865"},
- {file = "aiohttp-3.8.6-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:6e2f9cc8e5328f829f6e1fb74a0a3a939b14e67e80832975e01929e320386b34"},
- {file = "aiohttp-3.8.6-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:e6a00ffcc173e765e200ceefb06399ba09c06db97f401f920513a10c803604ca"},
- {file = "aiohttp-3.8.6-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:41bdc2ba359032e36c0e9de5a3bd00d6fb7ea558a6ce6b70acedf0da86458321"},
- {file = "aiohttp-3.8.6-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:14cd52ccf40006c7a6cd34a0f8663734e5363fd981807173faf3a017e202fec9"},
- {file = "aiohttp-3.8.6-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2d5b785c792802e7b275c420d84f3397668e9d49ab1cb52bd916b3b3ffcf09ad"},
- {file = "aiohttp-3.8.6-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1bed815f3dc3d915c5c1e556c397c8667826fbc1b935d95b0ad680787896a358"},
- {file = "aiohttp-3.8.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:96603a562b546632441926cd1293cfcb5b69f0b4159e6077f7c7dbdfb686af4d"},
- {file = "aiohttp-3.8.6-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d76e8b13161a202d14c9584590c4df4d068c9567c99506497bdd67eaedf36403"},
- {file = "aiohttp-3.8.6-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:e3f1e3f1a1751bb62b4a1b7f4e435afcdade6c17a4fd9b9d43607cebd242924a"},
- {file = "aiohttp-3.8.6-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:76b36b3124f0223903609944a3c8bf28a599b2cc0ce0be60b45211c8e9be97f8"},
- {file = "aiohttp-3.8.6-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:a2ece4af1f3c967a4390c284797ab595a9f1bc1130ef8b01828915a05a6ae684"},
- {file = "aiohttp-3.8.6-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:16d330b3b9db87c3883e565340d292638a878236418b23cc8b9b11a054aaa887"},
- {file = "aiohttp-3.8.6-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:42c89579f82e49db436b69c938ab3e1559e5a4409eb8639eb4143989bc390f2f"},
- {file = "aiohttp-3.8.6-cp311-cp311-win32.whl", hash = "sha256:efd2fcf7e7b9d7ab16e6b7d54205beded0a9c8566cb30f09c1abe42b4e22bdcb"},
- {file = "aiohttp-3.8.6-cp311-cp311-win_amd64.whl", hash = "sha256:3b2ab182fc28e7a81f6c70bfbd829045d9480063f5ab06f6e601a3eddbbd49a0"},
- {file = "aiohttp-3.8.6-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:fdee8405931b0615220e5ddf8cd7edd8592c606a8e4ca2a00704883c396e4479"},
- {file = "aiohttp-3.8.6-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d25036d161c4fe2225d1abff2bd52c34ed0b1099f02c208cd34d8c05729882f0"},
- {file = "aiohttp-3.8.6-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5d791245a894be071d5ab04bbb4850534261a7d4fd363b094a7b9963e8cdbd31"},
- {file = "aiohttp-3.8.6-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0cccd1de239afa866e4ce5c789b3032442f19c261c7d8a01183fd956b1935349"},
- {file = "aiohttp-3.8.6-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1f13f60d78224f0dace220d8ab4ef1dbc37115eeeab8c06804fec11bec2bbd07"},
- {file = "aiohttp-3.8.6-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8a9b5a0606faca4f6cc0d338359d6fa137104c337f489cd135bb7fbdbccb1e39"},
- {file = "aiohttp-3.8.6-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:13da35c9ceb847732bf5c6c5781dcf4780e14392e5d3b3c689f6d22f8e15ae31"},
- {file = "aiohttp-3.8.6-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:4d4cbe4ffa9d05f46a28252efc5941e0462792930caa370a6efaf491f412bc66"},
- {file = "aiohttp-3.8.6-cp36-cp36m-musllinux_1_1_ppc64le.whl", hash = "sha256:229852e147f44da0241954fc6cb910ba074e597f06789c867cb7fb0621e0ba7a"},
- {file = "aiohttp-3.8.6-cp36-cp36m-musllinux_1_1_s390x.whl", hash = "sha256:713103a8bdde61d13490adf47171a1039fd880113981e55401a0f7b42c37d071"},
- {file = "aiohttp-3.8.6-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:45ad816b2c8e3b60b510f30dbd37fe74fd4a772248a52bb021f6fd65dff809b6"},
- {file = "aiohttp-3.8.6-cp36-cp36m-win32.whl", hash = "sha256:2b8d4e166e600dcfbff51919c7a3789ff6ca8b3ecce16e1d9c96d95dd569eb4c"},
- {file = "aiohttp-3.8.6-cp36-cp36m-win_amd64.whl", hash = "sha256:0912ed87fee967940aacc5306d3aa8ba3a459fcd12add0b407081fbefc931e53"},
- {file = "aiohttp-3.8.6-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:e2a988a0c673c2e12084f5e6ba3392d76c75ddb8ebc6c7e9ead68248101cd446"},
- {file = "aiohttp-3.8.6-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ebf3fd9f141700b510d4b190094db0ce37ac6361a6806c153c161dc6c041ccda"},
- {file = "aiohttp-3.8.6-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3161ce82ab85acd267c8f4b14aa226047a6bee1e4e6adb74b798bd42c6ae1f80"},
- {file = "aiohttp-3.8.6-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d95fc1bf33a9a81469aa760617b5971331cdd74370d1214f0b3109272c0e1e3c"},
- {file = "aiohttp-3.8.6-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c43ecfef7deaf0617cee936836518e7424ee12cb709883f2c9a1adda63cc460"},
- {file = "aiohttp-3.8.6-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ca80e1b90a05a4f476547f904992ae81eda5c2c85c66ee4195bb8f9c5fb47f28"},
- {file = "aiohttp-3.8.6-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:90c72ebb7cb3a08a7f40061079817133f502a160561d0675b0a6adf231382c92"},
- {file = "aiohttp-3.8.6-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:bb54c54510e47a8c7c8e63454a6acc817519337b2b78606c4e840871a3e15349"},
- {file = "aiohttp-3.8.6-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:de6a1c9f6803b90e20869e6b99c2c18cef5cc691363954c93cb9adeb26d9f3ae"},
- {file = "aiohttp-3.8.6-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:a3628b6c7b880b181a3ae0a0683698513874df63783fd89de99b7b7539e3e8a8"},
- {file = "aiohttp-3.8.6-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:fc37e9aef10a696a5a4474802930079ccfc14d9f9c10b4662169671ff034b7df"},
- {file = "aiohttp-3.8.6-cp37-cp37m-win32.whl", hash = "sha256:f8ef51e459eb2ad8e7a66c1d6440c808485840ad55ecc3cafefadea47d1b1ba2"},
- {file = "aiohttp-3.8.6-cp37-cp37m-win_amd64.whl", hash = "sha256:b2fe42e523be344124c6c8ef32a011444e869dc5f883c591ed87f84339de5976"},
- {file = "aiohttp-3.8.6-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:9e2ee0ac5a1f5c7dd3197de309adfb99ac4617ff02b0603fd1e65b07dc772e4b"},
- {file = "aiohttp-3.8.6-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:01770d8c04bd8db568abb636c1fdd4f7140b284b8b3e0b4584f070180c1e5c62"},
- {file = "aiohttp-3.8.6-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:3c68330a59506254b556b99a91857428cab98b2f84061260a67865f7f52899f5"},
- {file = "aiohttp-3.8.6-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:89341b2c19fb5eac30c341133ae2cc3544d40d9b1892749cdd25892bbc6ac951"},
- {file = "aiohttp-3.8.6-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:71783b0b6455ac8f34b5ec99d83e686892c50498d5d00b8e56d47f41b38fbe04"},
- {file = "aiohttp-3.8.6-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f628dbf3c91e12f4d6c8b3f092069567d8eb17814aebba3d7d60c149391aee3a"},
- {file = "aiohttp-3.8.6-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b04691bc6601ef47c88f0255043df6f570ada1a9ebef99c34bd0b72866c217ae"},
- {file = "aiohttp-3.8.6-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7ee912f7e78287516df155f69da575a0ba33b02dd7c1d6614dbc9463f43066e3"},
- {file = "aiohttp-3.8.6-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:9c19b26acdd08dd239e0d3669a3dddafd600902e37881f13fbd8a53943079dbc"},
- {file = "aiohttp-3.8.6-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:99c5ac4ad492b4a19fc132306cd57075c28446ec2ed970973bbf036bcda1bcc6"},
- {file = "aiohttp-3.8.6-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:f0f03211fd14a6a0aed2997d4b1c013d49fb7b50eeb9ffdf5e51f23cfe2c77fa"},
- {file = "aiohttp-3.8.6-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:8d399dade330c53b4106160f75f55407e9ae7505263ea86f2ccca6bfcbdb4921"},
- {file = "aiohttp-3.8.6-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:ec4fd86658c6a8964d75426517dc01cbf840bbf32d055ce64a9e63a40fd7b771"},
- {file = "aiohttp-3.8.6-cp38-cp38-win32.whl", hash = "sha256:33164093be11fcef3ce2571a0dccd9041c9a93fa3bde86569d7b03120d276c6f"},
- {file = "aiohttp-3.8.6-cp38-cp38-win_amd64.whl", hash = "sha256:bdf70bfe5a1414ba9afb9d49f0c912dc524cf60141102f3a11143ba3d291870f"},
- {file = "aiohttp-3.8.6-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:d52d5dc7c6682b720280f9d9db41d36ebe4791622c842e258c9206232251ab2b"},
- {file = "aiohttp-3.8.6-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:4ac39027011414dbd3d87f7edb31680e1f430834c8cef029f11c66dad0670aa5"},
- {file = "aiohttp-3.8.6-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:3f5c7ce535a1d2429a634310e308fb7d718905487257060e5d4598e29dc17f0b"},
- {file = "aiohttp-3.8.6-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b30e963f9e0d52c28f284d554a9469af073030030cef8693106d918b2ca92f54"},
- {file = "aiohttp-3.8.6-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:918810ef188f84152af6b938254911055a72e0f935b5fbc4c1a4ed0b0584aed1"},
- {file = "aiohttp-3.8.6-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:002f23e6ea8d3dd8d149e569fd580c999232b5fbc601c48d55398fbc2e582e8c"},
- {file = "aiohttp-3.8.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4fcf3eabd3fd1a5e6092d1242295fa37d0354b2eb2077e6eb670accad78e40e1"},
- {file = "aiohttp-3.8.6-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:255ba9d6d5ff1a382bb9a578cd563605aa69bec845680e21c44afc2670607a95"},
- {file = "aiohttp-3.8.6-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:d67f8baed00870aa390ea2590798766256f31dc5ed3ecc737debb6e97e2ede78"},
- {file = "aiohttp-3.8.6-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:86f20cee0f0a317c76573b627b954c412ea766d6ada1a9fcf1b805763ae7feeb"},
- {file = "aiohttp-3.8.6-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:39a312d0e991690ccc1a61f1e9e42daa519dcc34ad03eb6f826d94c1190190dd"},
- {file = "aiohttp-3.8.6-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:e827d48cf802de06d9c935088c2924e3c7e7533377d66b6f31ed175c1620e05e"},
- {file = "aiohttp-3.8.6-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:bd111d7fc5591ddf377a408ed9067045259ff2770f37e2d94e6478d0f3fc0c17"},
- {file = "aiohttp-3.8.6-cp39-cp39-win32.whl", hash = "sha256:caf486ac1e689dda3502567eb89ffe02876546599bbf915ec94b1fa424eeffd4"},
- {file = "aiohttp-3.8.6-cp39-cp39-win_amd64.whl", hash = "sha256:3f0e27e5b733803333bb2371249f41cf42bae8884863e8e8965ec69bebe53132"},
- {file = "aiohttp-3.8.6.tar.gz", hash = "sha256:b0cf2a4501bff9330a8a5248b4ce951851e415bdcce9dc158e76cfd55e15085c"},
+ { file = "aiohttp-3.8.6-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:41d55fc043954cddbbd82503d9cc3f4814a40bcef30b3569bc7b5e34130718c1" },
+ { file = "aiohttp-3.8.6-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:1d84166673694841d8953f0a8d0c90e1087739d24632fe86b1a08819168b4566" },
+ { file = "aiohttp-3.8.6-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:253bf92b744b3170eb4c4ca2fa58f9c4b87aeb1df42f71d4e78815e6e8b73c9e" },
+ { file = "aiohttp-3.8.6-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3fd194939b1f764d6bb05490987bfe104287bbf51b8d862261ccf66f48fb4096" },
+ { file = "aiohttp-3.8.6-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:6c5f938d199a6fdbdc10bbb9447496561c3a9a565b43be564648d81e1102ac22" },
+ { file = "aiohttp-3.8.6-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2817b2f66ca82ee699acd90e05c95e79bbf1dc986abb62b61ec8aaf851e81c93" },
+ { file = "aiohttp-3.8.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0fa375b3d34e71ccccf172cab401cd94a72de7a8cc01847a7b3386204093bb47" },
+ { file = "aiohttp-3.8.6-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9de50a199b7710fa2904be5a4a9b51af587ab24c8e540a7243ab737b45844543" },
+ { file = "aiohttp-3.8.6-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:e1d8cb0b56b3587c5c01de3bf2f600f186da7e7b5f7353d1bf26a8ddca57f965" },
+ { file = "aiohttp-3.8.6-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:8e31e9db1bee8b4f407b77fd2507337a0a80665ad7b6c749d08df595d88f1cf5" },
+ { file = "aiohttp-3.8.6-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:7bc88fc494b1f0311d67f29fee6fd636606f4697e8cc793a2d912ac5b19aa38d" },
+ { file = "aiohttp-3.8.6-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:ec00c3305788e04bf6d29d42e504560e159ccaf0be30c09203b468a6c1ccd3b2" },
+ { file = "aiohttp-3.8.6-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:ad1407db8f2f49329729564f71685557157bfa42b48f4b93e53721a16eb813ed" },
+ { file = "aiohttp-3.8.6-cp310-cp310-win32.whl", hash = "sha256:ccc360e87341ad47c777f5723f68adbb52b37ab450c8bc3ca9ca1f3e849e5fe2" },
+ { file = "aiohttp-3.8.6-cp310-cp310-win_amd64.whl", hash = "sha256:93c15c8e48e5e7b89d5cb4613479d144fda8344e2d886cf694fd36db4cc86865" },
+ { file = "aiohttp-3.8.6-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:6e2f9cc8e5328f829f6e1fb74a0a3a939b14e67e80832975e01929e320386b34" },
+ { file = "aiohttp-3.8.6-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:e6a00ffcc173e765e200ceefb06399ba09c06db97f401f920513a10c803604ca" },
+ { file = "aiohttp-3.8.6-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:41bdc2ba359032e36c0e9de5a3bd00d6fb7ea558a6ce6b70acedf0da86458321" },
+ { file = "aiohttp-3.8.6-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:14cd52ccf40006c7a6cd34a0f8663734e5363fd981807173faf3a017e202fec9" },
+ { file = "aiohttp-3.8.6-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2d5b785c792802e7b275c420d84f3397668e9d49ab1cb52bd916b3b3ffcf09ad" },
+ { file = "aiohttp-3.8.6-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1bed815f3dc3d915c5c1e556c397c8667826fbc1b935d95b0ad680787896a358" },
+ { file = "aiohttp-3.8.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:96603a562b546632441926cd1293cfcb5b69f0b4159e6077f7c7dbdfb686af4d" },
+ { file = "aiohttp-3.8.6-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d76e8b13161a202d14c9584590c4df4d068c9567c99506497bdd67eaedf36403" },
+ { file = "aiohttp-3.8.6-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:e3f1e3f1a1751bb62b4a1b7f4e435afcdade6c17a4fd9b9d43607cebd242924a" },
+ { file = "aiohttp-3.8.6-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:76b36b3124f0223903609944a3c8bf28a599b2cc0ce0be60b45211c8e9be97f8" },
+ { file = "aiohttp-3.8.6-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:a2ece4af1f3c967a4390c284797ab595a9f1bc1130ef8b01828915a05a6ae684" },
+ { file = "aiohttp-3.8.6-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:16d330b3b9db87c3883e565340d292638a878236418b23cc8b9b11a054aaa887" },
+ { file = "aiohttp-3.8.6-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:42c89579f82e49db436b69c938ab3e1559e5a4409eb8639eb4143989bc390f2f" },
+ { file = "aiohttp-3.8.6-cp311-cp311-win32.whl", hash = "sha256:efd2fcf7e7b9d7ab16e6b7d54205beded0a9c8566cb30f09c1abe42b4e22bdcb" },
+ { file = "aiohttp-3.8.6-cp311-cp311-win_amd64.whl", hash = "sha256:3b2ab182fc28e7a81f6c70bfbd829045d9480063f5ab06f6e601a3eddbbd49a0" },
+ { file = "aiohttp-3.8.6-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:fdee8405931b0615220e5ddf8cd7edd8592c606a8e4ca2a00704883c396e4479" },
+ { file = "aiohttp-3.8.6-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d25036d161c4fe2225d1abff2bd52c34ed0b1099f02c208cd34d8c05729882f0" },
+ { file = "aiohttp-3.8.6-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5d791245a894be071d5ab04bbb4850534261a7d4fd363b094a7b9963e8cdbd31" },
+ { file = "aiohttp-3.8.6-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0cccd1de239afa866e4ce5c789b3032442f19c261c7d8a01183fd956b1935349" },
+ { file = "aiohttp-3.8.6-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1f13f60d78224f0dace220d8ab4ef1dbc37115eeeab8c06804fec11bec2bbd07" },
+ { file = "aiohttp-3.8.6-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8a9b5a0606faca4f6cc0d338359d6fa137104c337f489cd135bb7fbdbccb1e39" },
+ { file = "aiohttp-3.8.6-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:13da35c9ceb847732bf5c6c5781dcf4780e14392e5d3b3c689f6d22f8e15ae31" },
+ { file = "aiohttp-3.8.6-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:4d4cbe4ffa9d05f46a28252efc5941e0462792930caa370a6efaf491f412bc66" },
+ { file = "aiohttp-3.8.6-cp36-cp36m-musllinux_1_1_ppc64le.whl", hash = "sha256:229852e147f44da0241954fc6cb910ba074e597f06789c867cb7fb0621e0ba7a" },
+ { file = "aiohttp-3.8.6-cp36-cp36m-musllinux_1_1_s390x.whl", hash = "sha256:713103a8bdde61d13490adf47171a1039fd880113981e55401a0f7b42c37d071" },
+ { file = "aiohttp-3.8.6-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:45ad816b2c8e3b60b510f30dbd37fe74fd4a772248a52bb021f6fd65dff809b6" },
+ { file = "aiohttp-3.8.6-cp36-cp36m-win32.whl", hash = "sha256:2b8d4e166e600dcfbff51919c7a3789ff6ca8b3ecce16e1d9c96d95dd569eb4c" },
+ { file = "aiohttp-3.8.6-cp36-cp36m-win_amd64.whl", hash = "sha256:0912ed87fee967940aacc5306d3aa8ba3a459fcd12add0b407081fbefc931e53" },
+ { file = "aiohttp-3.8.6-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:e2a988a0c673c2e12084f5e6ba3392d76c75ddb8ebc6c7e9ead68248101cd446" },
+ { file = "aiohttp-3.8.6-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ebf3fd9f141700b510d4b190094db0ce37ac6361a6806c153c161dc6c041ccda" },
+ { file = "aiohttp-3.8.6-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3161ce82ab85acd267c8f4b14aa226047a6bee1e4e6adb74b798bd42c6ae1f80" },
+ { file = "aiohttp-3.8.6-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d95fc1bf33a9a81469aa760617b5971331cdd74370d1214f0b3109272c0e1e3c" },
+ { file = "aiohttp-3.8.6-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c43ecfef7deaf0617cee936836518e7424ee12cb709883f2c9a1adda63cc460" },
+ { file = "aiohttp-3.8.6-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ca80e1b90a05a4f476547f904992ae81eda5c2c85c66ee4195bb8f9c5fb47f28" },
+ { file = "aiohttp-3.8.6-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:90c72ebb7cb3a08a7f40061079817133f502a160561d0675b0a6adf231382c92" },
+ { file = "aiohttp-3.8.6-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:bb54c54510e47a8c7c8e63454a6acc817519337b2b78606c4e840871a3e15349" },
+ { file = "aiohttp-3.8.6-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:de6a1c9f6803b90e20869e6b99c2c18cef5cc691363954c93cb9adeb26d9f3ae" },
+ { file = "aiohttp-3.8.6-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:a3628b6c7b880b181a3ae0a0683698513874df63783fd89de99b7b7539e3e8a8" },
+ { file = "aiohttp-3.8.6-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:fc37e9aef10a696a5a4474802930079ccfc14d9f9c10b4662169671ff034b7df" },
+ { file = "aiohttp-3.8.6-cp37-cp37m-win32.whl", hash = "sha256:f8ef51e459eb2ad8e7a66c1d6440c808485840ad55ecc3cafefadea47d1b1ba2" },
+ { file = "aiohttp-3.8.6-cp37-cp37m-win_amd64.whl", hash = "sha256:b2fe42e523be344124c6c8ef32a011444e869dc5f883c591ed87f84339de5976" },
+ { file = "aiohttp-3.8.6-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:9e2ee0ac5a1f5c7dd3197de309adfb99ac4617ff02b0603fd1e65b07dc772e4b" },
+ { file = "aiohttp-3.8.6-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:01770d8c04bd8db568abb636c1fdd4f7140b284b8b3e0b4584f070180c1e5c62" },
+ { file = "aiohttp-3.8.6-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:3c68330a59506254b556b99a91857428cab98b2f84061260a67865f7f52899f5" },
+ { file = "aiohttp-3.8.6-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:89341b2c19fb5eac30c341133ae2cc3544d40d9b1892749cdd25892bbc6ac951" },
+ { file = "aiohttp-3.8.6-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:71783b0b6455ac8f34b5ec99d83e686892c50498d5d00b8e56d47f41b38fbe04" },
+ { file = "aiohttp-3.8.6-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f628dbf3c91e12f4d6c8b3f092069567d8eb17814aebba3d7d60c149391aee3a" },
+ { file = "aiohttp-3.8.6-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b04691bc6601ef47c88f0255043df6f570ada1a9ebef99c34bd0b72866c217ae" },
+ { file = "aiohttp-3.8.6-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7ee912f7e78287516df155f69da575a0ba33b02dd7c1d6614dbc9463f43066e3" },
+ { file = "aiohttp-3.8.6-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:9c19b26acdd08dd239e0d3669a3dddafd600902e37881f13fbd8a53943079dbc" },
+ { file = "aiohttp-3.8.6-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:99c5ac4ad492b4a19fc132306cd57075c28446ec2ed970973bbf036bcda1bcc6" },
+ { file = "aiohttp-3.8.6-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:f0f03211fd14a6a0aed2997d4b1c013d49fb7b50eeb9ffdf5e51f23cfe2c77fa" },
+ { file = "aiohttp-3.8.6-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:8d399dade330c53b4106160f75f55407e9ae7505263ea86f2ccca6bfcbdb4921" },
+ { file = "aiohttp-3.8.6-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:ec4fd86658c6a8964d75426517dc01cbf840bbf32d055ce64a9e63a40fd7b771" },
+ { file = "aiohttp-3.8.6-cp38-cp38-win32.whl", hash = "sha256:33164093be11fcef3ce2571a0dccd9041c9a93fa3bde86569d7b03120d276c6f" },
+ { file = "aiohttp-3.8.6-cp38-cp38-win_amd64.whl", hash = "sha256:bdf70bfe5a1414ba9afb9d49f0c912dc524cf60141102f3a11143ba3d291870f" },
+ { file = "aiohttp-3.8.6-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:d52d5dc7c6682b720280f9d9db41d36ebe4791622c842e258c9206232251ab2b" },
+ { file = "aiohttp-3.8.6-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:4ac39027011414dbd3d87f7edb31680e1f430834c8cef029f11c66dad0670aa5" },
+ { file = "aiohttp-3.8.6-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:3f5c7ce535a1d2429a634310e308fb7d718905487257060e5d4598e29dc17f0b" },
+ { file = "aiohttp-3.8.6-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b30e963f9e0d52c28f284d554a9469af073030030cef8693106d918b2ca92f54" },
+ { file = "aiohttp-3.8.6-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:918810ef188f84152af6b938254911055a72e0f935b5fbc4c1a4ed0b0584aed1" },
+ { file = "aiohttp-3.8.6-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:002f23e6ea8d3dd8d149e569fd580c999232b5fbc601c48d55398fbc2e582e8c" },
+ { file = "aiohttp-3.8.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4fcf3eabd3fd1a5e6092d1242295fa37d0354b2eb2077e6eb670accad78e40e1" },
+ { file = "aiohttp-3.8.6-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:255ba9d6d5ff1a382bb9a578cd563605aa69bec845680e21c44afc2670607a95" },
+ { file = "aiohttp-3.8.6-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:d67f8baed00870aa390ea2590798766256f31dc5ed3ecc737debb6e97e2ede78" },
+ { file = "aiohttp-3.8.6-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:86f20cee0f0a317c76573b627b954c412ea766d6ada1a9fcf1b805763ae7feeb" },
+ { file = "aiohttp-3.8.6-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:39a312d0e991690ccc1a61f1e9e42daa519dcc34ad03eb6f826d94c1190190dd" },
+ { file = "aiohttp-3.8.6-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:e827d48cf802de06d9c935088c2924e3c7e7533377d66b6f31ed175c1620e05e" },
+ { file = "aiohttp-3.8.6-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:bd111d7fc5591ddf377a408ed9067045259ff2770f37e2d94e6478d0f3fc0c17" },
+ { file = "aiohttp-3.8.6-cp39-cp39-win32.whl", hash = "sha256:caf486ac1e689dda3502567eb89ffe02876546599bbf915ec94b1fa424eeffd4" },
+ { file = "aiohttp-3.8.6-cp39-cp39-win_amd64.whl", hash = "sha256:3f0e27e5b733803333bb2371249f41cf42bae8884863e8e8965ec69bebe53132" },
+ { file = "aiohttp-3.8.6.tar.gz", hash = "sha256:b0cf2a4501bff9330a8a5248b4ce951851e415bdcce9dc158e76cfd55e15085c" },
]
[package.dependencies]
@@ -127,8 +127,8 @@ description = "aiosignal: a list of registered asynchronous callbacks"
optional = false
python-versions = ">=3.7"
files = [
- {file = "aiosignal-1.3.1-py3-none-any.whl", hash = "sha256:f8376fb07dd1e86a584e4fcdec80b36b7f81aac666ebc724e2c090300dd83b17"},
- {file = "aiosignal-1.3.1.tar.gz", hash = "sha256:54cd96e15e1649b75d6c87526a6ff0b6c1b0dd3459f43d9ca11d48c339b68cfc"},
+ { file = "aiosignal-1.3.1-py3-none-any.whl", hash = "sha256:f8376fb07dd1e86a584e4fcdec80b36b7f81aac666ebc724e2c090300dd83b17" },
+ { file = "aiosignal-1.3.1.tar.gz", hash = "sha256:54cd96e15e1649b75d6c87526a6ff0b6c1b0dd3459f43d9ca11d48c339b68cfc" },
]
[package.dependencies]
@@ -141,12 +141,12 @@ description = "Reusable constraint types to use with typing.Annotated"
optional = false
python-versions = ">=3.8"
files = [
- {file = "annotated_types-0.6.0-py3-none-any.whl", hash = "sha256:0641064de18ba7a25dee8f96403ebc39113d0cb953a01429249d5c7564666a43"},
- {file = "annotated_types-0.6.0.tar.gz", hash = "sha256:563339e807e53ffd9c267e99fc6d9ea23eb8443c08f112651963e24e22f84a5d"},
+ { file = "annotated_types-0.6.0-py3-none-any.whl", hash = "sha256:0641064de18ba7a25dee8f96403ebc39113d0cb953a01429249d5c7564666a43" },
+ { file = "annotated_types-0.6.0.tar.gz", hash = "sha256:563339e807e53ffd9c267e99fc6d9ea23eb8443c08f112651963e24e22f84a5d" },
]
[package.dependencies]
-typing-extensions = {version = ">=4.0.0", markers = "python_version < \"3.9\""}
+typing-extensions = { version = ">=4.0.0", markers = "python_version < \"3.9\"" }
[[package]]
name = "async-timeout"
@@ -155,8 +155,8 @@ description = "Timeout context manager for asyncio programs"
optional = false
python-versions = ">=3.7"
files = [
- {file = "async-timeout-4.0.3.tar.gz", hash = "sha256:4640d96be84d82d02ed59ea2b7105a0f7b33abe8703703cd0ab0bf87c427522f"},
- {file = "async_timeout-4.0.3-py3-none-any.whl", hash = "sha256:7405140ff1230c310e51dc27b3145b9092d659ce68ff733fb0cefe3ee42be028"},
+ { file = "async-timeout-4.0.3.tar.gz", hash = "sha256:4640d96be84d82d02ed59ea2b7105a0f7b33abe8703703cd0ab0bf87c427522f" },
+ { file = "async_timeout-4.0.3-py3-none-any.whl", hash = "sha256:7405140ff1230c310e51dc27b3145b9092d659ce68ff733fb0cefe3ee42be028" },
]
[[package]]
@@ -166,8 +166,8 @@ description = "Classes Without Boilerplate"
optional = false
python-versions = ">=3.7"
files = [
- {file = "attrs-23.1.0-py3-none-any.whl", hash = "sha256:1f28b4522cdc2fb4256ac1a020c78acf9cba2c6b461ccd2c126f3aa8e8335d04"},
- {file = "attrs-23.1.0.tar.gz", hash = "sha256:6279836d581513a26f1bf235f9acd333bc9115683f14f7e8fae46c98fc50e015"},
+ { file = "attrs-23.1.0-py3-none-any.whl", hash = "sha256:1f28b4522cdc2fb4256ac1a020c78acf9cba2c6b461ccd2c126f3aa8e8335d04" },
+ { file = "attrs-23.1.0.tar.gz", hash = "sha256:6279836d581513a26f1bf235f9acd333bc9115683f14f7e8fae46c98fc50e015" },
]
[package.extras]
@@ -184,8 +184,8 @@ description = "Python package for providing Mozilla's CA Bundle."
optional = false
python-versions = ">=3.6"
files = [
- {file = "certifi-2023.7.22-py3-none-any.whl", hash = "sha256:92d6037539857d8206b8f6ae472e8b77db8058fec5937a1ef3f54304089edbb9"},
- {file = "certifi-2023.7.22.tar.gz", hash = "sha256:539cc1d13202e33ca466e88b2807e29f4c13049d6d87031a3c110744495cb082"},
+ { file = "certifi-2023.7.22-py3-none-any.whl", hash = "sha256:92d6037539857d8206b8f6ae472e8b77db8058fec5937a1ef3f54304089edbb9" },
+ { file = "certifi-2023.7.22.tar.gz", hash = "sha256:539cc1d13202e33ca466e88b2807e29f4c13049d6d87031a3c110744495cb082" },
]
[[package]]
@@ -195,96 +195,96 @@ description = "The Real First Universal Charset Detector. Open, modern and activ
optional = false
python-versions = ">=3.7.0"
files = [
- {file = "charset-normalizer-3.3.0.tar.gz", hash = "sha256:63563193aec44bce707e0c5ca64ff69fa72ed7cf34ce6e11d5127555756fd2f6"},
- {file = "charset_normalizer-3.3.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:effe5406c9bd748a871dbcaf3ac69167c38d72db8c9baf3ff954c344f31c4cbe"},
- {file = "charset_normalizer-3.3.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:4162918ef3098851fcd8a628bf9b6a98d10c380725df9e04caf5ca6dd48c847a"},
- {file = "charset_normalizer-3.3.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:0570d21da019941634a531444364f2482e8db0b3425fcd5ac0c36565a64142c8"},
- {file = "charset_normalizer-3.3.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5707a746c6083a3a74b46b3a631d78d129edab06195a92a8ece755aac25a3f3d"},
- {file = "charset_normalizer-3.3.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:278c296c6f96fa686d74eb449ea1697f3c03dc28b75f873b65b5201806346a69"},
- {file = "charset_normalizer-3.3.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a4b71f4d1765639372a3b32d2638197f5cd5221b19531f9245fcc9ee62d38f56"},
- {file = "charset_normalizer-3.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f5969baeaea61c97efa706b9b107dcba02784b1601c74ac84f2a532ea079403e"},
- {file = "charset_normalizer-3.3.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a3f93dab657839dfa61025056606600a11d0b696d79386f974e459a3fbc568ec"},
- {file = "charset_normalizer-3.3.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:db756e48f9c5c607b5e33dd36b1d5872d0422e960145b08ab0ec7fd420e9d649"},
- {file = "charset_normalizer-3.3.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:232ac332403e37e4a03d209a3f92ed9071f7d3dbda70e2a5e9cff1c4ba9f0678"},
- {file = "charset_normalizer-3.3.0-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:e5c1502d4ace69a179305abb3f0bb6141cbe4714bc9b31d427329a95acfc8bdd"},
- {file = "charset_normalizer-3.3.0-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:2502dd2a736c879c0f0d3e2161e74d9907231e25d35794584b1ca5284e43f596"},
- {file = "charset_normalizer-3.3.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:23e8565ab7ff33218530bc817922fae827420f143479b753104ab801145b1d5b"},
- {file = "charset_normalizer-3.3.0-cp310-cp310-win32.whl", hash = "sha256:1872d01ac8c618a8da634e232f24793883d6e456a66593135aeafe3784b0848d"},
- {file = "charset_normalizer-3.3.0-cp310-cp310-win_amd64.whl", hash = "sha256:557b21a44ceac6c6b9773bc65aa1b4cc3e248a5ad2f5b914b91579a32e22204d"},
- {file = "charset_normalizer-3.3.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:d7eff0f27edc5afa9e405f7165f85a6d782d308f3b6b9d96016c010597958e63"},
- {file = "charset_normalizer-3.3.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6a685067d05e46641d5d1623d7c7fdf15a357546cbb2f71b0ebde91b175ffc3e"},
- {file = "charset_normalizer-3.3.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:0d3d5b7db9ed8a2b11a774db2bbea7ba1884430a205dbd54a32d61d7c2a190fa"},
- {file = "charset_normalizer-3.3.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2935ffc78db9645cb2086c2f8f4cfd23d9b73cc0dc80334bc30aac6f03f68f8c"},
- {file = "charset_normalizer-3.3.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9fe359b2e3a7729010060fbca442ca225280c16e923b37db0e955ac2a2b72a05"},
- {file = "charset_normalizer-3.3.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:380c4bde80bce25c6e4f77b19386f5ec9db230df9f2f2ac1e5ad7af2caa70459"},
- {file = "charset_normalizer-3.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f0d1e3732768fecb052d90d62b220af62ead5748ac51ef61e7b32c266cac9293"},
- {file = "charset_normalizer-3.3.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1b2919306936ac6efb3aed1fbf81039f7087ddadb3160882a57ee2ff74fd2382"},
- {file = "charset_normalizer-3.3.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:f8888e31e3a85943743f8fc15e71536bda1c81d5aa36d014a3c0c44481d7db6e"},
- {file = "charset_normalizer-3.3.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:82eb849f085624f6a607538ee7b83a6d8126df6d2f7d3b319cb837b289123078"},
- {file = "charset_normalizer-3.3.0-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:7b8b8bf1189b3ba9b8de5c8db4d541b406611a71a955bbbd7385bbc45fcb786c"},
- {file = "charset_normalizer-3.3.0-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:5adf257bd58c1b8632046bbe43ee38c04e1038e9d37de9c57a94d6bd6ce5da34"},
- {file = "charset_normalizer-3.3.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:c350354efb159b8767a6244c166f66e67506e06c8924ed74669b2c70bc8735b1"},
- {file = "charset_normalizer-3.3.0-cp311-cp311-win32.whl", hash = "sha256:02af06682e3590ab952599fbadac535ede5d60d78848e555aa58d0c0abbde786"},
- {file = "charset_normalizer-3.3.0-cp311-cp311-win_amd64.whl", hash = "sha256:86d1f65ac145e2c9ed71d8ffb1905e9bba3a91ae29ba55b4c46ae6fc31d7c0d4"},
- {file = "charset_normalizer-3.3.0-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:3b447982ad46348c02cb90d230b75ac34e9886273df3a93eec0539308a6296d7"},
- {file = "charset_normalizer-3.3.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:abf0d9f45ea5fb95051c8bfe43cb40cda383772f7e5023a83cc481ca2604d74e"},
- {file = "charset_normalizer-3.3.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:b09719a17a2301178fac4470d54b1680b18a5048b481cb8890e1ef820cb80455"},
- {file = "charset_normalizer-3.3.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b3d9b48ee6e3967b7901c052b670c7dda6deb812c309439adaffdec55c6d7b78"},
- {file = "charset_normalizer-3.3.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:edfe077ab09442d4ef3c52cb1f9dab89bff02f4524afc0acf2d46be17dc479f5"},
- {file = "charset_normalizer-3.3.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3debd1150027933210c2fc321527c2299118aa929c2f5a0a80ab6953e3bd1908"},
- {file = "charset_normalizer-3.3.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:86f63face3a527284f7bb8a9d4f78988e3c06823f7bea2bd6f0e0e9298ca0403"},
- {file = "charset_normalizer-3.3.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:24817cb02cbef7cd499f7c9a2735286b4782bd47a5b3516a0e84c50eab44b98e"},
- {file = "charset_normalizer-3.3.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:c71f16da1ed8949774ef79f4a0260d28b83b3a50c6576f8f4f0288d109777989"},
- {file = "charset_normalizer-3.3.0-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:9cf3126b85822c4e53aa28c7ec9869b924d6fcfb76e77a45c44b83d91afd74f9"},
- {file = "charset_normalizer-3.3.0-cp312-cp312-musllinux_1_1_ppc64le.whl", hash = "sha256:b3b2316b25644b23b54a6f6401074cebcecd1244c0b8e80111c9a3f1c8e83d65"},
- {file = "charset_normalizer-3.3.0-cp312-cp312-musllinux_1_1_s390x.whl", hash = "sha256:03680bb39035fbcffe828eae9c3f8afc0428c91d38e7d61aa992ef7a59fb120e"},
- {file = "charset_normalizer-3.3.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:4cc152c5dd831641e995764f9f0b6589519f6f5123258ccaca8c6d34572fefa8"},
- {file = "charset_normalizer-3.3.0-cp312-cp312-win32.whl", hash = "sha256:b8f3307af845803fb0b060ab76cf6dd3a13adc15b6b451f54281d25911eb92df"},
- {file = "charset_normalizer-3.3.0-cp312-cp312-win_amd64.whl", hash = "sha256:8eaf82f0eccd1505cf39a45a6bd0a8cf1c70dcfc30dba338207a969d91b965c0"},
- {file = "charset_normalizer-3.3.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:dc45229747b67ffc441b3de2f3ae5e62877a282ea828a5bdb67883c4ee4a8810"},
- {file = "charset_normalizer-3.3.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2f4a0033ce9a76e391542c182f0d48d084855b5fcba5010f707c8e8c34663d77"},
- {file = "charset_normalizer-3.3.0-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ada214c6fa40f8d800e575de6b91a40d0548139e5dc457d2ebb61470abf50186"},
- {file = "charset_normalizer-3.3.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b1121de0e9d6e6ca08289583d7491e7fcb18a439305b34a30b20d8215922d43c"},
- {file = "charset_normalizer-3.3.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1063da2c85b95f2d1a430f1c33b55c9c17ffaf5e612e10aeaad641c55a9e2b9d"},
- {file = "charset_normalizer-3.3.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:70f1d09c0d7748b73290b29219e854b3207aea922f839437870d8cc2168e31cc"},
- {file = "charset_normalizer-3.3.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:250c9eb0f4600361dd80d46112213dff2286231d92d3e52af1e5a6083d10cad9"},
- {file = "charset_normalizer-3.3.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:750b446b2ffce1739e8578576092179160f6d26bd5e23eb1789c4d64d5af7dc7"},
- {file = "charset_normalizer-3.3.0-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:fc52b79d83a3fe3a360902d3f5d79073a993597d48114c29485e9431092905d8"},
- {file = "charset_normalizer-3.3.0-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:588245972aca710b5b68802c8cad9edaa98589b1b42ad2b53accd6910dad3545"},
- {file = "charset_normalizer-3.3.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:e39c7eb31e3f5b1f88caff88bcff1b7f8334975b46f6ac6e9fc725d829bc35d4"},
- {file = "charset_normalizer-3.3.0-cp37-cp37m-win32.whl", hash = "sha256:abecce40dfebbfa6abf8e324e1860092eeca6f7375c8c4e655a8afb61af58f2c"},
- {file = "charset_normalizer-3.3.0-cp37-cp37m-win_amd64.whl", hash = "sha256:24a91a981f185721542a0b7c92e9054b7ab4fea0508a795846bc5b0abf8118d4"},
- {file = "charset_normalizer-3.3.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:67b8cc9574bb518ec76dc8e705d4c39ae78bb96237cb533edac149352c1f39fe"},
- {file = "charset_normalizer-3.3.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:ac71b2977fb90c35d41c9453116e283fac47bb9096ad917b8819ca8b943abecd"},
- {file = "charset_normalizer-3.3.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:3ae38d325b512f63f8da31f826e6cb6c367336f95e418137286ba362925c877e"},
- {file = "charset_normalizer-3.3.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:542da1178c1c6af8873e143910e2269add130a299c9106eef2594e15dae5e482"},
- {file = "charset_normalizer-3.3.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:30a85aed0b864ac88309b7d94be09f6046c834ef60762a8833b660139cfbad13"},
- {file = "charset_normalizer-3.3.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:aae32c93e0f64469f74ccc730a7cb21c7610af3a775157e50bbd38f816536b38"},
- {file = "charset_normalizer-3.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:15b26ddf78d57f1d143bdf32e820fd8935d36abe8a25eb9ec0b5a71c82eb3895"},
- {file = "charset_normalizer-3.3.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7f5d10bae5d78e4551b7be7a9b29643a95aded9d0f602aa2ba584f0388e7a557"},
- {file = "charset_normalizer-3.3.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:249c6470a2b60935bafd1d1d13cd613f8cd8388d53461c67397ee6a0f5dce741"},
- {file = "charset_normalizer-3.3.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:c5a74c359b2d47d26cdbbc7845e9662d6b08a1e915eb015d044729e92e7050b7"},
- {file = "charset_normalizer-3.3.0-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:b5bcf60a228acae568e9911f410f9d9e0d43197d030ae5799e20dca8df588287"},
- {file = "charset_normalizer-3.3.0-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:187d18082694a29005ba2944c882344b6748d5be69e3a89bf3cc9d878e548d5a"},
- {file = "charset_normalizer-3.3.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:81bf654678e575403736b85ba3a7867e31c2c30a69bc57fe88e3ace52fb17b89"},
- {file = "charset_normalizer-3.3.0-cp38-cp38-win32.whl", hash = "sha256:85a32721ddde63c9df9ebb0d2045b9691d9750cb139c161c80e500d210f5e26e"},
- {file = "charset_normalizer-3.3.0-cp38-cp38-win_amd64.whl", hash = "sha256:468d2a840567b13a590e67dd276c570f8de00ed767ecc611994c301d0f8c014f"},
- {file = "charset_normalizer-3.3.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:e0fc42822278451bc13a2e8626cf2218ba570f27856b536e00cfa53099724828"},
- {file = "charset_normalizer-3.3.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:09c77f964f351a7369cc343911e0df63e762e42bac24cd7d18525961c81754f4"},
- {file = "charset_normalizer-3.3.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:12ebea541c44fdc88ccb794a13fe861cc5e35d64ed689513a5c03d05b53b7c82"},
- {file = "charset_normalizer-3.3.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:805dfea4ca10411a5296bcc75638017215a93ffb584c9e344731eef0dcfb026a"},
- {file = "charset_normalizer-3.3.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:96c2b49eb6a72c0e4991d62406e365d87067ca14c1a729a870d22354e6f68115"},
- {file = "charset_normalizer-3.3.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:aaf7b34c5bc56b38c931a54f7952f1ff0ae77a2e82496583b247f7c969eb1479"},
- {file = "charset_normalizer-3.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:619d1c96099be5823db34fe89e2582b336b5b074a7f47f819d6b3a57ff7bdb86"},
- {file = "charset_normalizer-3.3.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a0ac5e7015a5920cfce654c06618ec40c33e12801711da6b4258af59a8eff00a"},
- {file = "charset_normalizer-3.3.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:93aa7eef6ee71c629b51ef873991d6911b906d7312c6e8e99790c0f33c576f89"},
- {file = "charset_normalizer-3.3.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:7966951325782121e67c81299a031f4c115615e68046f79b85856b86ebffc4cd"},
- {file = "charset_normalizer-3.3.0-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:02673e456dc5ab13659f85196c534dc596d4ef260e4d86e856c3b2773ce09843"},
- {file = "charset_normalizer-3.3.0-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:c2af80fb58f0f24b3f3adcb9148e6203fa67dd3f61c4af146ecad033024dde43"},
- {file = "charset_normalizer-3.3.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:153e7b6e724761741e0974fc4dcd406d35ba70b92bfe3fedcb497226c93b9da7"},
- {file = "charset_normalizer-3.3.0-cp39-cp39-win32.whl", hash = "sha256:d47ecf253780c90ee181d4d871cd655a789da937454045b17b5798da9393901a"},
- {file = "charset_normalizer-3.3.0-cp39-cp39-win_amd64.whl", hash = "sha256:d97d85fa63f315a8bdaba2af9a6a686e0eceab77b3089af45133252618e70884"},
- {file = "charset_normalizer-3.3.0-py3-none-any.whl", hash = "sha256:e46cd37076971c1040fc8c41273a8b3e2c624ce4f2be3f5dfcb7a430c1d3acc2"},
+ { file = "charset-normalizer-3.3.0.tar.gz", hash = "sha256:63563193aec44bce707e0c5ca64ff69fa72ed7cf34ce6e11d5127555756fd2f6" },
+ { file = "charset_normalizer-3.3.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:effe5406c9bd748a871dbcaf3ac69167c38d72db8c9baf3ff954c344f31c4cbe" },
+ { file = "charset_normalizer-3.3.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:4162918ef3098851fcd8a628bf9b6a98d10c380725df9e04caf5ca6dd48c847a" },
+ { file = "charset_normalizer-3.3.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:0570d21da019941634a531444364f2482e8db0b3425fcd5ac0c36565a64142c8" },
+ { file = "charset_normalizer-3.3.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5707a746c6083a3a74b46b3a631d78d129edab06195a92a8ece755aac25a3f3d" },
+ { file = "charset_normalizer-3.3.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:278c296c6f96fa686d74eb449ea1697f3c03dc28b75f873b65b5201806346a69" },
+ { file = "charset_normalizer-3.3.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a4b71f4d1765639372a3b32d2638197f5cd5221b19531f9245fcc9ee62d38f56" },
+ { file = "charset_normalizer-3.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f5969baeaea61c97efa706b9b107dcba02784b1601c74ac84f2a532ea079403e" },
+ { file = "charset_normalizer-3.3.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a3f93dab657839dfa61025056606600a11d0b696d79386f974e459a3fbc568ec" },
+ { file = "charset_normalizer-3.3.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:db756e48f9c5c607b5e33dd36b1d5872d0422e960145b08ab0ec7fd420e9d649" },
+ { file = "charset_normalizer-3.3.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:232ac332403e37e4a03d209a3f92ed9071f7d3dbda70e2a5e9cff1c4ba9f0678" },
+ { file = "charset_normalizer-3.3.0-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:e5c1502d4ace69a179305abb3f0bb6141cbe4714bc9b31d427329a95acfc8bdd" },
+ { file = "charset_normalizer-3.3.0-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:2502dd2a736c879c0f0d3e2161e74d9907231e25d35794584b1ca5284e43f596" },
+ { file = "charset_normalizer-3.3.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:23e8565ab7ff33218530bc817922fae827420f143479b753104ab801145b1d5b" },
+ { file = "charset_normalizer-3.3.0-cp310-cp310-win32.whl", hash = "sha256:1872d01ac8c618a8da634e232f24793883d6e456a66593135aeafe3784b0848d" },
+ { file = "charset_normalizer-3.3.0-cp310-cp310-win_amd64.whl", hash = "sha256:557b21a44ceac6c6b9773bc65aa1b4cc3e248a5ad2f5b914b91579a32e22204d" },
+ { file = "charset_normalizer-3.3.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:d7eff0f27edc5afa9e405f7165f85a6d782d308f3b6b9d96016c010597958e63" },
+ { file = "charset_normalizer-3.3.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6a685067d05e46641d5d1623d7c7fdf15a357546cbb2f71b0ebde91b175ffc3e" },
+ { file = "charset_normalizer-3.3.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:0d3d5b7db9ed8a2b11a774db2bbea7ba1884430a205dbd54a32d61d7c2a190fa" },
+ { file = "charset_normalizer-3.3.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2935ffc78db9645cb2086c2f8f4cfd23d9b73cc0dc80334bc30aac6f03f68f8c" },
+ { file = "charset_normalizer-3.3.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9fe359b2e3a7729010060fbca442ca225280c16e923b37db0e955ac2a2b72a05" },
+ { file = "charset_normalizer-3.3.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:380c4bde80bce25c6e4f77b19386f5ec9db230df9f2f2ac1e5ad7af2caa70459" },
+ { file = "charset_normalizer-3.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f0d1e3732768fecb052d90d62b220af62ead5748ac51ef61e7b32c266cac9293" },
+ { file = "charset_normalizer-3.3.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1b2919306936ac6efb3aed1fbf81039f7087ddadb3160882a57ee2ff74fd2382" },
+ { file = "charset_normalizer-3.3.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:f8888e31e3a85943743f8fc15e71536bda1c81d5aa36d014a3c0c44481d7db6e" },
+ { file = "charset_normalizer-3.3.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:82eb849f085624f6a607538ee7b83a6d8126df6d2f7d3b319cb837b289123078" },
+ { file = "charset_normalizer-3.3.0-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:7b8b8bf1189b3ba9b8de5c8db4d541b406611a71a955bbbd7385bbc45fcb786c" },
+ { file = "charset_normalizer-3.3.0-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:5adf257bd58c1b8632046bbe43ee38c04e1038e9d37de9c57a94d6bd6ce5da34" },
+ { file = "charset_normalizer-3.3.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:c350354efb159b8767a6244c166f66e67506e06c8924ed74669b2c70bc8735b1" },
+ { file = "charset_normalizer-3.3.0-cp311-cp311-win32.whl", hash = "sha256:02af06682e3590ab952599fbadac535ede5d60d78848e555aa58d0c0abbde786" },
+ { file = "charset_normalizer-3.3.0-cp311-cp311-win_amd64.whl", hash = "sha256:86d1f65ac145e2c9ed71d8ffb1905e9bba3a91ae29ba55b4c46ae6fc31d7c0d4" },
+ { file = "charset_normalizer-3.3.0-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:3b447982ad46348c02cb90d230b75ac34e9886273df3a93eec0539308a6296d7" },
+ { file = "charset_normalizer-3.3.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:abf0d9f45ea5fb95051c8bfe43cb40cda383772f7e5023a83cc481ca2604d74e" },
+ { file = "charset_normalizer-3.3.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:b09719a17a2301178fac4470d54b1680b18a5048b481cb8890e1ef820cb80455" },
+ { file = "charset_normalizer-3.3.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b3d9b48ee6e3967b7901c052b670c7dda6deb812c309439adaffdec55c6d7b78" },
+ { file = "charset_normalizer-3.3.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:edfe077ab09442d4ef3c52cb1f9dab89bff02f4524afc0acf2d46be17dc479f5" },
+ { file = "charset_normalizer-3.3.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3debd1150027933210c2fc321527c2299118aa929c2f5a0a80ab6953e3bd1908" },
+ { file = "charset_normalizer-3.3.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:86f63face3a527284f7bb8a9d4f78988e3c06823f7bea2bd6f0e0e9298ca0403" },
+ { file = "charset_normalizer-3.3.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:24817cb02cbef7cd499f7c9a2735286b4782bd47a5b3516a0e84c50eab44b98e" },
+ { file = "charset_normalizer-3.3.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:c71f16da1ed8949774ef79f4a0260d28b83b3a50c6576f8f4f0288d109777989" },
+ { file = "charset_normalizer-3.3.0-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:9cf3126b85822c4e53aa28c7ec9869b924d6fcfb76e77a45c44b83d91afd74f9" },
+ { file = "charset_normalizer-3.3.0-cp312-cp312-musllinux_1_1_ppc64le.whl", hash = "sha256:b3b2316b25644b23b54a6f6401074cebcecd1244c0b8e80111c9a3f1c8e83d65" },
+ { file = "charset_normalizer-3.3.0-cp312-cp312-musllinux_1_1_s390x.whl", hash = "sha256:03680bb39035fbcffe828eae9c3f8afc0428c91d38e7d61aa992ef7a59fb120e" },
+ { file = "charset_normalizer-3.3.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:4cc152c5dd831641e995764f9f0b6589519f6f5123258ccaca8c6d34572fefa8" },
+ { file = "charset_normalizer-3.3.0-cp312-cp312-win32.whl", hash = "sha256:b8f3307af845803fb0b060ab76cf6dd3a13adc15b6b451f54281d25911eb92df" },
+ { file = "charset_normalizer-3.3.0-cp312-cp312-win_amd64.whl", hash = "sha256:8eaf82f0eccd1505cf39a45a6bd0a8cf1c70dcfc30dba338207a969d91b965c0" },
+ { file = "charset_normalizer-3.3.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:dc45229747b67ffc441b3de2f3ae5e62877a282ea828a5bdb67883c4ee4a8810" },
+ { file = "charset_normalizer-3.3.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2f4a0033ce9a76e391542c182f0d48d084855b5fcba5010f707c8e8c34663d77" },
+ { file = "charset_normalizer-3.3.0-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ada214c6fa40f8d800e575de6b91a40d0548139e5dc457d2ebb61470abf50186" },
+ { file = "charset_normalizer-3.3.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b1121de0e9d6e6ca08289583d7491e7fcb18a439305b34a30b20d8215922d43c" },
+ { file = "charset_normalizer-3.3.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1063da2c85b95f2d1a430f1c33b55c9c17ffaf5e612e10aeaad641c55a9e2b9d" },
+ { file = "charset_normalizer-3.3.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:70f1d09c0d7748b73290b29219e854b3207aea922f839437870d8cc2168e31cc" },
+ { file = "charset_normalizer-3.3.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:250c9eb0f4600361dd80d46112213dff2286231d92d3e52af1e5a6083d10cad9" },
+ { file = "charset_normalizer-3.3.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:750b446b2ffce1739e8578576092179160f6d26bd5e23eb1789c4d64d5af7dc7" },
+ { file = "charset_normalizer-3.3.0-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:fc52b79d83a3fe3a360902d3f5d79073a993597d48114c29485e9431092905d8" },
+ { file = "charset_normalizer-3.3.0-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:588245972aca710b5b68802c8cad9edaa98589b1b42ad2b53accd6910dad3545" },
+ { file = "charset_normalizer-3.3.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:e39c7eb31e3f5b1f88caff88bcff1b7f8334975b46f6ac6e9fc725d829bc35d4" },
+ { file = "charset_normalizer-3.3.0-cp37-cp37m-win32.whl", hash = "sha256:abecce40dfebbfa6abf8e324e1860092eeca6f7375c8c4e655a8afb61af58f2c" },
+ { file = "charset_normalizer-3.3.0-cp37-cp37m-win_amd64.whl", hash = "sha256:24a91a981f185721542a0b7c92e9054b7ab4fea0508a795846bc5b0abf8118d4" },
+ { file = "charset_normalizer-3.3.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:67b8cc9574bb518ec76dc8e705d4c39ae78bb96237cb533edac149352c1f39fe" },
+ { file = "charset_normalizer-3.3.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:ac71b2977fb90c35d41c9453116e283fac47bb9096ad917b8819ca8b943abecd" },
+ { file = "charset_normalizer-3.3.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:3ae38d325b512f63f8da31f826e6cb6c367336f95e418137286ba362925c877e" },
+ { file = "charset_normalizer-3.3.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:542da1178c1c6af8873e143910e2269add130a299c9106eef2594e15dae5e482" },
+ { file = "charset_normalizer-3.3.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:30a85aed0b864ac88309b7d94be09f6046c834ef60762a8833b660139cfbad13" },
+ { file = "charset_normalizer-3.3.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:aae32c93e0f64469f74ccc730a7cb21c7610af3a775157e50bbd38f816536b38" },
+ { file = "charset_normalizer-3.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:15b26ddf78d57f1d143bdf32e820fd8935d36abe8a25eb9ec0b5a71c82eb3895" },
+ { file = "charset_normalizer-3.3.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7f5d10bae5d78e4551b7be7a9b29643a95aded9d0f602aa2ba584f0388e7a557" },
+ { file = "charset_normalizer-3.3.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:249c6470a2b60935bafd1d1d13cd613f8cd8388d53461c67397ee6a0f5dce741" },
+ { file = "charset_normalizer-3.3.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:c5a74c359b2d47d26cdbbc7845e9662d6b08a1e915eb015d044729e92e7050b7" },
+ { file = "charset_normalizer-3.3.0-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:b5bcf60a228acae568e9911f410f9d9e0d43197d030ae5799e20dca8df588287" },
+ { file = "charset_normalizer-3.3.0-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:187d18082694a29005ba2944c882344b6748d5be69e3a89bf3cc9d878e548d5a" },
+ { file = "charset_normalizer-3.3.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:81bf654678e575403736b85ba3a7867e31c2c30a69bc57fe88e3ace52fb17b89" },
+ { file = "charset_normalizer-3.3.0-cp38-cp38-win32.whl", hash = "sha256:85a32721ddde63c9df9ebb0d2045b9691d9750cb139c161c80e500d210f5e26e" },
+ { file = "charset_normalizer-3.3.0-cp38-cp38-win_amd64.whl", hash = "sha256:468d2a840567b13a590e67dd276c570f8de00ed767ecc611994c301d0f8c014f" },
+ { file = "charset_normalizer-3.3.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:e0fc42822278451bc13a2e8626cf2218ba570f27856b536e00cfa53099724828" },
+ { file = "charset_normalizer-3.3.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:09c77f964f351a7369cc343911e0df63e762e42bac24cd7d18525961c81754f4" },
+ { file = "charset_normalizer-3.3.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:12ebea541c44fdc88ccb794a13fe861cc5e35d64ed689513a5c03d05b53b7c82" },
+ { file = "charset_normalizer-3.3.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:805dfea4ca10411a5296bcc75638017215a93ffb584c9e344731eef0dcfb026a" },
+ { file = "charset_normalizer-3.3.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:96c2b49eb6a72c0e4991d62406e365d87067ca14c1a729a870d22354e6f68115" },
+ { file = "charset_normalizer-3.3.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:aaf7b34c5bc56b38c931a54f7952f1ff0ae77a2e82496583b247f7c969eb1479" },
+ { file = "charset_normalizer-3.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:619d1c96099be5823db34fe89e2582b336b5b074a7f47f819d6b3a57ff7bdb86" },
+ { file = "charset_normalizer-3.3.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a0ac5e7015a5920cfce654c06618ec40c33e12801711da6b4258af59a8eff00a" },
+ { file = "charset_normalizer-3.3.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:93aa7eef6ee71c629b51ef873991d6911b906d7312c6e8e99790c0f33c576f89" },
+ { file = "charset_normalizer-3.3.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:7966951325782121e67c81299a031f4c115615e68046f79b85856b86ebffc4cd" },
+ { file = "charset_normalizer-3.3.0-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:02673e456dc5ab13659f85196c534dc596d4ef260e4d86e856c3b2773ce09843" },
+ { file = "charset_normalizer-3.3.0-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:c2af80fb58f0f24b3f3adcb9148e6203fa67dd3f61c4af146ecad033024dde43" },
+ { file = "charset_normalizer-3.3.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:153e7b6e724761741e0974fc4dcd406d35ba70b92bfe3fedcb497226c93b9da7" },
+ { file = "charset_normalizer-3.3.0-cp39-cp39-win32.whl", hash = "sha256:d47ecf253780c90ee181d4d871cd655a789da937454045b17b5798da9393901a" },
+ { file = "charset_normalizer-3.3.0-cp39-cp39-win_amd64.whl", hash = "sha256:d97d85fa63f315a8bdaba2af9a6a686e0eceab77b3089af45133252618e70884" },
+ { file = "charset_normalizer-3.3.0-py3-none-any.whl", hash = "sha256:e46cd37076971c1040fc8c41273a8b3e2c624ce4f2be3f5dfcb7a430c1d3acc2" },
]
[[package]]
@@ -294,8 +294,8 @@ description = "E2B SDK that give agents cloud environments"
optional = false
python-versions = ">=3.8,<4.0"
files = [
- {file = "e2b-0.9.3-py3-none-any.whl", hash = "sha256:889daeeb1b3dc19a35e48c38380a0ca996379197935d3ff03561f7fb0872af7e"},
- {file = "e2b-0.9.3.tar.gz", hash = "sha256:b1a9d370dbb3a130082357824a11be44ebf84dadf39e74613b90ec8a8acd55e0"},
+ { file = "e2b-0.9.3-py3-none-any.whl", hash = "sha256:889daeeb1b3dc19a35e48c38380a0ca996379197935d3ff03561f7fb0872af7e" },
+ { file = "e2b-0.9.3.tar.gz", hash = "sha256:b1a9d370dbb3a130082357824a11be44ebf84dadf39e74613b90ec8a8acd55e0" },
]
[package.dependencies]
@@ -315,67 +315,67 @@ description = "A list-like structure which implements collections.abc.MutableSeq
optional = false
python-versions = ">=3.8"
files = [
- {file = "frozenlist-1.4.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:764226ceef3125e53ea2cb275000e309c0aa5464d43bd72abd661e27fffc26ab"},
- {file = "frozenlist-1.4.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d6484756b12f40003c6128bfcc3fa9f0d49a687e171186c2d85ec82e3758c559"},
- {file = "frozenlist-1.4.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9ac08e601308e41eb533f232dbf6b7e4cea762f9f84f6357136eed926c15d12c"},
- {file = "frozenlist-1.4.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d081f13b095d74b67d550de04df1c756831f3b83dc9881c38985834387487f1b"},
- {file = "frozenlist-1.4.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:71932b597f9895f011f47f17d6428252fc728ba2ae6024e13c3398a087c2cdea"},
- {file = "frozenlist-1.4.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:981b9ab5a0a3178ff413bca62526bb784249421c24ad7381e39d67981be2c326"},
- {file = "frozenlist-1.4.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e41f3de4df3e80de75845d3e743b3f1c4c8613c3997a912dbf0229fc61a8b963"},
- {file = "frozenlist-1.4.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6918d49b1f90821e93069682c06ffde41829c346c66b721e65a5c62b4bab0300"},
- {file = "frozenlist-1.4.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:0e5c8764c7829343d919cc2dfc587a8db01c4f70a4ebbc49abde5d4b158b007b"},
- {file = "frozenlist-1.4.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:8d0edd6b1c7fb94922bf569c9b092ee187a83f03fb1a63076e7774b60f9481a8"},
- {file = "frozenlist-1.4.0-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:e29cda763f752553fa14c68fb2195150bfab22b352572cb36c43c47bedba70eb"},
- {file = "frozenlist-1.4.0-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:0c7c1b47859ee2cac3846fde1c1dc0f15da6cec5a0e5c72d101e0f83dcb67ff9"},
- {file = "frozenlist-1.4.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:901289d524fdd571be1c7be054f48b1f88ce8dddcbdf1ec698b27d4b8b9e5d62"},
- {file = "frozenlist-1.4.0-cp310-cp310-win32.whl", hash = "sha256:1a0848b52815006ea6596c395f87449f693dc419061cc21e970f139d466dc0a0"},
- {file = "frozenlist-1.4.0-cp310-cp310-win_amd64.whl", hash = "sha256:b206646d176a007466358aa21d85cd8600a415c67c9bd15403336c331a10d956"},
- {file = "frozenlist-1.4.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:de343e75f40e972bae1ef6090267f8260c1446a1695e77096db6cfa25e759a95"},
- {file = "frozenlist-1.4.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:ad2a9eb6d9839ae241701d0918f54c51365a51407fd80f6b8289e2dfca977cc3"},
- {file = "frozenlist-1.4.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:bd7bd3b3830247580de99c99ea2a01416dfc3c34471ca1298bccabf86d0ff4dc"},
- {file = "frozenlist-1.4.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bdf1847068c362f16b353163391210269e4f0569a3c166bc6a9f74ccbfc7e839"},
- {file = "frozenlist-1.4.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:38461d02d66de17455072c9ba981d35f1d2a73024bee7790ac2f9e361ef1cd0c"},
- {file = "frozenlist-1.4.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d5a32087d720c608f42caed0ef36d2b3ea61a9d09ee59a5142d6070da9041b8f"},
- {file = "frozenlist-1.4.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:dd65632acaf0d47608190a71bfe46b209719bf2beb59507db08ccdbe712f969b"},
- {file = "frozenlist-1.4.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:261b9f5d17cac914531331ff1b1d452125bf5daa05faf73b71d935485b0c510b"},
- {file = "frozenlist-1.4.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:b89ac9768b82205936771f8d2eb3ce88503b1556324c9f903e7156669f521472"},
- {file = "frozenlist-1.4.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:008eb8b31b3ea6896da16c38c1b136cb9fec9e249e77f6211d479db79a4eaf01"},
- {file = "frozenlist-1.4.0-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:e74b0506fa5aa5598ac6a975a12aa8928cbb58e1f5ac8360792ef15de1aa848f"},
- {file = "frozenlist-1.4.0-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:490132667476f6781b4c9458298b0c1cddf237488abd228b0b3650e5ecba7467"},
- {file = "frozenlist-1.4.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:76d4711f6f6d08551a7e9ef28c722f4a50dd0fc204c56b4bcd95c6cc05ce6fbb"},
- {file = "frozenlist-1.4.0-cp311-cp311-win32.whl", hash = "sha256:a02eb8ab2b8f200179b5f62b59757685ae9987996ae549ccf30f983f40602431"},
- {file = "frozenlist-1.4.0-cp311-cp311-win_amd64.whl", hash = "sha256:515e1abc578dd3b275d6a5114030b1330ba044ffba03f94091842852f806f1c1"},
- {file = "frozenlist-1.4.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:f0ed05f5079c708fe74bf9027e95125334b6978bf07fd5ab923e9e55e5fbb9d3"},
- {file = "frozenlist-1.4.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:ca265542ca427bf97aed183c1676e2a9c66942e822b14dc6e5f42e038f92a503"},
- {file = "frozenlist-1.4.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:491e014f5c43656da08958808588cc6c016847b4360e327a62cb308c791bd2d9"},
- {file = "frozenlist-1.4.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:17ae5cd0f333f94f2e03aaf140bb762c64783935cc764ff9c82dff626089bebf"},
- {file = "frozenlist-1.4.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1e78fb68cf9c1a6aa4a9a12e960a5c9dfbdb89b3695197aa7064705662515de2"},
- {file = "frozenlist-1.4.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d5655a942f5f5d2c9ed93d72148226d75369b4f6952680211972a33e59b1dfdc"},
- {file = "frozenlist-1.4.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c11b0746f5d946fecf750428a95f3e9ebe792c1ee3b1e96eeba145dc631a9672"},
- {file = "frozenlist-1.4.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e66d2a64d44d50d2543405fb183a21f76b3b5fd16f130f5c99187c3fb4e64919"},
- {file = "frozenlist-1.4.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:88f7bc0fcca81f985f78dd0fa68d2c75abf8272b1f5c323ea4a01a4d7a614efc"},
- {file = "frozenlist-1.4.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:5833593c25ac59ede40ed4de6d67eb42928cca97f26feea219f21d0ed0959b79"},
- {file = "frozenlist-1.4.0-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:fec520865f42e5c7f050c2a79038897b1c7d1595e907a9e08e3353293ffc948e"},
- {file = "frozenlist-1.4.0-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:b826d97e4276750beca7c8f0f1a4938892697a6bcd8ec8217b3312dad6982781"},
- {file = "frozenlist-1.4.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:ceb6ec0a10c65540421e20ebd29083c50e6d1143278746a4ef6bcf6153171eb8"},
- {file = "frozenlist-1.4.0-cp38-cp38-win32.whl", hash = "sha256:2b8bcf994563466db019fab287ff390fffbfdb4f905fc77bc1c1d604b1c689cc"},
- {file = "frozenlist-1.4.0-cp38-cp38-win_amd64.whl", hash = "sha256:a6c8097e01886188e5be3e6b14e94ab365f384736aa1fca6a0b9e35bd4a30bc7"},
- {file = "frozenlist-1.4.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:6c38721585f285203e4b4132a352eb3daa19121a035f3182e08e437cface44bf"},
- {file = "frozenlist-1.4.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:a0c6da9aee33ff0b1a451e867da0c1f47408112b3391dd43133838339e410963"},
- {file = "frozenlist-1.4.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:93ea75c050c5bb3d98016b4ba2497851eadf0ac154d88a67d7a6816206f6fa7f"},
- {file = "frozenlist-1.4.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f61e2dc5ad442c52b4887f1fdc112f97caeff4d9e6ebe78879364ac59f1663e1"},
- {file = "frozenlist-1.4.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:aa384489fefeb62321b238e64c07ef48398fe80f9e1e6afeff22e140e0850eef"},
- {file = "frozenlist-1.4.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:10ff5faaa22786315ef57097a279b833ecab1a0bfb07d604c9cbb1c4cdc2ed87"},
- {file = "frozenlist-1.4.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:007df07a6e3eb3e33e9a1fe6a9db7af152bbd8a185f9aaa6ece10a3529e3e1c6"},
- {file = "frozenlist-1.4.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7f4f399d28478d1f604c2ff9119907af9726aed73680e5ed1ca634d377abb087"},
- {file = "frozenlist-1.4.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:c5374b80521d3d3f2ec5572e05adc94601985cc526fb276d0c8574a6d749f1b3"},
- {file = "frozenlist-1.4.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:ce31ae3e19f3c902de379cf1323d90c649425b86de7bbdf82871b8a2a0615f3d"},
- {file = "frozenlist-1.4.0-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:7211ef110a9194b6042449431e08c4d80c0481e5891e58d429df5899690511c2"},
- {file = "frozenlist-1.4.0-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:556de4430ce324c836789fa4560ca62d1591d2538b8ceb0b4f68fb7b2384a27a"},
- {file = "frozenlist-1.4.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:7645a8e814a3ee34a89c4a372011dcd817964ce8cb273c8ed6119d706e9613e3"},
- {file = "frozenlist-1.4.0-cp39-cp39-win32.whl", hash = "sha256:19488c57c12d4e8095a922f328df3f179c820c212940a498623ed39160bc3c2f"},
- {file = "frozenlist-1.4.0-cp39-cp39-win_amd64.whl", hash = "sha256:6221d84d463fb110bdd7619b69cb43878a11d51cbb9394ae3105d082d5199167"},
- {file = "frozenlist-1.4.0.tar.gz", hash = "sha256:09163bdf0b2907454042edb19f887c6d33806adc71fbd54afc14908bfdc22251"},
+ { file = "frozenlist-1.4.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:764226ceef3125e53ea2cb275000e309c0aa5464d43bd72abd661e27fffc26ab" },
+ { file = "frozenlist-1.4.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d6484756b12f40003c6128bfcc3fa9f0d49a687e171186c2d85ec82e3758c559" },
+ { file = "frozenlist-1.4.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9ac08e601308e41eb533f232dbf6b7e4cea762f9f84f6357136eed926c15d12c" },
+ { file = "frozenlist-1.4.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d081f13b095d74b67d550de04df1c756831f3b83dc9881c38985834387487f1b" },
+ { file = "frozenlist-1.4.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:71932b597f9895f011f47f17d6428252fc728ba2ae6024e13c3398a087c2cdea" },
+ { file = "frozenlist-1.4.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:981b9ab5a0a3178ff413bca62526bb784249421c24ad7381e39d67981be2c326" },
+ { file = "frozenlist-1.4.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e41f3de4df3e80de75845d3e743b3f1c4c8613c3997a912dbf0229fc61a8b963" },
+ { file = "frozenlist-1.4.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6918d49b1f90821e93069682c06ffde41829c346c66b721e65a5c62b4bab0300" },
+ { file = "frozenlist-1.4.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:0e5c8764c7829343d919cc2dfc587a8db01c4f70a4ebbc49abde5d4b158b007b" },
+ { file = "frozenlist-1.4.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:8d0edd6b1c7fb94922bf569c9b092ee187a83f03fb1a63076e7774b60f9481a8" },
+ { file = "frozenlist-1.4.0-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:e29cda763f752553fa14c68fb2195150bfab22b352572cb36c43c47bedba70eb" },
+ { file = "frozenlist-1.4.0-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:0c7c1b47859ee2cac3846fde1c1dc0f15da6cec5a0e5c72d101e0f83dcb67ff9" },
+ { file = "frozenlist-1.4.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:901289d524fdd571be1c7be054f48b1f88ce8dddcbdf1ec698b27d4b8b9e5d62" },
+ { file = "frozenlist-1.4.0-cp310-cp310-win32.whl", hash = "sha256:1a0848b52815006ea6596c395f87449f693dc419061cc21e970f139d466dc0a0" },
+ { file = "frozenlist-1.4.0-cp310-cp310-win_amd64.whl", hash = "sha256:b206646d176a007466358aa21d85cd8600a415c67c9bd15403336c331a10d956" },
+ { file = "frozenlist-1.4.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:de343e75f40e972bae1ef6090267f8260c1446a1695e77096db6cfa25e759a95" },
+ { file = "frozenlist-1.4.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:ad2a9eb6d9839ae241701d0918f54c51365a51407fd80f6b8289e2dfca977cc3" },
+ { file = "frozenlist-1.4.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:bd7bd3b3830247580de99c99ea2a01416dfc3c34471ca1298bccabf86d0ff4dc" },
+ { file = "frozenlist-1.4.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bdf1847068c362f16b353163391210269e4f0569a3c166bc6a9f74ccbfc7e839" },
+ { file = "frozenlist-1.4.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:38461d02d66de17455072c9ba981d35f1d2a73024bee7790ac2f9e361ef1cd0c" },
+ { file = "frozenlist-1.4.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d5a32087d720c608f42caed0ef36d2b3ea61a9d09ee59a5142d6070da9041b8f" },
+ { file = "frozenlist-1.4.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:dd65632acaf0d47608190a71bfe46b209719bf2beb59507db08ccdbe712f969b" },
+ { file = "frozenlist-1.4.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:261b9f5d17cac914531331ff1b1d452125bf5daa05faf73b71d935485b0c510b" },
+ { file = "frozenlist-1.4.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:b89ac9768b82205936771f8d2eb3ce88503b1556324c9f903e7156669f521472" },
+ { file = "frozenlist-1.4.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:008eb8b31b3ea6896da16c38c1b136cb9fec9e249e77f6211d479db79a4eaf01" },
+ { file = "frozenlist-1.4.0-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:e74b0506fa5aa5598ac6a975a12aa8928cbb58e1f5ac8360792ef15de1aa848f" },
+ { file = "frozenlist-1.4.0-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:490132667476f6781b4c9458298b0c1cddf237488abd228b0b3650e5ecba7467" },
+ { file = "frozenlist-1.4.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:76d4711f6f6d08551a7e9ef28c722f4a50dd0fc204c56b4bcd95c6cc05ce6fbb" },
+ { file = "frozenlist-1.4.0-cp311-cp311-win32.whl", hash = "sha256:a02eb8ab2b8f200179b5f62b59757685ae9987996ae549ccf30f983f40602431" },
+ { file = "frozenlist-1.4.0-cp311-cp311-win_amd64.whl", hash = "sha256:515e1abc578dd3b275d6a5114030b1330ba044ffba03f94091842852f806f1c1" },
+ { file = "frozenlist-1.4.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:f0ed05f5079c708fe74bf9027e95125334b6978bf07fd5ab923e9e55e5fbb9d3" },
+ { file = "frozenlist-1.4.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:ca265542ca427bf97aed183c1676e2a9c66942e822b14dc6e5f42e038f92a503" },
+ { file = "frozenlist-1.4.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:491e014f5c43656da08958808588cc6c016847b4360e327a62cb308c791bd2d9" },
+ { file = "frozenlist-1.4.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:17ae5cd0f333f94f2e03aaf140bb762c64783935cc764ff9c82dff626089bebf" },
+ { file = "frozenlist-1.4.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1e78fb68cf9c1a6aa4a9a12e960a5c9dfbdb89b3695197aa7064705662515de2" },
+ { file = "frozenlist-1.4.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d5655a942f5f5d2c9ed93d72148226d75369b4f6952680211972a33e59b1dfdc" },
+ { file = "frozenlist-1.4.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c11b0746f5d946fecf750428a95f3e9ebe792c1ee3b1e96eeba145dc631a9672" },
+ { file = "frozenlist-1.4.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e66d2a64d44d50d2543405fb183a21f76b3b5fd16f130f5c99187c3fb4e64919" },
+ { file = "frozenlist-1.4.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:88f7bc0fcca81f985f78dd0fa68d2c75abf8272b1f5c323ea4a01a4d7a614efc" },
+ { file = "frozenlist-1.4.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:5833593c25ac59ede40ed4de6d67eb42928cca97f26feea219f21d0ed0959b79" },
+ { file = "frozenlist-1.4.0-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:fec520865f42e5c7f050c2a79038897b1c7d1595e907a9e08e3353293ffc948e" },
+ { file = "frozenlist-1.4.0-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:b826d97e4276750beca7c8f0f1a4938892697a6bcd8ec8217b3312dad6982781" },
+ { file = "frozenlist-1.4.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:ceb6ec0a10c65540421e20ebd29083c50e6d1143278746a4ef6bcf6153171eb8" },
+ { file = "frozenlist-1.4.0-cp38-cp38-win32.whl", hash = "sha256:2b8bcf994563466db019fab287ff390fffbfdb4f905fc77bc1c1d604b1c689cc" },
+ { file = "frozenlist-1.4.0-cp38-cp38-win_amd64.whl", hash = "sha256:a6c8097e01886188e5be3e6b14e94ab365f384736aa1fca6a0b9e35bd4a30bc7" },
+ { file = "frozenlist-1.4.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:6c38721585f285203e4b4132a352eb3daa19121a035f3182e08e437cface44bf" },
+ { file = "frozenlist-1.4.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:a0c6da9aee33ff0b1a451e867da0c1f47408112b3391dd43133838339e410963" },
+ { file = "frozenlist-1.4.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:93ea75c050c5bb3d98016b4ba2497851eadf0ac154d88a67d7a6816206f6fa7f" },
+ { file = "frozenlist-1.4.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f61e2dc5ad442c52b4887f1fdc112f97caeff4d9e6ebe78879364ac59f1663e1" },
+ { file = "frozenlist-1.4.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:aa384489fefeb62321b238e64c07ef48398fe80f9e1e6afeff22e140e0850eef" },
+ { file = "frozenlist-1.4.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:10ff5faaa22786315ef57097a279b833ecab1a0bfb07d604c9cbb1c4cdc2ed87" },
+ { file = "frozenlist-1.4.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:007df07a6e3eb3e33e9a1fe6a9db7af152bbd8a185f9aaa6ece10a3529e3e1c6" },
+ { file = "frozenlist-1.4.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7f4f399d28478d1f604c2ff9119907af9726aed73680e5ed1ca634d377abb087" },
+ { file = "frozenlist-1.4.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:c5374b80521d3d3f2ec5572e05adc94601985cc526fb276d0c8574a6d749f1b3" },
+ { file = "frozenlist-1.4.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:ce31ae3e19f3c902de379cf1323d90c649425b86de7bbdf82871b8a2a0615f3d" },
+ { file = "frozenlist-1.4.0-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:7211ef110a9194b6042449431e08c4d80c0481e5891e58d429df5899690511c2" },
+ { file = "frozenlist-1.4.0-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:556de4430ce324c836789fa4560ca62d1591d2538b8ceb0b4f68fb7b2384a27a" },
+ { file = "frozenlist-1.4.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:7645a8e814a3ee34a89c4a372011dcd817964ce8cb273c8ed6119d706e9613e3" },
+ { file = "frozenlist-1.4.0-cp39-cp39-win32.whl", hash = "sha256:19488c57c12d4e8095a922f328df3f179c820c212940a498623ed39160bc3c2f" },
+ { file = "frozenlist-1.4.0-cp39-cp39-win_amd64.whl", hash = "sha256:6221d84d463fb110bdd7619b69cb43878a11d51cbb9394ae3105d082d5199167" },
+ { file = "frozenlist-1.4.0.tar.gz", hash = "sha256:09163bdf0b2907454042edb19f887c6d33806adc71fbd54afc14908bfdc22251" },
]
[[package]]
@@ -385,8 +385,8 @@ description = "Internationalized Domain Names in Applications (IDNA)"
optional = false
python-versions = ">=3.5"
files = [
- {file = "idna-3.4-py3-none-any.whl", hash = "sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2"},
- {file = "idna-3.4.tar.gz", hash = "sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4"},
+ { file = "idna-3.4-py3-none-any.whl", hash = "sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2" },
+ { file = "idna-3.4.tar.gz", hash = "sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4" },
]
[[package]]
@@ -396,7 +396,7 @@ description = "Send JSON-RPC requests"
optional = false
python-versions = ">=3.6"
files = [
- {file = "jsonrpcclient-4.0.3-py3-none-any.whl", hash = "sha256:3cbb9e27e1be29821becf135ea183144a836215422727e1ffe5056a49a670f0d"},
+ { file = "jsonrpcclient-4.0.3-py3-none-any.whl", hash = "sha256:3cbb9e27e1be29821becf135ea183144a836215422727e1ffe5056a49a670f0d" },
]
[package.extras]
@@ -409,80 +409,80 @@ description = "multidict implementation"
optional = false
python-versions = ">=3.7"
files = [
- {file = "multidict-6.0.4-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:0b1a97283e0c85772d613878028fec909f003993e1007eafa715b24b377cb9b8"},
- {file = "multidict-6.0.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:eeb6dcc05e911516ae3d1f207d4b0520d07f54484c49dfc294d6e7d63b734171"},
- {file = "multidict-6.0.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:d6d635d5209b82a3492508cf5b365f3446afb65ae7ebd755e70e18f287b0adf7"},
- {file = "multidict-6.0.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c048099e4c9e9d615545e2001d3d8a4380bd403e1a0578734e0d31703d1b0c0b"},
- {file = "multidict-6.0.4-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ea20853c6dbbb53ed34cb4d080382169b6f4554d394015f1bef35e881bf83547"},
- {file = "multidict-6.0.4-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:16d232d4e5396c2efbbf4f6d4df89bfa905eb0d4dc5b3549d872ab898451f569"},
- {file = "multidict-6.0.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:36c63aaa167f6c6b04ef2c85704e93af16c11d20de1d133e39de6a0e84582a93"},
- {file = "multidict-6.0.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:64bdf1086b6043bf519869678f5f2757f473dee970d7abf6da91ec00acb9cb98"},
- {file = "multidict-6.0.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:43644e38f42e3af682690876cff722d301ac585c5b9e1eacc013b7a3f7b696a0"},
- {file = "multidict-6.0.4-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:7582a1d1030e15422262de9f58711774e02fa80df0d1578995c76214f6954988"},
- {file = "multidict-6.0.4-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:ddff9c4e225a63a5afab9dd15590432c22e8057e1a9a13d28ed128ecf047bbdc"},
- {file = "multidict-6.0.4-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:ee2a1ece51b9b9e7752e742cfb661d2a29e7bcdba2d27e66e28a99f1890e4fa0"},
- {file = "multidict-6.0.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:a2e4369eb3d47d2034032a26c7a80fcb21a2cb22e1173d761a162f11e562caa5"},
- {file = "multidict-6.0.4-cp310-cp310-win32.whl", hash = "sha256:574b7eae1ab267e5f8285f0fe881f17efe4b98c39a40858247720935b893bba8"},
- {file = "multidict-6.0.4-cp310-cp310-win_amd64.whl", hash = "sha256:4dcbb0906e38440fa3e325df2359ac6cb043df8e58c965bb45f4e406ecb162cc"},
- {file = "multidict-6.0.4-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:0dfad7a5a1e39c53ed00d2dd0c2e36aed4650936dc18fd9a1826a5ae1cad6f03"},
- {file = "multidict-6.0.4-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:64da238a09d6039e3bd39bb3aee9c21a5e34f28bfa5aa22518581f910ff94af3"},
- {file = "multidict-6.0.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:ff959bee35038c4624250473988b24f846cbeb2c6639de3602c073f10410ceba"},
- {file = "multidict-6.0.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:01a3a55bd90018c9c080fbb0b9f4891db37d148a0a18722b42f94694f8b6d4c9"},
- {file = "multidict-6.0.4-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c5cb09abb18c1ea940fb99360ea0396f34d46566f157122c92dfa069d3e0e982"},
- {file = "multidict-6.0.4-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:666daae833559deb2d609afa4490b85830ab0dfca811a98b70a205621a6109fe"},
- {file = "multidict-6.0.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:11bdf3f5e1518b24530b8241529d2050014c884cf18b6fc69c0c2b30ca248710"},
- {file = "multidict-6.0.4-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7d18748f2d30f94f498e852c67d61261c643b349b9d2a581131725595c45ec6c"},
- {file = "multidict-6.0.4-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:458f37be2d9e4c95e2d8866a851663cbc76e865b78395090786f6cd9b3bbf4f4"},
- {file = "multidict-6.0.4-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:b1a2eeedcead3a41694130495593a559a668f382eee0727352b9a41e1c45759a"},
- {file = "multidict-6.0.4-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:7d6ae9d593ef8641544d6263c7fa6408cc90370c8cb2bbb65f8d43e5b0351d9c"},
- {file = "multidict-6.0.4-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:5979b5632c3e3534e42ca6ff856bb24b2e3071b37861c2c727ce220d80eee9ed"},
- {file = "multidict-6.0.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:dcfe792765fab89c365123c81046ad4103fcabbc4f56d1c1997e6715e8015461"},
- {file = "multidict-6.0.4-cp311-cp311-win32.whl", hash = "sha256:3601a3cece3819534b11d4efc1eb76047488fddd0c85a3948099d5da4d504636"},
- {file = "multidict-6.0.4-cp311-cp311-win_amd64.whl", hash = "sha256:81a4f0b34bd92df3da93315c6a59034df95866014ac08535fc819f043bfd51f0"},
- {file = "multidict-6.0.4-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:67040058f37a2a51ed8ea8f6b0e6ee5bd78ca67f169ce6122f3e2ec80dfe9b78"},
- {file = "multidict-6.0.4-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:853888594621e6604c978ce2a0444a1e6e70c8d253ab65ba11657659dcc9100f"},
- {file = "multidict-6.0.4-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:39ff62e7d0f26c248b15e364517a72932a611a9b75f35b45be078d81bdb86603"},
- {file = "multidict-6.0.4-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:af048912e045a2dc732847d33821a9d84ba553f5c5f028adbd364dd4765092ac"},
- {file = "multidict-6.0.4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b1e8b901e607795ec06c9e42530788c45ac21ef3aaa11dbd0c69de543bfb79a9"},
- {file = "multidict-6.0.4-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:62501642008a8b9871ddfccbf83e4222cf8ac0d5aeedf73da36153ef2ec222d2"},
- {file = "multidict-6.0.4-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:99b76c052e9f1bc0721f7541e5e8c05db3941eb9ebe7b8553c625ef88d6eefde"},
- {file = "multidict-6.0.4-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:509eac6cf09c794aa27bcacfd4d62c885cce62bef7b2c3e8b2e49d365b5003fe"},
- {file = "multidict-6.0.4-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:21a12c4eb6ddc9952c415f24eef97e3e55ba3af61f67c7bc388dcdec1404a067"},
- {file = "multidict-6.0.4-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:5cad9430ab3e2e4fa4a2ef4450f548768400a2ac635841bc2a56a2052cdbeb87"},
- {file = "multidict-6.0.4-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:ab55edc2e84460694295f401215f4a58597f8f7c9466faec545093045476327d"},
- {file = "multidict-6.0.4-cp37-cp37m-win32.whl", hash = "sha256:5a4dcf02b908c3b8b17a45fb0f15b695bf117a67b76b7ad18b73cf8e92608775"},
- {file = "multidict-6.0.4-cp37-cp37m-win_amd64.whl", hash = "sha256:6ed5f161328b7df384d71b07317f4d8656434e34591f20552c7bcef27b0ab88e"},
- {file = "multidict-6.0.4-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:5fc1b16f586f049820c5c5b17bb4ee7583092fa0d1c4e28b5239181ff9532e0c"},
- {file = "multidict-6.0.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1502e24330eb681bdaa3eb70d6358e818e8e8f908a22a1851dfd4e15bc2f8161"},
- {file = "multidict-6.0.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:b692f419760c0e65d060959df05f2a531945af31fda0c8a3b3195d4efd06de11"},
- {file = "multidict-6.0.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:45e1ecb0379bfaab5eef059f50115b54571acfbe422a14f668fc8c27ba410e7e"},
- {file = "multidict-6.0.4-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ddd3915998d93fbcd2566ddf9cf62cdb35c9e093075f862935573d265cf8f65d"},
- {file = "multidict-6.0.4-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:59d43b61c59d82f2effb39a93c48b845efe23a3852d201ed2d24ba830d0b4cf2"},
- {file = "multidict-6.0.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cc8e1d0c705233c5dd0c5e6460fbad7827d5d36f310a0fadfd45cc3029762258"},
- {file = "multidict-6.0.4-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d6aa0418fcc838522256761b3415822626f866758ee0bc6632c9486b179d0b52"},
- {file = "multidict-6.0.4-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:6748717bb10339c4760c1e63da040f5f29f5ed6e59d76daee30305894069a660"},
- {file = "multidict-6.0.4-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:4d1a3d7ef5e96b1c9e92f973e43aa5e5b96c659c9bc3124acbbd81b0b9c8a951"},
- {file = "multidict-6.0.4-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:4372381634485bec7e46718edc71528024fcdc6f835baefe517b34a33c731d60"},
- {file = "multidict-6.0.4-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:fc35cb4676846ef752816d5be2193a1e8367b4c1397b74a565a9d0389c433a1d"},
- {file = "multidict-6.0.4-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:4b9d9e4e2b37daddb5c23ea33a3417901fa7c7b3dee2d855f63ee67a0b21e5b1"},
- {file = "multidict-6.0.4-cp38-cp38-win32.whl", hash = "sha256:e41b7e2b59679edfa309e8db64fdf22399eec4b0b24694e1b2104fb789207779"},
- {file = "multidict-6.0.4-cp38-cp38-win_amd64.whl", hash = "sha256:d6c254ba6e45d8e72739281ebc46ea5eb5f101234f3ce171f0e9f5cc86991480"},
- {file = "multidict-6.0.4-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:16ab77bbeb596e14212e7bab8429f24c1579234a3a462105cda4a66904998664"},
- {file = "multidict-6.0.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:bc779e9e6f7fda81b3f9aa58e3a6091d49ad528b11ed19f6621408806204ad35"},
- {file = "multidict-6.0.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4ceef517eca3e03c1cceb22030a3e39cb399ac86bff4e426d4fc6ae49052cc60"},
- {file = "multidict-6.0.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:281af09f488903fde97923c7744bb001a9b23b039a909460d0f14edc7bf59706"},
- {file = "multidict-6.0.4-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:52f2dffc8acaba9a2f27174c41c9e57f60b907bb9f096b36b1a1f3be71c6284d"},
- {file = "multidict-6.0.4-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b41156839806aecb3641f3208c0dafd3ac7775b9c4c422d82ee2a45c34ba81ca"},
- {file = "multidict-6.0.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d5e3fc56f88cc98ef8139255cf8cd63eb2c586531e43310ff859d6bb3a6b51f1"},
- {file = "multidict-6.0.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8316a77808c501004802f9beebde51c9f857054a0c871bd6da8280e718444449"},
- {file = "multidict-6.0.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:f70b98cd94886b49d91170ef23ec5c0e8ebb6f242d734ed7ed677b24d50c82cf"},
- {file = "multidict-6.0.4-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:bf6774e60d67a9efe02b3616fee22441d86fab4c6d335f9d2051d19d90a40063"},
- {file = "multidict-6.0.4-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:e69924bfcdda39b722ef4d9aa762b2dd38e4632b3641b1d9a57ca9cd18f2f83a"},
- {file = "multidict-6.0.4-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:6b181d8c23da913d4ff585afd1155a0e1194c0b50c54fcfe286f70cdaf2b7176"},
- {file = "multidict-6.0.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:52509b5be062d9eafc8170e53026fbc54cf3b32759a23d07fd935fb04fc22d95"},
- {file = "multidict-6.0.4-cp39-cp39-win32.whl", hash = "sha256:27c523fbfbdfd19c6867af7346332b62b586eed663887392cff78d614f9ec313"},
- {file = "multidict-6.0.4-cp39-cp39-win_amd64.whl", hash = "sha256:33029f5734336aa0d4c0384525da0387ef89148dc7191aae00ca5fb23d7aafc2"},
- {file = "multidict-6.0.4.tar.gz", hash = "sha256:3666906492efb76453c0e7b97f2cf459b0682e7402c0489a95484965dbc1da49"},
+ { file = "multidict-6.0.4-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:0b1a97283e0c85772d613878028fec909f003993e1007eafa715b24b377cb9b8" },
+ { file = "multidict-6.0.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:eeb6dcc05e911516ae3d1f207d4b0520d07f54484c49dfc294d6e7d63b734171" },
+ { file = "multidict-6.0.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:d6d635d5209b82a3492508cf5b365f3446afb65ae7ebd755e70e18f287b0adf7" },
+ { file = "multidict-6.0.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c048099e4c9e9d615545e2001d3d8a4380bd403e1a0578734e0d31703d1b0c0b" },
+ { file = "multidict-6.0.4-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ea20853c6dbbb53ed34cb4d080382169b6f4554d394015f1bef35e881bf83547" },
+ { file = "multidict-6.0.4-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:16d232d4e5396c2efbbf4f6d4df89bfa905eb0d4dc5b3549d872ab898451f569" },
+ { file = "multidict-6.0.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:36c63aaa167f6c6b04ef2c85704e93af16c11d20de1d133e39de6a0e84582a93" },
+ { file = "multidict-6.0.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:64bdf1086b6043bf519869678f5f2757f473dee970d7abf6da91ec00acb9cb98" },
+ { file = "multidict-6.0.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:43644e38f42e3af682690876cff722d301ac585c5b9e1eacc013b7a3f7b696a0" },
+ { file = "multidict-6.0.4-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:7582a1d1030e15422262de9f58711774e02fa80df0d1578995c76214f6954988" },
+ { file = "multidict-6.0.4-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:ddff9c4e225a63a5afab9dd15590432c22e8057e1a9a13d28ed128ecf047bbdc" },
+ { file = "multidict-6.0.4-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:ee2a1ece51b9b9e7752e742cfb661d2a29e7bcdba2d27e66e28a99f1890e4fa0" },
+ { file = "multidict-6.0.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:a2e4369eb3d47d2034032a26c7a80fcb21a2cb22e1173d761a162f11e562caa5" },
+ { file = "multidict-6.0.4-cp310-cp310-win32.whl", hash = "sha256:574b7eae1ab267e5f8285f0fe881f17efe4b98c39a40858247720935b893bba8" },
+ { file = "multidict-6.0.4-cp310-cp310-win_amd64.whl", hash = "sha256:4dcbb0906e38440fa3e325df2359ac6cb043df8e58c965bb45f4e406ecb162cc" },
+ { file = "multidict-6.0.4-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:0dfad7a5a1e39c53ed00d2dd0c2e36aed4650936dc18fd9a1826a5ae1cad6f03" },
+ { file = "multidict-6.0.4-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:64da238a09d6039e3bd39bb3aee9c21a5e34f28bfa5aa22518581f910ff94af3" },
+ { file = "multidict-6.0.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:ff959bee35038c4624250473988b24f846cbeb2c6639de3602c073f10410ceba" },
+ { file = "multidict-6.0.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:01a3a55bd90018c9c080fbb0b9f4891db37d148a0a18722b42f94694f8b6d4c9" },
+ { file = "multidict-6.0.4-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c5cb09abb18c1ea940fb99360ea0396f34d46566f157122c92dfa069d3e0e982" },
+ { file = "multidict-6.0.4-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:666daae833559deb2d609afa4490b85830ab0dfca811a98b70a205621a6109fe" },
+ { file = "multidict-6.0.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:11bdf3f5e1518b24530b8241529d2050014c884cf18b6fc69c0c2b30ca248710" },
+ { file = "multidict-6.0.4-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7d18748f2d30f94f498e852c67d61261c643b349b9d2a581131725595c45ec6c" },
+ { file = "multidict-6.0.4-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:458f37be2d9e4c95e2d8866a851663cbc76e865b78395090786f6cd9b3bbf4f4" },
+ { file = "multidict-6.0.4-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:b1a2eeedcead3a41694130495593a559a668f382eee0727352b9a41e1c45759a" },
+ { file = "multidict-6.0.4-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:7d6ae9d593ef8641544d6263c7fa6408cc90370c8cb2bbb65f8d43e5b0351d9c" },
+ { file = "multidict-6.0.4-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:5979b5632c3e3534e42ca6ff856bb24b2e3071b37861c2c727ce220d80eee9ed" },
+ { file = "multidict-6.0.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:dcfe792765fab89c365123c81046ad4103fcabbc4f56d1c1997e6715e8015461" },
+ { file = "multidict-6.0.4-cp311-cp311-win32.whl", hash = "sha256:3601a3cece3819534b11d4efc1eb76047488fddd0c85a3948099d5da4d504636" },
+ { file = "multidict-6.0.4-cp311-cp311-win_amd64.whl", hash = "sha256:81a4f0b34bd92df3da93315c6a59034df95866014ac08535fc819f043bfd51f0" },
+ { file = "multidict-6.0.4-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:67040058f37a2a51ed8ea8f6b0e6ee5bd78ca67f169ce6122f3e2ec80dfe9b78" },
+ { file = "multidict-6.0.4-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:853888594621e6604c978ce2a0444a1e6e70c8d253ab65ba11657659dcc9100f" },
+ { file = "multidict-6.0.4-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:39ff62e7d0f26c248b15e364517a72932a611a9b75f35b45be078d81bdb86603" },
+ { file = "multidict-6.0.4-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:af048912e045a2dc732847d33821a9d84ba553f5c5f028adbd364dd4765092ac" },
+ { file = "multidict-6.0.4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b1e8b901e607795ec06c9e42530788c45ac21ef3aaa11dbd0c69de543bfb79a9" },
+ { file = "multidict-6.0.4-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:62501642008a8b9871ddfccbf83e4222cf8ac0d5aeedf73da36153ef2ec222d2" },
+ { file = "multidict-6.0.4-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:99b76c052e9f1bc0721f7541e5e8c05db3941eb9ebe7b8553c625ef88d6eefde" },
+ { file = "multidict-6.0.4-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:509eac6cf09c794aa27bcacfd4d62c885cce62bef7b2c3e8b2e49d365b5003fe" },
+ { file = "multidict-6.0.4-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:21a12c4eb6ddc9952c415f24eef97e3e55ba3af61f67c7bc388dcdec1404a067" },
+ { file = "multidict-6.0.4-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:5cad9430ab3e2e4fa4a2ef4450f548768400a2ac635841bc2a56a2052cdbeb87" },
+ { file = "multidict-6.0.4-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:ab55edc2e84460694295f401215f4a58597f8f7c9466faec545093045476327d" },
+ { file = "multidict-6.0.4-cp37-cp37m-win32.whl", hash = "sha256:5a4dcf02b908c3b8b17a45fb0f15b695bf117a67b76b7ad18b73cf8e92608775" },
+ { file = "multidict-6.0.4-cp37-cp37m-win_amd64.whl", hash = "sha256:6ed5f161328b7df384d71b07317f4d8656434e34591f20552c7bcef27b0ab88e" },
+ { file = "multidict-6.0.4-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:5fc1b16f586f049820c5c5b17bb4ee7583092fa0d1c4e28b5239181ff9532e0c" },
+ { file = "multidict-6.0.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1502e24330eb681bdaa3eb70d6358e818e8e8f908a22a1851dfd4e15bc2f8161" },
+ { file = "multidict-6.0.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:b692f419760c0e65d060959df05f2a531945af31fda0c8a3b3195d4efd06de11" },
+ { file = "multidict-6.0.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:45e1ecb0379bfaab5eef059f50115b54571acfbe422a14f668fc8c27ba410e7e" },
+ { file = "multidict-6.0.4-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ddd3915998d93fbcd2566ddf9cf62cdb35c9e093075f862935573d265cf8f65d" },
+ { file = "multidict-6.0.4-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:59d43b61c59d82f2effb39a93c48b845efe23a3852d201ed2d24ba830d0b4cf2" },
+ { file = "multidict-6.0.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cc8e1d0c705233c5dd0c5e6460fbad7827d5d36f310a0fadfd45cc3029762258" },
+ { file = "multidict-6.0.4-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d6aa0418fcc838522256761b3415822626f866758ee0bc6632c9486b179d0b52" },
+ { file = "multidict-6.0.4-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:6748717bb10339c4760c1e63da040f5f29f5ed6e59d76daee30305894069a660" },
+ { file = "multidict-6.0.4-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:4d1a3d7ef5e96b1c9e92f973e43aa5e5b96c659c9bc3124acbbd81b0b9c8a951" },
+ { file = "multidict-6.0.4-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:4372381634485bec7e46718edc71528024fcdc6f835baefe517b34a33c731d60" },
+ { file = "multidict-6.0.4-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:fc35cb4676846ef752816d5be2193a1e8367b4c1397b74a565a9d0389c433a1d" },
+ { file = "multidict-6.0.4-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:4b9d9e4e2b37daddb5c23ea33a3417901fa7c7b3dee2d855f63ee67a0b21e5b1" },
+ { file = "multidict-6.0.4-cp38-cp38-win32.whl", hash = "sha256:e41b7e2b59679edfa309e8db64fdf22399eec4b0b24694e1b2104fb789207779" },
+ { file = "multidict-6.0.4-cp38-cp38-win_amd64.whl", hash = "sha256:d6c254ba6e45d8e72739281ebc46ea5eb5f101234f3ce171f0e9f5cc86991480" },
+ { file = "multidict-6.0.4-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:16ab77bbeb596e14212e7bab8429f24c1579234a3a462105cda4a66904998664" },
+ { file = "multidict-6.0.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:bc779e9e6f7fda81b3f9aa58e3a6091d49ad528b11ed19f6621408806204ad35" },
+ { file = "multidict-6.0.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4ceef517eca3e03c1cceb22030a3e39cb399ac86bff4e426d4fc6ae49052cc60" },
+ { file = "multidict-6.0.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:281af09f488903fde97923c7744bb001a9b23b039a909460d0f14edc7bf59706" },
+ { file = "multidict-6.0.4-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:52f2dffc8acaba9a2f27174c41c9e57f60b907bb9f096b36b1a1f3be71c6284d" },
+ { file = "multidict-6.0.4-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b41156839806aecb3641f3208c0dafd3ac7775b9c4c422d82ee2a45c34ba81ca" },
+ { file = "multidict-6.0.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d5e3fc56f88cc98ef8139255cf8cd63eb2c586531e43310ff859d6bb3a6b51f1" },
+ { file = "multidict-6.0.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8316a77808c501004802f9beebde51c9f857054a0c871bd6da8280e718444449" },
+ { file = "multidict-6.0.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:f70b98cd94886b49d91170ef23ec5c0e8ebb6f242d734ed7ed677b24d50c82cf" },
+ { file = "multidict-6.0.4-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:bf6774e60d67a9efe02b3616fee22441d86fab4c6d335f9d2051d19d90a40063" },
+ { file = "multidict-6.0.4-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:e69924bfcdda39b722ef4d9aa762b2dd38e4632b3641b1d9a57ca9cd18f2f83a" },
+ { file = "multidict-6.0.4-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:6b181d8c23da913d4ff585afd1155a0e1194c0b50c54fcfe286f70cdaf2b7176" },
+ { file = "multidict-6.0.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:52509b5be062d9eafc8170e53026fbc54cf3b32759a23d07fd935fb04fc22d95" },
+ { file = "multidict-6.0.4-cp39-cp39-win32.whl", hash = "sha256:27c523fbfbdfd19c6867af7346332b62b586eed663887392cff78d614f9ec313" },
+ { file = "multidict-6.0.4-cp39-cp39-win_amd64.whl", hash = "sha256:33029f5734336aa0d4c0384525da0387ef89148dc7191aae00ca5fb23d7aafc2" },
+ { file = "multidict-6.0.4.tar.gz", hash = "sha256:3666906492efb76453c0e7b97f2cf459b0682e7402c0489a95484965dbc1da49" },
]
[[package]]
@@ -492,8 +492,8 @@ description = "Data validation using Python type hints"
optional = false
python-versions = ">=3.7"
files = [
- {file = "pydantic-2.4.2-py3-none-any.whl", hash = "sha256:bc3ddf669d234f4220e6e1c4d96b061abe0998185a8d7855c0126782b7abc8c1"},
- {file = "pydantic-2.4.2.tar.gz", hash = "sha256:94f336138093a5d7f426aac732dcfe7ab4eb4da243c88f891d65deb4a2556ee7"},
+ { file = "pydantic-2.4.2-py3-none-any.whl", hash = "sha256:bc3ddf669d234f4220e6e1c4d96b061abe0998185a8d7855c0126782b7abc8c1" },
+ { file = "pydantic-2.4.2.tar.gz", hash = "sha256:94f336138093a5d7f426aac732dcfe7ab4eb4da243c88f891d65deb4a2556ee7" },
]
[package.dependencies]
@@ -511,112 +511,112 @@ description = ""
optional = false
python-versions = ">=3.7"
files = [
- {file = "pydantic_core-2.10.1-cp310-cp310-macosx_10_7_x86_64.whl", hash = "sha256:d64728ee14e667ba27c66314b7d880b8eeb050e58ffc5fec3b7a109f8cddbd63"},
- {file = "pydantic_core-2.10.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:48525933fea744a3e7464c19bfede85df4aba79ce90c60b94d8b6e1eddd67096"},
- {file = "pydantic_core-2.10.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ef337945bbd76cce390d1b2496ccf9f90b1c1242a3a7bc242ca4a9fc5993427a"},
- {file = "pydantic_core-2.10.1-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:a1392e0638af203cee360495fd2cfdd6054711f2db5175b6e9c3c461b76f5175"},
- {file = "pydantic_core-2.10.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0675ba5d22de54d07bccde38997e780044dcfa9a71aac9fd7d4d7a1d2e3e65f7"},
- {file = "pydantic_core-2.10.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:128552af70a64660f21cb0eb4876cbdadf1a1f9d5de820fed6421fa8de07c893"},
- {file = "pydantic_core-2.10.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8f6e6aed5818c264412ac0598b581a002a9f050cb2637a84979859e70197aa9e"},
- {file = "pydantic_core-2.10.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:ecaac27da855b8d73f92123e5f03612b04c5632fd0a476e469dfc47cd37d6b2e"},
- {file = "pydantic_core-2.10.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:b3c01c2fb081fced3bbb3da78510693dc7121bb893a1f0f5f4b48013201f362e"},
- {file = "pydantic_core-2.10.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:92f675fefa977625105708492850bcbc1182bfc3e997f8eecb866d1927c98ae6"},
- {file = "pydantic_core-2.10.1-cp310-none-win32.whl", hash = "sha256:420a692b547736a8d8703c39ea935ab5d8f0d2573f8f123b0a294e49a73f214b"},
- {file = "pydantic_core-2.10.1-cp310-none-win_amd64.whl", hash = "sha256:0880e239827b4b5b3e2ce05e6b766a7414e5f5aedc4523be6b68cfbc7f61c5d0"},
- {file = "pydantic_core-2.10.1-cp311-cp311-macosx_10_7_x86_64.whl", hash = "sha256:073d4a470b195d2b2245d0343569aac7e979d3a0dcce6c7d2af6d8a920ad0bea"},
- {file = "pydantic_core-2.10.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:600d04a7b342363058b9190d4e929a8e2e715c5682a70cc37d5ded1e0dd370b4"},
- {file = "pydantic_core-2.10.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:39215d809470f4c8d1881758575b2abfb80174a9e8daf8f33b1d4379357e417c"},
- {file = "pydantic_core-2.10.1-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:eeb3d3d6b399ffe55f9a04e09e635554012f1980696d6b0aca3e6cf42a17a03b"},
- {file = "pydantic_core-2.10.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a7a7902bf75779bc12ccfc508bfb7a4c47063f748ea3de87135d433a4cca7a2f"},
- {file = "pydantic_core-2.10.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3625578b6010c65964d177626fde80cf60d7f2e297d56b925cb5cdeda6e9925a"},
- {file = "pydantic_core-2.10.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:caa48fc31fc7243e50188197b5f0c4228956f97b954f76da157aae7f67269ae8"},
- {file = "pydantic_core-2.10.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:07ec6d7d929ae9c68f716195ce15e745b3e8fa122fc67698ac6498d802ed0fa4"},
- {file = "pydantic_core-2.10.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:e6f31a17acede6a8cd1ae2d123ce04d8cca74056c9d456075f4f6f85de055607"},
- {file = "pydantic_core-2.10.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:d8f1ebca515a03e5654f88411420fea6380fc841d1bea08effb28184e3d4899f"},
- {file = "pydantic_core-2.10.1-cp311-none-win32.whl", hash = "sha256:6db2eb9654a85ada248afa5a6db5ff1cf0f7b16043a6b070adc4a5be68c716d6"},
- {file = "pydantic_core-2.10.1-cp311-none-win_amd64.whl", hash = "sha256:4a5be350f922430997f240d25f8219f93b0c81e15f7b30b868b2fddfc2d05f27"},
- {file = "pydantic_core-2.10.1-cp311-none-win_arm64.whl", hash = "sha256:5fdb39f67c779b183b0c853cd6b45f7db84b84e0571b3ef1c89cdb1dfc367325"},
- {file = "pydantic_core-2.10.1-cp312-cp312-macosx_10_7_x86_64.whl", hash = "sha256:b1f22a9ab44de5f082216270552aa54259db20189e68fc12484873d926426921"},
- {file = "pydantic_core-2.10.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:8572cadbf4cfa95fb4187775b5ade2eaa93511f07947b38f4cd67cf10783b118"},
- {file = "pydantic_core-2.10.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:db9a28c063c7c00844ae42a80203eb6d2d6bbb97070cfa00194dff40e6f545ab"},
- {file = "pydantic_core-2.10.1-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:0e2a35baa428181cb2270a15864ec6286822d3576f2ed0f4cd7f0c1708472aff"},
- {file = "pydantic_core-2.10.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:05560ab976012bf40f25d5225a58bfa649bb897b87192a36c6fef1ab132540d7"},
- {file = "pydantic_core-2.10.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d6495008733c7521a89422d7a68efa0a0122c99a5861f06020ef5b1f51f9ba7c"},
- {file = "pydantic_core-2.10.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:14ac492c686defc8e6133e3a2d9eaf5261b3df26b8ae97450c1647286750b901"},
- {file = "pydantic_core-2.10.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:8282bab177a9a3081fd3d0a0175a07a1e2bfb7fcbbd949519ea0980f8a07144d"},
- {file = "pydantic_core-2.10.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:aafdb89fdeb5fe165043896817eccd6434aee124d5ee9b354f92cd574ba5e78f"},
- {file = "pydantic_core-2.10.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:f6defd966ca3b187ec6c366604e9296f585021d922e666b99c47e78738b5666c"},
- {file = "pydantic_core-2.10.1-cp312-none-win32.whl", hash = "sha256:7c4d1894fe112b0864c1fa75dffa045720a194b227bed12f4be7f6045b25209f"},
- {file = "pydantic_core-2.10.1-cp312-none-win_amd64.whl", hash = "sha256:5994985da903d0b8a08e4935c46ed8daf5be1cf217489e673910951dc533d430"},
- {file = "pydantic_core-2.10.1-cp312-none-win_arm64.whl", hash = "sha256:0d8a8adef23d86d8eceed3e32e9cca8879c7481c183f84ed1a8edc7df073af94"},
- {file = "pydantic_core-2.10.1-cp37-cp37m-macosx_10_7_x86_64.whl", hash = "sha256:9badf8d45171d92387410b04639d73811b785b5161ecadabf056ea14d62d4ede"},
- {file = "pydantic_core-2.10.1-cp37-cp37m-macosx_11_0_arm64.whl", hash = "sha256:ebedb45b9feb7258fac0a268a3f6bec0a2ea4d9558f3d6f813f02ff3a6dc6698"},
- {file = "pydantic_core-2.10.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cfe1090245c078720d250d19cb05d67e21a9cd7c257698ef139bc41cf6c27b4f"},
- {file = "pydantic_core-2.10.1-cp37-cp37m-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e357571bb0efd65fd55f18db0a2fb0ed89d0bb1d41d906b138f088933ae618bb"},
- {file = "pydantic_core-2.10.1-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b3dcd587b69bbf54fc04ca157c2323b8911033e827fffaecf0cafa5a892a0904"},
- {file = "pydantic_core-2.10.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9c120c9ce3b163b985a3b966bb701114beb1da4b0468b9b236fc754783d85aa3"},
- {file = "pydantic_core-2.10.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:15d6bca84ffc966cc9976b09a18cf9543ed4d4ecbd97e7086f9ce9327ea48891"},
- {file = "pydantic_core-2.10.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:5cabb9710f09d5d2e9e2748c3e3e20d991a4c5f96ed8f1132518f54ab2967221"},
- {file = "pydantic_core-2.10.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:82f55187a5bebae7d81d35b1e9aaea5e169d44819789837cdd4720d768c55d15"},
- {file = "pydantic_core-2.10.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:1d40f55222b233e98e3921df7811c27567f0e1a4411b93d4c5c0f4ce131bc42f"},
- {file = "pydantic_core-2.10.1-cp37-none-win32.whl", hash = "sha256:14e09ff0b8fe6e46b93d36a878f6e4a3a98ba5303c76bb8e716f4878a3bee92c"},
- {file = "pydantic_core-2.10.1-cp37-none-win_amd64.whl", hash = "sha256:1396e81b83516b9d5c9e26a924fa69164156c148c717131f54f586485ac3c15e"},
- {file = "pydantic_core-2.10.1-cp38-cp38-macosx_10_7_x86_64.whl", hash = "sha256:6835451b57c1b467b95ffb03a38bb75b52fb4dc2762bb1d9dbed8de31ea7d0fc"},
- {file = "pydantic_core-2.10.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:b00bc4619f60c853556b35f83731bd817f989cba3e97dc792bb8c97941b8053a"},
- {file = "pydantic_core-2.10.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0fa467fd300a6f046bdb248d40cd015b21b7576c168a6bb20aa22e595c8ffcdd"},
- {file = "pydantic_core-2.10.1-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d99277877daf2efe074eae6338453a4ed54a2d93fb4678ddfe1209a0c93a2468"},
- {file = "pydantic_core-2.10.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:fa7db7558607afeccb33c0e4bf1c9a9a835e26599e76af6fe2fcea45904083a6"},
- {file = "pydantic_core-2.10.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:aad7bd686363d1ce4ee930ad39f14e1673248373f4a9d74d2b9554f06199fb58"},
- {file = "pydantic_core-2.10.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:443fed67d33aa85357464f297e3d26e570267d1af6fef1c21ca50921d2976302"},
- {file = "pydantic_core-2.10.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:042462d8d6ba707fd3ce9649e7bf268633a41018d6a998fb5fbacb7e928a183e"},
- {file = "pydantic_core-2.10.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:ecdbde46235f3d560b18be0cb706c8e8ad1b965e5c13bbba7450c86064e96561"},
- {file = "pydantic_core-2.10.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:ed550ed05540c03f0e69e6d74ad58d026de61b9eaebebbaaf8873e585cbb18de"},
- {file = "pydantic_core-2.10.1-cp38-none-win32.whl", hash = "sha256:8cdbbd92154db2fec4ec973d45c565e767ddc20aa6dbaf50142676484cbff8ee"},
- {file = "pydantic_core-2.10.1-cp38-none-win_amd64.whl", hash = "sha256:9f6f3e2598604956480f6c8aa24a3384dbf6509fe995d97f6ca6103bb8c2534e"},
- {file = "pydantic_core-2.10.1-cp39-cp39-macosx_10_7_x86_64.whl", hash = "sha256:655f8f4c8d6a5963c9a0687793da37b9b681d9ad06f29438a3b2326d4e6b7970"},
- {file = "pydantic_core-2.10.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e570ffeb2170e116a5b17e83f19911020ac79d19c96f320cbfa1fa96b470185b"},
- {file = "pydantic_core-2.10.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:64322bfa13e44c6c30c518729ef08fda6026b96d5c0be724b3c4ae4da939f875"},
- {file = "pydantic_core-2.10.1-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:485a91abe3a07c3a8d1e082ba29254eea3e2bb13cbbd4351ea4e5a21912cc9b0"},
- {file = "pydantic_core-2.10.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f7c2b8eb9fc872e68b46eeaf835e86bccc3a58ba57d0eedc109cbb14177be531"},
- {file = "pydantic_core-2.10.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a5cb87bdc2e5f620693148b5f8f842d293cae46c5f15a1b1bf7ceeed324a740c"},
- {file = "pydantic_core-2.10.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:25bd966103890ccfa028841a8f30cebcf5875eeac8c4bde4fe221364c92f0c9a"},
- {file = "pydantic_core-2.10.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f323306d0556351735b54acbf82904fe30a27b6a7147153cbe6e19aaaa2aa429"},
- {file = "pydantic_core-2.10.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:0c27f38dc4fbf07b358b2bc90edf35e82d1703e22ff2efa4af4ad5de1b3833e7"},
- {file = "pydantic_core-2.10.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:f1365e032a477c1430cfe0cf2856679529a2331426f8081172c4a74186f1d595"},
- {file = "pydantic_core-2.10.1-cp39-none-win32.whl", hash = "sha256:a1c311fd06ab3b10805abb72109f01a134019739bd3286b8ae1bc2fc4e50c07a"},
- {file = "pydantic_core-2.10.1-cp39-none-win_amd64.whl", hash = "sha256:ae8a8843b11dc0b03b57b52793e391f0122e740de3df1474814c700d2622950a"},
- {file = "pydantic_core-2.10.1-pp310-pypy310_pp73-macosx_10_7_x86_64.whl", hash = "sha256:d43002441932f9a9ea5d6f9efaa2e21458221a3a4b417a14027a1d530201ef1b"},
- {file = "pydantic_core-2.10.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:fcb83175cc4936a5425dde3356f079ae03c0802bbdf8ff82c035f8a54b333521"},
- {file = "pydantic_core-2.10.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:962ed72424bf1f72334e2f1e61b68f16c0e596f024ca7ac5daf229f7c26e4208"},
- {file = "pydantic_core-2.10.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2cf5bb4dd67f20f3bbc1209ef572a259027c49e5ff694fa56bed62959b41e1f9"},
- {file = "pydantic_core-2.10.1-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:e544246b859f17373bed915182ab841b80849ed9cf23f1f07b73b7c58baee5fb"},
- {file = "pydantic_core-2.10.1-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:c0877239307b7e69d025b73774e88e86ce82f6ba6adf98f41069d5b0b78bd1bf"},
- {file = "pydantic_core-2.10.1-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:53df009d1e1ba40f696f8995683e067e3967101d4bb4ea6f667931b7d4a01357"},
- {file = "pydantic_core-2.10.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:a1254357f7e4c82e77c348dabf2d55f1d14d19d91ff025004775e70a6ef40ada"},
- {file = "pydantic_core-2.10.1-pp37-pypy37_pp73-macosx_10_7_x86_64.whl", hash = "sha256:524ff0ca3baea164d6d93a32c58ac79eca9f6cf713586fdc0adb66a8cdeab96a"},
- {file = "pydantic_core-2.10.1-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3f0ac9fb8608dbc6eaf17956bf623c9119b4db7dbb511650910a82e261e6600f"},
- {file = "pydantic_core-2.10.1-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:320f14bd4542a04ab23747ff2c8a778bde727158b606e2661349557f0770711e"},
- {file = "pydantic_core-2.10.1-pp37-pypy37_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:63974d168b6233b4ed6a0046296803cb13c56637a7b8106564ab575926572a55"},
- {file = "pydantic_core-2.10.1-pp37-pypy37_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:417243bf599ba1f1fef2bb8c543ceb918676954734e2dcb82bf162ae9d7bd514"},
- {file = "pydantic_core-2.10.1-pp37-pypy37_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:dda81e5ec82485155a19d9624cfcca9be88a405e2857354e5b089c2a982144b2"},
- {file = "pydantic_core-2.10.1-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:14cfbb00959259e15d684505263d5a21732b31248a5dd4941f73a3be233865b9"},
- {file = "pydantic_core-2.10.1-pp38-pypy38_pp73-macosx_10_7_x86_64.whl", hash = "sha256:631cb7415225954fdcc2a024119101946793e5923f6c4d73a5914d27eb3d3a05"},
- {file = "pydantic_core-2.10.1-pp38-pypy38_pp73-macosx_11_0_arm64.whl", hash = "sha256:bec7dd208a4182e99c5b6c501ce0b1f49de2802448d4056091f8e630b28e9a52"},
- {file = "pydantic_core-2.10.1-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:149b8a07712f45b332faee1a2258d8ef1fb4a36f88c0c17cb687f205c5dc6e7d"},
- {file = "pydantic_core-2.10.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4d966c47f9dd73c2d32a809d2be529112d509321c5310ebf54076812e6ecd884"},
- {file = "pydantic_core-2.10.1-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:7eb037106f5c6b3b0b864ad226b0b7ab58157124161d48e4b30c4a43fef8bc4b"},
- {file = "pydantic_core-2.10.1-pp38-pypy38_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:154ea7c52e32dce13065dbb20a4a6f0cc012b4f667ac90d648d36b12007fa9f7"},
- {file = "pydantic_core-2.10.1-pp38-pypy38_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:e562617a45b5a9da5be4abe72b971d4f00bf8555eb29bb91ec2ef2be348cd132"},
- {file = "pydantic_core-2.10.1-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:f23b55eb5464468f9e0e9a9935ce3ed2a870608d5f534025cd5536bca25b1402"},
- {file = "pydantic_core-2.10.1-pp39-pypy39_pp73-macosx_10_7_x86_64.whl", hash = "sha256:e9121b4009339b0f751955baf4543a0bfd6bc3f8188f8056b1a25a2d45099934"},
- {file = "pydantic_core-2.10.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:0523aeb76e03f753b58be33b26540880bac5aa54422e4462404c432230543f33"},
- {file = "pydantic_core-2.10.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2e0e2959ef5d5b8dc9ef21e1a305a21a36e254e6a34432d00c72a92fdc5ecda5"},
- {file = "pydantic_core-2.10.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:da01bec0a26befab4898ed83b362993c844b9a607a86add78604186297eb047e"},
- {file = "pydantic_core-2.10.1-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f2e9072d71c1f6cfc79a36d4484c82823c560e6f5599c43c1ca6b5cdbd54f881"},
- {file = "pydantic_core-2.10.1-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:f36a3489d9e28fe4b67be9992a23029c3cec0babc3bd9afb39f49844a8c721c5"},
- {file = "pydantic_core-2.10.1-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:f64f82cc3443149292b32387086d02a6c7fb39b8781563e0ca7b8d7d9cf72bd7"},
- {file = "pydantic_core-2.10.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:b4a6db486ac8e99ae696e09efc8b2b9fea67b63c8f88ba7a1a16c24a057a0776"},
- {file = "pydantic_core-2.10.1.tar.gz", hash = "sha256:0f8682dbdd2f67f8e1edddcbffcc29f60a6182b4901c367fc8c1c40d30bb0a82"},
+ { file = "pydantic_core-2.10.1-cp310-cp310-macosx_10_7_x86_64.whl", hash = "sha256:d64728ee14e667ba27c66314b7d880b8eeb050e58ffc5fec3b7a109f8cddbd63" },
+ { file = "pydantic_core-2.10.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:48525933fea744a3e7464c19bfede85df4aba79ce90c60b94d8b6e1eddd67096" },
+ { file = "pydantic_core-2.10.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ef337945bbd76cce390d1b2496ccf9f90b1c1242a3a7bc242ca4a9fc5993427a" },
+ { file = "pydantic_core-2.10.1-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:a1392e0638af203cee360495fd2cfdd6054711f2db5175b6e9c3c461b76f5175" },
+ { file = "pydantic_core-2.10.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0675ba5d22de54d07bccde38997e780044dcfa9a71aac9fd7d4d7a1d2e3e65f7" },
+ { file = "pydantic_core-2.10.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:128552af70a64660f21cb0eb4876cbdadf1a1f9d5de820fed6421fa8de07c893" },
+ { file = "pydantic_core-2.10.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8f6e6aed5818c264412ac0598b581a002a9f050cb2637a84979859e70197aa9e" },
+ { file = "pydantic_core-2.10.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:ecaac27da855b8d73f92123e5f03612b04c5632fd0a476e469dfc47cd37d6b2e" },
+ { file = "pydantic_core-2.10.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:b3c01c2fb081fced3bbb3da78510693dc7121bb893a1f0f5f4b48013201f362e" },
+ { file = "pydantic_core-2.10.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:92f675fefa977625105708492850bcbc1182bfc3e997f8eecb866d1927c98ae6" },
+ { file = "pydantic_core-2.10.1-cp310-none-win32.whl", hash = "sha256:420a692b547736a8d8703c39ea935ab5d8f0d2573f8f123b0a294e49a73f214b" },
+ { file = "pydantic_core-2.10.1-cp310-none-win_amd64.whl", hash = "sha256:0880e239827b4b5b3e2ce05e6b766a7414e5f5aedc4523be6b68cfbc7f61c5d0" },
+ { file = "pydantic_core-2.10.1-cp311-cp311-macosx_10_7_x86_64.whl", hash = "sha256:073d4a470b195d2b2245d0343569aac7e979d3a0dcce6c7d2af6d8a920ad0bea" },
+ { file = "pydantic_core-2.10.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:600d04a7b342363058b9190d4e929a8e2e715c5682a70cc37d5ded1e0dd370b4" },
+ { file = "pydantic_core-2.10.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:39215d809470f4c8d1881758575b2abfb80174a9e8daf8f33b1d4379357e417c" },
+ { file = "pydantic_core-2.10.1-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:eeb3d3d6b399ffe55f9a04e09e635554012f1980696d6b0aca3e6cf42a17a03b" },
+ { file = "pydantic_core-2.10.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a7a7902bf75779bc12ccfc508bfb7a4c47063f748ea3de87135d433a4cca7a2f" },
+ { file = "pydantic_core-2.10.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3625578b6010c65964d177626fde80cf60d7f2e297d56b925cb5cdeda6e9925a" },
+ { file = "pydantic_core-2.10.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:caa48fc31fc7243e50188197b5f0c4228956f97b954f76da157aae7f67269ae8" },
+ { file = "pydantic_core-2.10.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:07ec6d7d929ae9c68f716195ce15e745b3e8fa122fc67698ac6498d802ed0fa4" },
+ { file = "pydantic_core-2.10.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:e6f31a17acede6a8cd1ae2d123ce04d8cca74056c9d456075f4f6f85de055607" },
+ { file = "pydantic_core-2.10.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:d8f1ebca515a03e5654f88411420fea6380fc841d1bea08effb28184e3d4899f" },
+ { file = "pydantic_core-2.10.1-cp311-none-win32.whl", hash = "sha256:6db2eb9654a85ada248afa5a6db5ff1cf0f7b16043a6b070adc4a5be68c716d6" },
+ { file = "pydantic_core-2.10.1-cp311-none-win_amd64.whl", hash = "sha256:4a5be350f922430997f240d25f8219f93b0c81e15f7b30b868b2fddfc2d05f27" },
+ { file = "pydantic_core-2.10.1-cp311-none-win_arm64.whl", hash = "sha256:5fdb39f67c779b183b0c853cd6b45f7db84b84e0571b3ef1c89cdb1dfc367325" },
+ { file = "pydantic_core-2.10.1-cp312-cp312-macosx_10_7_x86_64.whl", hash = "sha256:b1f22a9ab44de5f082216270552aa54259db20189e68fc12484873d926426921" },
+ { file = "pydantic_core-2.10.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:8572cadbf4cfa95fb4187775b5ade2eaa93511f07947b38f4cd67cf10783b118" },
+ { file = "pydantic_core-2.10.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:db9a28c063c7c00844ae42a80203eb6d2d6bbb97070cfa00194dff40e6f545ab" },
+ { file = "pydantic_core-2.10.1-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:0e2a35baa428181cb2270a15864ec6286822d3576f2ed0f4cd7f0c1708472aff" },
+ { file = "pydantic_core-2.10.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:05560ab976012bf40f25d5225a58bfa649bb897b87192a36c6fef1ab132540d7" },
+ { file = "pydantic_core-2.10.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d6495008733c7521a89422d7a68efa0a0122c99a5861f06020ef5b1f51f9ba7c" },
+ { file = "pydantic_core-2.10.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:14ac492c686defc8e6133e3a2d9eaf5261b3df26b8ae97450c1647286750b901" },
+ { file = "pydantic_core-2.10.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:8282bab177a9a3081fd3d0a0175a07a1e2bfb7fcbbd949519ea0980f8a07144d" },
+ { file = "pydantic_core-2.10.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:aafdb89fdeb5fe165043896817eccd6434aee124d5ee9b354f92cd574ba5e78f" },
+ { file = "pydantic_core-2.10.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:f6defd966ca3b187ec6c366604e9296f585021d922e666b99c47e78738b5666c" },
+ { file = "pydantic_core-2.10.1-cp312-none-win32.whl", hash = "sha256:7c4d1894fe112b0864c1fa75dffa045720a194b227bed12f4be7f6045b25209f" },
+ { file = "pydantic_core-2.10.1-cp312-none-win_amd64.whl", hash = "sha256:5994985da903d0b8a08e4935c46ed8daf5be1cf217489e673910951dc533d430" },
+ { file = "pydantic_core-2.10.1-cp312-none-win_arm64.whl", hash = "sha256:0d8a8adef23d86d8eceed3e32e9cca8879c7481c183f84ed1a8edc7df073af94" },
+ { file = "pydantic_core-2.10.1-cp37-cp37m-macosx_10_7_x86_64.whl", hash = "sha256:9badf8d45171d92387410b04639d73811b785b5161ecadabf056ea14d62d4ede" },
+ { file = "pydantic_core-2.10.1-cp37-cp37m-macosx_11_0_arm64.whl", hash = "sha256:ebedb45b9feb7258fac0a268a3f6bec0a2ea4d9558f3d6f813f02ff3a6dc6698" },
+ { file = "pydantic_core-2.10.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cfe1090245c078720d250d19cb05d67e21a9cd7c257698ef139bc41cf6c27b4f" },
+ { file = "pydantic_core-2.10.1-cp37-cp37m-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e357571bb0efd65fd55f18db0a2fb0ed89d0bb1d41d906b138f088933ae618bb" },
+ { file = "pydantic_core-2.10.1-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b3dcd587b69bbf54fc04ca157c2323b8911033e827fffaecf0cafa5a892a0904" },
+ { file = "pydantic_core-2.10.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9c120c9ce3b163b985a3b966bb701114beb1da4b0468b9b236fc754783d85aa3" },
+ { file = "pydantic_core-2.10.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:15d6bca84ffc966cc9976b09a18cf9543ed4d4ecbd97e7086f9ce9327ea48891" },
+ { file = "pydantic_core-2.10.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:5cabb9710f09d5d2e9e2748c3e3e20d991a4c5f96ed8f1132518f54ab2967221" },
+ { file = "pydantic_core-2.10.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:82f55187a5bebae7d81d35b1e9aaea5e169d44819789837cdd4720d768c55d15" },
+ { file = "pydantic_core-2.10.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:1d40f55222b233e98e3921df7811c27567f0e1a4411b93d4c5c0f4ce131bc42f" },
+ { file = "pydantic_core-2.10.1-cp37-none-win32.whl", hash = "sha256:14e09ff0b8fe6e46b93d36a878f6e4a3a98ba5303c76bb8e716f4878a3bee92c" },
+ { file = "pydantic_core-2.10.1-cp37-none-win_amd64.whl", hash = "sha256:1396e81b83516b9d5c9e26a924fa69164156c148c717131f54f586485ac3c15e" },
+ { file = "pydantic_core-2.10.1-cp38-cp38-macosx_10_7_x86_64.whl", hash = "sha256:6835451b57c1b467b95ffb03a38bb75b52fb4dc2762bb1d9dbed8de31ea7d0fc" },
+ { file = "pydantic_core-2.10.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:b00bc4619f60c853556b35f83731bd817f989cba3e97dc792bb8c97941b8053a" },
+ { file = "pydantic_core-2.10.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0fa467fd300a6f046bdb248d40cd015b21b7576c168a6bb20aa22e595c8ffcdd" },
+ { file = "pydantic_core-2.10.1-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d99277877daf2efe074eae6338453a4ed54a2d93fb4678ddfe1209a0c93a2468" },
+ { file = "pydantic_core-2.10.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:fa7db7558607afeccb33c0e4bf1c9a9a835e26599e76af6fe2fcea45904083a6" },
+ { file = "pydantic_core-2.10.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:aad7bd686363d1ce4ee930ad39f14e1673248373f4a9d74d2b9554f06199fb58" },
+ { file = "pydantic_core-2.10.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:443fed67d33aa85357464f297e3d26e570267d1af6fef1c21ca50921d2976302" },
+ { file = "pydantic_core-2.10.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:042462d8d6ba707fd3ce9649e7bf268633a41018d6a998fb5fbacb7e928a183e" },
+ { file = "pydantic_core-2.10.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:ecdbde46235f3d560b18be0cb706c8e8ad1b965e5c13bbba7450c86064e96561" },
+ { file = "pydantic_core-2.10.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:ed550ed05540c03f0e69e6d74ad58d026de61b9eaebebbaaf8873e585cbb18de" },
+ { file = "pydantic_core-2.10.1-cp38-none-win32.whl", hash = "sha256:8cdbbd92154db2fec4ec973d45c565e767ddc20aa6dbaf50142676484cbff8ee" },
+ { file = "pydantic_core-2.10.1-cp38-none-win_amd64.whl", hash = "sha256:9f6f3e2598604956480f6c8aa24a3384dbf6509fe995d97f6ca6103bb8c2534e" },
+ { file = "pydantic_core-2.10.1-cp39-cp39-macosx_10_7_x86_64.whl", hash = "sha256:655f8f4c8d6a5963c9a0687793da37b9b681d9ad06f29438a3b2326d4e6b7970" },
+ { file = "pydantic_core-2.10.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e570ffeb2170e116a5b17e83f19911020ac79d19c96f320cbfa1fa96b470185b" },
+ { file = "pydantic_core-2.10.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:64322bfa13e44c6c30c518729ef08fda6026b96d5c0be724b3c4ae4da939f875" },
+ { file = "pydantic_core-2.10.1-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:485a91abe3a07c3a8d1e082ba29254eea3e2bb13cbbd4351ea4e5a21912cc9b0" },
+ { file = "pydantic_core-2.10.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f7c2b8eb9fc872e68b46eeaf835e86bccc3a58ba57d0eedc109cbb14177be531" },
+ { file = "pydantic_core-2.10.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a5cb87bdc2e5f620693148b5f8f842d293cae46c5f15a1b1bf7ceeed324a740c" },
+ { file = "pydantic_core-2.10.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:25bd966103890ccfa028841a8f30cebcf5875eeac8c4bde4fe221364c92f0c9a" },
+ { file = "pydantic_core-2.10.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f323306d0556351735b54acbf82904fe30a27b6a7147153cbe6e19aaaa2aa429" },
+ { file = "pydantic_core-2.10.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:0c27f38dc4fbf07b358b2bc90edf35e82d1703e22ff2efa4af4ad5de1b3833e7" },
+ { file = "pydantic_core-2.10.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:f1365e032a477c1430cfe0cf2856679529a2331426f8081172c4a74186f1d595" },
+ { file = "pydantic_core-2.10.1-cp39-none-win32.whl", hash = "sha256:a1c311fd06ab3b10805abb72109f01a134019739bd3286b8ae1bc2fc4e50c07a" },
+ { file = "pydantic_core-2.10.1-cp39-none-win_amd64.whl", hash = "sha256:ae8a8843b11dc0b03b57b52793e391f0122e740de3df1474814c700d2622950a" },
+ { file = "pydantic_core-2.10.1-pp310-pypy310_pp73-macosx_10_7_x86_64.whl", hash = "sha256:d43002441932f9a9ea5d6f9efaa2e21458221a3a4b417a14027a1d530201ef1b" },
+ { file = "pydantic_core-2.10.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:fcb83175cc4936a5425dde3356f079ae03c0802bbdf8ff82c035f8a54b333521" },
+ { file = "pydantic_core-2.10.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:962ed72424bf1f72334e2f1e61b68f16c0e596f024ca7ac5daf229f7c26e4208" },
+ { file = "pydantic_core-2.10.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2cf5bb4dd67f20f3bbc1209ef572a259027c49e5ff694fa56bed62959b41e1f9" },
+ { file = "pydantic_core-2.10.1-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:e544246b859f17373bed915182ab841b80849ed9cf23f1f07b73b7c58baee5fb" },
+ { file = "pydantic_core-2.10.1-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:c0877239307b7e69d025b73774e88e86ce82f6ba6adf98f41069d5b0b78bd1bf" },
+ { file = "pydantic_core-2.10.1-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:53df009d1e1ba40f696f8995683e067e3967101d4bb4ea6f667931b7d4a01357" },
+ { file = "pydantic_core-2.10.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:a1254357f7e4c82e77c348dabf2d55f1d14d19d91ff025004775e70a6ef40ada" },
+ { file = "pydantic_core-2.10.1-pp37-pypy37_pp73-macosx_10_7_x86_64.whl", hash = "sha256:524ff0ca3baea164d6d93a32c58ac79eca9f6cf713586fdc0adb66a8cdeab96a" },
+ { file = "pydantic_core-2.10.1-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3f0ac9fb8608dbc6eaf17956bf623c9119b4db7dbb511650910a82e261e6600f" },
+ { file = "pydantic_core-2.10.1-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:320f14bd4542a04ab23747ff2c8a778bde727158b606e2661349557f0770711e" },
+ { file = "pydantic_core-2.10.1-pp37-pypy37_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:63974d168b6233b4ed6a0046296803cb13c56637a7b8106564ab575926572a55" },
+ { file = "pydantic_core-2.10.1-pp37-pypy37_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:417243bf599ba1f1fef2bb8c543ceb918676954734e2dcb82bf162ae9d7bd514" },
+ { file = "pydantic_core-2.10.1-pp37-pypy37_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:dda81e5ec82485155a19d9624cfcca9be88a405e2857354e5b089c2a982144b2" },
+ { file = "pydantic_core-2.10.1-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:14cfbb00959259e15d684505263d5a21732b31248a5dd4941f73a3be233865b9" },
+ { file = "pydantic_core-2.10.1-pp38-pypy38_pp73-macosx_10_7_x86_64.whl", hash = "sha256:631cb7415225954fdcc2a024119101946793e5923f6c4d73a5914d27eb3d3a05" },
+ { file = "pydantic_core-2.10.1-pp38-pypy38_pp73-macosx_11_0_arm64.whl", hash = "sha256:bec7dd208a4182e99c5b6c501ce0b1f49de2802448d4056091f8e630b28e9a52" },
+ { file = "pydantic_core-2.10.1-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:149b8a07712f45b332faee1a2258d8ef1fb4a36f88c0c17cb687f205c5dc6e7d" },
+ { file = "pydantic_core-2.10.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4d966c47f9dd73c2d32a809d2be529112d509321c5310ebf54076812e6ecd884" },
+ { file = "pydantic_core-2.10.1-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:7eb037106f5c6b3b0b864ad226b0b7ab58157124161d48e4b30c4a43fef8bc4b" },
+ { file = "pydantic_core-2.10.1-pp38-pypy38_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:154ea7c52e32dce13065dbb20a4a6f0cc012b4f667ac90d648d36b12007fa9f7" },
+ { file = "pydantic_core-2.10.1-pp38-pypy38_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:e562617a45b5a9da5be4abe72b971d4f00bf8555eb29bb91ec2ef2be348cd132" },
+ { file = "pydantic_core-2.10.1-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:f23b55eb5464468f9e0e9a9935ce3ed2a870608d5f534025cd5536bca25b1402" },
+ { file = "pydantic_core-2.10.1-pp39-pypy39_pp73-macosx_10_7_x86_64.whl", hash = "sha256:e9121b4009339b0f751955baf4543a0bfd6bc3f8188f8056b1a25a2d45099934" },
+ { file = "pydantic_core-2.10.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:0523aeb76e03f753b58be33b26540880bac5aa54422e4462404c432230543f33" },
+ { file = "pydantic_core-2.10.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2e0e2959ef5d5b8dc9ef21e1a305a21a36e254e6a34432d00c72a92fdc5ecda5" },
+ { file = "pydantic_core-2.10.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:da01bec0a26befab4898ed83b362993c844b9a607a86add78604186297eb047e" },
+ { file = "pydantic_core-2.10.1-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f2e9072d71c1f6cfc79a36d4484c82823c560e6f5599c43c1ca6b5cdbd54f881" },
+ { file = "pydantic_core-2.10.1-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:f36a3489d9e28fe4b67be9992a23029c3cec0babc3bd9afb39f49844a8c721c5" },
+ { file = "pydantic_core-2.10.1-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:f64f82cc3443149292b32387086d02a6c7fb39b8781563e0ca7b8d7d9cf72bd7" },
+ { file = "pydantic_core-2.10.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:b4a6db486ac8e99ae696e09efc8b2b9fea67b63c8f88ba7a1a16c24a057a0776" },
+ { file = "pydantic_core-2.10.1.tar.gz", hash = "sha256:0f8682dbdd2f67f8e1edddcbffcc29f60a6182b4901c367fc8c1c40d30bb0a82" },
]
[package.dependencies]
@@ -629,8 +629,8 @@ description = "Extensions to the standard Python datetime module"
optional = false
python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7"
files = [
- {file = "python-dateutil-2.8.2.tar.gz", hash = "sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86"},
- {file = "python_dateutil-2.8.2-py2.py3-none-any.whl", hash = "sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9"},
+ { file = "python-dateutil-2.8.2.tar.gz", hash = "sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86" },
+ { file = "python_dateutil-2.8.2-py2.py3-none-any.whl", hash = "sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9" },
]
[package.dependencies]
@@ -643,8 +643,8 @@ description = "Python HTTP for Humans."
optional = false
python-versions = ">=3.7"
files = [
- {file = "requests-2.31.0-py3-none-any.whl", hash = "sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f"},
- {file = "requests-2.31.0.tar.gz", hash = "sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1"},
+ { file = "requests-2.31.0-py3-none-any.whl", hash = "sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f" },
+ { file = "requests-2.31.0.tar.gz", hash = "sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1" },
]
[package.dependencies]
@@ -664,8 +664,8 @@ description = "Python 2 and 3 compatibility utilities"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*"
files = [
- {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"},
- {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"},
+ { file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254" },
+ { file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" },
]
[[package]]
@@ -675,8 +675,8 @@ description = "Backported and Experimental Type Hints for Python 3.8+"
optional = false
python-versions = ">=3.8"
files = [
- {file = "typing_extensions-4.8.0-py3-none-any.whl", hash = "sha256:8f92fc8806f9a6b641eaa5318da32b44d401efaac0f6678c9bc448ba3605faa0"},
- {file = "typing_extensions-4.8.0.tar.gz", hash = "sha256:df8e4339e9cb77357558cbdbceca33c303714cf861d1eef15e1070055ae8b7ef"},
+ { file = "typing_extensions-4.8.0-py3-none-any.whl", hash = "sha256:8f92fc8806f9a6b641eaa5318da32b44d401efaac0f6678c9bc448ba3605faa0" },
+ { file = "typing_extensions-4.8.0.tar.gz", hash = "sha256:df8e4339e9cb77357558cbdbceca33c303714cf861d1eef15e1070055ae8b7ef" },
]
[[package]]
@@ -686,8 +686,8 @@ description = "HTTP library with thread-safe connection pooling, file post, and
optional = false
python-versions = ">=3.7"
files = [
- {file = "urllib3-2.0.7-py3-none-any.whl", hash = "sha256:fdb6d215c776278489906c2f8916e6e7d4f5a9b602ccbcfdf7f016fc8da0596e"},
- {file = "urllib3-2.0.7.tar.gz", hash = "sha256:c97dfde1f7bd43a71c8d2a58e369e9b2bf692d1334ea9f9cae55add7d0dd0f84"},
+ { file = "urllib3-2.0.7-py3-none-any.whl", hash = "sha256:fdb6d215c776278489906c2f8916e6e7d4f5a9b602ccbcfdf7f016fc8da0596e" },
+ { file = "urllib3-2.0.7.tar.gz", hash = "sha256:c97dfde1f7bd43a71c8d2a58e369e9b2bf692d1334ea9f9cae55add7d0dd0f84" },
]
[package.extras]
@@ -703,76 +703,76 @@ description = "An implementation of the WebSocket Protocol (RFC 6455 & 7692)"
optional = false
python-versions = ">=3.7"
files = [
- {file = "websockets-11.0.3-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:3ccc8a0c387629aec40f2fc9fdcb4b9d5431954f934da3eaf16cdc94f67dbfac"},
- {file = "websockets-11.0.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d67ac60a307f760c6e65dad586f556dde58e683fab03323221a4e530ead6f74d"},
- {file = "websockets-11.0.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:84d27a4832cc1a0ee07cdcf2b0629a8a72db73f4cf6de6f0904f6661227f256f"},
- {file = "websockets-11.0.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ffd7dcaf744f25f82190856bc26ed81721508fc5cbf2a330751e135ff1283564"},
- {file = "websockets-11.0.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7622a89d696fc87af8e8d280d9b421db5133ef5b29d3f7a1ce9f1a7bf7fcfa11"},
- {file = "websockets-11.0.3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bceab846bac555aff6427d060f2fcfff71042dba6f5fca7dc4f75cac815e57ca"},
- {file = "websockets-11.0.3-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:54c6e5b3d3a8936a4ab6870d46bdd6ec500ad62bde9e44462c32d18f1e9a8e54"},
- {file = "websockets-11.0.3-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:41f696ba95cd92dc047e46b41b26dd24518384749ed0d99bea0a941ca87404c4"},
- {file = "websockets-11.0.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:86d2a77fd490ae3ff6fae1c6ceaecad063d3cc2320b44377efdde79880e11526"},
- {file = "websockets-11.0.3-cp310-cp310-win32.whl", hash = "sha256:2d903ad4419f5b472de90cd2d40384573b25da71e33519a67797de17ef849b69"},
- {file = "websockets-11.0.3-cp310-cp310-win_amd64.whl", hash = "sha256:1d2256283fa4b7f4c7d7d3e84dc2ece74d341bce57d5b9bf385df109c2a1a82f"},
- {file = "websockets-11.0.3-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:e848f46a58b9fcf3d06061d17be388caf70ea5b8cc3466251963c8345e13f7eb"},
- {file = "websockets-11.0.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:aa5003845cdd21ac0dc6c9bf661c5beddd01116f6eb9eb3c8e272353d45b3288"},
- {file = "websockets-11.0.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:b58cbf0697721120866820b89f93659abc31c1e876bf20d0b3d03cef14faf84d"},
- {file = "websockets-11.0.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:660e2d9068d2bedc0912af508f30bbeb505bbbf9774d98def45f68278cea20d3"},
- {file = "websockets-11.0.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c1f0524f203e3bd35149f12157438f406eff2e4fb30f71221c8a5eceb3617b6b"},
- {file = "websockets-11.0.3-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:def07915168ac8f7853812cc593c71185a16216e9e4fa886358a17ed0fd9fcf6"},
- {file = "websockets-11.0.3-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:b30c6590146e53149f04e85a6e4fcae068df4289e31e4aee1fdf56a0dead8f97"},
- {file = "websockets-11.0.3-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:619d9f06372b3a42bc29d0cd0354c9bb9fb39c2cbc1a9c5025b4538738dbffaf"},
- {file = "websockets-11.0.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:01f5567d9cf6f502d655151645d4e8b72b453413d3819d2b6f1185abc23e82dd"},
- {file = "websockets-11.0.3-cp311-cp311-win32.whl", hash = "sha256:e1459677e5d12be8bbc7584c35b992eea142911a6236a3278b9b5ce3326f282c"},
- {file = "websockets-11.0.3-cp311-cp311-win_amd64.whl", hash = "sha256:e7837cb169eca3b3ae94cc5787c4fed99eef74c0ab9506756eea335e0d6f3ed8"},
- {file = "websockets-11.0.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:9f59a3c656fef341a99e3d63189852be7084c0e54b75734cde571182c087b152"},
- {file = "websockets-11.0.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2529338a6ff0eb0b50c7be33dc3d0e456381157a31eefc561771ee431134a97f"},
- {file = "websockets-11.0.3-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:34fd59a4ac42dff6d4681d8843217137f6bc85ed29722f2f7222bd619d15e95b"},
- {file = "websockets-11.0.3-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:332d126167ddddec94597c2365537baf9ff62dfcc9db4266f263d455f2f031cb"},
- {file = "websockets-11.0.3-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:6505c1b31274723ccaf5f515c1824a4ad2f0d191cec942666b3d0f3aa4cb4007"},
- {file = "websockets-11.0.3-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:f467ba0050b7de85016b43f5a22b46383ef004c4f672148a8abf32bc999a87f0"},
- {file = "websockets-11.0.3-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:9d9acd80072abcc98bd2c86c3c9cd4ac2347b5a5a0cae7ed5c0ee5675f86d9af"},
- {file = "websockets-11.0.3-cp37-cp37m-win32.whl", hash = "sha256:e590228200fcfc7e9109509e4d9125eace2042fd52b595dd22bbc34bb282307f"},
- {file = "websockets-11.0.3-cp37-cp37m-win_amd64.whl", hash = "sha256:b16fff62b45eccb9c7abb18e60e7e446998093cdcb50fed33134b9b6878836de"},
- {file = "websockets-11.0.3-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:fb06eea71a00a7af0ae6aefbb932fb8a7df3cb390cc217d51a9ad7343de1b8d0"},
- {file = "websockets-11.0.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:8a34e13a62a59c871064dfd8ffb150867e54291e46d4a7cf11d02c94a5275bae"},
- {file = "websockets-11.0.3-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:4841ed00f1026dfbced6fca7d963c4e7043aa832648671b5138008dc5a8f6d99"},
- {file = "websockets-11.0.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1a073fc9ab1c8aff37c99f11f1641e16da517770e31a37265d2755282a5d28aa"},
- {file = "websockets-11.0.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:68b977f21ce443d6d378dbd5ca38621755f2063d6fdb3335bda981d552cfff86"},
- {file = "websockets-11.0.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e1a99a7a71631f0efe727c10edfba09ea6bee4166a6f9c19aafb6c0b5917d09c"},
- {file = "websockets-11.0.3-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:bee9fcb41db2a23bed96c6b6ead6489702c12334ea20a297aa095ce6d31370d0"},
- {file = "websockets-11.0.3-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:4b253869ea05a5a073ebfdcb5cb3b0266a57c3764cf6fe114e4cd90f4bfa5f5e"},
- {file = "websockets-11.0.3-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:1553cb82942b2a74dd9b15a018dce645d4e68674de2ca31ff13ebc2d9f283788"},
- {file = "websockets-11.0.3-cp38-cp38-win32.whl", hash = "sha256:f61bdb1df43dc9c131791fbc2355535f9024b9a04398d3bd0684fc16ab07df74"},
- {file = "websockets-11.0.3-cp38-cp38-win_amd64.whl", hash = "sha256:03aae4edc0b1c68498f41a6772d80ac7c1e33c06c6ffa2ac1c27a07653e79d6f"},
- {file = "websockets-11.0.3-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:777354ee16f02f643a4c7f2b3eff8027a33c9861edc691a2003531f5da4f6bc8"},
- {file = "websockets-11.0.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:8c82f11964f010053e13daafdc7154ce7385ecc538989a354ccc7067fd7028fd"},
- {file = "websockets-11.0.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:3580dd9c1ad0701169e4d6fc41e878ffe05e6bdcaf3c412f9d559389d0c9e016"},
- {file = "websockets-11.0.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6f1a3f10f836fab6ca6efa97bb952300b20ae56b409414ca85bff2ad241d2a61"},
- {file = "websockets-11.0.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:df41b9bc27c2c25b486bae7cf42fccdc52ff181c8c387bfd026624a491c2671b"},
- {file = "websockets-11.0.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:279e5de4671e79a9ac877427f4ac4ce93751b8823f276b681d04b2156713b9dd"},
- {file = "websockets-11.0.3-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:1fdf26fa8a6a592f8f9235285b8affa72748dc12e964a5518c6c5e8f916716f7"},
- {file = "websockets-11.0.3-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:69269f3a0b472e91125b503d3c0b3566bda26da0a3261c49f0027eb6075086d1"},
- {file = "websockets-11.0.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:97b52894d948d2f6ea480171a27122d77af14ced35f62e5c892ca2fae9344311"},
- {file = "websockets-11.0.3-cp39-cp39-win32.whl", hash = "sha256:c7f3cb904cce8e1be667c7e6fef4516b98d1a6a0635a58a57528d577ac18a128"},
- {file = "websockets-11.0.3-cp39-cp39-win_amd64.whl", hash = "sha256:c792ea4eabc0159535608fc5658a74d1a81020eb35195dd63214dcf07556f67e"},
- {file = "websockets-11.0.3-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:f2e58f2c36cc52d41f2659e4c0cbf7353e28c8c9e63e30d8c6d3494dc9fdedcf"},
- {file = "websockets-11.0.3-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:de36fe9c02995c7e6ae6efe2e205816f5f00c22fd1fbf343d4d18c3d5ceac2f5"},
- {file = "websockets-11.0.3-pp37-pypy37_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0ac56b661e60edd453585f4bd68eb6a29ae25b5184fd5ba51e97652580458998"},
- {file = "websockets-11.0.3-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e052b8467dd07d4943936009f46ae5ce7b908ddcac3fda581656b1b19c083d9b"},
- {file = "websockets-11.0.3-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:42cc5452a54a8e46a032521d7365da775823e21bfba2895fb7b77633cce031bb"},
- {file = "websockets-11.0.3-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:e6316827e3e79b7b8e7d8e3b08f4e331af91a48e794d5d8b099928b6f0b85f20"},
- {file = "websockets-11.0.3-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8531fdcad636d82c517b26a448dcfe62f720e1922b33c81ce695d0edb91eb931"},
- {file = "websockets-11.0.3-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c114e8da9b475739dde229fd3bc6b05a6537a88a578358bc8eb29b4030fac9c9"},
- {file = "websockets-11.0.3-pp38-pypy38_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e063b1865974611313a3849d43f2c3f5368093691349cf3c7c8f8f75ad7cb280"},
- {file = "websockets-11.0.3-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:92b2065d642bf8c0a82d59e59053dd2fdde64d4ed44efe4870fa816c1232647b"},
- {file = "websockets-11.0.3-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:0ee68fe502f9031f19d495dae2c268830df2760c0524cbac5d759921ba8c8e82"},
- {file = "websockets-11.0.3-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dcacf2c7a6c3a84e720d1bb2b543c675bf6c40e460300b628bab1b1efc7c034c"},
- {file = "websockets-11.0.3-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b67c6f5e5a401fc56394f191f00f9b3811fe843ee93f4a70df3c389d1adf857d"},
- {file = "websockets-11.0.3-pp39-pypy39_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1d5023a4b6a5b183dc838808087033ec5df77580485fc533e7dab2567851b0a4"},
- {file = "websockets-11.0.3-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:ed058398f55163a79bb9f06a90ef9ccc063b204bb346c4de78efc5d15abfe602"},
- {file = "websockets-11.0.3-py3-none-any.whl", hash = "sha256:6681ba9e7f8f3b19440921e99efbb40fc89f26cd71bf539e45d8c8a25c976dc6"},
- {file = "websockets-11.0.3.tar.gz", hash = "sha256:88fc51d9a26b10fc331be344f1781224a375b78488fc343620184e95a4b27016"},
+ { file = "websockets-11.0.3-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:3ccc8a0c387629aec40f2fc9fdcb4b9d5431954f934da3eaf16cdc94f67dbfac" },
+ { file = "websockets-11.0.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d67ac60a307f760c6e65dad586f556dde58e683fab03323221a4e530ead6f74d" },
+ { file = "websockets-11.0.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:84d27a4832cc1a0ee07cdcf2b0629a8a72db73f4cf6de6f0904f6661227f256f" },
+ { file = "websockets-11.0.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ffd7dcaf744f25f82190856bc26ed81721508fc5cbf2a330751e135ff1283564" },
+ { file = "websockets-11.0.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7622a89d696fc87af8e8d280d9b421db5133ef5b29d3f7a1ce9f1a7bf7fcfa11" },
+ { file = "websockets-11.0.3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bceab846bac555aff6427d060f2fcfff71042dba6f5fca7dc4f75cac815e57ca" },
+ { file = "websockets-11.0.3-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:54c6e5b3d3a8936a4ab6870d46bdd6ec500ad62bde9e44462c32d18f1e9a8e54" },
+ { file = "websockets-11.0.3-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:41f696ba95cd92dc047e46b41b26dd24518384749ed0d99bea0a941ca87404c4" },
+ { file = "websockets-11.0.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:86d2a77fd490ae3ff6fae1c6ceaecad063d3cc2320b44377efdde79880e11526" },
+ { file = "websockets-11.0.3-cp310-cp310-win32.whl", hash = "sha256:2d903ad4419f5b472de90cd2d40384573b25da71e33519a67797de17ef849b69" },
+ { file = "websockets-11.0.3-cp310-cp310-win_amd64.whl", hash = "sha256:1d2256283fa4b7f4c7d7d3e84dc2ece74d341bce57d5b9bf385df109c2a1a82f" },
+ { file = "websockets-11.0.3-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:e848f46a58b9fcf3d06061d17be388caf70ea5b8cc3466251963c8345e13f7eb" },
+ { file = "websockets-11.0.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:aa5003845cdd21ac0dc6c9bf661c5beddd01116f6eb9eb3c8e272353d45b3288" },
+ { file = "websockets-11.0.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:b58cbf0697721120866820b89f93659abc31c1e876bf20d0b3d03cef14faf84d" },
+ { file = "websockets-11.0.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:660e2d9068d2bedc0912af508f30bbeb505bbbf9774d98def45f68278cea20d3" },
+ { file = "websockets-11.0.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c1f0524f203e3bd35149f12157438f406eff2e4fb30f71221c8a5eceb3617b6b" },
+ { file = "websockets-11.0.3-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:def07915168ac8f7853812cc593c71185a16216e9e4fa886358a17ed0fd9fcf6" },
+ { file = "websockets-11.0.3-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:b30c6590146e53149f04e85a6e4fcae068df4289e31e4aee1fdf56a0dead8f97" },
+ { file = "websockets-11.0.3-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:619d9f06372b3a42bc29d0cd0354c9bb9fb39c2cbc1a9c5025b4538738dbffaf" },
+ { file = "websockets-11.0.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:01f5567d9cf6f502d655151645d4e8b72b453413d3819d2b6f1185abc23e82dd" },
+ { file = "websockets-11.0.3-cp311-cp311-win32.whl", hash = "sha256:e1459677e5d12be8bbc7584c35b992eea142911a6236a3278b9b5ce3326f282c" },
+ { file = "websockets-11.0.3-cp311-cp311-win_amd64.whl", hash = "sha256:e7837cb169eca3b3ae94cc5787c4fed99eef74c0ab9506756eea335e0d6f3ed8" },
+ { file = "websockets-11.0.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:9f59a3c656fef341a99e3d63189852be7084c0e54b75734cde571182c087b152" },
+ { file = "websockets-11.0.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2529338a6ff0eb0b50c7be33dc3d0e456381157a31eefc561771ee431134a97f" },
+ { file = "websockets-11.0.3-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:34fd59a4ac42dff6d4681d8843217137f6bc85ed29722f2f7222bd619d15e95b" },
+ { file = "websockets-11.0.3-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:332d126167ddddec94597c2365537baf9ff62dfcc9db4266f263d455f2f031cb" },
+ { file = "websockets-11.0.3-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:6505c1b31274723ccaf5f515c1824a4ad2f0d191cec942666b3d0f3aa4cb4007" },
+ { file = "websockets-11.0.3-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:f467ba0050b7de85016b43f5a22b46383ef004c4f672148a8abf32bc999a87f0" },
+ { file = "websockets-11.0.3-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:9d9acd80072abcc98bd2c86c3c9cd4ac2347b5a5a0cae7ed5c0ee5675f86d9af" },
+ { file = "websockets-11.0.3-cp37-cp37m-win32.whl", hash = "sha256:e590228200fcfc7e9109509e4d9125eace2042fd52b595dd22bbc34bb282307f" },
+ { file = "websockets-11.0.3-cp37-cp37m-win_amd64.whl", hash = "sha256:b16fff62b45eccb9c7abb18e60e7e446998093cdcb50fed33134b9b6878836de" },
+ { file = "websockets-11.0.3-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:fb06eea71a00a7af0ae6aefbb932fb8a7df3cb390cc217d51a9ad7343de1b8d0" },
+ { file = "websockets-11.0.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:8a34e13a62a59c871064dfd8ffb150867e54291e46d4a7cf11d02c94a5275bae" },
+ { file = "websockets-11.0.3-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:4841ed00f1026dfbced6fca7d963c4e7043aa832648671b5138008dc5a8f6d99" },
+ { file = "websockets-11.0.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1a073fc9ab1c8aff37c99f11f1641e16da517770e31a37265d2755282a5d28aa" },
+ { file = "websockets-11.0.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:68b977f21ce443d6d378dbd5ca38621755f2063d6fdb3335bda981d552cfff86" },
+ { file = "websockets-11.0.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e1a99a7a71631f0efe727c10edfba09ea6bee4166a6f9c19aafb6c0b5917d09c" },
+ { file = "websockets-11.0.3-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:bee9fcb41db2a23bed96c6b6ead6489702c12334ea20a297aa095ce6d31370d0" },
+ { file = "websockets-11.0.3-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:4b253869ea05a5a073ebfdcb5cb3b0266a57c3764cf6fe114e4cd90f4bfa5f5e" },
+ { file = "websockets-11.0.3-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:1553cb82942b2a74dd9b15a018dce645d4e68674de2ca31ff13ebc2d9f283788" },
+ { file = "websockets-11.0.3-cp38-cp38-win32.whl", hash = "sha256:f61bdb1df43dc9c131791fbc2355535f9024b9a04398d3bd0684fc16ab07df74" },
+ { file = "websockets-11.0.3-cp38-cp38-win_amd64.whl", hash = "sha256:03aae4edc0b1c68498f41a6772d80ac7c1e33c06c6ffa2ac1c27a07653e79d6f" },
+ { file = "websockets-11.0.3-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:777354ee16f02f643a4c7f2b3eff8027a33c9861edc691a2003531f5da4f6bc8" },
+ { file = "websockets-11.0.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:8c82f11964f010053e13daafdc7154ce7385ecc538989a354ccc7067fd7028fd" },
+ { file = "websockets-11.0.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:3580dd9c1ad0701169e4d6fc41e878ffe05e6bdcaf3c412f9d559389d0c9e016" },
+ { file = "websockets-11.0.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6f1a3f10f836fab6ca6efa97bb952300b20ae56b409414ca85bff2ad241d2a61" },
+ { file = "websockets-11.0.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:df41b9bc27c2c25b486bae7cf42fccdc52ff181c8c387bfd026624a491c2671b" },
+ { file = "websockets-11.0.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:279e5de4671e79a9ac877427f4ac4ce93751b8823f276b681d04b2156713b9dd" },
+ { file = "websockets-11.0.3-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:1fdf26fa8a6a592f8f9235285b8affa72748dc12e964a5518c6c5e8f916716f7" },
+ { file = "websockets-11.0.3-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:69269f3a0b472e91125b503d3c0b3566bda26da0a3261c49f0027eb6075086d1" },
+ { file = "websockets-11.0.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:97b52894d948d2f6ea480171a27122d77af14ced35f62e5c892ca2fae9344311" },
+ { file = "websockets-11.0.3-cp39-cp39-win32.whl", hash = "sha256:c7f3cb904cce8e1be667c7e6fef4516b98d1a6a0635a58a57528d577ac18a128" },
+ { file = "websockets-11.0.3-cp39-cp39-win_amd64.whl", hash = "sha256:c792ea4eabc0159535608fc5658a74d1a81020eb35195dd63214dcf07556f67e" },
+ { file = "websockets-11.0.3-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:f2e58f2c36cc52d41f2659e4c0cbf7353e28c8c9e63e30d8c6d3494dc9fdedcf" },
+ { file = "websockets-11.0.3-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:de36fe9c02995c7e6ae6efe2e205816f5f00c22fd1fbf343d4d18c3d5ceac2f5" },
+ { file = "websockets-11.0.3-pp37-pypy37_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0ac56b661e60edd453585f4bd68eb6a29ae25b5184fd5ba51e97652580458998" },
+ { file = "websockets-11.0.3-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e052b8467dd07d4943936009f46ae5ce7b908ddcac3fda581656b1b19c083d9b" },
+ { file = "websockets-11.0.3-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:42cc5452a54a8e46a032521d7365da775823e21bfba2895fb7b77633cce031bb" },
+ { file = "websockets-11.0.3-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:e6316827e3e79b7b8e7d8e3b08f4e331af91a48e794d5d8b099928b6f0b85f20" },
+ { file = "websockets-11.0.3-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8531fdcad636d82c517b26a448dcfe62f720e1922b33c81ce695d0edb91eb931" },
+ { file = "websockets-11.0.3-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c114e8da9b475739dde229fd3bc6b05a6537a88a578358bc8eb29b4030fac9c9" },
+ { file = "websockets-11.0.3-pp38-pypy38_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e063b1865974611313a3849d43f2c3f5368093691349cf3c7c8f8f75ad7cb280" },
+ { file = "websockets-11.0.3-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:92b2065d642bf8c0a82d59e59053dd2fdde64d4ed44efe4870fa816c1232647b" },
+ { file = "websockets-11.0.3-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:0ee68fe502f9031f19d495dae2c268830df2760c0524cbac5d759921ba8c8e82" },
+ { file = "websockets-11.0.3-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dcacf2c7a6c3a84e720d1bb2b543c675bf6c40e460300b628bab1b1efc7c034c" },
+ { file = "websockets-11.0.3-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b67c6f5e5a401fc56394f191f00f9b3811fe843ee93f4a70df3c389d1adf857d" },
+ { file = "websockets-11.0.3-pp39-pypy39_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1d5023a4b6a5b183dc838808087033ec5df77580485fc533e7dab2567851b0a4" },
+ { file = "websockets-11.0.3-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:ed058398f55163a79bb9f06a90ef9ccc063b204bb346c4de78efc5d15abfe602" },
+ { file = "websockets-11.0.3-py3-none-any.whl", hash = "sha256:6681ba9e7f8f3b19440921e99efbb40fc89f26cd71bf539e45d8c8a25c976dc6" },
+ { file = "websockets-11.0.3.tar.gz", hash = "sha256:88fc51d9a26b10fc331be344f1781224a375b78488fc343620184e95a4b27016" },
]
[[package]]
@@ -782,80 +782,80 @@ description = "Yet another URL library"
optional = false
python-versions = ">=3.7"
files = [
- {file = "yarl-1.9.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:8c2ad583743d16ddbdf6bb14b5cd76bf43b0d0006e918809d5d4ddf7bde8dd82"},
- {file = "yarl-1.9.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:82aa6264b36c50acfb2424ad5ca537a2060ab6de158a5bd2a72a032cc75b9eb8"},
- {file = "yarl-1.9.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c0c77533b5ed4bcc38e943178ccae29b9bcf48ffd1063f5821192f23a1bd27b9"},
- {file = "yarl-1.9.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ee4afac41415d52d53a9833ebae7e32b344be72835bbb589018c9e938045a560"},
- {file = "yarl-1.9.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9bf345c3a4f5ba7f766430f97f9cc1320786f19584acc7086491f45524a551ac"},
- {file = "yarl-1.9.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2a96c19c52ff442a808c105901d0bdfd2e28575b3d5f82e2f5fd67e20dc5f4ea"},
- {file = "yarl-1.9.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:891c0e3ec5ec881541f6c5113d8df0315ce5440e244a716b95f2525b7b9f3608"},
- {file = "yarl-1.9.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c3a53ba34a636a256d767c086ceb111358876e1fb6b50dfc4d3f4951d40133d5"},
- {file = "yarl-1.9.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:566185e8ebc0898b11f8026447eacd02e46226716229cea8db37496c8cdd26e0"},
- {file = "yarl-1.9.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:2b0738fb871812722a0ac2154be1f049c6223b9f6f22eec352996b69775b36d4"},
- {file = "yarl-1.9.2-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:32f1d071b3f362c80f1a7d322bfd7b2d11e33d2adf395cc1dd4df36c9c243095"},
- {file = "yarl-1.9.2-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:e9fdc7ac0d42bc3ea78818557fab03af6181e076a2944f43c38684b4b6bed8e3"},
- {file = "yarl-1.9.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:56ff08ab5df8429901ebdc5d15941b59f6253393cb5da07b4170beefcf1b2528"},
- {file = "yarl-1.9.2-cp310-cp310-win32.whl", hash = "sha256:8ea48e0a2f931064469bdabca50c2f578b565fc446f302a79ba6cc0ee7f384d3"},
- {file = "yarl-1.9.2-cp310-cp310-win_amd64.whl", hash = "sha256:50f33040f3836e912ed16d212f6cc1efb3231a8a60526a407aeb66c1c1956dde"},
- {file = "yarl-1.9.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:646d663eb2232d7909e6601f1a9107e66f9791f290a1b3dc7057818fe44fc2b6"},
- {file = "yarl-1.9.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:aff634b15beff8902d1f918012fc2a42e0dbae6f469fce134c8a0dc51ca423bb"},
- {file = "yarl-1.9.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a83503934c6273806aed765035716216cc9ab4e0364f7f066227e1aaea90b8d0"},
- {file = "yarl-1.9.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b25322201585c69abc7b0e89e72790469f7dad90d26754717f3310bfe30331c2"},
- {file = "yarl-1.9.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:22a94666751778629f1ec4280b08eb11815783c63f52092a5953faf73be24191"},
- {file = "yarl-1.9.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8ec53a0ea2a80c5cd1ab397925f94bff59222aa3cf9c6da938ce05c9ec20428d"},
- {file = "yarl-1.9.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:159d81f22d7a43e6eabc36d7194cb53f2f15f498dbbfa8edc8a3239350f59fe7"},
- {file = "yarl-1.9.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:832b7e711027c114d79dffb92576acd1bd2decc467dec60e1cac96912602d0e6"},
- {file = "yarl-1.9.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:95d2ecefbcf4e744ea952d073c6922e72ee650ffc79028eb1e320e732898d7e8"},
- {file = "yarl-1.9.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:d4e2c6d555e77b37288eaf45b8f60f0737c9efa3452c6c44626a5455aeb250b9"},
- {file = "yarl-1.9.2-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:783185c75c12a017cc345015ea359cc801c3b29a2966c2655cd12b233bf5a2be"},
- {file = "yarl-1.9.2-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:b8cc1863402472f16c600e3e93d542b7e7542a540f95c30afd472e8e549fc3f7"},
- {file = "yarl-1.9.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:822b30a0f22e588b32d3120f6d41e4ed021806418b4c9f0bc3048b8c8cb3f92a"},
- {file = "yarl-1.9.2-cp311-cp311-win32.whl", hash = "sha256:a60347f234c2212a9f0361955007fcf4033a75bf600a33c88a0a8e91af77c0e8"},
- {file = "yarl-1.9.2-cp311-cp311-win_amd64.whl", hash = "sha256:be6b3fdec5c62f2a67cb3f8c6dbf56bbf3f61c0f046f84645cd1ca73532ea051"},
- {file = "yarl-1.9.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:38a3928ae37558bc1b559f67410df446d1fbfa87318b124bf5032c31e3447b74"},
- {file = "yarl-1.9.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ac9bb4c5ce3975aeac288cfcb5061ce60e0d14d92209e780c93954076c7c4367"},
- {file = "yarl-1.9.2-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3da8a678ca8b96c8606bbb8bfacd99a12ad5dd288bc6f7979baddd62f71c63ef"},
- {file = "yarl-1.9.2-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:13414591ff516e04fcdee8dc051c13fd3db13b673c7a4cb1350e6b2ad9639ad3"},
- {file = "yarl-1.9.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bf74d08542c3a9ea97bb8f343d4fcbd4d8f91bba5ec9d5d7f792dbe727f88938"},
- {file = "yarl-1.9.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6e7221580dc1db478464cfeef9b03b95c5852cc22894e418562997df0d074ccc"},
- {file = "yarl-1.9.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:494053246b119b041960ddcd20fd76224149cfea8ed8777b687358727911dd33"},
- {file = "yarl-1.9.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:52a25809fcbecfc63ac9ba0c0fb586f90837f5425edfd1ec9f3372b119585e45"},
- {file = "yarl-1.9.2-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:e65610c5792870d45d7b68c677681376fcf9cc1c289f23e8e8b39c1485384185"},
- {file = "yarl-1.9.2-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:1b1bba902cba32cdec51fca038fd53f8beee88b77efc373968d1ed021024cc04"},
- {file = "yarl-1.9.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:662e6016409828ee910f5d9602a2729a8a57d74b163c89a837de3fea050c7582"},
- {file = "yarl-1.9.2-cp37-cp37m-win32.whl", hash = "sha256:f364d3480bffd3aa566e886587eaca7c8c04d74f6e8933f3f2c996b7f09bee1b"},
- {file = "yarl-1.9.2-cp37-cp37m-win_amd64.whl", hash = "sha256:6a5883464143ab3ae9ba68daae8e7c5c95b969462bbe42e2464d60e7e2698368"},
- {file = "yarl-1.9.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:5610f80cf43b6202e2c33ba3ec2ee0a2884f8f423c8f4f62906731d876ef4fac"},
- {file = "yarl-1.9.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:b9a4e67ad7b646cd6f0938c7ebfd60e481b7410f574c560e455e938d2da8e0f4"},
- {file = "yarl-1.9.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:83fcc480d7549ccebe9415d96d9263e2d4226798c37ebd18c930fce43dfb9574"},
- {file = "yarl-1.9.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5fcd436ea16fee7d4207c045b1e340020e58a2597301cfbcfdbe5abd2356c2fb"},
- {file = "yarl-1.9.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:84e0b1599334b1e1478db01b756e55937d4614f8654311eb26012091be109d59"},
- {file = "yarl-1.9.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3458a24e4ea3fd8930e934c129b676c27452e4ebda80fbe47b56d8c6c7a63a9e"},
- {file = "yarl-1.9.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:838162460b3a08987546e881a2bfa573960bb559dfa739e7800ceeec92e64417"},
- {file = "yarl-1.9.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f4e2d08f07a3d7d3e12549052eb5ad3eab1c349c53ac51c209a0e5991bbada78"},
- {file = "yarl-1.9.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:de119f56f3c5f0e2fb4dee508531a32b069a5f2c6e827b272d1e0ff5ac040333"},
- {file = "yarl-1.9.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:149ddea5abf329752ea5051b61bd6c1d979e13fbf122d3a1f9f0c8be6cb6f63c"},
- {file = "yarl-1.9.2-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:674ca19cbee4a82c9f54e0d1eee28116e63bc6fd1e96c43031d11cbab8b2afd5"},
- {file = "yarl-1.9.2-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:9b3152f2f5677b997ae6c804b73da05a39daa6a9e85a512e0e6823d81cdad7cc"},
- {file = "yarl-1.9.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:5415d5a4b080dc9612b1b63cba008db84e908b95848369aa1da3686ae27b6d2b"},
- {file = "yarl-1.9.2-cp38-cp38-win32.whl", hash = "sha256:f7a3d8146575e08c29ed1cd287068e6d02f1c7bdff8970db96683b9591b86ee7"},
- {file = "yarl-1.9.2-cp38-cp38-win_amd64.whl", hash = "sha256:63c48f6cef34e6319a74c727376e95626f84ea091f92c0250a98e53e62c77c72"},
- {file = "yarl-1.9.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:75df5ef94c3fdc393c6b19d80e6ef1ecc9ae2f4263c09cacb178d871c02a5ba9"},
- {file = "yarl-1.9.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:c027a6e96ef77d401d8d5a5c8d6bc478e8042f1e448272e8d9752cb0aff8b5c8"},
- {file = "yarl-1.9.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:f3b078dbe227f79be488ffcfc7a9edb3409d018e0952cf13f15fd6512847f3f7"},
- {file = "yarl-1.9.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:59723a029760079b7d991a401386390c4be5bfec1e7dd83e25a6a0881859e716"},
- {file = "yarl-1.9.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b03917871bf859a81ccb180c9a2e6c1e04d2f6a51d953e6a5cdd70c93d4e5a2a"},
- {file = "yarl-1.9.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c1012fa63eb6c032f3ce5d2171c267992ae0c00b9e164efe4d73db818465fac3"},
- {file = "yarl-1.9.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a74dcbfe780e62f4b5a062714576f16c2f3493a0394e555ab141bf0d746bb955"},
- {file = "yarl-1.9.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8c56986609b057b4839968ba901944af91b8e92f1725d1a2d77cbac6972b9ed1"},
- {file = "yarl-1.9.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:2c315df3293cd521033533d242d15eab26583360b58f7ee5d9565f15fee1bef4"},
- {file = "yarl-1.9.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:b7232f8dfbd225d57340e441d8caf8652a6acd06b389ea2d3222b8bc89cbfca6"},
- {file = "yarl-1.9.2-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:53338749febd28935d55b41bf0bcc79d634881195a39f6b2f767870b72514caf"},
- {file = "yarl-1.9.2-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:066c163aec9d3d073dc9ffe5dd3ad05069bcb03fcaab8d221290ba99f9f69ee3"},
- {file = "yarl-1.9.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:8288d7cd28f8119b07dd49b7230d6b4562f9b61ee9a4ab02221060d21136be80"},
- {file = "yarl-1.9.2-cp39-cp39-win32.whl", hash = "sha256:b124e2a6d223b65ba8768d5706d103280914d61f5cae3afbc50fc3dfcc016623"},
- {file = "yarl-1.9.2-cp39-cp39-win_amd64.whl", hash = "sha256:61016e7d582bc46a5378ffdd02cd0314fb8ba52f40f9cf4d9a5e7dbef88dee18"},
- {file = "yarl-1.9.2.tar.gz", hash = "sha256:04ab9d4b9f587c06d801c2abfe9317b77cdf996c65a90d5e84ecc45010823571"},
+ { file = "yarl-1.9.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:8c2ad583743d16ddbdf6bb14b5cd76bf43b0d0006e918809d5d4ddf7bde8dd82" },
+ { file = "yarl-1.9.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:82aa6264b36c50acfb2424ad5ca537a2060ab6de158a5bd2a72a032cc75b9eb8" },
+ { file = "yarl-1.9.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c0c77533b5ed4bcc38e943178ccae29b9bcf48ffd1063f5821192f23a1bd27b9" },
+ { file = "yarl-1.9.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ee4afac41415d52d53a9833ebae7e32b344be72835bbb589018c9e938045a560" },
+ { file = "yarl-1.9.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9bf345c3a4f5ba7f766430f97f9cc1320786f19584acc7086491f45524a551ac" },
+ { file = "yarl-1.9.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2a96c19c52ff442a808c105901d0bdfd2e28575b3d5f82e2f5fd67e20dc5f4ea" },
+ { file = "yarl-1.9.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:891c0e3ec5ec881541f6c5113d8df0315ce5440e244a716b95f2525b7b9f3608" },
+ { file = "yarl-1.9.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c3a53ba34a636a256d767c086ceb111358876e1fb6b50dfc4d3f4951d40133d5" },
+ { file = "yarl-1.9.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:566185e8ebc0898b11f8026447eacd02e46226716229cea8db37496c8cdd26e0" },
+ { file = "yarl-1.9.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:2b0738fb871812722a0ac2154be1f049c6223b9f6f22eec352996b69775b36d4" },
+ { file = "yarl-1.9.2-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:32f1d071b3f362c80f1a7d322bfd7b2d11e33d2adf395cc1dd4df36c9c243095" },
+ { file = "yarl-1.9.2-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:e9fdc7ac0d42bc3ea78818557fab03af6181e076a2944f43c38684b4b6bed8e3" },
+ { file = "yarl-1.9.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:56ff08ab5df8429901ebdc5d15941b59f6253393cb5da07b4170beefcf1b2528" },
+ { file = "yarl-1.9.2-cp310-cp310-win32.whl", hash = "sha256:8ea48e0a2f931064469bdabca50c2f578b565fc446f302a79ba6cc0ee7f384d3" },
+ { file = "yarl-1.9.2-cp310-cp310-win_amd64.whl", hash = "sha256:50f33040f3836e912ed16d212f6cc1efb3231a8a60526a407aeb66c1c1956dde" },
+ { file = "yarl-1.9.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:646d663eb2232d7909e6601f1a9107e66f9791f290a1b3dc7057818fe44fc2b6" },
+ { file = "yarl-1.9.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:aff634b15beff8902d1f918012fc2a42e0dbae6f469fce134c8a0dc51ca423bb" },
+ { file = "yarl-1.9.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a83503934c6273806aed765035716216cc9ab4e0364f7f066227e1aaea90b8d0" },
+ { file = "yarl-1.9.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b25322201585c69abc7b0e89e72790469f7dad90d26754717f3310bfe30331c2" },
+ { file = "yarl-1.9.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:22a94666751778629f1ec4280b08eb11815783c63f52092a5953faf73be24191" },
+ { file = "yarl-1.9.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8ec53a0ea2a80c5cd1ab397925f94bff59222aa3cf9c6da938ce05c9ec20428d" },
+ { file = "yarl-1.9.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:159d81f22d7a43e6eabc36d7194cb53f2f15f498dbbfa8edc8a3239350f59fe7" },
+ { file = "yarl-1.9.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:832b7e711027c114d79dffb92576acd1bd2decc467dec60e1cac96912602d0e6" },
+ { file = "yarl-1.9.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:95d2ecefbcf4e744ea952d073c6922e72ee650ffc79028eb1e320e732898d7e8" },
+ { file = "yarl-1.9.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:d4e2c6d555e77b37288eaf45b8f60f0737c9efa3452c6c44626a5455aeb250b9" },
+ { file = "yarl-1.9.2-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:783185c75c12a017cc345015ea359cc801c3b29a2966c2655cd12b233bf5a2be" },
+ { file = "yarl-1.9.2-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:b8cc1863402472f16c600e3e93d542b7e7542a540f95c30afd472e8e549fc3f7" },
+ { file = "yarl-1.9.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:822b30a0f22e588b32d3120f6d41e4ed021806418b4c9f0bc3048b8c8cb3f92a" },
+ { file = "yarl-1.9.2-cp311-cp311-win32.whl", hash = "sha256:a60347f234c2212a9f0361955007fcf4033a75bf600a33c88a0a8e91af77c0e8" },
+ { file = "yarl-1.9.2-cp311-cp311-win_amd64.whl", hash = "sha256:be6b3fdec5c62f2a67cb3f8c6dbf56bbf3f61c0f046f84645cd1ca73532ea051" },
+ { file = "yarl-1.9.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:38a3928ae37558bc1b559f67410df446d1fbfa87318b124bf5032c31e3447b74" },
+ { file = "yarl-1.9.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ac9bb4c5ce3975aeac288cfcb5061ce60e0d14d92209e780c93954076c7c4367" },
+ { file = "yarl-1.9.2-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3da8a678ca8b96c8606bbb8bfacd99a12ad5dd288bc6f7979baddd62f71c63ef" },
+ { file = "yarl-1.9.2-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:13414591ff516e04fcdee8dc051c13fd3db13b673c7a4cb1350e6b2ad9639ad3" },
+ { file = "yarl-1.9.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bf74d08542c3a9ea97bb8f343d4fcbd4d8f91bba5ec9d5d7f792dbe727f88938" },
+ { file = "yarl-1.9.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6e7221580dc1db478464cfeef9b03b95c5852cc22894e418562997df0d074ccc" },
+ { file = "yarl-1.9.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:494053246b119b041960ddcd20fd76224149cfea8ed8777b687358727911dd33" },
+ { file = "yarl-1.9.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:52a25809fcbecfc63ac9ba0c0fb586f90837f5425edfd1ec9f3372b119585e45" },
+ { file = "yarl-1.9.2-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:e65610c5792870d45d7b68c677681376fcf9cc1c289f23e8e8b39c1485384185" },
+ { file = "yarl-1.9.2-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:1b1bba902cba32cdec51fca038fd53f8beee88b77efc373968d1ed021024cc04" },
+ { file = "yarl-1.9.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:662e6016409828ee910f5d9602a2729a8a57d74b163c89a837de3fea050c7582" },
+ { file = "yarl-1.9.2-cp37-cp37m-win32.whl", hash = "sha256:f364d3480bffd3aa566e886587eaca7c8c04d74f6e8933f3f2c996b7f09bee1b" },
+ { file = "yarl-1.9.2-cp37-cp37m-win_amd64.whl", hash = "sha256:6a5883464143ab3ae9ba68daae8e7c5c95b969462bbe42e2464d60e7e2698368" },
+ { file = "yarl-1.9.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:5610f80cf43b6202e2c33ba3ec2ee0a2884f8f423c8f4f62906731d876ef4fac" },
+ { file = "yarl-1.9.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:b9a4e67ad7b646cd6f0938c7ebfd60e481b7410f574c560e455e938d2da8e0f4" },
+ { file = "yarl-1.9.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:83fcc480d7549ccebe9415d96d9263e2d4226798c37ebd18c930fce43dfb9574" },
+ { file = "yarl-1.9.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5fcd436ea16fee7d4207c045b1e340020e58a2597301cfbcfdbe5abd2356c2fb" },
+ { file = "yarl-1.9.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:84e0b1599334b1e1478db01b756e55937d4614f8654311eb26012091be109d59" },
+ { file = "yarl-1.9.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3458a24e4ea3fd8930e934c129b676c27452e4ebda80fbe47b56d8c6c7a63a9e" },
+ { file = "yarl-1.9.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:838162460b3a08987546e881a2bfa573960bb559dfa739e7800ceeec92e64417" },
+ { file = "yarl-1.9.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f4e2d08f07a3d7d3e12549052eb5ad3eab1c349c53ac51c209a0e5991bbada78" },
+ { file = "yarl-1.9.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:de119f56f3c5f0e2fb4dee508531a32b069a5f2c6e827b272d1e0ff5ac040333" },
+ { file = "yarl-1.9.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:149ddea5abf329752ea5051b61bd6c1d979e13fbf122d3a1f9f0c8be6cb6f63c" },
+ { file = "yarl-1.9.2-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:674ca19cbee4a82c9f54e0d1eee28116e63bc6fd1e96c43031d11cbab8b2afd5" },
+ { file = "yarl-1.9.2-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:9b3152f2f5677b997ae6c804b73da05a39daa6a9e85a512e0e6823d81cdad7cc" },
+ { file = "yarl-1.9.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:5415d5a4b080dc9612b1b63cba008db84e908b95848369aa1da3686ae27b6d2b" },
+ { file = "yarl-1.9.2-cp38-cp38-win32.whl", hash = "sha256:f7a3d8146575e08c29ed1cd287068e6d02f1c7bdff8970db96683b9591b86ee7" },
+ { file = "yarl-1.9.2-cp38-cp38-win_amd64.whl", hash = "sha256:63c48f6cef34e6319a74c727376e95626f84ea091f92c0250a98e53e62c77c72" },
+ { file = "yarl-1.9.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:75df5ef94c3fdc393c6b19d80e6ef1ecc9ae2f4263c09cacb178d871c02a5ba9" },
+ { file = "yarl-1.9.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:c027a6e96ef77d401d8d5a5c8d6bc478e8042f1e448272e8d9752cb0aff8b5c8" },
+ { file = "yarl-1.9.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:f3b078dbe227f79be488ffcfc7a9edb3409d018e0952cf13f15fd6512847f3f7" },
+ { file = "yarl-1.9.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:59723a029760079b7d991a401386390c4be5bfec1e7dd83e25a6a0881859e716" },
+ { file = "yarl-1.9.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b03917871bf859a81ccb180c9a2e6c1e04d2f6a51d953e6a5cdd70c93d4e5a2a" },
+ { file = "yarl-1.9.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c1012fa63eb6c032f3ce5d2171c267992ae0c00b9e164efe4d73db818465fac3" },
+ { file = "yarl-1.9.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a74dcbfe780e62f4b5a062714576f16c2f3493a0394e555ab141bf0d746bb955" },
+ { file = "yarl-1.9.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8c56986609b057b4839968ba901944af91b8e92f1725d1a2d77cbac6972b9ed1" },
+ { file = "yarl-1.9.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:2c315df3293cd521033533d242d15eab26583360b58f7ee5d9565f15fee1bef4" },
+ { file = "yarl-1.9.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:b7232f8dfbd225d57340e441d8caf8652a6acd06b389ea2d3222b8bc89cbfca6" },
+ { file = "yarl-1.9.2-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:53338749febd28935d55b41bf0bcc79d634881195a39f6b2f767870b72514caf" },
+ { file = "yarl-1.9.2-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:066c163aec9d3d073dc9ffe5dd3ad05069bcb03fcaab8d221290ba99f9f69ee3" },
+ { file = "yarl-1.9.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:8288d7cd28f8119b07dd49b7230d6b4562f9b61ee9a4ab02221060d21136be80" },
+ { file = "yarl-1.9.2-cp39-cp39-win32.whl", hash = "sha256:b124e2a6d223b65ba8768d5706d103280914d61f5cae3afbc50fc3dfcc016623" },
+ { file = "yarl-1.9.2-cp39-cp39-win_amd64.whl", hash = "sha256:61016e7d582bc46a5378ffdd02cd0314fb8ba52f40f9cf4d9a5e7dbef88dee18" },
+ { file = "yarl-1.9.2.tar.gz", hash = "sha256:04ab9d4b9f587c06d801c2abfe9317b77cdf996c65a90d5e84ecc45010823571" },
]
[package.dependencies]
diff --git a/apps/docs/src/code/python/processes/background_processes.py b/apps/docs/src/code/python/processes/background_processes.py
index 823cbbbe7..1d78c03ff 100644
--- a/apps/docs/src/code/python/processes/background_processes.py
+++ b/apps/docs/src/code/python/processes/background_processes.py
@@ -1,40 +1,41 @@
import time
from os import getenv
-from e2b import Session
+
+from e2b import Sandbox
E2B_API_KEY = getenv("E2B_API_KEY")
def print_stdout(output):
- print(output.line)
+ print(output.line)
-def main():
- session = Session.create(id="Python3", api_key=E2B_API_KEY)
- # Start a server process in the background
- # We are not using `background_server.wait()` - that would wait for the process to finish running
- background_server = session.process.start( # $HighlightLine
- "python3 -m http.server 8000", # $HighlightLine
- on_stdout=print_stdout, # $HighlightLine
- ) # $HighlightLine
+def main():
+ sandbox = Sandbox(id="base", api_key=E2B_API_KEY)
- # Wait for the server to be accessible
- time.sleep(1)
+ # Start a server process in the background
+ # We are not using `background_server.wait()` - that would wait for the process to finish running
+ background_server = sandbox.process.start( # $HighlightLine
+ "python3 -m http.server 8000", # $HighlightLine
+ on_stdout=print_stdout, # $HighlightLine
+ ) # $HighlightLine
- # Start another process that creates request to server
- server_request = session.process.start("curl localhost:8000")
+ # Wait for the server to be accessible
+ time.sleep(1)
- # Wait for the server request to finish running
- request_output = server_request.wait()
+ # Start another process that creates request to server
+ server_request = sandbox.process.start("curl localhost:8000")
- # Stop the background process (it would otherwise run indefinitely)
- background_server.kill() # $HighlightLine
+ # Wait for the server request to finish running
+ request_output = server_request.wait()
- # Access the server output after the server process is killed
- server_output = background_server.output # $HighlightLine
+ # Stop the background process (it would otherwise run indefinitely)
+ background_server.kill() # $HighlightLine
+ # Access the server output after the server process is killed
+ server_output = background_server.output # $HighlightLine
- session.close()
+ sandbox.close()
main()
diff --git a/apps/docs/src/code/python/quickstart.py b/apps/docs/src/code/python/quickstart.py
index a53f90bbe..87a7e4b95 100644
--- a/apps/docs/src/code/python/quickstart.py
+++ b/apps/docs/src/code/python/quickstart.py
@@ -1,24 +1,24 @@
from os import getenv
-from e2b import Session
+
+from e2b import Sandbox
E2B_API_KEY = getenv("E2B_API_KEY")
# 1. Start cloud playground
def main():
- # `id` can also be one of:
- # 'Nodejs', 'Bash', 'Python3', 'Java', 'Go', 'Rust', 'PHP', 'Perl', 'DotNET'
- session = Session.create(id="Nodejs", api_key=E2B_API_KEY) # $HighlightLine
+ # `id` can be your own template id
+ sandbox = Sandbox(id="base", api_key=E2B_API_KEY) # $HighlightLine
- # 2. Use filesystem
- session.filesystem # $HighlightLine
+ # 2. Use filesystem
+ sandbox.filesystem # $HighlightLine
- # 3. Start processes
- session.process.start() # $HighlightLine
+ # 3. Start processes
+ sandbox.process.start() # $HighlightLine
- # 4. Upload/download files
- session.read_bytes() # $HighlightLine
- session.write_bytes() # $HighlightLine
+ # 4. Upload/download files
+ sandbox.read_bytes() # $HighlightLine
+ sandbox.write_bytes() # $HighlightLine
- session.close()
+ sandbox.close()
-main()
\ No newline at end of file
+main()
diff --git a/apps/docs/src/code/python/timeout/timeout_filesystem.py b/apps/docs/src/code/python/timeout/timeout_filesystem.py
index 0c7a0e3cd..85dfd28e3 100644
--- a/apps/docs/src/code/python/timeout/timeout_filesystem.py
+++ b/apps/docs/src/code/python/timeout/timeout_filesystem.py
@@ -1,16 +1,16 @@
-from e2b import Session
+from e2b import Sandbox
-session = Session.create(id="Nodejs")
+sandbox = Sandbox(id="base")
# Timeout 3s for the write operation
-session.filesystem.write("test.txt", "Hello World", timeout=3) # $HighlightLine
+sandbox.filesystem.write("test.txt", "Hello World", timeout=3) # $HighlightLine
# Timeout 3s for the list operation
-dir_content = session.filesystem.list(".", timeout=3) # $HighlightLine
+dir_content = sandbox.filesystem.list(".", timeout=3) # $HighlightLine
print(dir_content)
# Timeout 3s for the read operation
-file_content = session.filesystem.read("test.txt", timeout=3) # $HighlightLine
+file_content = sandbox.filesystem.read("test.txt", timeout=3) # $HighlightLine
print(file_content)
-session.close()
\ No newline at end of file
+sandbox.close()
diff --git a/apps/docs/src/code/python/timeout/timeout_process.py b/apps/docs/src/code/python/timeout/timeout_process.py
index 3b33702e3..657f2c1b3 100644
--- a/apps/docs/src/code/python/timeout/timeout_process.py
+++ b/apps/docs/src/code/python/timeout/timeout_process.py
@@ -1,9 +1,9 @@
-from e2b import Session
+from e2b import Sandbox
-session = Session.create(id="Nodejs")
+sandbox = Sandbox(id="base")
# Timeout 3s for the process to start
-npm_init = session.process.start("npm init -y", timeout=3) # $HighlightLine
+npm_init = sandbox.process.start("npm init -y", timeout=3) # $HighlightLine
npm_init.wait()
-session.close()
\ No newline at end of file
+sandbox.close()
diff --git a/apps/docs/src/code/python/timeout/timeout_sandbox.py b/apps/docs/src/code/python/timeout/timeout_sandbox.py
new file mode 100644
index 000000000..8d3b1a2df
--- /dev/null
+++ b/apps/docs/src/code/python/timeout/timeout_sandbox.py
@@ -0,0 +1,6 @@
+from e2b import Sandbox
+
+# Timeout 3s for the sandbox to open
+sandbox = Sandbox(id="base", timeout=3) # $HighlightLine
+
+sandbox.close()
diff --git a/apps/docs/src/code/python/timeout/timeout_session.py b/apps/docs/src/code/python/timeout/timeout_session.py
deleted file mode 100644
index 04ec80f92..000000000
--- a/apps/docs/src/code/python/timeout/timeout_session.py
+++ /dev/null
@@ -1,6 +0,0 @@
-from e2b import Session
-
-# Timeout 3s for the session to open
-session = Session.create(id="Nodejs", timeout=3) # $HighlightLine
-
-session.close()
diff --git a/apps/docs/src/components/Auth.tsx b/apps/docs/src/components/Auth.tsx
index 395ece588..ee169227e 100644
--- a/apps/docs/src/components/Auth.tsx
+++ b/apps/docs/src/components/Auth.tsx
@@ -13,15 +13,15 @@ import { useSignIn } from '@/utils/useSignIn'
import { Popover, PopoverContent, PopoverTrigger } from './ui/Popover'
function CopyableSecret({
- secret = '',
- onAfterCopy,
- obfuscateStart,
- obfuscateEnd,
-}: {
- secret: string
- onAfterCopy: () => void
- obfuscateStart?: number
- obfuscateEnd?: number
+ secret = '',
+ onAfterCopy,
+ obfuscateStart,
+ obfuscateEnd,
+ }: {
+ secret: string;
+ onAfterCopy: () => void;
+ obfuscateStart?: number;
+ obfuscateEnd?: number;
}) {
return (
<>
@@ -62,10 +62,7 @@ export const Auth = function () {
if (error)
return (
<div className="flex flex-row items-center gap-4">
- <span
- className="text-sm text-red-500"
- title={error?.message}
- >
+ <span className="text-sm text-red-500" title={error?.message}>
Something went wrong
</span>
{/* @ts-ignore */}
@@ -76,10 +73,7 @@ export const Auth = function () {
if (isLoading)
return (
<div className="flex animate-pulse">
- <div
- title="Loading..."
- className="h-2 w-40 rounded bg-slate-500"
- ></div>
+ <div title="Loading..." className="h-2 w-40 rounded bg-slate-500"></div>
</div>
)
@@ -102,7 +96,7 @@ export const Auth = function () {
onAfterCopy={() => posthog?.capture('copied API key')}
/>
</div>
- <HeaderSeparator />
+ <HeaderSeparator/>
<div className="flex items-center gap-2">
<Popover>
<PopoverTrigger
@@ -117,7 +111,7 @@ export const Auth = function () {
<div className="flex flex-col">
<span className="text-xs font-bold">API Key</span>
<span className="text-xs text-gray-200">
- Use for <strong>running</strong> the sessions.
+ Use for <strong>running</strong> the sandboxes.
</span>
<div className="group relative text-xs">
<CopyableSecret
@@ -128,30 +122,33 @@ export const Auth = function () {
/>
</div>
<span className="text-xs text-gray-400">
- TIP: Set as <code>E2B_API_KEY</code> env var to avoid passing it
- every time.
+ TIP: Set as <code>E2B_API_KEY</code> env var to avoid
+ passing it every time.
</span>
</div>
<div className="flex flex-col">
<span className="text-xs font-bold">Access Token</span>
<span className="text-xs text-gray-200">
- Use for <strong>managing</strong> the sessions
+ Use for <strong>managing</strong> the sandboxes
(creating/listing/deleting).
</span>
<span className="text-xs text-gray-200">
- Not needed when logging in via CLI via <code>e2b login</code>
+ Not needed when logging in via CLI via{' '}
+ <code>e2b login</code>
</span>
<div className="group relative text-xs">
<CopyableSecret
secret={accessToken}
- onAfterCopy={() => posthog?.capture('copied Access Token')}
+ onAfterCopy={() =>
+ posthog?.capture('copied Access Token')
+ }
obfuscateStart={12}
obfuscateEnd={5}
/>
</div>
<span className="text-xs text-gray-400">
- TIP: Set as <code>E2B_ACCESS_TOKEN</code> env var to avoid passing
- it every time.
+ TIP: Set as <code>E2B_ACCESS_TOKEN</code> env var to avoid
+ passing it every time.
</span>
</div>
</div>
@@ -163,7 +160,7 @@ export const Auth = function () {
title="Sign out"
onClick={() => signOut()}
>
- <LogOutIcon className="h-5 w-5" />
+ <LogOutIcon className="h-5 w-5"/>
</Button>
</div>
</div>
diff --git a/apps/docs/src/components/Button.tsx b/apps/docs/src/components/Button.tsx
index 7eb15c222..adc6ad02c 100644
--- a/apps/docs/src/components/Button.tsx
+++ b/apps/docs/src/components/Button.tsx
@@ -44,18 +44,18 @@ type ButtonProps = {
disabled?: boolean
arrow?: 'left' | 'right'
} & (
- | React.ComponentPropsWithoutRef<typeof Link>
- | (React.ComponentPropsWithoutRef<'button'> & { href?: undefined })
+ | React.ComponentPropsWithoutRef<typeof Link>
+ | (React.ComponentPropsWithoutRef<'button'> & { href?: undefined })
)
export function Button({
- variant = 'primary',
- disabled = false,
- className,
- children,
- arrow,
- ...props
-}: ButtonProps) {
+ variant = 'primary',
+ disabled = false,
+ className,
+ children,
+ arrow,
+ ...props
+ }: ButtonProps) {
className = clsx(
'inline-flex gap-0.5 justify-center overflow-hidden text-base font-medium transition',
variantStyles[variant],
diff --git a/apps/docs/src/components/Code.tsx b/apps/docs/src/components/Code.tsx
index 44a97c2ed..9297f3a16 100644
--- a/apps/docs/src/components/Code.tsx
+++ b/apps/docs/src/components/Code.tsx
@@ -1,15 +1,6 @@
'use client'
import Image from 'next/image'
-import {
- Children,
- createContext,
- isValidElement,
- useContext,
- useEffect,
- useReducer,
- useRef,
- useState,
-} from 'react'
+import { Children, createContext, isValidElement, useContext, useEffect, useReducer, useRef, useState } from 'react'
import { Tab } from '@headlessui/react'
import clsx from 'clsx'
import { create } from 'zustand'
@@ -18,7 +9,7 @@ import { LoaderIcon, PlayIcon } from 'lucide-react'
import { CopyButton } from '@/components/CopyButton'
import { useApiKey } from '@/utils/useUser'
import { ProcessMessage } from '@e2b/sdk'
-import { useSessionsStore } from '@/utils/useSessions'
+import { useSandboxesStore } from '@/utils/useSandboxes'
import { useSignIn } from '@/utils/useSignIn'
import { LangShort, languageNames, mdLangToLangShort } from '@/utils/consts'
import { usePostHog } from 'posthog-js/react'
@@ -26,31 +17,31 @@ import logoNode from '@/images/logos/node.svg'
import logoPython from '@/images/logos/python.svg'
export function getPanelTitle({
- title,
- language,
-}: {
- title?: string
- language?: string
+ title,
+ language,
+ }: {
+ title?: string;
+ language?: string;
}) {
if (title) {
return title
}
if (language && language in languageNames) {
- return languageNames[language]
+ return languageNames[language]
}
return 'Code'
}
function CodePanel({
- children,
- code,
- lang,
- isRunnable = true,
-}: {
- children: React.ReactNode
- code?: string
- lang?: LangShort
- isRunnable?: boolean
+ children,
+ code,
+ lang,
+ isRunnable = true,
+ }: {
+ children: React.ReactNode;
+ code?: string;
+ lang?: LangShort;
+ isRunnable?: boolean;
}) {
const signIn = useSignIn()
const apiKey = useApiKey()
@@ -58,8 +49,8 @@ function CodePanel({
const codeGroupContext = useContext(CodeGroupContext)
- const sessionDef = useSessionsStore(s => s.sessions[lang])
- const initSession = useSessionsStore(s => s.initSession)
+ const sandboxDef = useSandboxesStore((s) => s.sandboxes[lang])
+ const initSandbox = useSandboxesStore((s) => s.initSandbox)
const { outputLines, dispatch } = useOutputReducer()
const [isRunning, setIsRunning] = useState(false)
@@ -68,13 +59,13 @@ function CodePanel({
}
function filterAndMaybeAppendOutput(out: ProcessMessage) {
- if (out.line.includes('Cannot refresh session')) return
+ if (out.line.includes('Cannot refresh sandbox')) return
if (out.line.includes('Trying to reconnect')) return
- console.log(`⚠️ Session stderr ${out.line}`)
+ console.log(`⚠️ Sandbox stderr ${out.line}`)
// appendOutput(out) // TODO: Reconsider logging to console after making the runs more stable
}
- function handleSessionCreationError(err: Error) {
+ function handleSandboxCreationError(err: Error) {
console.error(err)
setIsRunning(false)
dispatch({ type: 'clear' })
@@ -93,24 +84,26 @@ function CodePanel({
snippetPath: codeGroupContext?.path ?? 'unknown snippet',
})
- let session = sessionDef?.session
+ let sandbox = sandboxDef?.sandbox
try {
- if (!session) {
- if (sessionDef?.promise) {
- console.log(`Session for "${lang}" is still opening, waiting...`)
- session = await sessionDef.promise
+ if (!sandbox) {
+ if (sandboxDef?.promise) {
+ console.log(`Sandbox for "${lang}" is still opening, waiting...`)
+ sandbox = await sandboxDef.promise
} else {
- console.log(`Session not ready yet for "${lang}", opening...`)
- session = await initSession(lang, apiKey)
+ console.log(`Sandbox not ready yet for "${lang}", opening...`)
+ sandbox = await initSandbox(lang, apiKey)
}
}
} catch (err) {
- handleSessionCreationError(err)
+ handleSandboxCreationError(err)
return
}
- if (!session) {
- console.warn('This should not happen, session is null, debug & fix properly later')
+ if (!sandbox) {
+ console.warn(
+ 'This should not happen, sandbox is null, debug & fix properly later',
+ )
setIsRunning(false)
return
}
@@ -119,8 +112,8 @@ function CodePanel({
if (lang === LangShort.js) {
runtime += ' node'
const filename = '/code/index.js'
- await session.filesystem.write(filename, code)
- session.process.start({
+ await sandbox.filesystem.write(filename, code)
+ sandbox.process.start({
cmd: `${runtime} ${filename}`,
onStdout: appendOutput,
onStderr: filterAndMaybeAppendOutput,
@@ -129,8 +122,8 @@ function CodePanel({
} else if (lang === LangShort.py) {
runtime += ' python3'
const filename = '/main.py'
- await session.filesystem.write(filename, code)
- session.process.start({
+ await sandbox.filesystem.write(filename, code)
+ sandbox.process.start({
cmd: `${runtime} ${filename}`,
cwd: '/code',
onStdout: appendOutput,
@@ -149,7 +142,9 @@ function CodePanel({
lang = mdLangToLangShort[child.props.language ?? lang] // Get lang from child if available
}
if (!code) {
- throw new Error('`CodePanel` requires a `code` prop, or a child with a `code` prop.')
+ throw new Error(
+ '`CodePanel` requires a `code` prop, or a child with a `code` prop.',
+ )
}
return (
@@ -206,25 +201,26 @@ function CodePanel({
</pre>
</div>
)}
- <CopyButton code={code} />
+ <CopyButton code={code}/>
</div>
)
}
export function CodeGroupHeader({
- title,
- children,
- selectedIndex,
-}: {
- title: string
- children: React.ReactNode
- selectedIndex: number
+ title,
+ children,
+ selectedIndex,
+ }: {
+ title: string;
+ children: React.ReactNode;
+ selectedIndex: number;
}) {
const hasTabs = Children.count(children) > 1
if (!title && !hasTabs) return null
return (
- <div className="flex min-h-[calc(theme(spacing.12)+1px)] flex-wrap items-center justify-between gap-x-4 border-b border-zinc-700 bg-zinc-800 px-4 dark:border-zinc-800 dark:bg-transparent">
+ <div
+ className="flex min-h-[calc(theme(spacing.12)+1px)] flex-wrap items-center justify-between gap-x-4 border-b border-zinc-700 bg-zinc-800 px-4 dark:border-zinc-800 dark:bg-transparent">
<div className="flex flex-col items-start">
{title && (
<div className="pl-2 mt-3">
@@ -245,13 +241,17 @@ export function CodeGroupHeader({
: 'border-transparent text-zinc-400 hover:text-zinc-300',
)}
>
- <div className="
+ <div
+ className="
flex
items-center
px-1
gap-1
- ">
- {getPanelTitle(isValidElement(child) ? child.props : {}).includes('JavaScript') ? (
+ "
+ >
+ {getPanelTitle(
+ isValidElement(child) ? child.props : {},
+ ).includes('JavaScript') ? (
<Image
src={logoNode}
alt=""
@@ -278,9 +278,9 @@ export function CodeGroupHeader({
}
function CodeGroupPanels({
- children,
- ...props
-}: React.ComponentPropsWithoutRef<typeof CodePanel>) {
+ children,
+ ...props
+ }: React.ComponentPropsWithoutRef<typeof CodePanel>) {
const hasTabs = Children.count(children) > 1
/* <INTERNAL> */
@@ -288,7 +288,7 @@ function CodeGroupPanels({
if (typeof window !== 'undefined' && window.DEBUG_COMPARE_LANGS) {
return (
<div className="grid grid-cols-2">
- {Children.map(children, child => (
+ {Children.map(children, (child) => (
<CodePanel {...props}>{child}</CodePanel>
))}
</div>
@@ -339,7 +339,8 @@ function usePreventLayoutShift() {
callback()
rafRef.current = window.requestAnimationFrame(() => {
- const newTop = positionRef.current?.getBoundingClientRect().top ?? initialTop
+ const newTop =
+ positionRef.current?.getBoundingClientRect().top ?? initialTop
window.scrollBy(0, newTop - initialTop)
})
},
@@ -347,15 +348,15 @@ function usePreventLayoutShift() {
}
const usePreferredLanguageStore = create<{
- preferredLanguages: Array<string>
- addPreferredLanguage: (language: string) => void
-}>()(set => ({
+ preferredLanguages: Array<string>;
+ addPreferredLanguage: (language: string) => void;
+}>()((set) => ({
preferredLanguages: [],
- addPreferredLanguage: language =>
- set(state => ({
+ addPreferredLanguage: (language) =>
+ set((state) => ({
preferredLanguages: [
...state.preferredLanguages.filter(
- preferredLanguage => preferredLanguage !== language,
+ (preferredLanguage) => preferredLanguage !== language,
),
language,
],
@@ -363,7 +364,8 @@ const usePreferredLanguageStore = create<{
}))
export function useTabGroupProps(availableLanguages: Array<string>) {
- const { preferredLanguages, addPreferredLanguage } = usePreferredLanguageStore()
+ const { preferredLanguages, addPreferredLanguage } =
+ usePreferredLanguageStore()
const [selectedIndex, setSelectedIndex] = useState(0)
const activeLanguage = [...availableLanguages].sort(
(a, z) => preferredLanguages.indexOf(z) - preferredLanguages.indexOf(a),
@@ -380,7 +382,9 @@ export function useTabGroupProps(availableLanguages: Array<string>) {
ref: positionRef,
selectedIndex,
onChange: (newSelectedIndex: number) => {
- preventLayoutShift(() => addPreferredLanguage(availableLanguages[newSelectedIndex]))
+ preventLayoutShift(() =>
+ addPreferredLanguage(availableLanguages[newSelectedIndex]),
+ )
},
}
}
@@ -392,8 +396,8 @@ function useOutputReducer() {
(
state: string[],
action: {
- type: 'push' | 'clear'
- payload?: string
+ type: 'push' | 'clear';
+ payload?: string;
},
) => {
switch (action.type) {
@@ -409,28 +413,25 @@ function useOutputReducer() {
}
export function CodeGroup({
- children,
- title,
- path,
- ...props
-}: React.ComponentPropsWithoutRef<typeof CodeGroupPanels> & {
- title?: string
- path?: string // For analytics
+ children,
+ title,
+ path,
+ ...props
+ }: React.ComponentPropsWithoutRef<typeof CodeGroupPanels> & {
+ title?: string;
+ path?: string; // For analytics
}) {
const hasTabs = Children.count(children) > 1
const containerClassName =
'not-prose my-6 overflow-hidden rounded-2xl bg-zinc-900 shadow-md dark:ring-1 dark:ring-white/10'
const languages =
- Children.map(children, child =>
+ Children.map(children, (child) =>
getPanelTitle(isValidElement(child) ? child.props : {}),
) ?? []
const tabGroupProps = useTabGroupProps(languages)
const header = (
- <CodeGroupHeader
- title={title}
- selectedIndex={tabGroupProps.selectedIndex}
- >
+ <CodeGroupHeader title={title} selectedIndex={tabGroupProps.selectedIndex}>
{children}
</CodeGroupHeader>
)
@@ -443,10 +444,7 @@ export function CodeGroup({
}}
>
{hasTabs ? (
- <Tab.Group
- {...tabGroupProps}
- className={containerClassName}
- >
+ <Tab.Group {...tabGroupProps} className={containerClassName}>
{header}
{panels}
</Tab.Group>
@@ -460,7 +458,10 @@ export function CodeGroup({
)
}
-export function Code({ children, ...props }: React.ComponentPropsWithoutRef<'code'>) {
+export function Code({
+ children,
+ ...props
+ }: React.ComponentPropsWithoutRef<'code'>) {
/* <DYNAMIC-API-REPLACEMENT> */
// let apiKey = useApiKey()
// if (children.replace && apiKey) children = children.replace(`{{API_KEY}}`, `${apiKey}`)
@@ -474,21 +475,16 @@ export function Code({ children, ...props }: React.ComponentPropsWithoutRef<'cod
'`Code` children must be a string when nested inside a `CodeGroup`.',
)
}
- return (
- <code
- {...props}
- dangerouslySetInnerHTML={{ __html: children }}
- />
- )
+ return <code {...props} dangerouslySetInnerHTML={{ __html: children }}/>
}
return <code {...props}>{children}</code>
}
export function Pre({
- children,
- ...props
-}: React.ComponentPropsWithoutRef<typeof CodeGroup>) {
+ children,
+ ...props
+ }: React.ComponentPropsWithoutRef<typeof CodeGroup>) {
const isGrouped = useContext(CodeGroupContext)
if (isGrouped) {
diff --git a/apps/docs/src/components/CopyButton.tsx b/apps/docs/src/components/CopyButton.tsx
index 08cd20e84..735809664 100644
--- a/apps/docs/src/components/CopyButton.tsx
+++ b/apps/docs/src/components/CopyButton.tsx
@@ -22,10 +22,11 @@ function ClipboardIcon(props) {
}
export function CopyButton({
- code,
- customPositionClassNames = 'right-4 top-3.5', // default from TailwindUI, works great with code blocks
- onAfterCopy = () => {},
-}) {
+ code,
+ customPositionClassNames = 'right-4 top-3.5', // default from TailwindUI, works great with code blocks
+ onAfterCopy = () => {
+ },
+ }) {
const buttonRef = useRef()
const [copyCount, setCopyCount] = useState(0)
const copied = copyCount > 0
@@ -69,7 +70,8 @@ export function CopyButton({
copied && '-translate-y-1.5 opacity-0',
)}
>
- <ClipboardIcon className="h-5 w-5 fill-zinc-500/20 stroke-zinc-500 transition-colors group-hover/button:stroke-zinc-400" />
+ <ClipboardIcon
+ className="h-5 w-5 fill-zinc-500/20 stroke-zinc-500 transition-colors group-hover/button:stroke-zinc-400"/>
Copy
</span>
<span
diff --git a/apps/docs/src/components/DialogAnimated.tsx b/apps/docs/src/components/DialogAnimated.tsx
index 2a056ab4a..d256e89cd 100644
--- a/apps/docs/src/components/DialogAnimated.tsx
+++ b/apps/docs/src/components/DialogAnimated.tsx
@@ -3,14 +3,15 @@ import { Dialog, Transition } from '@headlessui/react'
import clsx from 'clsx'
export function DialogAnimated({
- open,
- setOpen,
- as = Fragment,
- className = '',
- afterLeave = () => {},
- rootProps = {},
- children,
-}) {
+ open,
+ setOpen,
+ as = Fragment,
+ className = '',
+ afterLeave = () => {
+ },
+ rootProps = {},
+ children,
+ }) {
return (
<Transition.Root
show={open}
@@ -30,7 +31,7 @@ export function DialogAnimated({
leaveFrom="opacity-100"
leaveTo="opacity-0"
>
- <div className="fixed inset-0 bg-zinc-400/25 backdrop-blur-sm dark:bg-black/40" />
+ <div className="fixed inset-0 bg-zinc-400/25 backdrop-blur-sm dark:bg-black/40"/>
</Transition.Child>
<div className="fixed inset-0 overflow-y-auto px-4 py-4 sm:px-6 sm:py-20 md:py-32 lg:px-8 lg:py-[15vh]">
@@ -43,7 +44,8 @@ export function DialogAnimated({
leaveFrom="opacity-100 scale-100"
leaveTo="opacity-0 scale-95"
>
- <Dialog.Panel className="mx-auto transform-gpu overflow-hidden rounded-lg bg-zinc-50 shadow-xl ring-1 ring-zinc-900/7.5 dark:bg-zinc-900 dark:ring-zinc-800 sm:max-w-xl">
+ <Dialog.Panel
+ className="mx-auto transform-gpu overflow-hidden rounded-lg bg-zinc-50 shadow-xl ring-1 ring-zinc-900/7.5 dark:bg-zinc-900 dark:ring-zinc-800 sm:max-w-xl">
<div {...rootProps}>{children}</div>
</Dialog.Panel>
</Transition.Child>
diff --git a/apps/docs/src/components/Feedback/FeedbackButton.tsx b/apps/docs/src/components/Feedback/FeedbackButton.tsx
index b9e11dfe5..9ce555e07 100644
--- a/apps/docs/src/components/Feedback/FeedbackButton.tsx
+++ b/apps/docs/src/components/Feedback/FeedbackButton.tsx
@@ -18,12 +18,12 @@ function FeedbackButton({ onClick, isFinished, variant, className }) {
>
{isFinished ? (
<>
- <Check size={14} />
+ <Check size={14}/>
<span className="text-sm">Thank you!</span>
</>
) : (
<div className="flex flex-row items-center gap-2">
- <MessageCircle size={14} />
+ <MessageCircle size={14}/>
<span className="text-sm">Send feedback to CEO</span>
</div>
)}
diff --git a/apps/docs/src/components/Feedback/FeedbackModal.tsx b/apps/docs/src/components/Feedback/FeedbackModal.tsx
index 6d4b34821..865c61e4a 100644
--- a/apps/docs/src/components/Feedback/FeedbackModal.tsx
+++ b/apps/docs/src/components/Feedback/FeedbackModal.tsx
@@ -81,9 +81,9 @@ function FeedbackModal({ open, setOpen, onSend }) {
>
{isSavingFeedback ? (
// @ts-ignore
- <SpinnerIcon />
+ <SpinnerIcon/>
) : (
- <Send size="14px" />
+ <Send size="14px"/>
)}
<span className="text-base">Send</span>
diff --git a/apps/docs/src/components/Feedback/index.tsx b/apps/docs/src/components/Feedback/index.tsx
index f5935913c..4109f3704 100644
--- a/apps/docs/src/components/Feedback/index.tsx
+++ b/apps/docs/src/components/Feedback/index.tsx
@@ -7,9 +7,9 @@ import FeedbackModal from './FeedbackModal'
import useExpiringState from '@/utils/useExpiringState'
export function Feedback({
- className,
- variant,
-}: {
+ className,
+ variant,
+ }: {
className?: string
variant?: string
}) {
diff --git a/apps/docs/src/components/FeedbackQuick.tsx b/apps/docs/src/components/FeedbackQuick.tsx
index 324c0cfa6..bc62b69fe 100644
--- a/apps/docs/src/components/FeedbackQuick.tsx
+++ b/apps/docs/src/components/FeedbackQuick.tsx
@@ -47,9 +47,10 @@ const FeedbackForm = forwardRef(function FeedbackForm({ onSubmit }, ref) {
className="absolute inset-0 flex items-center justify-center gap-6 md:justify-start"
>
<p className="text-sm text-zinc-600 dark:text-zinc-400">Was this page helpful?</p>
- <div className="group grid h-8 grid-cols-[1fr,1px,1fr] overflow-hidden rounded-full border border-zinc-900/10 dark:border-white/10">
+ <div
+ className="group grid h-8 grid-cols-[1fr,1px,1fr] overflow-hidden rounded-full border border-zinc-900/10 dark:border-white/10">
<FeedbackButton data-response="yes">Yes</FeedbackButton>
- <div className="bg-zinc-900/10 dark:bg-white/10" />
+ <div className="bg-zinc-900/10 dark:bg-white/10"/>
<FeedbackButton data-response="no">No</FeedbackButton>
</div>
</form>
@@ -63,8 +64,10 @@ const FeedbackThanks = forwardRef(function FeedbackThanks(_props, ref) {
ref={ref}
className="absolute inset-0 flex justify-center md:justify-start"
>
- <div className="bg-brand-50/50 flex items-center gap-3 rounded-full py-1 pl-1.5 pr-3 text-sm text-brand-900 ring-1 ring-inset ring-brand-500/20 dark:bg-brand-500/5 dark:text-brand-200 dark:ring-brand-500/30">
- <CheckIcon className="h-5 w-5 flex-none fill-brand-500 stroke-white dark:fill-brand-200/20 dark:stroke-brand-200" />
+ <div
+ className="bg-brand-50/50 flex items-center gap-3 rounded-full py-1 pl-1.5 pr-3 text-sm text-brand-900 ring-1 ring-inset ring-brand-500/20 dark:bg-brand-500/5 dark:text-brand-200 dark:ring-brand-500/30">
+ <CheckIcon
+ className="h-5 w-5 flex-none fill-brand-500 stroke-white dark:fill-brand-200/20 dark:stroke-brand-200"/>
Thanks for your feedback!
</div>
</div>
@@ -93,7 +96,7 @@ export function FeedbackQuick() {
leave="pointer-events-none duration-300"
>
{/* @ts-ignore */}
- <FeedbackForm onSubmit={onSubmit} />
+ <FeedbackForm onSubmit={onSubmit}/>
</Transition>
<Transition
show={submitted}
@@ -102,7 +105,7 @@ export function FeedbackQuick() {
enterTo="opacity-100"
enter="delay-150 duration-300"
>
- <FeedbackThanks />
+ <FeedbackThanks/>
</Transition>
</div>
)
diff --git a/apps/docs/src/components/Footer.tsx b/apps/docs/src/components/Footer.tsx
index 175cdee8b..a15e87bcc 100644
--- a/apps/docs/src/components/Footer.tsx
+++ b/apps/docs/src/components/Footer.tsx
@@ -10,10 +10,10 @@ import { GitHubIcon } from '@/components/icons/GitHubIcon'
import { DiscordIcon } from '@/components/icons/DiscordIcon'
function PageLink({
- label,
- page,
- previous = false,
-}: {
+ label,
+ page,
+ previous = false,
+ }: {
label: string
page: { href: string; title: string }
previous?: boolean
@@ -79,10 +79,10 @@ function PageNavigation() {
}
function SocialLink({
- href,
- icon: Icon,
- children,
-}: {
+ href,
+ icon: Icon,
+ children,
+ }: {
href: string
icon: React.ComponentType<{ className?: string }>
children: React.ReactNode
@@ -93,14 +93,15 @@ function SocialLink({
className="group"
>
<span className="sr-only">{children}</span>
- <Icon className="h-5 w-5 fill-zinc-700 transition group-hover:fill-zinc-900 dark:group-hover:fill-zinc-500" />
+ <Icon className="h-5 w-5 fill-zinc-700 transition group-hover:fill-zinc-900 dark:group-hover:fill-zinc-500"/>
</Link>
)
}
function SmallPrint() {
return (
- <div className="flex flex-col items-start items-center justify-between gap-5 border-t border-zinc-900/5 pt-8 dark:border-white/5 sm:flex-row">
+ <div
+ className="flex flex-col items-start items-center justify-between gap-5 border-t border-zinc-900/5 pt-8 dark:border-white/5 sm:flex-row">
<div className="flex flex-col items-center justify-start lg:items-start">
<p className="text-xs text-zinc-600 dark:text-zinc-400">
&copy; FoundryLabs, Inc. {new Date().getFullYear()}. All rights reserved.
@@ -136,8 +137,8 @@ function SmallPrint() {
export function Footer() {
return (
<footer className="mx-auto w-full max-w-2xl space-y-10 pb-16 lg:max-w-5xl">
- <PageNavigation />
- <SmallPrint />
+ <PageNavigation/>
+ <SmallPrint/>
</footer>
)
}
diff --git a/apps/docs/src/components/GridPattern.tsx b/apps/docs/src/components/GridPattern.tsx
index 762bc2afd..ed53e4e81 100644
--- a/apps/docs/src/components/GridPattern.tsx
+++ b/apps/docs/src/components/GridPattern.tsx
@@ -1,13 +1,13 @@
import { useId } from 'react'
export function GridPattern({
- width,
- height,
- x,
- y,
- squares,
- ...props
-}: React.ComponentPropsWithoutRef<'svg'> & {
+ width,
+ height,
+ x,
+ y,
+ squares,
+ ...props
+ }: React.ComponentPropsWithoutRef<'svg'> & {
width: number
height: number
x: string | number
diff --git a/apps/docs/src/components/Guides.tsx b/apps/docs/src/components/Guides.tsx
index b09d48409..c6b2a4fed 100644
--- a/apps/docs/src/components/Guides.tsx
+++ b/apps/docs/src/components/Guides.tsx
@@ -34,7 +34,8 @@ export function Guides() {
>
Guides
</Heading>
- <div className="not-prose mt-4 grid grid-cols-1 gap-8 border-t border-zinc-900/5 pt-10 dark:border-white/5 sm:grid-cols-2 xl:grid-cols-4">
+ <div
+ className="not-prose mt-4 grid grid-cols-1 gap-8 border-t border-zinc-900/5 pt-10 dark:border-white/5 sm:grid-cols-2 xl:grid-cols-4">
{guides.map(guide => (
<div key={guide.href}>
<h3 className="text-sm font-semibold text-zinc-900 dark:text-white">
diff --git a/apps/docs/src/components/Header.tsx b/apps/docs/src/components/Header.tsx
index 82fb234dd..e8f50c211 100644
--- a/apps/docs/src/components/Header.tsx
+++ b/apps/docs/src/components/Header.tsx
@@ -2,11 +2,7 @@ import { forwardRef, useEffect } from 'react'
import Link from 'next/link'
import clsx from 'clsx'
import { motion, useScroll, useTransform } from 'framer-motion'
-import {
- MobileNavigation,
- useIsInsideMobileNavigation,
- useMobileNavigationStore,
-} from '@/components/MobileNavigation'
+import { MobileNavigation, useIsInsideMobileNavigation, useMobileNavigationStore } from '@/components/MobileNavigation'
import { Logo } from '@/components/Logo'
import { MobileSearch, Search } from '@/components/Search'
import { Auth } from '@/components/Auth'
@@ -71,9 +67,6 @@ export const Header = forwardRef(function Header({ className }, ref) {
className,
'fixed inset-x-0 top-0 z-50 flex h-14 items-center justify-between gap-12 px-4 transition sm:px-6 lg:z-30 lg:px-8',
!isInsideMobileNavigation && 'backdrop-blur-sm dark:backdrop-blur',
- isInsideMobileNavigation
- ? 'bg-white dark:bg-zinc-900'
- : 'bg-white/[var(--bg-opacity-light)] dark:bg-zinc-900/[var(--bg-opacity-dark)]',
)}
style={
{
@@ -94,17 +87,17 @@ export const Header = forwardRef(function Header({ className }, ref) {
href="/"
aria-label="Home"
>
- <Logo className="h-6" />
+ <Logo className="h-6"/>
</Link>
</div>
- <Search />
+ <Search/>
<div className="flex items-center gap-5 lg:hidden">
- <MobileNavigation />
+ <MobileNavigation/>
<Link
href="/"
aria-label="Home"
>
- <Logo className="h-6" />
+ <Logo className="h-6"/>
</Link>
</div>
<div className="flex items-center gap-4">
@@ -117,24 +110,24 @@ export const Header = forwardRef(function Header({ className }, ref) {
href={`https://discord.gg/${config.discord.slug}`}
stat={discordUsers}
statType="discordUsers"
- icon={<DiscordIcon className="h-5 w-5 fill-current" />}
+ icon={<DiscordIcon className="h-5 w-5 fill-current"/>}
/>
<TopLevelNavItem
href={config.github.url}
stat={githubStars}
statType="githubStars"
- icon={<GitHubIcon className="h-5 w-5 fill-current" />}
+ icon={<GitHubIcon className="h-5 w-5 fill-current"/>}
/>
<TopLevelNavItem
href={config.twitter.url}
- icon={<TwitterIcon className="h-5 w-5 fill-current" />}
+ icon={<TwitterIcon className="h-5 w-5 fill-current"/>}
/>
</ul>
</nav>
- <HeaderSeparator />
- <MobileSearch />
+ <HeaderSeparator/>
+ <MobileSearch/>
<div className="hidden min-[540px]:contents">
- <Auth />
+ <Auth/>
</div>
</div>
</motion.div>
diff --git a/apps/docs/src/components/HeaderUtils.tsx b/apps/docs/src/components/HeaderUtils.tsx
index b103c6ff5..c4269e31d 100644
--- a/apps/docs/src/components/HeaderUtils.tsx
+++ b/apps/docs/src/components/HeaderUtils.tsx
@@ -1,5 +1,5 @@
export function HeaderSeparator() {
return (
- <div className="hidden md:block md:h-5 md:w-px md:bg-zinc-900/10 md:dark:bg-white/15" />
+ <div className="hidden md:block md:h-5 md:w-px md:bg-zinc-900/10 md:dark:bg-white/15"/>
)
}
diff --git a/apps/docs/src/components/Heading.tsx b/apps/docs/src/components/Heading.tsx
index 8b9131cf4..ec46f7e9a 100644
--- a/apps/docs/src/components/Heading.tsx
+++ b/apps/docs/src/components/Heading.tsx
@@ -17,7 +17,7 @@ function AnchorIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
aria-hidden="true"
{...props}
>
- <path d="m6.5 11.5-.964-.964a3.535 3.535 0 1 1 5-5l.964.964m2 2 .964.964a3.536 3.536 0 0 1-5 5L8.5 13.5m0-5 3 3" />
+ <path d="m6.5 11.5-.964-.964a3.535 3.535 0 1 1 5-5l.964.964m2 2 .964.964a3.536 3.536 0 0 1-5 5L8.5 13.5m0-5 3 3"/>
</svg>
)
}
@@ -31,7 +31,7 @@ function Eyebrow({ tag, label }: { tag?: string; label?: string }) {
<div className="flex items-center gap-x-3">
{tag && <Tag>{tag}</Tag>}
{tag && label && (
- <span className="h-0.5 w-0.5 rounded-full bg-zinc-300 dark:bg-zinc-600" />
+ <span className="h-0.5 w-0.5 rounded-full bg-zinc-300 dark:bg-zinc-600"/>
)}
{label && <span className="font-mono text-xs text-zinc-400">{label}</span>}
</div>
@@ -39,10 +39,10 @@ function Eyebrow({ tag, label }: { tag?: string; label?: string }) {
}
function Anchor({
- id,
- inView,
- children,
-}: {
+ id,
+ inView,
+ children,
+ }: {
id: string
inView: boolean
children: React.ReactNode
@@ -53,9 +53,12 @@ function Anchor({
className="group text-inherit no-underline hover:text-inherit"
>
{inView && (
- <div className="absolute ml-[calc(-1*var(--width))] mt-1 hidden w-[var(--width)] opacity-0 transition [--width:calc(2.625rem+0.5px+50%-min(50%,calc(theme(maxWidth.lg)+theme(spacing.8))))] group-hover:opacity-100 group-focus:opacity-100 md:block lg:z-50 2xl:[--width:theme(spacing.10)]">
- <div className="group/anchor block h-5 w-5 rounded-lg bg-zinc-50 ring-1 ring-inset ring-zinc-300 transition hover:ring-zinc-500 dark:bg-zinc-800 dark:ring-zinc-700 dark:hover:bg-zinc-700 dark:hover:ring-zinc-600">
- <AnchorIcon className="h-5 w-5 stroke-zinc-500 transition dark:stroke-zinc-400 dark:group-hover/anchor:stroke-white" />
+ <div
+ className="absolute ml-[calc(-1*var(--width))] mt-1 hidden w-[var(--width)] opacity-0 transition [--width:calc(2.625rem+0.5px+50%-min(50%,calc(theme(maxWidth.lg)+theme(spacing.8))))] group-hover:opacity-100 group-focus:opacity-100 md:block lg:z-50 2xl:[--width:theme(spacing.10)]">
+ <div
+ className="group/anchor block h-5 w-5 rounded-lg bg-zinc-50 ring-1 ring-inset ring-zinc-300 transition hover:ring-zinc-500 dark:bg-zinc-800 dark:ring-zinc-700 dark:hover:bg-zinc-700 dark:hover:ring-zinc-600">
+ <AnchorIcon
+ className="h-5 w-5 stroke-zinc-500 transition dark:stroke-zinc-400 dark:group-hover/anchor:stroke-white"/>
</div>
</div>
)}
@@ -65,13 +68,13 @@ function Anchor({
}
export function Heading<Level extends 2 | 3>({
- children,
- tag,
- label,
- level,
- anchor = true,
- ...props
-}: React.ComponentPropsWithoutRef<`h${Level}`> & {
+ children,
+ tag,
+ label,
+ level,
+ anchor = true,
+ ...props
+ }: React.ComponentPropsWithoutRef<`h${Level}`> & {
id: string
tag?: string
label?: string
diff --git a/apps/docs/src/components/HeroPattern.tsx b/apps/docs/src/components/HeroPattern.tsx
index a4723c59e..01fd52f45 100644
--- a/apps/docs/src/components/HeroPattern.tsx
+++ b/apps/docs/src/components/HeroPattern.tsx
@@ -3,8 +3,10 @@ import { GridPattern } from '@/components/GridPattern'
export function HeroPattern() {
return (
<div className="absolute inset-0 -z-10 mx-0 max-w-none overflow-hidden">
- <div className="absolute left-1/2 top-0 ml-[-38rem] h-[25rem] w-[81.25rem] dark:[mask-image:linear-gradient(white,transparent)]">
- <div className="absolute inset-0 bg-gradient-to-r from-[#FF8800] to-[#F15B03] opacity-40 [mask-image:radial-gradient(farthest-side_at_top,white,transparent)] dark:from-[#FF8800]/30 dark:to-[#F15B03]/30 dark:opacity-100">
+ <div
+ className="absolute left-1/2 top-0 ml-[-38rem] h-[25rem] w-[81.25rem] dark:[mask-image:linear-gradient(white,transparent)]">
+ <div
+ className="absolute inset-0 bg-gradient-to-r from-[#FF8800] to-[#F15B03] opacity-40 [mask-image:radial-gradient(farthest-side_at_top,white,transparent)] dark:from-[#FF8800]/30 dark:to-[#F15B03]/30 dark:opacity-100">
<GridPattern
width={72}
height={56}
diff --git a/apps/docs/src/components/Layout.tsx b/apps/docs/src/components/Layout.tsx
index 0238b7e00..3a89733d2 100644
--- a/apps/docs/src/components/Layout.tsx
+++ b/apps/docs/src/components/Layout.tsx
@@ -9,9 +9,9 @@ import { Navigation } from '@/components/Navigation'
import { Section, SectionProvider } from '@/components/SectionProvider'
export function Layout({
- children,
- allSections,
-}: {
+ children,
+ allSections,
+ }: {
children: React.ReactNode
allSections: Record<string, Array<Section>>
}) {
@@ -39,8 +39,8 @@ export function Layout({
lg:pb-8
"
>
- <Header />
- <Navigation className="hidden lg:my-4 lg:block" />
+ <Header/>
+ <Navigation className="hidden lg:my-4 lg:block"/>
</div>
</motion.header>
<div
@@ -62,7 +62,7 @@ export function Layout({
<main className="
flex-auto
">{children}</main>
- <Footer />
+ <Footer/>
</div>
</div>
</SectionProvider>
diff --git a/apps/docs/src/components/Logo.tsx b/apps/docs/src/components/Logo.tsx
index b209f1668..faa526716 100644
--- a/apps/docs/src/components/Logo.tsx
+++ b/apps/docs/src/components/Logo.tsx
@@ -145,7 +145,7 @@ export function Logo(props) {
y2="195.449"
gradientUnits="userSpaceOnUse"
>
- <stop stopColor="white" />
+ <stop stopColor="white"/>
<stop
offset="0.720129"
stopColor="#FF8800"
diff --git a/apps/docs/src/components/MobileNavigation.tsx b/apps/docs/src/components/MobileNavigation.tsx
index 15872d88c..d65649b6b 100644
--- a/apps/docs/src/components/MobileNavigation.tsx
+++ b/apps/docs/src/components/MobileNavigation.tsx
@@ -18,7 +18,7 @@ function MenuIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
aria-hidden="true"
{...props}
>
- <path d="M.5 1h9M.5 8h9M.5 4.5h9" />
+ <path d="M.5 1h9M.5 8h9M.5 4.5h9"/>
</svg>
)
}
@@ -32,7 +32,7 @@ function XIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
aria-hidden="true"
{...props}
>
- <path d="m1.5 1 7 7M8.5 1l-7 7" />
+ <path d="m1.5 1 7 7M8.5 1l-7 7"/>
</svg>
)
}
@@ -40,9 +40,9 @@ function XIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
const IsInsideMobileNavigationContext = createContext(false)
function MobileNavigationDialog({
- isOpen,
- close,
-}: {
+ isOpen,
+ close,
+ }: {
isOpen: boolean
close: () => void
}) {
@@ -66,7 +66,7 @@ function MobileNavigationDialog({
if (
link &&
link.pathname + link.search + link.hash ===
- window.location.pathname + window.location.search + window.location.hash
+ window.location.pathname + window.location.search + window.location.hash
) {
close()
}
@@ -91,7 +91,7 @@ function MobileNavigationDialog({
leaveFrom="opacity-100"
leaveTo="opacity-0"
>
- <div className="fixed inset-0 top-14 bg-zinc-400/20 backdrop-blur-sm dark:bg-black/40" />
+ <div className="fixed inset-0 top-14 bg-zinc-400/20 backdrop-blur-sm dark:bg-black/40"/>
</Transition.Child>
<Dialog.Panel>
@@ -104,7 +104,7 @@ function MobileNavigationDialog({
leaveFrom="opacity-100"
leaveTo="opacity-0"
>
- <Header />
+ <Header/>
</Transition.Child>
<Transition.Child
@@ -120,7 +120,7 @@ function MobileNavigationDialog({
layoutScroll
className="fixed bottom-0 left-0 top-14 w-full overflow-y-auto overflow-x-hidden bg-white px-4 pb-4 pt-6 shadow-lg shadow-zinc-900/10 ring-1 ring-zinc-900/7.5 dark:bg-zinc-900 dark:ring-zinc-800 min-[416px]:max-w-sm sm:px-6 sm:pb-10"
>
- <Navigation />
+ <Navigation/>
</motion.div>
</Transition.Child>
</Dialog.Panel>
@@ -158,7 +158,7 @@ export function MobileNavigation() {
aria-label="Toggle navigation"
onClick={toggle}
>
- <ToggleIcon className="w-2.5 stroke-zinc-900 dark:stroke-white" />
+ <ToggleIcon className="w-2.5 stroke-zinc-900 dark:stroke-white"/>
</button>
{!isInsideMobileNavigation && (
<Suspense fallback={null}>
diff --git a/apps/docs/src/components/Navigation/index.tsx b/apps/docs/src/components/Navigation/index.tsx
index 5ba276b6d..479b77d34 100644
--- a/apps/docs/src/components/Navigation/index.tsx
+++ b/apps/docs/src/components/Navigation/index.tsx
@@ -29,9 +29,9 @@ function useInitialValue<T>(value: T, condition = true) {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
function TopLevelNavItem({
- href,
- children,
-}: {
+ href,
+ children,
+ }: {
href: string
children: React.ReactNode
}) {
@@ -48,15 +48,15 @@ function TopLevelNavItem({
}
function NavLink({
- className,
- href,
- children,
- tag,
- icon,
- active = false,
- isAnchorLink = false,
- isFontMono = false,
-}: {
+ className,
+ href,
+ children,
+ tag,
+ icon,
+ active = false,
+ isAnchorLink = false,
+ isFontMono = false,
+ }: {
className?: string
href: string
children: React.ReactNode
@@ -275,7 +275,7 @@ export function Navigation(props) {
/>
))}
<li className="z-10 mt-6">
- <Feedback className="w-full" />
+ <Feedback className="w-full"/>
</li>
<li
/* -1.5rem to stretch outside the padding of the parent list */
@@ -285,7 +285,7 @@ export function Navigation(props) {
min-[540px]:hidden
"
>
- <Auth />
+ <Auth/>
</li>
</ul>
</nav>
diff --git a/apps/docs/src/components/Navigation/routes.tsx b/apps/docs/src/components/Navigation/routes.tsx
index 7f5df5511..19f72cf9e 100644
--- a/apps/docs/src/components/Navigation/routes.tsx
+++ b/apps/docs/src/components/Navigation/routes.tsx
@@ -1,19 +1,21 @@
import {
ChevronRightSquare,
+ Cpu,
+ DollarSign,
+ FileDown,
+ FileUp,
Folder,
FolderTree,
+ Hammer,
+ HeartHandshake,
KeyRound,
+ Link,
Settings,
ShieldQuestion,
Timer,
- HeartHandshake,
- DollarSign,
- Hammer,
- Cpu,
- Link,
- FileUp,
- FileDown,
Variable,
+ PencilRuler,
+ File,
} from 'lucide-react'
export const routes = [
@@ -83,23 +85,18 @@ export const routes = [
size={20}
/>
),
- title: 'Example: Run LLM-generated code',
+ title: 'Guide: Run LLM-generated code',
href: '/guide/simple-gpt4-code-interpreter',
},
],
},
- // {
- // title: 'Sandbox Templates',
- // links: [
- // { title: 'Overview', href: '/sandbox/templates/overview' },
- // { title: 'Custom Template', href: '/sandbox/templates/custom' },
- // { title: 'Premade: Data Analysis', href: '/sandbox/templates/data-analysis' },
- // ],
- // },
{
- title: 'Sandbox API',
+ title: 'Sandbox',
links: [
- { title: 'Overview', href: '/sandbox/overview' },
+ {
+ title: 'Overview',
+ href: '/sandbox/overview',
+ },
{
icon: (
<Cpu
@@ -107,50 +104,93 @@ export const routes = [
size={20}
/>
),
- title: 'Sandbox Resources',
+ title: 'Resources',
href: '/sandbox/resources',
},
{
icon: (
- <Variable
+ <PencilRuler
strokeWidth={1}
size={20}
/>
),
- title: 'Environment Variables',
- href: '/sandbox/envs',
+ title: 'Customization',
+ href: '/sandbox/custom',
+ },
+ ],
+ },
+ {
+ title: 'Sandbox Templates',
+ links: [
+ {
+ title: 'Overview',
+ href: '/sandbox/templates/overview',
},
{
icon: (
- <FolderTree
+ <File
strokeWidth={1}
size={20}
/>
),
- title: 'Filesystem',
- href: '/sandbox/filesystem',
+ title: 'Template File',
+ href: '/sandbox/templates/template-file',
},
{
icon: (
- <ChevronRightSquare
+ <Hammer
strokeWidth={1}
size={20}
/>
),
- title: 'Process',
- href: '/sandbox/process',
+ title: 'Guide: Creating Custom Sandbox',
+ href: '/guide/custom-sandbox',
},
- // TODO: Remove
// {
// icon: (
- // <Binary
+ // <ImageIcon
// strokeWidth={1}
// size={20}
// />
// ),
- // title: 'Executing Code',
- // href: '/sandbox/execute',
+ // title: 'Premade Templates',
+ // href: '/sandbox/templates/premade',
// },
+ ]
+ },
+ {
+ title: 'Sandbox API',
+ links: [
+ {
+ icon: (
+ <Variable
+ strokeWidth={1}
+ size={20}
+ />
+ ),
+ title: 'Environment Variables',
+ href: '/sandbox/api/envs',
+ },
+ {
+ icon: (
+ <FolderTree
+ strokeWidth={1}
+ size={20}
+ />
+ ),
+ title: 'Filesystem',
+ href: '/sandbox/api/filesystem',
+ },
+ {
+ icon: (
+ <ChevronRightSquare
+ strokeWidth={1}
+ size={20}
+ />
+ ),
+ title: 'Process',
+ href: '/sandbox/api/process',
+ },
{
icon: (
<Folder
@@ -159,28 +199,8 @@ export const routes = [
/>
),
title: 'Working Directory',
- href: '/sandbox/cwd',
+ href: '/sandbox/api/cwd',
},
- // {
- // icon: (
- // <TextQuote
- // strokeWidth={1}
- // size={20}
- // />
- // ),
- // title: '[TODO] Streaming',
- // href: '/sandbox/streaming',
- // },
- // {
- // icon: (
- // <TextQuote
- // strokeWidth={1}
- // size={20}
- // />
- // ),
- // title: '[TODO] Debug logs',
- // href: '/sandbox/debugging',
- // },
{
icon: (
<Link
@@ -189,7 +209,7 @@ export const routes = [
/>
),
title: 'Sandbox URL',
- href: '/sandbox/url',
+ href: '/sandbox/api/url',
},
{
icon: (
@@ -199,7 +219,7 @@ export const routes = [
/>
),
title: 'Upload Files',
- href: '/sandbox/upload',
+ href: '/sandbox/api/upload',
},
{
icon: (
@@ -209,7 +229,7 @@ export const routes = [
/>
),
title: 'Download Files',
- href: '/sandbox/download',
+ href: '/sandbox/api/download',
},
{
icon: (
@@ -219,41 +239,17 @@ export const routes = [
/>
),
title: 'Timeouts',
- href: '/sandbox/timeouts',
+ href: '/sandbox/api/timeouts',
},
],
},
// {
- // title: 'Guides',
- // links: [
- // { title: 'AI Data Analysis With GPT-4', href: '/guides/ai-data-analysis' },
- // { title: 'GPT-4 Cloud Browser Assistant', href: '/guides/cloud-browser-assistant' },
- // { title: 'Custom Code Interpreter', href: '/guides/custom-code-interpreter' },
- // { title: 'GPT-controlled FFmpeg', href: '/guides/gpt-controlled-ffmpeg' }
- // ],
- // },
- // {
- // title: 'Framework Integrations',
- // links: [
- // { title: 'LangChain', href: '/integrations/framework/langchain' },
- // { title: 'LlamaIndex', href: '/integrations/framework/llamaindex' },
- // { title: 'Rivet', href: '/integrations/framework/rivet' },
- // { title: 'AutoGen', href: '/integrations/framework/autogen' },
- // { title: 'Fixie', href: '/integrations/framework/fixie' },
- // { title: 'Hugging Face Agents', href: '/integrations/framework/hf-agents' },
- // { title: 'AgentLabs', href: '/integrations/framework/agentlabs' },
- // { title: 'Chainlit', href: '/integrations/framework/chainlit' },
- // { title: 'Streamlit', href: '/integrations/framework/streamlit' },
- // { title: 'Gradio', href: '/integrations/framework/gradio' },
- // ],
- // },
- // {
- // title: 'LLMs Integrations',
+ // title: 'E2B CLI',
// links: [
- // { title: 'OpenAI', href: '/integrations/llm/openai' },
- // { title: 'Anthropic', href: '/integrations/llm/anthropic' },
- // { title: 'Hugging Face', href: '/integrations/llm/hugging-face' },
- // { title: 'Replicate', href: '/integrations/llm/replicate' },
+ // {
+ // title: 'Overview',
+ // href: '/cli/overview',
+ // },
// ],
// },
]
diff --git a/apps/docs/src/components/Prose.tsx b/apps/docs/src/components/Prose.tsx
index d11a0dd3e..8663e8519 100644
--- a/apps/docs/src/components/Prose.tsx
+++ b/apps/docs/src/components/Prose.tsx
@@ -1,10 +1,10 @@
import clsx from 'clsx'
export function Prose<T extends React.ElementType = 'div'>({
- as,
- className,
- ...props
-}: Omit<React.ComponentPropsWithoutRef<T>, 'as' | 'className'> & {
+ as,
+ className,
+ ...props
+ }: Omit<React.ComponentPropsWithoutRef<T>, 'as' | 'className'> & {
as?: T
className?: string
}) {
diff --git a/apps/docs/src/components/Search.tsx b/apps/docs/src/components/Search.tsx
index 5073bed7e..294735232 100644
--- a/apps/docs/src/components/Search.tsx
+++ b/apps/docs/src/components/Search.tsx
@@ -1,22 +1,13 @@
'use client'
-import {
- forwardRef,
- Fragment,
- Suspense,
- useCallback,
- useEffect,
- useId,
- useRef,
- useState,
-} from 'react'
+import { forwardRef, Fragment, Suspense, useCallback, useEffect, useId, useRef, useState } from 'react'
import Highlighter from 'react-highlight-words'
import { usePathname, useRouter, useSearchParams } from 'next/navigation'
import {
type AutocompleteApi,
- createAutocomplete,
- type AutocompleteState,
type AutocompleteCollection,
+ type AutocompleteState,
+ createAutocomplete,
} from '@algolia/autocomplete-core'
import clsx from 'clsx'
@@ -161,7 +152,7 @@ function LoadingIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
y2="15"
gradientUnits="userSpaceOnUse"
>
- <stop stopColor="currentColor" />
+ <stop stopColor="currentColor"/>
<stop
offset="1"
stopColor="currentColor"
@@ -185,12 +176,12 @@ function HighlightQuery({ text, query }: { text: string; query: string }) {
}
function SearchResult({
- result,
- resultIndex,
- autocomplete,
- collection,
- query,
-}: {
+ result,
+ resultIndex,
+ autocomplete,
+ collection,
+ query,
+ }: {
result: Result
resultIndex: number
autocomplete: Autocomplete
@@ -258,10 +249,10 @@ function SearchResult({
}
function SearchResults({
- autocomplete,
- query,
- collection,
-}: {
+ autocomplete,
+ query,
+ collection,
+ }: {
autocomplete: Autocomplete
query: string
collection: AutocompleteCollection<Result>
@@ -269,7 +260,7 @@ function SearchResults({
if (collection.items.length === 0) {
return (
<div className="p-6 text-center">
- <NoResultsIcon className="mx-auto h-5 w-5 stroke-zinc-900 dark:stroke-zinc-600" />
+ <NoResultsIcon className="mx-auto h-5 w-5 stroke-zinc-900 dark:stroke-zinc-600"/>
<p className="mt-2 text-xs text-zinc-700 dark:text-zinc-400">
Nothing found for{' '}
<strong className="break-words font-semibold text-zinc-900 dark:text-white">
@@ -309,7 +300,7 @@ const SearchInput = forwardRef<
return (
<div className="group relative flex h-12">
- <SearchIcon className="pointer-events-none absolute left-3 top-0 h-full w-5 stroke-zinc-500" />
+ <SearchIcon className="pointer-events-none absolute left-3 top-0 h-full w-5 stroke-zinc-500"/>
<input
ref={inputRef}
className={clsx(
@@ -337,7 +328,8 @@ const SearchInput = forwardRef<
/>
{autocompleteState.status === 'stalled' && (
<div className="absolute inset-y-0 right-3 flex items-center">
- <LoadingIcon className="h-5 w-5 animate-spin stroke-zinc-200 text-zinc-900 dark:stroke-zinc-800 dark:text-brand-400" />
+ <LoadingIcon
+ className="h-5 w-5 animate-spin stroke-zinc-200 text-zinc-900 dark:stroke-zinc-800 dark:text-brand-400"/>
</div>
)}
</div>
@@ -345,10 +337,10 @@ const SearchInput = forwardRef<
})
function SearchDialog({
- open,
- setOpen,
- className,
-}: {
+ open,
+ setOpen,
+ className,
+ }: {
open: boolean
setOpen: (open: boolean) => void
className?: string
@@ -448,7 +440,7 @@ function useSearchProps() {
setOpen: useCallback(
(open: boolean) => {
const { width = 0, height = 0 } =
- buttonRef.current?.getBoundingClientRect() ?? {}
+ buttonRef.current?.getBoundingClientRect() ?? {}
if (!open || (width !== 0 && height !== 0)) {
setOpen(open)
}
@@ -474,7 +466,7 @@ export function Search() {
className="hidden h-8 w-full items-center gap-2 whitespace-nowrap rounded-full bg-white pl-2 pr-3 text-sm text-zinc-500 ring-1 ring-zinc-900/10 transition hover:ring-zinc-900/20 ui-not-focus-visible:outline-none dark:bg-white/5 dark:text-zinc-400 dark:ring-inset dark:ring-white/10 dark:hover:ring-white/20 lg:flex"
{...buttonProps}
>
- <SearchIcon className="h-5 w-5 stroke-current" />
+ <SearchIcon className="h-5 w-5 stroke-current"/>
Find something...
<kbd className="ml-auto text-2xs text-zinc-400 dark:text-zinc-500">
<kbd className="font-sans">{modifierKey}</kbd>
@@ -502,7 +494,7 @@ export function MobileSearch() {
aria-label="Find something..."
{...buttonProps}
>
- <SearchIcon className="h-5 w-5 stroke-zinc-900 dark:stroke-white" />
+ <SearchIcon className="h-5 w-5 stroke-zinc-900 dark:stroke-white"/>
</button>
<Suspense fallback={null}>
<SearchDialog
diff --git a/apps/docs/src/components/SectionProvider.tsx b/apps/docs/src/components/SectionProvider.tsx
index 1d22018d8..023eab5a5 100644
--- a/apps/docs/src/components/SectionProvider.tsx
+++ b/apps/docs/src/components/SectionProvider.tsx
@@ -1,7 +1,7 @@
'use client'
import { createContext, useContext, useEffect, useLayoutEffect, useState } from 'react'
-import { type StoreApi, createStore, useStore } from 'zustand'
+import { createStore, type StoreApi, useStore } from 'zustand'
import { remToPx } from '@/lib/remToPx'
@@ -19,10 +19,10 @@ interface SectionState {
visibleSections: Array<string>
setVisibleSections: (visibleSections: Array<string>) => void
registerHeading: ({
- id,
- ref,
- offsetRem,
- }: {
+ id,
+ ref,
+ offsetRem,
+ }: {
id: string
ref: React.RefObject<HTMLHeadingElement>
offsetRem: number
@@ -117,9 +117,9 @@ const useIsomorphicLayoutEffect =
typeof window === 'undefined' ? useEffect : useLayoutEffect
export function SectionProvider({
- sections,
- children,
-}: {
+ sections,
+ children,
+ }: {
sections: Array<Section>
children: React.ReactNode
}) {
diff --git a/apps/docs/src/components/Tag.tsx b/apps/docs/src/components/Tag.tsx
index 884f12256..1d17fd30a 100644
--- a/apps/docs/src/components/Tag.tsx
+++ b/apps/docs/src/components/Tag.tsx
@@ -41,10 +41,10 @@ const valueColorMap = {
} as Record<string, keyof typeof colorStyles>
export function Tag({
- children,
- variant = 'medium',
- color = valueColorMap[children] ?? 'emerald',
-}: {
+ children,
+ variant = 'medium',
+ color = valueColorMap[children] ?? 'emerald',
+ }: {
// eslint-disable-next-line @typescript-eslint/ban-types
children: keyof typeof valueColorMap & (string | {})
variant?: keyof typeof variantStyles
diff --git a/apps/docs/src/components/ThemeToggle.tsx b/apps/docs/src/components/ThemeToggle.tsx
index feea7618d..c0ccf6db9 100644
--- a/apps/docs/src/components/ThemeToggle.tsx
+++ b/apps/docs/src/components/ThemeToggle.tsx
@@ -9,7 +9,7 @@ function SunIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
aria-hidden="true"
{...props}
>
- <path d="M12.5 10a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0Z" />
+ <path d="M12.5 10a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0Z"/>
<path
strokeLinecap="round"
d="M10 5.5v-1M13.182 6.818l.707-.707M14.5 10h1M13.182 13.182l.707.707M10 15.5v-1M6.11 13.889l.708-.707M4.5 10h1M6.11 6.111l.708.707"
@@ -26,7 +26,7 @@ function MoonIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
aria-hidden="true"
{...props}
>
- <path d="M15.224 11.724a5.5 5.5 0 0 1-6.949-6.949 5.5 5.5 0 1 0 6.949 6.949Z" />
+ <path d="M15.224 11.724a5.5 5.5 0 0 1-6.949-6.949 5.5 5.5 0 1 0 6.949 6.949Z"/>
</svg>
)
}
@@ -47,8 +47,8 @@ export function ThemeToggle() {
aria-label={mounted ? `Switch to ${otherTheme} theme` : 'Toggle theme'}
onClick={() => setTheme(otherTheme)}
>
- <SunIcon className="h-5 w-5 stroke-zinc-900 dark:hidden" />
- <MoonIcon className="hidden h-5 w-5 stroke-white dark:block" />
+ <SunIcon className="h-5 w-5 stroke-zinc-900 dark:hidden"/>
+ <MoonIcon className="hidden h-5 w-5 stroke-white dark:block"/>
</button>
)
}
diff --git a/apps/docs/src/components/TopLevelNavItem.tsx b/apps/docs/src/components/TopLevelNavItem.tsx
index e6060488b..17ba54a64 100644
--- a/apps/docs/src/components/TopLevelNavItem.tsx
+++ b/apps/docs/src/components/TopLevelNavItem.tsx
@@ -1,11 +1,11 @@
import Link from 'next/link'
export default function TopLevelNavItem({
- href,
- stat,
- statType,
- icon,
-}: {
+ href,
+ stat,
+ statType,
+ icon,
+ }: {
href: string
stat?: number | null
statType?: string
diff --git a/apps/docs/src/components/UseCases.tsx b/apps/docs/src/components/UseCases.tsx
index 7eacd73ec..1aca6b7d6 100644
--- a/apps/docs/src/components/UseCases.tsx
+++ b/apps/docs/src/components/UseCases.tsx
@@ -68,8 +68,10 @@ const useCases = [
function UseCaseIcon({ icon: Icon }) {
return (
- <div className="flex h-7 w-7 items-center justify-center rounded-full bg-zinc-900/5 ring-1 ring-zinc-900/25 backdrop-blur-[2px] transition duration-300 group-hover:bg-white/50 group-hover:ring-zinc-900/25 dark:bg-white/7.5 dark:ring-white/15 dark:group-hover:bg-brand-300/10 dark:group-hover:ring-brand-400">
- <Icon className="h-5 w-5 fill-zinc-700/10 stroke-zinc-700 transition-colors duration-300 group-hover:stroke-zinc-900 dark:fill-white/10 dark:stroke-zinc-400 dark:group-hover:fill-brand-300/10 dark:group-hover:stroke-brand-400" />
+ <div
+ className="flex h-7 w-7 items-center justify-center rounded-full bg-zinc-900/5 ring-1 ring-zinc-900/25 backdrop-blur-[2px] transition duration-300 group-hover:bg-white/50 group-hover:ring-zinc-900/25 dark:bg-white/7.5 dark:ring-white/15 dark:group-hover:bg-brand-300/10 dark:group-hover:ring-brand-400">
+ <Icon
+ className="h-5 w-5 fill-zinc-700/10 stroke-zinc-700 transition-colors duration-300 group-hover:stroke-zinc-900 dark:fill-white/10 dark:stroke-zinc-400 dark:group-hover:fill-brand-300/10 dark:group-hover:stroke-brand-400"/>
</div>
)
}
@@ -80,7 +82,8 @@ function UseCasePattern({ mouseX, mouseY, ...gridProps }) {
return (
<div className="pointer-events-none">
- <div className="absolute inset-0 rounded-2xl transition duration-300 [mask-image:linear-gradient(white,transparent)] group-hover:opacity-50">
+ <div
+ className="absolute inset-0 rounded-2xl transition duration-300 [mask-image:linear-gradient(white,transparent)] group-hover:opacity-50">
{/* @ts-ignore */}
<GridPattern
width={72}
@@ -132,12 +135,13 @@ function UseCase({ useCase }) {
mouseX={mouseX}
mouseY={mouseY}
/>
- <div className="absolute inset-0 rounded-2xl ring-1 ring-inset ring-zinc-900/7.5 group-hover:ring-zinc-900/10 dark:ring-white/10 dark:group-hover:ring-white/20" />
+ <div
+ className="absolute inset-0 rounded-2xl ring-1 ring-inset ring-zinc-900/7.5 group-hover:ring-zinc-900/10 dark:ring-white/10 dark:group-hover:ring-white/20"/>
<div className="relative rounded-2xl px-4 pb-4 pt-16">
- <UseCaseIcon icon={useCase.icon} />
+ <UseCaseIcon icon={useCase.icon}/>
<h3 className="mt-4 text-sm font-semibold leading-7 text-zinc-900 dark:text-white">
<Link href={useCase.href}>
- <span className="absolute inset-0 rounded-2xl" />
+ <span className="absolute inset-0 rounded-2xl"/>
{useCase.name}
</Link>
</h3>
@@ -159,7 +163,8 @@ export function UseCases() {
>
Use Cases
</Heading>
- <div className="not-prose mt-4 grid grid-cols-1 gap-8 border-t border-zinc-900/5 pt-10 dark:border-white/5 sm:grid-cols-2 xl:grid-cols-4">
+ <div
+ className="not-prose mt-4 grid grid-cols-1 gap-8 border-t border-zinc-900/5 pt-10 dark:border-white/5 sm:grid-cols-2 xl:grid-cols-4">
{useCases.map(useCase => (
<UseCase
key={useCase.href}
diff --git a/apps/docs/src/components/icons/DiscordIcon.tsx b/apps/docs/src/components/icons/DiscordIcon.tsx
index eb46baa7c..b4f81aeb9 100644
--- a/apps/docs/src/components/icons/DiscordIcon.tsx
+++ b/apps/docs/src/components/icons/DiscordIcon.tsx
@@ -5,7 +5,8 @@ export function DiscordIcon(props) {
aria-hidden="true"
{...props}
>
- <path d="M16.238 4.515a14.842 14.842 0 0 0-3.664-1.136.055.055 0 0 0-.059.027 10.35 10.35 0 0 0-.456.938 13.702 13.702 0 0 0-4.115 0 9.479 9.479 0 0 0-.464-.938.058.058 0 0 0-.058-.027c-1.266.218-2.497.6-3.664 1.136a.052.052 0 0 0-.024.02C1.4 8.023.76 11.424 1.074 14.782a.062.062 0 0 0 .024.042 14.923 14.923 0 0 0 4.494 2.272.058.058 0 0 0 .064-.02c.346-.473.654-.972.92-1.496a.057.057 0 0 0-.032-.08 9.83 9.83 0 0 1-1.404-.669.058.058 0 0 1-.029-.046.058.058 0 0 1 .023-.05c.094-.07.189-.144.279-.218a.056.056 0 0 1 .058-.008c2.946 1.345 6.135 1.345 9.046 0a.056.056 0 0 1 .059.007c.09.074.184.149.28.22a.058.058 0 0 1 .023.049.059.059 0 0 1-.028.046 9.224 9.224 0 0 1-1.405.669.058.058 0 0 0-.033.033.056.056 0 0 0 .002.047c.27.523.58 1.022.92 1.495a.056.056 0 0 0 .062.021 14.878 14.878 0 0 0 4.502-2.272.055.055 0 0 0 .016-.018.056.056 0 0 0 .008-.023c.375-3.883-.63-7.256-2.662-10.246a.046.046 0 0 0-.023-.021Zm-9.223 8.221c-.887 0-1.618-.814-1.618-1.814s.717-1.814 1.618-1.814c.908 0 1.632.821 1.618 1.814 0 1-.717 1.814-1.618 1.814Zm5.981 0c-.887 0-1.618-.814-1.618-1.814s.717-1.814 1.618-1.814c.908 0 1.632.821 1.618 1.814 0 1-.71 1.814-1.618 1.814Z" />
+ <path
+ d="M16.238 4.515a14.842 14.842 0 0 0-3.664-1.136.055.055 0 0 0-.059.027 10.35 10.35 0 0 0-.456.938 13.702 13.702 0 0 0-4.115 0 9.479 9.479 0 0 0-.464-.938.058.058 0 0 0-.058-.027c-1.266.218-2.497.6-3.664 1.136a.052.052 0 0 0-.024.02C1.4 8.023.76 11.424 1.074 14.782a.062.062 0 0 0 .024.042 14.923 14.923 0 0 0 4.494 2.272.058.058 0 0 0 .064-.02c.346-.473.654-.972.92-1.496a.057.057 0 0 0-.032-.08 9.83 9.83 0 0 1-1.404-.669.058.058 0 0 1-.029-.046.058.058 0 0 1 .023-.05c.094-.07.189-.144.279-.218a.056.056 0 0 1 .058-.008c2.946 1.345 6.135 1.345 9.046 0a.056.056 0 0 1 .059.007c.09.074.184.149.28.22a.058.058 0 0 1 .023.049.059.059 0 0 1-.028.046 9.224 9.224 0 0 1-1.405.669.058.058 0 0 0-.033.033.056.056 0 0 0 .002.047c.27.523.58 1.022.92 1.495a.056.056 0 0 0 .062.021 14.878 14.878 0 0 0 4.502-2.272.055.055 0 0 0 .016-.018.056.056 0 0 0 .008-.023c.375-3.883-.63-7.256-2.662-10.246a.046.046 0 0 0-.023-.021Zm-9.223 8.221c-.887 0-1.618-.814-1.618-1.814s.717-1.814 1.618-1.814c.908 0 1.632.821 1.618 1.814 0 1-.717 1.814-1.618 1.814Zm5.981 0c-.887 0-1.618-.814-1.618-1.814s.717-1.814 1.618-1.814c.908 0 1.632.821 1.618 1.814 0 1-.71 1.814-1.618 1.814Z"/>
</svg>
)
}
diff --git a/apps/docs/src/components/mdx.tsx b/apps/docs/src/components/mdx.tsx
index 0a9bc50b7..8a199b8eb 100644
--- a/apps/docs/src/components/mdx.tsx
+++ b/apps/docs/src/components/mdx.tsx
@@ -15,7 +15,7 @@ export function wrapper({ children }: { children: React.ReactNode }) {
<article className="mx-auto flex h-full max-w-6xl flex-col pb-10 pt-16">
<Prose className="flex-auto">{children}</Prose>
<footer className="mx-auto mt-10 w-full max-w-2xl lg:max-w-5xl">
- <Feedback variant="textSubtle" />
+ <Feedback variant="textSubtle"/>
</footer>
</article>
)
@@ -64,8 +64,10 @@ function InfoIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
export function Note({ children }: { children: React.ReactNode }) {
return (
- <div className="bg-brand-50/50 my-6 flex gap-2.5 rounded-2xl border border-brand-500/20 p-4 leading-6 text-brand-900 dark:border-brand-500/30 dark:bg-brand-500/5 dark:text-brand-200 dark:[--tw-prose-links-hover:theme(colors.brand.300)] dark:[--tw-prose-links:theme(colors.white)]">
- <InfoIcon className="mt-1 h-4 w-4 flex-none fill-brand-500 stroke-white dark:fill-brand-200/20 dark:stroke-brand-200" />
+ <div
+ className="bg-brand-50/50 my-6 flex gap-2.5 rounded-2xl border border-brand-500/20 p-4 leading-6 text-brand-900 dark:border-brand-500/30 dark:bg-brand-500/5 dark:text-brand-200 dark:[--tw-prose-links-hover:theme(colors.brand.300)] dark:[--tw-prose-links:theme(colors.white)]">
+ <InfoIcon
+ className="mt-1 h-4 w-4 flex-none fill-brand-500 stroke-white dark:fill-brand-200/20 dark:stroke-brand-200"/>
<div className="[&>:first-child]:mt-0 [&>:last-child]:mb-0">{children}</div>
</div>
)
@@ -80,9 +82,9 @@ export function Row({ children }: { children: React.ReactNode }) {
}
export function Col({
- children,
- sticky = false,
-}: {
+ children,
+ sticky = false,
+ }: {
children: React.ReactNode
sticky?: boolean
}) {
@@ -112,10 +114,10 @@ export function Properties({ children }: { children: React.ReactNode }) {
}
export function Property({
- name,
- children,
- type,
-}: {
+ name,
+ children,
+ type,
+ }: {
name: string
children: React.ReactNode
type?: string
diff --git a/apps/docs/src/images/ai-app-e2b-sandbox-model.png b/apps/docs/src/images/ai-app-e2b-sandbox-model.png
new file mode 100644
index 000000000..b4ba6b7d6
Binary files /dev/null and b/apps/docs/src/images/ai-app-e2b-sandbox-model.png differ
diff --git a/apps/docs/src/images/logos/go.svg b/apps/docs/src/images/logos/go.svg
deleted file mode 100644
index 7f7b19de5..000000000
--- a/apps/docs/src/images/logos/go.svg
+++ /dev/null
@@ -1,14 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" fill="none">
- <g fill="#00ACD7" clip-path="url(#a)">
- <path fill-rule="evenodd"
- d="M5.8 19.334c-.08 0-.093-.054-.067-.107l.4-.533a.421.421 0 0 1 .227-.08h6.893c.08 0 .094.053.067.106l-.334.507c-.04.053-.133.12-.2.12L5.8 19.32v.014Zm-2.92 1.773c-.08 0-.093-.04-.053-.107l.4-.52c.04-.053.133-.093.213-.093h8.8c.093 0 .133.053.107.12l-.16.453c-.014.08-.094.134-.174.134H2.88v.013Zm4.68 1.773c-.08 0-.107-.053-.067-.12l.267-.48c.053-.053.133-.12.2-.12h3.866c.08 0 .12.067.12.134l-.04.466c0 .08-.08.134-.133.134L7.56 22.88Zm20.053-3.906-3.24.853c-.293.08-.32.093-.56-.2-.293-.32-.506-.533-.92-.733a3.36 3.36 0 0 0-3.493.293 4.107 4.107 0 0 0-1.973 3.667 3.027 3.027 0 0 0 2.613 3.04c1.306.173 2.413-.294 3.28-1.28l.533-.707H20.12c-.4 0-.507-.267-.373-.587.253-.6.72-1.6.986-2.106a.533.533 0 0 1 .48-.307h7.04c-.04.533-.04 1.04-.12 1.573-.213 1.387-.733 2.667-1.586 3.787a8.053 8.053 0 0 1-5.507 3.28 6.839 6.839 0 0 1-5.2-1.28A6.065 6.065 0 0 1 13.386 24c-.24-2.106.374-4 1.654-5.666A8.573 8.573 0 0 1 20.44 15a6.667 6.667 0 0 1 5.12.934c1.027.666 1.76 1.6 2.253 2.733.107.173.027.267-.2.32v-.013Z"
- clip-rule="evenodd" />
- <path
- d="M34 29.667a7.253 7.253 0 0 1-4.707-1.707 6.066 6.066 0 0 1-2.08-3.733 7.373 7.373 0 0 1 1.56-5.827 8.107 8.107 0 0 1 5.413-3.226 7.173 7.173 0 0 1 5.507.986 6.015 6.015 0 0 1 2.72 4.307 7.467 7.467 0 0 1-2.227 6.547 8.854 8.854 0 0 1-4.626 2.48c-.534.093-1.054.106-1.547.173H34Zm4.613-7.813c-.027-.254-.027-.44-.067-.64a3.186 3.186 0 0 0-3.933-2.547 4.227 4.227 0 0 0-3.387 3.36A3.187 3.187 0 0 0 33 25.68c1.066.454 2.133.4 3.16-.133a4.227 4.227 0 0 0 2.453-3.68v-.013Z" />
- </g>
- <defs>
- <clipPath id="a">
- <path fill="#fff" d="M4 4h40v40H4z" />
- </clipPath>
- </defs>
-</svg>
diff --git a/apps/docs/src/images/logos/node.svg b/apps/docs/src/images/logos/node.svg
index 1d09de22b..76224e4ac 100644
--- a/apps/docs/src/images/logos/node.svg
+++ b/apps/docs/src/images/logos/node.svg
@@ -1,4 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" fill="none">
- <path fill="#89D42C"
- d="M23.675 39.82a2.48 2.48 0 0 1-1.19-.313l-3.764-2.236c-.568-.31-.285-.425-.114-.48.765-.256.906-.313 1.698-.765.086-.057.198-.029.284.028l2.888 1.727c.113.057.254.057.34 0l11.296-6.54c.113-.057.17-.17.17-.312v-13.05c0-.143-.057-.256-.17-.313l-11.296-6.51c-.114-.057-.256-.057-.34 0L12.18 17.567c-.114.057-.17.198-.17.311V30.93c0 .114.056.255.17.312l3.087 1.784c1.67.849 2.717-.143 2.717-1.133V19.01a.344.344 0 0 1 .34-.34h1.443a.344.344 0 0 1 .341.34v12.882c0 2.237-1.218 3.539-3.342 3.539-.65 0-1.16 0-2.604-.708l-2.975-1.698A2.39 2.39 0 0 1 10 30.959V17.904c0-.849.452-1.642 1.189-2.066l11.296-6.54a2.527 2.527 0 0 1 2.379 0l11.297 6.54a2.39 2.39 0 0 1 1.188 2.066V30.96c0 .85-.452 1.642-1.188 2.066l-11.297 6.54a2.896 2.896 0 0 1-1.189.256v-.001Zm3.482-8.976c-4.954 0-5.973-2.264-5.973-4.19a.344.344 0 0 1 .34-.34h1.472c.169 0 .311.114.311.284.226 1.5.878 2.236 3.879 2.236 2.378 0 3.397-.538 3.397-1.812 0-.736-.283-1.274-3.992-1.642-3.086-.311-5.012-.99-5.012-3.454 0-2.293 1.926-3.652 5.154-3.652 3.623 0 5.407 1.246 5.634 3.963a.459.459 0 0 1-.086.256c-.056.056-.141.113-.226.113h-1.472a.332.332 0 0 1-.311-.256c-.34-1.555-1.217-2.066-3.539-2.066-2.605 0-2.916.906-2.916 1.585 0 .821.368 1.076 3.878 1.53 3.483.452 5.124 1.104 5.124 3.539-.027 2.491-2.066 3.907-5.662 3.907Z" />
+ <path fill="#89D42C"
+ d="M23.675 39.82a2.48 2.48 0 0 1-1.19-.313l-3.764-2.236c-.568-.31-.285-.425-.114-.48.765-.256.906-.313 1.698-.765.086-.057.198-.029.284.028l2.888 1.727c.113.057.254.057.34 0l11.296-6.54c.113-.057.17-.17.17-.312v-13.05c0-.143-.057-.256-.17-.313l-11.296-6.51c-.114-.057-.256-.057-.34 0L12.18 17.567c-.114.057-.17.198-.17.311V30.93c0 .114.056.255.17.312l3.087 1.784c1.67.849 2.717-.143 2.717-1.133V19.01a.344.344 0 0 1 .34-.34h1.443a.344.344 0 0 1 .341.34v12.882c0 2.237-1.218 3.539-3.342 3.539-.65 0-1.16 0-2.604-.708l-2.975-1.698A2.39 2.39 0 0 1 10 30.959V17.904c0-.849.452-1.642 1.189-2.066l11.296-6.54a2.527 2.527 0 0 1 2.379 0l11.297 6.54a2.39 2.39 0 0 1 1.188 2.066V30.96c0 .85-.452 1.642-1.188 2.066l-11.297 6.54a2.896 2.896 0 0 1-1.189.256v-.001Zm3.482-8.976c-4.954 0-5.973-2.264-5.973-4.19a.344.344 0 0 1 .34-.34h1.472c.169 0 .311.114.311.284.226 1.5.878 2.236 3.879 2.236 2.378 0 3.397-.538 3.397-1.812 0-.736-.283-1.274-3.992-1.642-3.086-.311-5.012-.99-5.012-3.454 0-2.293 1.926-3.652 5.154-3.652 3.623 0 5.407 1.246 5.634 3.963a.459.459 0 0 1-.086.256c-.056.056-.141.113-.226.113h-1.472a.332.332 0 0 1-.311-.256c-.34-1.555-1.217-2.066-3.539-2.066-2.605 0-2.916.906-2.916 1.585 0 .821.368 1.076 3.878 1.53 3.483.452 5.124 1.104 5.124 3.539-.027 2.491-2.066 3.907-5.662 3.907Z"/>
</svg>
diff --git a/apps/docs/src/images/logos/php.svg b/apps/docs/src/images/logos/php.svg
deleted file mode 100644
index 0a9ac462a..000000000
--- a/apps/docs/src/images/logos/php.svg
+++ /dev/null
@@ -1,10 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" fill="none">
- <path fill="#6181B6" fill-rule="evenodd"
- d="M14.643 21.762h-1.77l-.964 4.965h1.57c1.043 0 1.82-.198 2.33-.59.51-.393.853-1.047 1.03-1.966.173-.882.095-1.503-.232-1.866-.328-.362-.98-.543-1.962-.543h-.002Z"
- clip-rule="evenodd" />
- <path fill="#6181B6"
- d="M24 13.29c-12.426 0-22.5 5.3-22.5 11.835 0 6.535 10.074 11.837 22.5 11.837s22.5-5.3 22.5-11.837S36.426 13.29 24 13.29Zm-6.113 13.971a4.55 4.55 0 0 1-1.718 1.032c-.63.203-1.434.308-2.41.308h-2.215l-.612 3.152H8.346l2.307-11.861h4.968c1.494 0 2.585.391 3.27 1.177.687.785.893 1.88.618 3.285a5.34 5.34 0 0 1-.57 1.588c-.28.493-.634.938-1.053 1.319h.002Zm7.546 1.34 1.018-5.247c.119-.598.073-1.005-.128-1.221-.2-.218-.63-.328-1.288-.328h-2.047l-1.32 6.799h-2.566L21.41 16.74h2.561l-.611 3.155h2.282c1.439 0 2.429.25 2.975.75.546.499.708 1.314.492 2.437l-1.073 5.52h-2.604V28.6Zm14.243-4.245a5.215 5.215 0 0 1-.571 1.586 5.356 5.356 0 0 1-1.051 1.319c-.49.467-1.078.82-1.721 1.032-.63.203-1.434.308-2.41.308H31.71l-.614 3.154h-2.581l2.305-11.862h4.968c1.495 0 2.584.393 3.27 1.177.686.784.895 1.878.62 3.285h-.002Z" />
- <path fill="#6181B6" fill-rule="evenodd"
- d="M34.81 21.762h-1.765l-.968 4.965h1.571c1.044 0 1.821-.198 2.33-.59.51-.393.852-1.047 1.032-1.966.172-.882.093-1.503-.234-1.866-.326-.362-.983-.543-1.964-.543h-.002Z"
- clip-rule="evenodd" />
-</svg>
diff --git a/apps/docs/src/images/logos/python.svg b/apps/docs/src/images/logos/python.svg
index 9bceb587a..c55ed0fcf 100644
--- a/apps/docs/src/images/logos/python.svg
+++ b/apps/docs/src/images/logos/python.svg
@@ -1,13 +1,13 @@
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" fill="none">
- <g clip-path="url(#a)">
- <path fill="#3372A7"
- d="M23.429 9.008c-7.882 0-7.39 3.418-7.39 3.418l.01 3.541h7.52v1.063H13.062s-5.043-.572-5.043 7.38c0 7.954 4.402 7.671 4.402 7.671h2.627v-3.69s-.142-4.402 4.331-4.402h7.46s4.191.068 4.191-4.05v-6.81s.637-4.12-7.6-4.12Zm-4.147 2.382a1.353 1.353 0 1 1 .001 2.706 1.353 1.353 0 0 1-.001-2.706Z" />
- <path fill="#FFD235"
- d="M23.653 39.894c7.881 0 7.39-3.418 7.39-3.418l-.01-3.541h-7.52v-1.063H34.02s5.043.572 5.043-7.381-4.402-7.67-4.402-7.67h-2.627v3.69s.142 4.402-4.332 4.402h-7.46s-4.19-.068-4.19 4.05v6.81s-.637 4.12 7.6 4.12Zm4.147-2.381a1.353 1.353 0 1 1-.002-2.707 1.353 1.353 0 0 1 .002 2.706Z" />
- </g>
- <defs>
- <clipPath id="a">
- <path fill="#fff" d="M8 9h31.122v31H8z" />
- </clipPath>
- </defs>
+ <g clip-path="url(#a)">
+ <path fill="#3372A7"
+ d="M23.429 9.008c-7.882 0-7.39 3.418-7.39 3.418l.01 3.541h7.52v1.063H13.062s-5.043-.572-5.043 7.38c0 7.954 4.402 7.671 4.402 7.671h2.627v-3.69s-.142-4.402 4.331-4.402h7.46s4.191.068 4.191-4.05v-6.81s.637-4.12-7.6-4.12Zm-4.147 2.382a1.353 1.353 0 1 1 .001 2.706 1.353 1.353 0 0 1-.001-2.706Z"/>
+ <path fill="#FFD235"
+ d="M23.653 39.894c7.881 0 7.39-3.418 7.39-3.418l-.01-3.541h-7.52v-1.063H34.02s5.043.572 5.043-7.381-4.402-7.67-4.402-7.67h-2.627v3.69s.142 4.402-4.332 4.402h-7.46s-4.19-.068-4.19 4.05v6.81s-.637 4.12 7.6 4.12Zm4.147-2.381a1.353 1.353 0 1 1-.002-2.707 1.353 1.353 0 0 1 .002 2.706Z"/>
+ </g>
+ <defs>
+ <clipPath id="a">
+ <path fill="#fff" d="M8 9h31.122v31H8z"/>
+ </clipPath>
+ </defs>
</svg>
diff --git a/apps/docs/src/images/logos/ruby.svg b/apps/docs/src/images/logos/ruby.svg
deleted file mode 100644
index b22a5bf10..000000000
--- a/apps/docs/src/images/logos/ruby.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" fill="none">
- <path fill="#D91505"
- d="M33.735 10.41c3.376.585 4.334 2.893 4.262 5.311l.017-.035-1.519 19.912-19.752 1.352h.017c-1.639-.069-5.294-.218-5.46-5.328l1.83-3.34 3.139 7.331.56 1.306L19.95 26.74l-.032.007.017-.034 10.302 3.29-1.555-6.044-1.101-4.341 9.817-.634-.684-.567-7.048-5.746 4.073-2.272-.004.012v-.001ZM17.01 15.966c3.963-3.932 9.079-6.256 11.044-4.274 1.96 1.98-.118 6.796-4.089 10.726-3.966 3.931-9.02 6.382-10.98 4.405-1.967-1.98.05-6.921 4.02-10.853l.005-.004Z" />
-</svg>
diff --git a/apps/docs/src/images/sandbox-build-output.png b/apps/docs/src/images/sandbox-build-output.png
new file mode 100644
index 000000000..514720c33
Binary files /dev/null and b/apps/docs/src/images/sandbox-build-output.png differ
diff --git a/apps/docs/src/mdx/rehype.mjs b/apps/docs/src/mdx/rehype.mjs
index 6069e3a88..48aaafb78 100644
--- a/apps/docs/src/mdx/rehype.mjs
+++ b/apps/docs/src/mdx/rehype.mjs
@@ -12,7 +12,7 @@ function rehypeParseCodeBlocks() {
if (node.tagName === 'code' && node.properties.className) {
parentNode.properties.language = node.properties.className[0]?.replace(
/^language-/,
- '',
+ ''
)
}
})
@@ -38,7 +38,7 @@ const elements = {
token({ style, children }) {
return `<span style="${style}">${children}</span>` // no changes here
- },
+ }
}
// From Shiki
@@ -47,7 +47,7 @@ const FontStyle = {
None: 0,
Italic: 1,
Bold: 2,
- Underline: 4,
+ Underline: 4
}
// Custom implementation of renderToHtml from https://raw.githubusercontent.com/shikijs/shiki/main/packages/shiki/src/renderer.ts
@@ -58,7 +58,7 @@ function customRenderToHtml(lines, language) {
children = children.filter(Boolean)
return element({
...props,
- children: type === 'code' ? children.join('\n') : children.join(''),
+ children: type === 'code' ? children.join('\n') : children.join('')
})
}
return ''
@@ -75,10 +75,10 @@ function customRenderToHtml(lines, language) {
index === 0 && // Only supported on the first line
line?.some(
token =>
- token.content === 'import' && token.color === 'var(--shiki-token-keyword)',
+ token.content === 'import' && token.color === 'var(--shiki-token-keyword)'
) && // works fine for Python and JS
line?.some(
- token => token.content === 'e2b' && token.color === 'var(--shiki-token-text)',
+ token => token.content === 'e2b' && token.color === 'var(--shiki-token-text)'
) // works fine for Python and JS
) {
isE2bImport = true // TODO: Actually use, probably to dim the line
@@ -89,7 +89,7 @@ function customRenderToHtml(lines, language) {
line?.some(
token =>
token.content.includes('$HighlightLine') &&
- token.color === 'var(--shiki-token-comment)',
+ token.color === 'var(--shiki-token-comment)'
)
) {
isHighlightComment = true
@@ -109,7 +109,7 @@ function customRenderToHtml(lines, language) {
!(
token.content.includes('$HighlightLine') &&
token.color === 'var(--shiki-token-comment)'
- ),
+ )
)
lineClasses += ' Code-line_highlighted'
}
@@ -120,7 +120,7 @@ function customRenderToHtml(lines, language) {
className: lineClasses,
lines,
line,
- index,
+ index
},
line.map((token, index) => {
const cssDeclarations = [`color: ${token.color}`]
@@ -137,14 +137,14 @@ function customRenderToHtml(lines, language) {
style: cssDeclarations.join('; '),
tokens: line,
token,
- index,
+ index
},
- [escapeHtml(token.content)],
+ [escapeHtml(token.content)]
)
- }),
+ })
)
- }),
- ),
+ })
+ )
])
}
@@ -153,7 +153,7 @@ const htmlEscapes = {
'<': '&lt;',
'>': '&gt;',
'"': '&quot;',
- "'": '&#39;',
+ "'": '&#39;'
}
function escapeHtml(html) {
@@ -220,9 +220,9 @@ function rehypeAddMDXExports(getExports) {
data: {
estree: acorn.parse(exportStr, {
sourceType: 'module',
- ecmaVersion: 'latest',
- }),
- },
+ ecmaVersion: 'latest'
+ })
+ }
})
}
}
@@ -254,7 +254,7 @@ export const rehypePlugins = [
[
rehypeAddMDXExports,
tree => ({
- sections: `[${getSections(tree).join()}]`,
- }),
- ],
+ sections: `[${getSections(tree).join()}]`
+ })
+ ]
]
diff --git a/apps/docs/src/mdx/remark.mjs b/apps/docs/src/mdx/remark.mjs
index 069463de1..91c9f0243 100644
--- a/apps/docs/src/mdx/remark.mjs
+++ b/apps/docs/src/mdx/remark.mjs
@@ -9,7 +9,7 @@ import fs from 'fs'
const lang2ext = {
js: 'js',
- python: 'py',
+ python: 'py'
}
function loadFileSnippet() {
@@ -27,7 +27,7 @@ function loadFileSnippet() {
if (snippet && node.value) {
throw new Error(
- `Snippet that should be loaded from file "${snippetFileName}" has content in the markdown file already specified. Please remove the content from the markdown file."`,
+ `Snippet that should be loaded from file "${snippetFileName}" has content in the markdown file already specified. Please remove the content from the markdown file."`
)
}
@@ -37,7 +37,7 @@ function loadFileSnippet() {
const file = path.resolve(`./src/code/${snippetFileName}`)
const content = await readFile(file, 'utf8')
node.value = content.trim()
- })(),
+ })()
)
}
})
@@ -64,7 +64,7 @@ function processCodeGroupAutoload() {
const fileExists = fs.existsSync(path.resolve(`./src/code/${snippetPath}`))
if (!fileExists) {
console.warn(
- `CodeGroupAutoload: snippet "${attrPath}" does not exist for language "${lang}"`,
+ `CodeGroupAutoload: snippet "${attrPath}" does not exist for language "${lang}"`
)
continue
}
@@ -74,9 +74,9 @@ function processCodeGroupAutoload() {
lang,
data: {
hProperties: {
- annotation: `{ language: '${lang}', snippet: '${snippetPath}' }`,
- },
- },
+ annotation: `{ language: '${lang}', snippet: '${snippetPath}' }`
+ }
+ }
})
}
})
@@ -87,5 +87,5 @@ export const remarkPlugins = [
processCodeGroupAutoload,
mdxAnnotations.remark,
remarkGfm,
- loadFileSnippet,
+ loadFileSnippet
]
diff --git a/apps/docs/src/mdx/search.mjs b/apps/docs/src/mdx/search.mjs
index 7cf35f0af..35c1144c0 100644
--- a/apps/docs/src/mdx/search.mjs
+++ b/apps/docs/src/mdx/search.mjs
@@ -122,8 +122,8 @@ export default function (nextConfig = {}) {
}))
}
`
- }),
- ],
+ })
+ ]
})
if (typeof nextConfig.webpack === 'function') {
@@ -131,6 +131,6 @@ export default function (nextConfig = {}) {
}
return config
- },
+ }
})
}
diff --git a/apps/docs/src/styles/tailwind.css b/apps/docs/src/styles/tailwind.css
index 592fa4c91..0dd816af1 100644
--- a/apps/docs/src/styles/tailwind.css
+++ b/apps/docs/src/styles/tailwind.css
@@ -1,136 +1,138 @@
@layer base {
- :root {
- --shiki-color-text: theme('colors.white');
- --shiki-token-constant: theme('colors.brand.300');
- --shiki-token-string: theme('colors.brand.300');
- --shiki-token-comment: theme('colors.zinc.500');
- --shiki-token-keyword: theme('colors.sky.300');
- --shiki-token-parameter: theme('colors.pink.300');
- --shiki-token-function: theme('colors.violet.300');
- --shiki-token-string-expression: theme('colors.brand.300');
- --shiki-token-punctuation: theme('colors.zinc.200');
- }
-
- code[class*='language-'] .Code-line_highlighted {
- position: relative; /* holds highlight element */
- z-index: 1; /* force above the highlight defined below */
- }
-
- code[class*='language-'] .Code-line_highlighted:before {
- content: '';
- position: absolute;
- left: -16px; /* align nicely with code border */
- top: -5px;
- bottom: -5px; /* breathing space */
- border-left: 3px solid theme('colors.brand.500');
- width: 300px; /* arbitrary value, looks nice */
- /* TODO: Theme colors */
- background: linear-gradient(to right, hsl(240, 3%, 21%), #1d1d20);
- pointer-events: none;
- z-index: -1; /* force below code */
- }
-
- [inert] ::-webkit-scrollbar {
- display: none;
- }
-
- #sidebar::-webkit-scrollbar-track {
- border-radius: 10px;
- }
-
- #sidebar::-webkit-scrollbar-thumb {
- border-radius: 10px;
- }
+ :root {
+ --shiki-color-text: theme('colors.white');
+ --shiki-token-constant: theme('colors.brand.300');
+ --shiki-token-string: theme('colors.brand.300');
+ --shiki-token-comment: theme('colors.zinc.500');
+ --shiki-token-keyword: theme('colors.sky.300');
+ --shiki-token-parameter: theme('colors.pink.300');
+ --shiki-token-function: theme('colors.violet.300');
+ --shiki-token-string-expression: theme('colors.brand.300');
+ --shiki-token-punctuation: theme('colors.zinc.200');
+ }
+
+ code[class*='language-'] .Code-line_highlighted {
+ position: relative; /* holds highlight element */
+ z-index: 1; /* force above the highlight defined below */
+ }
+
+ code[class*='language-'] .Code-line_highlighted:before {
+ content: '';
+ position: absolute;
+ left: -16px; /* align nicely with code border */
+ top: -5px;
+ bottom: -5px; /* breathing space */
+ border-left: 3px solid theme('colors.brand.500');
+ width: 300px; /* arbitrary value, looks nice */
+ /* TODO: Theme colors */
+ background: linear-gradient(to right, hsl(240, 3%, 21%), #1d1d20);
+ pointer-events: none;
+ z-index: -1; /* force below code */
+ }
+
+ [inert] ::-webkit-scrollbar {
+ display: none;
+ }
+
+ #sidebar::-webkit-scrollbar-track {
+ border-radius: 10px;
+ }
+
+ #sidebar::-webkit-scrollbar-thumb {
+ border-radius: 10px;
+ }
}
/* Shadcn */
@layer base {
- :root {
- --background: 0 0% 100%;
- --foreground: 222.2 84% 4.9%;
+ :root {
+ --background: 0 0% 100%;
+ --foreground: 222.2 84% 4.9%;
- --card: 0 0% 100%;
- --card-foreground: 222.2 84% 4.9%;
+ --card: 0 0% 100%;
+ --card-foreground: 222.2 84% 4.9%;
- --popover: 0 0% 100%;
- --popover-foreground: 222.2 84% 4.9%;
+ --popover: 0 0% 100%;
+ --popover-foreground: 222.2 84% 4.9%;
- --primary: 222.2 47.4% 11.2%;
- --primary-foreground: 210 40% 98%;
+ --primary: 222.2 47.4% 11.2%;
+ --primary-foreground: 210 40% 98%;
- --secondary: 210 40% 96.1%;
- --secondary-foreground: 222.2 47.4% 11.2%;
+ --secondary: 210 40% 96.1%;
+ --secondary-foreground: 222.2 47.4% 11.2%;
- --muted: 210 40% 96.1%;
- --muted-foreground: 215.4 16.3% 46.9%;
+ --muted: 210 40% 96.1%;
+ --muted-foreground: 215.4 16.3% 46.9%;
- --accent: 210 40% 96.1%;
- --accent-foreground: 222.2 47.4% 11.2%;
+ --accent: 210 40% 96.1%;
+ --accent-foreground: 222.2 47.4% 11.2%;
- --destructive: 0 84.2% 60.2%;
- --destructive-foreground: 210 40% 98%;
+ --destructive: 0 84.2% 60.2%;
+ --destructive-foreground: 210 40% 98%;
- --border: 214.3 31.8% 91.4%;
- --input: 214.3 31.8% 91.4%;
- --ring: 222.2 84% 4.9%;
+ --border: 214.3 31.8% 91.4%;
+ --input: 214.3 31.8% 91.4%;
+ --ring: 222.2 84% 4.9%;
- --radius: 0.5rem;
+ --radius: 0.5rem;
- --sidebar-nav-width: 376px;
- }
+ --sidebar-nav-width: 376px;
+ }
- .dark {
- --background: 222.2 84% 4.9%;
- --foreground: 210 40% 98%;
+ .dark {
+ --background: 222.2 84% 4.9%;
+ --foreground: 210 40% 98%;
- --card: 222.2 84% 4.9%;
- --card-foreground: 210 40% 98%;
+ --card: 222.2 84% 4.9%;
+ --card-foreground: 210 40% 98%;
- --popover: 222.2 84% 4.9%;
- --popover-foreground: 210 40% 98%;
+ --popover: 222.2 84% 4.9%;
+ --popover-foreground: 210 40% 98%;
- --primary: 210 40% 98%;
- --primary-foreground: 222.2 47.4% 11.2%;
+ --primary: 210 40% 98%;
+ --primary-foreground: 222.2 47.4% 11.2%;
- --secondary: 217.2 32.6% 17.5%;
- --secondary-foreground: 210 40% 98%;
+ --secondary: 217.2 32.6% 17.5%;
+ --secondary-foreground: 210 40% 98%;
- --muted: 217.2 32.6% 17.5%;
- --muted-foreground: 215 20.2% 65.1%;
+ --muted: 217.2 32.6% 17.5%;
+ --muted-foreground: 215 20.2% 65.1%;
- --accent: 217.2 32.6% 17.5%;
- --accent-foreground: 210 40% 98%;
+ --accent: 217.2 32.6% 17.5%;
+ --accent-foreground: 210 40% 98%;
- --destructive: 0 62.8% 30.6%;
- --destructive-foreground: 210 40% 98%;
+ --destructive: 0 62.8% 30.6%;
+ --destructive-foreground: 210 40% 98%;
- --border: 217.2 32.6% 17.5%;
- --input: 217.2 32.6% 17.5%;
- --ring: 212.7 26.8% 83.9%;
- }
+ --border: 217.2 32.6% 17.5%;
+ --input: 217.2 32.6% 17.5%;
+ --ring: 212.7 26.8% 83.9%;
+ }
}
/* Shadcn */
@layer base {
- * {
- @apply border-border;
- }
- body {
- @apply bg-background text-foreground;
- }
+ * {
+ @apply border-border;
+ }
+
+ body {
+ @apply bg-background text-foreground;
+ }
}
@layer utilities {
- .animation-delay-200 {
- animation-delay: 0.2s;
- }
- .animation-delay-400 {
- animation-delay: 0.4s;
- }
+ .animation-delay-200 {
+ animation-delay: 0.2s;
+ }
+
+ .animation-delay-400 {
+ animation-delay: 0.4s;
+ }
}
.circle {
- @apply relative top-[-1px] mx-[2px] h-[5px] w-[5px] rounded-full bg-gray-500;
+ @apply relative top-[-1px] mx-[2px] h-[5px] w-[5px] rounded-full bg-gray-500;
}
@tailwind base;
diff --git a/apps/docs/src/utils/useSandboxes.tsx b/apps/docs/src/utils/useSandboxes.tsx
new file mode 100644
index 000000000..253f90756
--- /dev/null
+++ b/apps/docs/src/utils/useSandboxes.tsx
@@ -0,0 +1,104 @@
+import { Sandbox } from '@e2b/sdk'
+import { create } from 'zustand'
+import { LangShort } from '@/utils/consts'
+
+function stdHandler({ line, timestamp, error }) {
+ if (process.env.NODE_ENV === 'production') return
+
+ const timestampHumanFriendly = new Date(timestamp / 1000000) // timestamp is in nanoseconds
+ .toISOString()
+ .split('T')[1] // only time, date is not relevant for debugging
+ .split('.')[0] // remove ms
+ const emoji = error ? '\x1B[31mERROR' : '\x1B[34mINFO'
+ console.log(`☁️ ${timestampHumanFriendly} ${emoji} ${line}`)
+}
+
+function log(message?: any, ...optionalParams: any[]) {
+ if (process.env.NODE_ENV === 'production') return
+ else console.log(message, optionalParams)
+}
+
+const envIds = {
+ js: 'rki5dems9wqfm4r03t7g',
+ py: 'rki5dems9wqfm4r03t7g',
+}
+
+const preps = {
+ js: 'npm init es6 -y && npm install @e2b/sdk',
+ py: 'pip install e2b',
+}
+
+// TODO: Consider using immer for easier state updates
+export const useSandboxesStore = create<SandboxStore>((set, get) => ({
+ sandboxes: {
+ js: null,
+ py: null,
+ },
+ initSandbox: async (lang: LangShort, apiKey: string): Promise<Sandbox> => {
+ // eslint-disable-next-line no-async-promise-executor
+ return new Promise(async (resolve, reject) => {
+ const maybeExistingSandbox = get().sandboxes[lang]
+ if (maybeExistingSandbox?.sandbox) {
+ log(`${lang} sandbox already ready`)
+ resolve(maybeExistingSandbox.sandbox)
+ return
+ } else if (maybeExistingSandbox?.promise) {
+ log(`${lang} sandbox in progress, waiting...`)
+ await maybeExistingSandbox.promise
+ resolve(maybeExistingSandbox.sandbox)
+ } else {
+ log(`${lang} sandbox creating...`)
+ try {
+ const sandboxP = Sandbox.create({ id: envIds[lang], apiKey })
+ // set promise to store so that other calls to initSandbox will wait for this one to finish
+ set((state) => ({
+ sandboxes: {
+ ...state.sandboxes,
+ [lang]: {
+ sandbox: null,
+ promise: sandboxP,
+ },
+ },
+ }))
+ const newSandbox = await sandboxP // await creation
+ log(`${lang} sandbox created, starting prep process...`)
+ const proc = await newSandbox.process.start({
+ cmd: preps[lang],
+ onStdout: stdHandler,
+ onStderr: stdHandler,
+ cwd: '/code',
+ })
+ await proc.wait() // await prep process to finish
+ log(`${lang} sandbox created and started`)
+ // set sandbox to store, so it can be used instead of creating a new one
+ set((state) => ({
+ sandboxes: {
+ ...state.sandboxes,
+ [lang]: {
+ sandbox: newSandbox,
+ promise: null,
+ },
+ },
+ }))
+ resolve(newSandbox) // also resolve with the new sandbox for the initSandbox caller
+ } catch (err) {
+ console.info(`${lang} sandbox creation failed`, err)
+ reject(err)
+ }
+ }
+ })
+ },
+}))
+
+type SandboxMeta = {
+ sandbox: Sandbox;
+ promise: Promise<Sandbox>;
+};
+
+export type SandboxStore = {
+ sandboxes: {
+ js: SandboxMeta;
+ py: SandboxMeta;
+ };
+ initSandbox: (lang: LangShort, apiKey: string) => Promise<Sandbox>;
+};
diff --git a/apps/docs/src/utils/useSessions.tsx b/apps/docs/src/utils/useSessions.tsx
deleted file mode 100644
index 54eb88f2e..000000000
--- a/apps/docs/src/utils/useSessions.tsx
+++ /dev/null
@@ -1,104 +0,0 @@
-import { Session } from '@e2b/sdk'
-import { create } from 'zustand'
-import { LangShort } from '@/utils/consts'
-
-function stdHandler({ line, timestamp, error }) {
- if (process.env.NODE_ENV === 'production') return
-
- const timestampHumanFriendly = new Date(timestamp / 1000000) // timestamp is in nanoseconds
- .toISOString()
- .split('T')[1] // only time, date is not relevant for debugging
- .split('.')[0] // remove ms
- const emoji = error ? '\x1B[31mERROR' : '\x1B[34mINFO'
- console.log(`☁️ ${timestampHumanFriendly} ${emoji} ${line}`)
-}
-
-function log(message?: any, ...optionalParams: any[]) {
- if (process.env.NODE_ENV === 'production') return
- else console.log(message, optionalParams)
-}
-
-const envIds = {
- js: 'Nodejs',
- py: 'Python3',
-}
-
-const preps = {
- js: 'npm init es6 -y && npm install @e2b/sdk',
- py: 'pip install e2b',
-}
-
-// TODO: Consider using immer for easier state updates
-export const useSessionsStore = create<SessionsStore>((set, get) => ({
- sessions: {
- js: null,
- py: null,
- },
- initSession: async (lang: LangShort, apiKey: string): Promise<Session> => {
- // eslint-disable-next-line no-async-promise-executor
- return new Promise(async (resolve, reject) => {
- const maybeExistingSession = get().sessions[lang]
- if (maybeExistingSession?.session) {
- log(`${lang} session already ready`)
- resolve(maybeExistingSession.session)
- return
- } else if (maybeExistingSession?.promise) {
- log(`${lang} session in progress, waiting...`)
- await maybeExistingSession.promise
- resolve(maybeExistingSession.session)
- } else {
- log(`${lang} session creating...`)
- try {
- const sessionP = Session.create({ id: envIds[lang], apiKey })
- // set promise to store so that other calls to initSession will wait for this one to finish
- set(state => ({
- sessions: {
- ...state.sessions,
- [lang]: {
- session: null,
- promise: sessionP,
- },
- },
- }))
- const newSession = await sessionP // await creation
- log(`${lang} session created, starting prep process...`)
- const proc = await newSession.process.start({
- cmd: preps[lang],
- onStdout: stdHandler,
- onStderr: stdHandler,
- cwd: '/code',
- })
- await proc.wait() // await prep process to finish
- log(`${lang} session created and started`)
- // set session to store, so it can be used instead of creating a new one
- set(state => ({
- sessions: {
- ...state.sessions,
- [lang]: {
- session: newSession,
- promise: null,
- },
- },
- }))
- resolve(newSession) // also resolve with the new session for the initSession caller
- } catch (err) {
- console.info(`${lang} session creation failed`, err)
- reject(err)
- }
- }
- })
- },
-}))
-
-type SessionMeta = {
- session: Session
- promise: Promise<Session>
-}
-
-export type SessionsStore = {
- sessions: {
- js: SessionMeta
- py: SessionMeta
- }
- initSession: (lang: LangShort, apiKey: string) => Promise<Session>
-}
diff --git a/apps/docs/src/utils/useUser.tsx b/apps/docs/src/utils/useUser.tsx
index 4e79b01dc..d5c0470b7 100644
--- a/apps/docs/src/utils/useUser.tsx
+++ b/apps/docs/src/utils/useUser.tsx
@@ -5,36 +5,37 @@ import { User } from '@supabase/supabase-auth-helpers/react'
import { createPagesBrowserClient } from '@supabase/auth-helpers-nextjs'
import { type Session } from '@supabase/supabase-js'
import * as Sentry from '@sentry/nextjs'
-import { useSessionsStore } from './useSessions'
+import { useSandboxesStore } from './useSandboxes'
import { LangShort } from './consts'
type UserContextType = {
- isLoading: boolean
- session: Session | null
+ isLoading: boolean;
+ session: Session | null;
user:
| (User & {
- teams: any[]
- apiKeys: any[]
- accessToken: string
- defaultTeamId: string
- })
- | null
- error: Error | null
-}
+ teams: any[];
+ apiKeys: any[];
+ accessToken: string;
+ defaultTeamId: string;
+ })
+ | null;
+ error: Error | null;
+};
export const UserContext = createContext(undefined)
-export const CustomUserContextProvider = props => {
+export const CustomUserContextProvider = (props) => {
const supabase = createPagesBrowserClient()
const [session, setSession] = useState(null)
const [user, setUser] = useState(null)
const [error, setError] = useState(null)
const [isLoading, setIsLoading] = useState(true)
const mounted = useRef<boolean>(false)
- const initSession = useSessionsStore(state => state.initSession)
+ const initSandbox = useSandboxesStore((state) => state.initSandbox)
useEffect(() => {
mounted.current = true
+
async function getSession() {
const {
data: { session },
@@ -52,6 +53,7 @@ export const CustomUserContextProvider = props => {
if (!session) setIsLoading(false) // if session is present, we set setLoading to false in the second useEffect
}
}
+
void getSession()
return () => {
mounted.current = false
@@ -64,7 +66,9 @@ export const CustomUserContextProvider = props => {
} = supabase.auth.onAuthStateChange((event, session) => {
if (
session &&
- (event === 'SIGNED_IN' || event === 'TOKEN_REFRESHED' || event === 'USER_UPDATED')
+ (event === 'SIGNED_IN' ||
+ event === 'TOKEN_REFRESHED' ||
+ event === 'USER_UPDATED')
) {
setSession(session)
}
@@ -91,15 +95,15 @@ export const CustomUserContextProvider = props => {
const { data: apiKeys, error: apiKeysError } = await supabase
.from('team_api_keys')
.select('*')
- .in('team_id', teams?.map(team => team.team_id)) // Due to RLS, we could also safely just fetch all, but let's be explicit for sure
+ .in('team_id', teams?.map((team) => team.team_id)) // Due to RLS, we could also safely just fetch all, but let's be explicit for sure
if (apiKeysError) Sentry.captureException(apiKeysError)
- // as soon as we have apiKey, start initializing sessions, so they are ready when user wanna use them
+ // as soon as we have apiKey, start initializing sandboxes, so they are ready when user want to use them
const apiKey = apiKeys?.[0]?.api_key
if (apiKey) {
// We don't care about awaiting these, we just want to start them
- void initSession(LangShort.js, apiKey)
- void initSession(LangShort.py, apiKey)
+ void initSandbox(LangShort.js, apiKey)
+ void initSandbox(LangShort.py, apiKey)
}
const defaultTeamId = teams?.[0]?.team_id // TODO: Adjust when user can be part of multiple teams
@@ -122,6 +126,7 @@ export const CustomUserContextProvider = props => {
})
setIsLoading(false)
}
+
if (session) void getUserCustom()
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [session])
@@ -148,17 +153,12 @@ export const CustomUserContextProvider = props => {
return {
isLoading: false,
error: null,
- session,
+ session: session,
user,
}
}, [isLoading, user, session, error])
- return (
- <UserContext.Provider
- value={value}
- {...props}
- />
- )
+ return <UserContext.Provider value={value} {...props} />
}
export const useUser = (): UserContextType => {
diff --git a/package.json b/package.json
index 994565165..5679b43be 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,5 @@
{
- "name": "@e2b/monorepo",
- "main": "index.js",
+ "name": "e2b",
"private": true,
"scripts": {
"version": "changeset version && pnpm run -r postVersion",
@@ -22,4 +21,4 @@
"eslint": "^8.49.0",
"eslint-plugin-unused-imports": "^3.0.0"
}
-}
+}
\ No newline at end of file
diff --git a/packages/cli/.eslintrc.cjs b/packages/cli/.eslintrc.cjs
index b7ecaaf3c..e29f055f3 100644
--- a/packages/cli/.eslintrc.cjs
+++ b/packages/cli/.eslintrc.cjs
@@ -1,4 +1,4 @@
module.exports = {
root: true,
- extends: '../../.eslintrc.cjs',
+ extends: '../../.eslintrc.cjs'
}
diff --git a/packages/cli/DEV.md b/packages/cli/DEV.md
deleted file mode 100644
index 5093e4e66..000000000
--- a/packages/cli/DEV.md
+++ /dev/null
@@ -1,95 +0,0 @@
-# DEV
-
-**The core ideology**
-https://medium.com/@jdxcode/12-factor-cli-apps-dd3c227a0e46
-
-## Setup
-How to setup building, package.json, etc.
-
-## Useful packages
-
-- chalk — colorizes the output
-- clear — clears the terminal screen
-- clui — draws command-line tables, gauges and spinners
-- figlet — creates ASCII art from text
-- inquirer — creates interactive command-line user interface
-- config — easily loads and saves config without you having to think about where and how.
-- shelljs - to allow bash like
-- boxen - create boxes
-- pkg - package executable
-- progress - for loaders (alternatives - cli-progress)
-- commander - parsign args and handling commands (alternatives - minimist, yargs)
-- update-notifier - adds notifications about updates
-
-## QOL improvement to standard CLI development/maintanence/usage
-- octa/web auth?
-- docs generation
-- add to homebrew
-- multiplatform support
-- spellcheck (find package for this!)
-- ci/cd versioning + version control of the whole cli that you can track
-- automatic updater
-- option to add [y/N] check before executing command and password protected commands
-- add fast automatic updating - either via downloading new CLI version or by downloading part of a command from some central DB that the command maintainer can quickly modify to reflect changes to the workflow
-
-## Best Practices for Offering a CLI
-Now that we’ve evidenced a growing trend of CLI support across the industry, what best practices are there for maintaining one?
-
-Juniper vs Cisco: Compare the two main CLI style families, and see which works best for you. Ideskog favors the Juniper style for its structure, consistency, and well-defined elements.
-
-Design it to be transactional: As Ideskog notes, “this is VERY important. When you work in a CLI you need to be able to prepare your configuration, validate it, compare it with what you have, and then in the end commit (apply) it in one single step.”
-
-Clearly separate operational and configuration data: Operational data are things like statistics and uptime, and are dissimilar from configuration such as ports and hosts. The differentiation should be obvious in the design. Ideskog warns to never allow configuration to depend on operational state:
-
-“An example is an interface that can only be configured if it’s connected to the Internet. This means that the configuration may have been valid when the admin set it the first time, but when internet connection goes down, what do you do then? The configuration is suddenly invalid. This is a bad property of a system. It makes it very hard to pre-provision a system, since you cannot tell beforehand if the configuration is valid or not.”
-
-Let the model drive the CLI for ultimate consistency: For Amazon, in order to reach a consistent command line experience across thousands of commands, they did the following:
-
-“We decided to auto-generate commands and options from the underlying models that describe AWS APIs. This strategy has enabled us to deliver timely support for new AWS services and API updates with a consistent style of commands.”
-
-Shoot for CLI-API-GUI parity: If you follow a model-driven paradigm, every single CLI command should be accessible as an API call, and vice versa. As API Evangelists notes, the AWS API and CLI are pretty much in sync in terms of functionalities:
-
-“Making sure there is parity and consistency between what is available via a UI, and the API and CLI is important.”
-
-Be careful about evolvability, especially when updating. Command documentation, API docs, and functionality must remain in sync. As Jeff Browning said:
-
-“CLIs are hardwired scripts that work well in the short term but don’t evolve as gracefully as true integration”
-
-Adam DuVander of Zapier lists some great CLI best practices in his article [here](https://zapier.com/engineering/how-to-cli/), some of which are summarized below.
-
-Provide a help screen: Usability and discovery are very important for CLIs. Make accessing a Getting Started guide easy with simple flags like -h or ?
-Offer tab completion.
-Steal from the champions. Replicate patterns from Linux commands that work, and take advantage of succinct commands.
-Offer customization options.
-Make security a high priority.
-If desktop-based, support different OSs and developer environments so that no teammate is left in the lurch.
-
-slack-cli quotes (https://slack.engineering/the-joy-of-internal-tools-4a1bb5fe905b):
-
-"A good rule of thumb for a development tool is this: if a developer has to stop what she’s doing and open a browser window for the next step in her work, then that task is a good candidate for building tooling around."
-
-Syncing files between developer machines and remote servers every time a file is saved.
-Distributing canonical SSH configurations from our ops team to engineers’ laptops.
-Automating installation of common git and bash configurations.
-Helpers for working with git — creating branches that are cross-referenced with our internal bug tracker, for example, or reverting Pull Requests with a single command.
-Tools for generating fake data on development servers or fixtures for writing unit tests.
-
-https://github.com/slackhq/magic-cli
-
-----------------------------------------------
-
-https://github.com/OpenAPITools/openapi-generator#openapi-generator
-
-https://github.com/Byron/google-apis-rs
-
-https://github.com/google/python-fire
-
-https://github.com/danielgtaylor/openapi-cli-generator
-
-https://auth0.com/blog/auth0-internal-dev-tools-unleashing-engineering-potential/
-
-https://github.com/vadimdemedes/ink
-
-https://github.com/chjj/blessed
-
-https://github.com/Yomguithereal/react-blessed
diff --git a/packages/cli/LICENSE b/packages/cli/LICENSE
deleted file mode 100644
index b7b0a5a78..000000000
--- a/packages/cli/LICENSE
+++ /dev/null
@@ -1,92 +0,0 @@
-Business Source License 1.1
-
-Parameters
-
-Licensor: FoundryLabs, Inc.
-Licensed Work: Devbook CLI
- The Licensed Work is (c) 2022 FoundryLabs, Inc.
-Additional Use Grant:
-
-Change Date: 2026-01-19
-
-Change License: Apache License, Version 2.0
-
-Notice
-
-The Business Source License (this document, or the "License") is not an Open
-Source license. However, the Licensed Work will eventually be made available
-under an Open Source License, as stated in this License.
-
-License text copyright (c) 2017 MariaDB Corporation Ab, All Rights Reserved.
-"Business Source License" is a trademark of MariaDB Corporation Ab.
-
------------------------------------------------------------------------------
-
-Business Source License 1.1
-
-Terms
-
-The Licensor hereby grants you the right to copy, modify, create derivative
-works, redistribute, and make non-production use of the Licensed Work. The
-Licensor may make an Additional Use Grant, above, permitting limited
-production use.
-
-Effective on the Change Date, or the fourth anniversary of the first publicly
-available distribution of a specific version of the Licensed Work under this
-License, whichever comes first, the Licensor hereby grants you rights under
-the terms of the Change License, and the rights granted in the paragraph
-above terminate.
-
-If your use of the Licensed Work does not comply with the requirements
-currently in effect as described in this License, you must purchase a
-commercial license from the Licensor, its affiliated entities, or authorized
-resellers, or you must refrain from using the Licensed Work.
-
-All copies of the original and modified Licensed Work, and derivative works
-of the Licensed Work, are subject to this License. This License applies
-separately for each version of the Licensed Work and the Change Date may vary
-for each version of the Licensed Work released by Licensor.
-
-You must conspicuously display this License on each original or modified copy
-of the Licensed Work. If you receive the Licensed Work in original or
-modified form from a third party, the terms and conditions set forth in this
-License apply to your use of that work.
-
-Any use of the Licensed Work in violation of this License will automatically
-terminate your rights under this License for the current and all other
-versions of the Licensed Work.
-
-This License does not grant you any right in any trademark or logo of
-Licensor or its affiliates (provided that you may use a trademark or logo of
-Licensor as expressly required by this License).
-
-TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
-AN "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
-EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
-TITLE.
-
-MariaDB hereby grants you permission to use this License’s text to license
-your works, and to refer to it using the trademark "Business Source License",
-as long as you comply with the Covenants of Licensor below.
-
-Covenants of Licensor
-
-In consideration of the right to use this License’s text and the "Business
-Source License" name and trademark, Licensor covenants to MariaDB, and to all
-other recipients of the licensed work to be provided by Licensor:
-
-1. To specify as the Change License the GPL Version 2.0 or any later version,
- or a license that is compatible with GPL Version 2.0 or a later version,
- where "compatible" means that software provided under the Change License can
- be included in a program with software provided under GPL Version 2.0 or a
- later version. Licensor may specify additional Change Licenses without
- limitation.
-
-2. To either: (a) specify an additional grant of rights to use that does not
- impose any additional restriction on the right granted in this License, as
- the Additional Use Grant; or (b) insert the text "None".
-
-3. To specify a Change Date.
-
-4. Not to modify this License in any other way.
diff --git a/packages/cli/README.md b/packages/cli/README.md
index b944e2aca..7f3f401bd 100644
--- a/packages/cli/README.md
+++ b/packages/cli/README.md
@@ -1,55 +1,109 @@
-# e2b CLI (WIP)
-
-Command line interface for [e2b](https://e2b.dev/).
+<h1 align="center">
+<span style="font-size:48px;"><b>E2B CLI</b></span>
+</h1>
+
+<h4 align="center">
+ <a href="https://e2b.dev/docs">Docs</a> |
+ <a href="https://e2b.dev">Website</a> |
+ <a href="https://discord.gg/U7KEcGErtQ">Discord</a> |
+ <a href="https://twitter.com/e2b_dev">Twitter</a>
+</h4>
+
+<h4 align="center">
+ <a href="https://discord.gg/U7KEcGErtQ">
+ <img src="https://img.shields.io/badge/chat-on%20Discord-blue" alt="Discord community server" />
+ </a>
+ <a href="https://twitter.com/e2b_dev">
+ <img src="https://img.shields.io/twitter/follow/infisical?label=Follow" alt="e2b Twitter" />
+ </a>
+</h4>
+
+[E2B](https://e2b.dev) (_english2bits_) is a cloud operating system for AI
+agents.
+
+This CLI tool allows you to build and manage E2B sandbox templates from your
+terminal.
+
+You define your sandbox template in a `Dockerfile` and then use the CLI to build
+the sandbox template. You can then connect to the sandbox template via SDKs and
+run your AI agents.
+
+The `Dockerfile` is the same as for Docker, but you can only use **Debian based
+linux distros** as the base image.
## Installation
-```sh
+```bash
npm install -g @e2b/cli
```
-Then you can use the CLI with
+Then you can use the CLI like this:
-```sh
+```bash
e2b --help
```
-You will need to authenticate to use the e2b CLI.
-
-```sh
-e2b login
-```
+## Getting started
-<details>
-<summary>Authenticate without the ability to open browser</summary>
+1. Authenticate with `e2b login`
+> To authenticate without the ability to open browser, you can provide
+> `E2B_ACCESS_TOKEN` as an environment variable. Get your `E2B_ACCESS_TOKEN`
+> from [e2b.dev/docs](https://e2b.dev/docs). Then use the CLI like this:
+> `E2B_ACCESS_TOKEN=sk_e2b_... e2b build`
-To authenticate without the ability to open browser, you can provide E2B_ACCESS_TOKEN as an environment variable.
-Obtain your E2B_ACCESS_TOKEN from at [e2b.dev/docs](https://e2b.dev/docs).
+2. Create a `Dockerfile` where you describe how your custom E2B sandbox template
+ should look like. Majority of **Debian based linux distros should work as the
+ base image**. Here is an example of a minimal `Dockerfile` for E2B sandbox
+ template:
-```sh
-E2B_ACCESS_TOKEN=sk_e2b_... e2b login
+```Dockerfile
+FROM ubuntu:22.04
```
-</details>
+3. Run `e2b build` inside the directory with the `Dockerfile` to create and
+ build the sandbox template. You will get * _template ID_* that you use for
+ connecting to the sandbox via SDKs and for rebuilding the sandbox template
+
+4. Use the **template ID** that you got during the `e2b build` with the Python
+ or JS/TS SDK as the `id` to create sandbox
+
+5. Rebuild the sandbox template by running `e2b build <id-of-the-template>` in
+ the directory with the `Dockerfile`
## Commands
-🔜 All commands can be called with a `--path <path-to-dir>` flag that changes the directory where the command will be called, without the need to call `cd`.
+All commands can be called with a `--path <path-to-dir>` flag that changes the
+directory where the command will be called, without the need to call `cd`.
-```
--V, --version Display e2b CLI version
+```sh
+-V, --version Display E2B CLI version
-h, --help display help for command
```
-```
-help [command] display help for command
+```sh
+Usage: e2b template [options] [command]
+
+Create sandbox templates from Dockerfiles by running e2b build then use our SDKs to create
+sandboxes from these templates.
+
+Visit E2B docs (https://e2b.dev/docs) to learn how to create sandbox templates
+and start sandboxes.
+
+Options:
+ -h, --help display help for command
+
+Commands:
+ build|bd [options] [id] Build sandbox template defined by ./e2b.Dockerfile or
+ ./Dockerfile in root directory. By default the root directory is the
+ current working directory. This command also creates e2b.toml config
+
+ list|ls List sandbox templates
+
+ shell|sh <id> Connect terminal to sandbox
-login Login to e2b
-logout Logout of e2b
+ init|it [options] Create basic E2B ./e2b.Dockerfile in root directory. You can then run
+ e2b build to build sandbox template from this Dockerfile
-env|environment Manage e2b environments
- create|cr [options] Create new environment and e2b.json config
- list|ls List environments
- shell|cn [options] [id] Connect terminal to environment
+ help [command] display help for command
```
diff --git a/packages/cli/package.json b/packages/cli/package.json
index 194aeb07d..cb1b517e5 100644
--- a/packages/cli/package.json
+++ b/packages/cli/package.json
@@ -1,9 +1,9 @@
{
"name": "@e2b/cli",
- "version": "0.0.11",
- "description": "CLI for managing e2b environments",
- "homepage": "https://usedevbook.com",
- "license": "SEE LICENSE IN LICENSE",
+ "version": "0.0.16",
+ "description": "CLI for managing e2b sandbox templates",
+ "homepage": "https://e2b.dev",
+ "license": "MIT",
"author": {
"name": "FoundryLabs, Inc.",
"email": "[email protected]",
@@ -19,22 +19,23 @@
},
"sideEffects": false,
"scripts": {
- "prepublishOnly": "npm run build",
- "build": "rm -rf ./dist && tsup --minify",
+ "prepublishOnly": "pnpm run build",
+ "build": "tsup --minify",
"dev": "tsup --watch",
- "test-e2b": "cd testground/demo-basic && ../../dist/index.js env create"
+ "test": "pnpm build && cd testground/demo-basic && ../../dist/index.js template build",
+ "check-deps": "knip",
+ "update-deps": "ncu -u && pnpm i"
},
"devDependencies": {
"@types/common-tags": "^1.8.2",
- "@types/inquirer": "^8.0.0",
- "@types/node": "16.11",
- "@types/node-fetch": "^2.6.5",
- "@types/parse-gitignore": "^1.0.0",
- "@types/platform": "^1.3.4",
- "@types/update-notifier": "5.1.0",
- "platform": "^1.3.6",
- "tsup": "^6.5.0",
- "typescript": "^4.9.3"
+ "@types/node": "^18.18.6",
+ "@types/tar-fs": "^2.0.3",
+ "@types/update-notifier": "6.0.5",
+ "knip": "^2.33.4",
+ "npm-check-updates": "^16.14.6",
+ "tsup": "^7.2.0",
+ "typescript": "^5.2.2",
+ "vitest": "^0.34.6"
},
"files": [
"dist",
@@ -47,31 +48,21 @@
},
"dependencies": {
"@balena/dockerignore": "^1.0.2",
- "@devbookhq/sdk": "^2.6.88",
- "@e2b/sdk": "^0.7.3",
+ "@e2b/sdk": "^0.7.5",
"@iarna/toml": "^2.2.5",
- "@nodelib/fs.walk": "^1.2.8",
- "@types/tar-fs": "^2.0.2",
+ "@nodelib/fs.walk": "^2.0.0",
"async-listen": "^3.0.1",
- "boxen": "^7.0.0",
- "chalk": "^5.1.2",
- "chokidar": "^3.5.3",
- "commander": "^9.4.1",
+ "boxen": "^7.1.1",
+ "chalk": "^5.3.0",
+ "commander": "^11.1.0",
"common-tags": "^1.8.2",
- "cross-blob": "^3.0.2",
- "docker-names": "^1.2.1",
- "formdata-node": "^5.0.1",
- "get-port": "^7.0.0",
"ignore": "^5.2.4",
- "inquirer": "^8.0.0",
- "node-fetch": "^3.3.2",
- "open": "^8.4.2",
- "parse-gitignore": "^2.0.0",
+ "open": "^9.1.0",
"tar-fs": "^3.0.4",
"update-notifier": "5.1.0",
- "yup": "^0.32.11"
+ "yup": "^1.3.2"
},
"engines": {
- "node": ">=16"
+ "node": ">=18"
}
}
\ No newline at end of file
diff --git a/packages/cli/src/api.ts b/packages/cli/src/api.ts
index b81e2e372..50cd79fcd 100644
--- a/packages/cli/src/api.ts
+++ b/packages/cli/src/api.ts
@@ -1,23 +1,11 @@
import * as boxen from 'boxen'
-import { getUserConfig } from './commands/auth'
+import { getUserConfig } from './user'
import { asBold } from './utils/format'
-// const client: sdk.ClientType = sdk.api
-
-// client.configure({
-// baseUrl: 'http://localhost:3003',
-// })
-
-export const apiBaseDefault = 'https://api.e2b.dev'
-export const apiBaseUrl = process.env.E2B_API_BASE ?? apiBaseDefault
export let apiKey = process.env.E2B_API_KEY
export let accessToken = process.env.E2B_ACCESS_TOKEN
-if (apiBaseUrl !== apiBaseDefault) {
- console.warn(`\nBeware: Using custom API base URL: ${asBold(apiBaseUrl)}\n`)
-}
-
const authErrorBox = boxen.default(
`You must be logged in to use this command. Run ${asBold('e2b login')}.`,
{
diff --git a/packages/cli/src/arguments.ts b/packages/cli/src/arguments.ts
deleted file mode 100644
index 212d27ce4..000000000
--- a/packages/cli/src/arguments.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-import * as commander from 'commander'
-
-import { asBold } from './utils/format'
-
-export const idArgument = new commander.Argument(
- '[id]',
- `Use environment specified by ${asBold('[id]')}`,
-)
-
-export const idsArgument = new commander.Argument(
- '[ids...]',
- `Use environments specified by ${asBold('[ids...]')}`,
-)
diff --git a/packages/cli/src/commands/env/create.ts b/packages/cli/src/commands/env/create.ts
deleted file mode 100644
index 7380cd663..000000000
--- a/packages/cli/src/commands/env/create.ts
+++ /dev/null
@@ -1,221 +0,0 @@
-import * as commander from 'commander'
-import { stripIndent } from 'common-tags'
-import * as fs from 'fs'
-import Blob from 'cross-blob' // Remove cross-blob when dropping node 16 support
-import { FormData } from 'formdata-node' // Remove formdata-node when dropping node 16 support
-import fsPromise from 'fs/promises'
-import fetch from 'node-fetch'
-import { apiBaseUrl, ensureAccessToken } from 'src/api'
-import { configName } from 'src/config'
-import { pathOption } from 'src/options'
-import { getFiles, getRoot, packToTar } from 'src/utils/filesystem'
-import {
- asBold,
- asFormattedEnvironment,
- asFormattedError,
- asLocal,
- asLocalRelative,
-} from 'src/utils/format'
-import * as yup from 'yup'
-import * as os from 'os'
-import path from 'path'
-
-export const createCommand = new commander.Command('create')
- .description(`Create new environment and ${asLocal(configName)} config`)
- .option(
- '-id, --id <id>',
- `Use ${asBold(
- '<id>',
- )} to override already existing environment, otherwise new environment will be created`,
- )
- .option('--respect-gitignore', 'Respect .gitignore file in the root directory', true)
- .option(
- '--respect-dockerignore',
- 'Respect .dockerignore file in the root directory',
- true,
- )
- // TODO: Future
- // .option(
- // '-t, --title <title>',
- // `Use ${asBold('<title>')} as environment title`
- // )
- // .option(
- // '-n, --no-config',
- // `Skip creating ${asLocal(configName)} config`
- // )
- .addOption(pathOption)
- .alias('cr')
- .action(async opts => {
- try {
- const accessToken = ensureAccessToken()
- process.stdout.write('\n')
-
- const root = getRoot(opts.path)
- // const configPath = getConfigPath(root) // TODO: Future
-
- // TODO: Future
- // let title = opts.title as string | undefined
- // const inquirer = await import('inquirer')
- // if (!title) {
- // title = randomTitle() // TODO: Infer from path
- // }
-
- const filePaths = await getFiles(root, {
- respectGitignore: opts.respectGitignore,
- respectDockerignore: opts.respectDockerignore,
- })
- if (!filePaths.length) {
- console.log(stripIndent`
- No files found in ${asLocalRelative(root)}.
- Note that .gitignore and .dockerignore files are respected by default,
- use --respect-gitignore=false and --respect-dockerignore=false to override.
- `)
- return
- }
-
- // const hash = getFilesHash(files) // TODO: Future
- console.log('📦 Files to be uploaded to create environment:')
- // @ts-ignore
- filePaths.map(filePath => {
- console.log(`• ${filePath.rootPath}`)
- })
-
- const tempDir = os.tmpdir()
- const tarPath = path.join(tempDir, 'env.tar.gz')
-
- await packToTar(
- root,
- // @ts-ignore
- filePaths.map(({ rootPath }) => rootPath),
- tarPath,
- )
-
- if (!fs.existsSync(tarPath)) throw new Error(`Tar file ${tarPath} does not exist`)
-
- const buildContextBlob = new Blob([fs.readFileSync(tarPath)])
- let dockerfileContent
- if (fs.existsSync(`${root}/Dockerfile`)) {
- dockerfileContent = fs.readFileSync(`${root}/Dockerfile`, 'utf-8')
- }
-
- // TODO: Use SDK client
- // client.path('/envs').method('post').create(...)
-
- const formData = new FormData()
- formData.append('buildContext', buildContextBlob, 'env.tar.gz.e2b')
- if (dockerfileContent) formData.append('dockerfile', dockerfileContent)
- // if (envID) formData.append('envID', envID); // TODO: Future
-
- const apiRes = await fetch(`${apiBaseUrl}/envs`, {
- method: 'POST',
- headers: { Authorization: `Bearer ${accessToken}` },
- body: formData,
- })
-
- if (!apiRes.ok) {
- const resJson = (await apiRes.json()) as { message: string }
- console.log('res', resJson)
- throw new Error(
- `API request failed: ${apiRes.statusText}, ${resJson?.message ?? 'no message'}`,
- )
- }
- const resJson = (await apiRes.json()) as {
- envID: string
- public: boolean
- status: 'building' | 'error' | 'ready'
- }
- console.log(`✅ Env created: ${resJson?.envID}, waiting for build to finish...`)
-
- const startedAt = new Date()
- let completed = false
- while (!completed) {
- await wait(5000)
- const apiResPoll = await fetch(`${apiBaseUrl}/envs/${resJson?.envID}`, {
- method: 'GET',
- headers: { Authorization: `Bearer ${accessToken}` },
- })
- if (!apiResPoll.ok)
- throw new Error(`API request failed: ${apiResPoll.statusText}`)
- const env = (await apiResPoll.json()) as { status: string; created_at: string }
- console.log('env', env)
-
- if (env.status === 'building') {
- const now = new Date()
- const elapsed = now.getTime() - startedAt.getTime()
- const elapsedStr = `${Math.floor(elapsed / 1000)}s`
- console.log(`⏳ Building… (started ${elapsedStr} ago)`) // nicer
- if (elapsed > 1000 * 60 * 2) {
- // TODO
- console.log(stripIndent`
- ⚠️ Build taking longer than 2 minutes, something might be wrong.
- Stopping to wait for result, but it might still finish.
- Check by yourself by running ${asLocal('e2b env list')}
- `)
- completed = true
- }
- } else if (env.status === 'ready') {
- completed = true
- console.log(`✅ Build completed at ${env.created_at}`) // TODO: Nicer
- } else if (env.status === 'error') {
- throw new Error('Build failed')
- }
- }
-
- // if (shouldSaveConfig) {
- // await ensureDir(root)
- // const configPath = getConfigPath(root)
- // await saveConfig(configPath, config)
- // }
- } catch (err: unknown) {
- console.error(asFormattedError((err as Error).message), err)
- process.exit(1)
- }
- })
-
-// TODO: Move to config/index.ts after refactoring
-// ===
-const envConfigSchema = yup.object({
- id: yup.string().required(),
- // TODO: Not MVP
- // title: yup.string().default(randomTitle),
- // filesystem: yup.object({
- // change_hash: yup.string(),
- // local_root: yup.string().required().default('./files'),
- // }),
-})
-
-export type EnvConfig = yup.InferType<typeof envConfigSchema>
-
-// eslint-disable-next-line @typescript-eslint/no-unused-vars
-async function saveConfig(configPath: string, config: EnvConfig, overwrite?: boolean) {
- try {
- if (!overwrite) {
- const configExists = fs.existsSync(configPath)
- if (configExists)
- throw new Error(`Config already exists on path ${asLocalRelative(configPath)}`)
- }
-
- const validatedConfig: any = await envConfigSchema.validate(config, {
- stripUnknown: true,
- })
- const jsonRaw = JSON.stringify(validatedConfig, null, 2)
- await fsPromise.writeFile(configPath, jsonRaw)
- } catch (err: any) {
- throw new Error(
- `e2b environment config ${asFormattedEnvironment(
- config,
- configPath,
- )} cannot be saved: ${err.message}`,
- )
- }
-}
-
-// TODO: Move to utils after refactoring
-// ===
-// eslint-disable-next-line @typescript-eslint/no-unused-vars
-const deleteFile = async (filePath: string) => {
- const stat = await fs.promises.stat(filePath)
- if (stat.isFile()) await fs.promises.unlink(filePath)
-}
-
-const wait = (ms: number) => new Promise(resolve => setTimeout(resolve, ms))
diff --git a/packages/cli/src/commands/env/index.ts b/packages/cli/src/commands/env/index.ts
deleted file mode 100644
index 216272526..000000000
--- a/packages/cli/src/commands/env/index.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import * as commander from 'commander'
-
-import { createCommand } from './create'
-import { listCommand } from './list'
-import { shellCommand } from './shell'
-
-export const envCommand = new commander.Command('env')
- .description('Manage e2b environments')
- .addCommand(createCommand)
- .addCommand(listCommand)
- .addCommand(shellCommand)
- .alias('environment')
diff --git a/packages/cli/src/commands/env/list.ts b/packages/cli/src/commands/env/list.ts
deleted file mode 100644
index 7fda50c48..000000000
--- a/packages/cli/src/commands/env/list.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-import * as chalk from 'chalk'
-import * as commander from 'commander'
-import { apiBaseUrl, ensureAccessToken } from 'src/api'
-import { asFormattedError } from 'src/utils/format'
-import { sortEnvs } from 'src/utils/sort'
-
-export const listCommand = new commander.Command('list')
- .description('List environments')
- .alias('ls')
- .action(async () => {
- try {
- const accessToken = ensureAccessToken()
- process.stdout.write('\n')
-
- // TODO: Use client
- // const envs = await client.path('/envs').method('get').create()({ accessToken }).data
- const apiRes = await fetch(`${apiBaseUrl}/envs`, {
- method: 'GET',
- headers: { Authorization: `Bearer ${accessToken}` },
- })
- const envs = await apiRes.json()
-
- console.log(chalk.default.underline(chalk.default.green('Environments')))
-
- if (!envs?.length) {
- console.log('No environments found')
- } else {
- envs.sort(sortEnvs).forEach((env: { envID: string }) => {
- console.log(env.envID)
- })
- }
-
- process.stdout.write('\n')
- } catch (err: unknown) {
- console.error(asFormattedError((err as Error).message))
- process.exit(1)
- }
- })
diff --git a/packages/cli/src/commands/env/shell.ts b/packages/cli/src/commands/env/shell.ts
deleted file mode 100644
index dfd607c3b..000000000
--- a/packages/cli/src/commands/env/shell.ts
+++ /dev/null
@@ -1,103 +0,0 @@
-import * as sdk from '@e2b/sdk'
-import * as commander from 'commander'
-import { ensureAPIKey } from 'src/api'
-import { idArgument } from 'src/arguments'
-import { pathOption, selectOption } from 'src/options'
-import { spawnConnectedTerminal } from 'src/terminal'
-import { getRoot } from 'src/utils/filesystem'
-import {
- asBold,
- asFormattedEnvironment,
- asFormattedError,
- asLocalRelative,
-} from 'src/utils/format'
-
-export const shellCommand = new commander.Command('shell')
- .description('Connect terminal to environment')
- .addArgument(idArgument)
- .addOption(selectOption)
- .addOption(pathOption)
- .alias('cn')
- .option(
- '-L, --local-debug',
- 'Connect to existing local environment instance for debugging',
- )
- .action(async (id, opts) => {
- try {
- const apiKey = ensureAPIKey()
- const root = getRoot(opts.path)
-
- if (opts.localDebug) {
- await connectEnvironment({ apiKey, local: true, config: { id: 'local-debug' } })
- return
- }
-
- // let env: sdk.components['schemas']['Environment'] | undefined
- let env: any
- if (id) {
- env = { id }
- } else if (opts.select) {
- throw new Error('Selecting is not yet implemented')
- // const apiKey = ensureAPIKey()
- // const envs = await listEnvironments({ apiKey })
- // env = await getPromptEnv(envs, 'Select environment to connect to')
- } else {
- throw new Error('No environment ID provided, use "e2b env shell --id <envID>"')
- // env = await getRootEnv(root)
- }
-
- if (!env) {
- console.log(`No environments found in ${asLocalRelative(root)}`)
- return
- }
-
- await connectEnvironment({ apiKey, config: env })
- // We explicitly call exit because the session is keeping the program alive.
- // We also don't want to call session.close because that would disconnect other users from the edit session.
- process.exit(0)
- } catch (err: any) {
- console.error(asFormattedError(err.message))
- process.exit(1)
- }
- })
-
-export async function connectEnvironment({
- apiKey,
- config,
- local,
-}: {
- apiKey: string
- local?: boolean
- config: sdk.components['schemas']['Environment']
-}) {
- const session = new sdk.Session({
- apiKey,
- id: config.id,
- ...(local
- ? {
- __debug_devEnv: 'local',
- __debug_hostname: 'localhost',
- __debug_port: 49982,
- }
- : {}),
- })
-
- await session.open({})
-
- if (session.terminal) {
- const { exited } = await spawnConnectedTerminal(
- session.terminal,
- `Terminal connected to environment ${asFormattedEnvironment(
- config,
- )}\nwith session URL ${asBold(`https://${session.getHostname()}`)}`,
- `Disconnecting terminal from environment ${asFormattedEnvironment(config)}`,
- )
-
- await exited
- console.log(
- `Closing terminal connection to environment ${asFormattedEnvironment(config)}`,
- )
- } else {
- throw new Error('Cannot start terminal - no session')
- }
-}
diff --git a/packages/cli/src/commands/index.ts b/packages/cli/src/commands/index.ts
index 74d5d3a32..d10d9b3d4 100644
--- a/packages/cli/src/commands/index.ts
+++ b/packages/cli/src/commands/index.ts
@@ -1,10 +1,11 @@
import * as commander from 'commander'
-import { loginCommand, logoutCommand } from './auth'
-import { envCommand } from './env'
+import { loginCommand } from './login'
+import { logoutCommand } from './logout'
+import { templateCommand } from './template'
export const program = new commander.Command()
- .description('Tool for interacting with e2b from command line')
- .addCommand(envCommand)
+ .description('Tool for interacting with E2B from command line')
+ .addCommand(templateCommand, { isDefault: true })
.addCommand(loginCommand)
.addCommand(logoutCommand)
diff --git a/packages/cli/src/commands/auth.ts b/packages/cli/src/commands/login.ts
similarity index 62%
rename from packages/cli/src/commands/auth.ts
rename to packages/cli/src/commands/login.ts
index b3f89728e..106b3965a 100644
--- a/packages/cli/src/commands/auth.ts
+++ b/packages/cli/src/commands/login.ts
@@ -1,26 +1,16 @@
-import { listen } from 'async-listen'
+import * as listen from 'async-listen'
import * as commander from 'commander'
-import fs from 'fs'
-import http from 'http'
-import open from 'open'
-import * as os from 'os'
-import path from 'path'
-import { asBold, asFormattedError } from 'src/utils/format'
-
-import pkg from '../../package.json'
+import * as fs from 'fs'
+import * as http from 'http'
+import * as open from 'open'
+import * as path from 'path'
-type UserConfig = {
- email: string
- accessToken: string
- defaultTeamApiKey: string
- defaultTeamId: string
-}
-
-const USER_CONFIG_PATH = path.join(os.homedir(), '.e2b', 'config.json') // TODO: Keep in Keychain
-const DOCS_BASE = process.env.E2B_DOCS_BASE || 'https://e2b.dev/docs'
+import { pkg } from 'src'
+import { DOCS_BASE, getUserConfig, USER_CONFIG_PATH, UserConfig } from 'src/user'
+import { asBold, asFormattedError } from 'src/utils/format'
export const loginCommand = new commander.Command('login')
- .description('Login to e2b')
+ .description('Log in to CLI')
.action(async () => {
let userConfig
try {
@@ -32,7 +22,7 @@ export const loginCommand = new commander.Command('login')
console.log(
`Already logged in as ${asBold(
userConfig.email,
- )}, if you want to login as a different user, logout first.`,
+ )}, if you want to login as a different user, logout first by running 'e2b logout'.`,
)
return
} else if (!userConfig) {
@@ -49,25 +39,9 @@ export const loginCommand = new commander.Command('login')
process.exit(0)
})
-export const logoutCommand = new commander.Command('logout')
- .description('Logout of e2b')
- .action(() => {
- if (fs.existsSync(USER_CONFIG_PATH)) {
- fs.unlinkSync(USER_CONFIG_PATH) // Delete user config
- console.log('Logged out.')
- } else {
- console.log('Not logged in, nothing to do')
- }
- })
-
-export function getUserConfig(): UserConfig | null {
- if (!fs.existsSync(USER_CONFIG_PATH)) return null
- return JSON.parse(fs.readFileSync(USER_CONFIG_PATH, 'utf8'))
-}
-
async function signInWithBrowser(): Promise<UserConfig> {
const server = http.createServer()
- const { port } = await listen(server, 0, '127.0.0.1')
+ const { port } = await listen.default(server, 0, '127.0.0.1')
const loginUrl = new URL(`${DOCS_BASE}/api/cli`)
loginUrl.searchParams.set('next', `http://localhost:${port}`)
loginUrl.searchParams.set('cliVersion', pkg.version)
@@ -77,9 +51,12 @@ async function signInWithBrowser(): Promise<UserConfig> {
// Close the HTTP connection to prevent `server.close()` from hanging
res.setHeader('connection', 'close')
const followUpUrl = new URL(`${DOCS_BASE}/api/cli`)
- const searchParams = new URL(req.url || '/', 'http://localhost').searchParams
- const searchParamsObj = Object.fromEntries(searchParams.entries()) as UserConfig & {
- error?: string
+ const searchParams = new URL(req.url || '/', 'http://localhost')
+ .searchParams
+ const searchParamsObj = Object.fromEntries(
+ searchParams.entries(),
+ ) as UserConfig & {
+ error?: string;
}
const { error } = searchParamsObj
if (error) {
@@ -97,6 +74,6 @@ async function signInWithBrowser(): Promise<UserConfig> {
res.end()
})
- return open(loginUrl.toString())
+ return open.default(loginUrl.toString())
})
}
diff --git a/packages/cli/src/commands/logout.ts b/packages/cli/src/commands/logout.ts
new file mode 100644
index 000000000..3861d3ebf
--- /dev/null
+++ b/packages/cli/src/commands/logout.ts
@@ -0,0 +1,15 @@
+import * as commander from 'commander'
+import * as fs from 'fs'
+
+import { USER_CONFIG_PATH } from 'src/user'
+
+export const logoutCommand = new commander.Command('logout')
+ .description('Log out of CLI')
+ .action(() => {
+ if (fs.existsSync(USER_CONFIG_PATH)) {
+ fs.unlinkSync(USER_CONFIG_PATH) // Delete user config
+ console.log('Logged out.')
+ } else {
+ console.log('Not logged in, nothing to do')
+ }
+ })
diff --git a/packages/cli/src/commands/template/build.ts b/packages/cli/src/commands/template/build.ts
new file mode 100644
index 000000000..fd5a95b4d
--- /dev/null
+++ b/packages/cli/src/commands/template/build.ts
@@ -0,0 +1,350 @@
+import * as commander from 'commander'
+import * as commonTags from 'common-tags'
+import * as fs from 'fs'
+import * as path from 'path'
+import * as e2b from '@e2b/sdk'
+
+import { wait } from 'src/utils/wait'
+import { ensureAccessToken } from 'src/api'
+import { getFiles, getRoot } from 'src/utils/filesystem'
+import { asBold, asBuildLogs, asFormattedSandboxTemplate, asLocal, asLocalRelative, asPrimary } from 'src/utils/format'
+import { pathOption } from 'src/options'
+import { createBlobFromFiles } from 'src/docker/archive'
+import { defaultDockerfileName, fallbackDockerfileName } from 'src/docker/constants'
+import { configName, getConfigPath, loadConfig, saveConfig } from 'src/config'
+
+const templateCheckInterval = 1_000 // 1 sec
+const maxBuildTime = 10 * 60 * 1_000 // 10 min
+
+const getTemplate = e2b.withAccessToken(
+ e2b.api.path('/envs/{envID}/builds/{buildID}').method('get').create(),
+)
+
+export const buildCommand = new commander.Command('build')
+ .description(
+ `Build sandbox template defined by ${asLocalRelative(
+ defaultDockerfileName,
+ )} or ${asLocalRelative(
+ fallbackDockerfileName,
+ )} in root directory. By default the root directory is the current working directory. This command also creates ${asLocal(
+ configName,
+ )} config`,
+ )
+ .argument(
+ '[id]',
+ `Specify ${asBold(
+ '[id]',
+ )} of sandbox template to rebuild it. If you don's specify ${asBold(
+ '[id]',
+ )} and there is no ${asLocal('e2b.toml')} a new sandbox will be created`,
+ )
+ .addOption(pathOption)
+ .option(
+ '-d, --dockerfile <file>',
+ `Specify path to Dockerfile. By default E2B tries to find ${asLocal(
+ defaultDockerfileName,
+ )} or ${asLocal(fallbackDockerfileName)} in root directory`,
+ )
+ .alias('bd')
+ .action(
+ async (
+ id: string | undefined,
+ opts: {
+ path?: string;
+ dockerfile?: string;
+ },
+ ) => {
+ try {
+ const accessToken = ensureAccessToken()
+ process.stdout.write('\n')
+
+ let envID = id
+ let dockerfile = opts.dockerfile
+
+ const root = getRoot(opts.path)
+ const configPath = getConfigPath(root)
+
+ const config = fs.existsSync(configPath)
+ ? await loadConfig(configPath)
+ : undefined
+
+ const relativeConfigPath = path.relative(root, configPath)
+
+ if (config) {
+ console.log(
+ `Found sandbox template ${asFormattedSandboxTemplate(
+ {
+ envID: config.id,
+ },
+ relativeConfigPath,
+ )}`,
+ )
+ envID = config.id
+ dockerfile = config.dockerfile
+ }
+
+ const filePaths = await getFiles(root, {
+ respectGitignore: false,
+ respectDockerignore: true,
+ })
+
+ if (!filePaths.length) {
+ console.log(commonTags.stripIndent`
+ No allowed files found in ${asLocalRelative(root)}. If you are using ${asLocal('.dockerignore')} check if it is configured correctly.
+ `)
+ return
+ }
+
+ console.log(
+ `Preparing sandbox template building (${filePaths.length} files in Docker build context).`,
+ )
+
+ const { dockerfileContent, dockerfileRelativePath } = getDockerfile(
+ root,
+ dockerfile,
+ )
+
+ console.log(
+ `Found ${asLocalRelative(
+ dockerfileRelativePath,
+ )} that will be used to build the sandbox template.`,
+ )
+
+ const body = new FormData()
+
+ body.append('dockerfile', dockerfileContent)
+
+ // It should be possible to pipe directly to the API
+ // instead of creating a blob in memory then streaming.
+ const blob = await createBlobFromFiles(
+ root,
+ filePaths,
+ dockerfileRelativePath !== fallbackDockerfileName
+ ? [
+ {
+ oldPath: dockerfileRelativePath,
+ newPath: fallbackDockerfileName,
+ },
+ ]
+ : [],
+ )
+ body.append('buildContext', blob, 'env.tar.gz.e2b')
+
+ const build = await buildTemplate(accessToken, body, envID)
+
+ console.log(
+ `Started building the sandbox template ${asFormattedSandboxTemplate(
+ build,
+ )} `,
+ )
+
+ await waitForBuildFinish(accessToken, build.envID, build.buildID)
+
+ if (!config) {
+ await saveConfig(
+ configPath,
+ {
+ id: build.envID,
+ dockerfile: dockerfileRelativePath,
+ },
+ true,
+ )
+ console.log(`Created config ${asLocalRelative(relativeConfigPath)}`)
+ }
+ } catch (err: any) {
+ console.error(err)
+ process.exit(1)
+ }
+ },
+ )
+
+async function waitForBuildFinish(
+ accessToken: string,
+ envID: string,
+ buildID: string,
+) {
+ const startedAt = new Date()
+ let logsOffset = 0
+
+ function elapsed() {
+ return Date.now() - startedAt.getTime()
+ }
+
+ let template: Awaited<ReturnType<typeof getTemplate>> | undefined
+
+ process.stdout.write('\n')
+ do {
+ await wait(templateCheckInterval)
+
+ try {
+ template = await getTemplate(accessToken, { envID, logsOffset, buildID })
+ } catch (e) {
+ if (e instanceof getTemplate.Error) {
+ const error = e.getActualType()
+ if (error.status === 401) {
+ throw new Error(
+ `Error getting build info - (${error.status}) bad request: ${error.data.message}`,
+ )
+ }
+ if (error.status === 404) {
+ throw new Error(
+ `Error getting build info - (${error.status}) not found: ${error.data.message}`,
+ )
+ }
+ if (error.status === 500) {
+ throw new Error(
+ `Error getting build info - (${error.status}) server error: ${error.data.message}`,
+ )
+ }
+ }
+ throw e
+ }
+
+ logsOffset += template.data.logs.length
+
+ switch (template.data.status) {
+ case 'building':
+ template.data.logs.forEach((line) =>
+ process.stdout.write(asBuildLogs(line)),
+ )
+ break
+ case 'ready':
+ console.log(
+ `\n✅ Building sandbox template ${asFormattedSandboxTemplate(
+ template.data,
+ )} finished.\n`,
+ )
+ break
+
+ case 'error':
+ template.data.logs.forEach((line) =>
+ process.stdout.write(asBuildLogs(line)),
+ )
+ throw new Error(
+ `\n❌ Building sandbox template ${asFormattedSandboxTemplate(
+ template.data,
+ )} failed.\nCheck the logs above for more details or contact us ${asPrimary('(https://e2b.dev/docs/getting-help)')} to get help.\n`,
+ )
+ }
+ } while (template.data.status === 'building' && elapsed() < maxBuildTime)
+ // TODO: We do have another timeout for envs building in API so we probably should handle timeout only in one place
+ if (template.data.status === 'building' && elapsed() >= maxBuildTime) {
+ throw new Error(
+ `\n❌ Building sandbox template ${asFormattedSandboxTemplate(
+ template.data,
+ )} timed out.\nCheck the logs above for more details or contact us ${asPrimary('(https://e2b.dev/docs/getting-help)')} to get help.\n`,
+ )
+ }
+}
+
+function loadFile(filePath: string) {
+ if (!fs.existsSync(filePath)) {
+ return undefined
+ }
+
+ return fs.readFileSync(filePath, 'utf-8')
+}
+
+function getDockerfile(root: string, file?: string) {
+ // Check if user specified custom Dockerfile exists
+ if (file) {
+ const dockerfilePath = path.join(root, file)
+ const dockerfileContent = loadFile(dockerfilePath)
+ const dockerfileRelativePath = path.relative(root, dockerfilePath)
+
+ if (dockerfileContent === undefined) {
+ throw new Error(
+ `No ${asLocalRelative(
+ dockerfileRelativePath,
+ )} found in the root directory.`,
+ )
+ }
+
+ return {
+ dockerfilePath,
+ dockerfileContent,
+ dockerfileRelativePath,
+ }
+ }
+
+ // Check if default dockerfile e2b.Dockerfile exists
+ let dockerfilePath = path.join(root, defaultDockerfileName)
+ let dockerfileContent = loadFile(dockerfilePath)
+ const defaultDockerfileRelativePath = path.relative(root, dockerfilePath)
+ let dockerfileRelativePath = defaultDockerfileRelativePath
+
+ if (dockerfileContent !== undefined) {
+ return {
+ dockerfilePath,
+ dockerfileContent,
+ dockerfileRelativePath,
+ }
+ }
+
+ // Check if fallback Dockerfile exists
+ dockerfilePath = path.join(root, fallbackDockerfileName)
+ dockerfileContent = loadFile(dockerfilePath)
+ const fallbackDockerfileRelativeName = path.relative(root, dockerfilePath)
+ dockerfileRelativePath = fallbackDockerfileRelativeName
+
+ if (dockerfileContent !== undefined) {
+ return {
+ dockerfilePath,
+ dockerfileContent,
+ dockerfileRelativePath,
+ }
+ }
+
+ throw new Error(
+ `No ${asLocalRelative(defaultDockerfileRelativePath)} or ${asLocalRelative(
+ fallbackDockerfileRelativeName,
+ )} found in the root directory.You can specify a custom Dockerfile with ${asBold(
+ '--dockerfile <file>',
+ )} option.`,
+ )
+}
+
+async function buildTemplate(
+ accessToken: string,
+ body: FormData,
+ envID?: string,
+): Promise<
+ Omit<
+ e2b.paths['/envs']['post']['responses']['202']['content']['application/json'],
+ 'logs'
+ >
+> {
+ const res = await fetch(e2b.API_HOST + (envID ? `/envs/${envID}` : '/envs'), {
+ method: 'POST',
+ headers: { Authorization: `Bearer ${accessToken}` },
+ body,
+ })
+
+ const data = await res.json()
+
+ if (!res.ok) {
+ const error:
+ | e2b.paths['/envs']['post']['responses']['401']['content']['application/json']
+ | e2b.paths['/envs']['post']['responses']['500']['content']['application/json'] =
+ data as any
+
+ if (error.code === 401) {
+ throw new Error(
+ `Authentication error: ${res.statusText}, ${error.message ?? 'no message'
+ }`,
+ )
+ }
+
+ if (error.code === 500) {
+ throw new Error(
+ `Server error: ${res.statusText}, ${error.message ?? 'no message'}`,
+ )
+ }
+
+ throw new Error(
+ `API request failed: ${res.statusText}, ${error.message ?? 'no message'}`,
+ )
+ }
+
+ return data as any
+}
diff --git a/packages/cli/src/commands/template/index.ts b/packages/cli/src/commands/template/index.ts
new file mode 100644
index 000000000..1d71aa8d5
--- /dev/null
+++ b/packages/cli/src/commands/template/index.ts
@@ -0,0 +1,17 @@
+import * as commander from 'commander'
+
+import { buildCommand } from './build'
+import { listCommand } from './list'
+import { shellCommand } from './shell'
+import { initCommand } from './init'
+import { asPrimary } from 'src/utils/format'
+
+export const templateCommand = new commander.Command('template')
+ .description(`Create sandbox templates from Dockerfiles by running ${asPrimary('e2b build')} then use our SDKs to create sandboxes from these templates.
+
+Visit ${asPrimary('E2B docs (https://e2b.dev/docs)')} to learn how to create sandbox templates and start sandboxes.
+`)
+ .addCommand(buildCommand)
+ .addCommand(listCommand)
+ .addCommand(shellCommand)
+ .addCommand(initCommand)
diff --git a/packages/cli/src/commands/template/init.ts b/packages/cli/src/commands/template/init.ts
new file mode 100644
index 000000000..18388f385
--- /dev/null
+++ b/packages/cli/src/commands/template/init.ts
@@ -0,0 +1,44 @@
+import * as commander from 'commander'
+import * as fsPromises from 'fs/promises'
+import * as fs from 'fs'
+import * as path from 'path'
+
+import { basicDockerfile, defaultDockerfileName } from 'src/docker/constants'
+import { pathOption } from 'src/options'
+import { getRoot } from 'src/utils/filesystem'
+import { asLocalRelative, asPrimary } from 'src/utils/format'
+
+export const initCommand = new commander.Command('init')
+ .description(
+ `Create basic E2B ${asLocalRelative('e2b.Dockerfile')} in root directory. You can then run ${asPrimary('e2b build')} to build sandbox template from this Dockerfile`,
+ )
+ .addOption(pathOption)
+ .alias('it')
+ .action(async (opts: { path?: string }) => {
+ try {
+ process.stdout.write('\n')
+
+ const root = getRoot(opts.path)
+ const filepath = path.join(root, defaultDockerfileName)
+
+ const fileExists = fs.existsSync(filepath)
+
+ const relativePath = opts.path
+ ? path.join(opts.path, defaultDockerfileName)
+ : defaultDockerfileName
+
+ if (fileExists) {
+ console.log(
+ `Dockerfile ${asLocalRelative(relativePath)} already exists.\n`,
+ )
+ return
+ }
+
+ await fsPromises.writeFile(filepath, basicDockerfile)
+
+ console.log(`Created ${asLocalRelative(relativePath)}\n`)
+ } catch (err: any) {
+ console.error(err)
+ process.exit(1)
+ }
+ })
diff --git a/packages/cli/src/commands/template/list.ts b/packages/cli/src/commands/template/list.ts
new file mode 100644
index 000000000..7b0efd076
--- /dev/null
+++ b/packages/cli/src/commands/template/list.ts
@@ -0,0 +1,42 @@
+import * as chalk from 'chalk'
+import * as commander from 'commander'
+import * as e2b from '@e2b/sdk'
+
+import { ensureAccessToken } from 'src/api'
+
+const listTemplates = e2b.withAccessToken(
+ e2b.api.path('/envs').method('get').create(),
+)
+
+export const listCommand = new commander.Command('list')
+ .description('List sandbox templates')
+ .alias('ls')
+ .action(async () => {
+ try {
+ const accessToken = ensureAccessToken()
+ process.stdout.write('\n')
+
+ const templatesResponse = await listTemplates(accessToken, {})
+
+ console.log(
+ chalk.default.underline(chalk.default.green('Sandbox templates')),
+ )
+
+ const templates = templatesResponse.data
+
+ if (!templates?.length) {
+ console.log('No templates found.')
+ } else {
+ templates
+ .sort((a, b) => a.envID.localeCompare(b.envID))
+ .forEach((template: { envID: string }) => {
+ console.log(template.envID)
+ })
+ }
+
+ process.stdout.write('\n')
+ } catch (err: any) {
+ console.error(err)
+ process.exit(1)
+ }
+ })
diff --git a/packages/cli/src/commands/template/shell.ts b/packages/cli/src/commands/template/shell.ts
new file mode 100644
index 000000000..a8d6d56ea
--- /dev/null
+++ b/packages/cli/src/commands/template/shell.ts
@@ -0,0 +1,65 @@
+import * as e2b from '@e2b/sdk'
+import * as commander from 'commander'
+
+import { ensureAPIKey } from 'src/api'
+import { spawnConnectedTerminal } from 'src/terminal'
+import { asBold, asFormattedSandboxTemplate } from 'src/utils/format'
+
+export const shellCommand = new commander.Command('shell')
+ .description('Connect terminal to sandbox')
+ .argument('<id>', `Connect to sandbox specified by ${asBold('<id>')}`)
+ .alias('sh')
+ .action(async (id: string) => {
+ try {
+ const apiKey = ensureAPIKey()
+
+ const template: Pick<e2b.components['schemas']['Environment'], 'envID'> =
+ {
+ envID: id,
+ }
+
+ await connectSandbox({ apiKey, template: template })
+ // We explicitly call exit because the sandbox is keeping the program alive.
+ // We also don't want to call sandbox.close because that would disconnect other users from the edit session.
+ process.exit(0)
+ } catch (err: any) {
+ console.error(err)
+ process.exit(1)
+ }
+ })
+
+async function connectSandbox({
+ apiKey,
+ template,
+ }: {
+ apiKey: string;
+ template: Pick<e2b.components['schemas']['Environment'], 'envID'>;
+}) {
+ const sandbox = new e2b.Sandbox({
+ apiKey,
+ id: template.envID,
+ })
+
+ await sandbox.open({})
+
+ if (sandbox.terminal) {
+ const { exited } = await spawnConnectedTerminal(
+ sandbox.terminal,
+ `Terminal connected to sandbox ${asFormattedSandboxTemplate(
+ template,
+ )}\nwith sandbox URL ${asBold(`https://${sandbox.getHostname()}`)}`,
+ `Disconnecting terminal from sandbox ${asFormattedSandboxTemplate(
+ template,
+ )}`,
+ )
+
+ await exited
+ console.log(
+ `Closing terminal connection to sandbox ${asFormattedSandboxTemplate(
+ template,
+ )}`,
+ )
+ } else {
+ throw new Error('Cannot start terminal - no sandbox')
+ }
+}
diff --git a/packages/cli/src/config/index.ts b/packages/cli/src/config/index.ts
index 669cec902..fd1e4d60c 100644
--- a/packages/cli/src/config/index.ts
+++ b/packages/cli/src/config/index.ts
@@ -1,67 +1,47 @@
+import * as yup from 'yup'
import * as toml from '@iarna/toml'
-import * as fs from 'fs'
import * as fsPromise from 'fs/promises'
+import * as fs from 'fs'
import * as path from 'path'
-import { asFormattedEnvironment, asLocalRelative } from 'src/utils/format'
-import * as yup from 'yup'
import { getFiles } from '../utils/filesystem'
+import { asFormattedSandboxTemplate, asLocalRelative } from 'src/utils/format'
-// eslint-disable-next-line @typescript-eslint/no-var-requires
-const dockerNames = require('docker-names')
+export const configName = 'e2b.toml'
-export const configName = 'e2b.json'
+const configCommentHeader = `# This is a config for E2B sandbox template
-const configCommentHeader = '# This is a config for a e2b environment'
-
-export function randomTitle() {
- return dockerNames.getRandomName().replace('_', '-')
-}
+`
export const configSchema = yup.object({
id: yup.string().required(),
- template: yup.string().required(),
- title: yup.string().default(randomTitle),
- filesystem: yup.object({
- change_hash: yup.string(),
- local_root: yup.string().required().default('./files'),
- }),
+ dockerfile: yup.string().required(),
})
-export type E2bConfig = yup.InferType<typeof configSchema>
+export type E2BConfig = yup.InferType<typeof configSchema>;
export async function loadConfig(configPath: string) {
- try {
- const configExists = fs.existsSync(configPath)
- if (!configExists) {
- throw new Error(`Config on path ${asLocalRelative(configPath)} not found`)
- }
-
- const tomlRaw = await fsPromise.readFile(configPath, 'utf-8')
- const config = toml.parse(tomlRaw)
- return (await configSchema.validate(config)) as E2bConfig
- } catch (err: any) {
- throw new Error(
- `E2b environment config ${asLocalRelative(configPath)} cannot be loaded: ${
- err.message
- }`,
- )
- }
+ const tomlRaw = await fsPromise.readFile(configPath, 'utf-8')
+ const config = toml.parse(tomlRaw)
+ return (await configSchema.validate(config)) as E2BConfig
}
export async function saveConfig(
configPath: string,
- config: E2bConfig,
+ config: E2BConfig,
overwrite?: boolean,
) {
try {
if (!overwrite) {
const configExists = fs.existsSync(configPath)
if (configExists) {
- throw new Error(`Config already exists on path ${asLocalRelative(configPath)}`)
+ throw new Error(
+ `Config already exists on path ${asLocalRelative(configPath)}`,
+ )
}
}
+ // TODO: check if await should be here
const validatedConfig: any = await configSchema.validate(config, {
stripUnknown: true,
})
@@ -70,8 +50,10 @@ export async function saveConfig(
await fsPromise.writeFile(configPath, configCommentHeader + tomlRaw)
} catch (err: any) {
throw new Error(
- `e2b environment config ${asFormattedEnvironment(
- config,
+ `E2B sandbox template config ${asFormattedSandboxTemplate(
+ {
+ envID: config.id,
+ },
configPath,
)} cannot be saved: ${err.message}`,
)
@@ -92,11 +74,11 @@ export async function getNestedConfigs(rootPath: string) {
export async function loadConfigs(rootPath: string, nested?: boolean) {
const configPaths = nested
- ? (await getNestedConfigs(rootPath)).map((c: { path: any }) => c.path)
+ ? (await getNestedConfigs(rootPath)).map((c) => c.path)
: [getConfigPath(rootPath)]
return Promise.all(
- configPaths.map(async (configPath: string) => {
+ configPaths.map(async (configPath) => {
const config = await loadConfig(configPath)
return {
...config,
diff --git a/packages/cli/src/config/template.ts b/packages/cli/src/config/template.ts
deleted file mode 100644
index b2f03ee2e..000000000
--- a/packages/cli/src/config/template.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-import * as sdk from '@devbookhq/sdk'
-
-import { notEmpty } from '../utils/notEmpty'
-
-export type Template = sdk.components['schemas']['Template']
-
-type Templates = { [key in Template]: boolean }
-
-const enabledTemplates: Templates = {
- Bash: true,
- Go: true,
- Nodejs: true,
- Python3: true,
- Rust: true,
- Java: true,
- Perl: true,
- PHP: true,
- DotNET: true,
-}
-
-export const templates = Object.entries(enabledTemplates)
- .map(([k, v]) => (v ? k : undefined))
- .filter(notEmpty)
diff --git a/packages/cli/src/docker/archive.ts b/packages/cli/src/docker/archive.ts
new file mode 100644
index 000000000..d33e7f952
--- /dev/null
+++ b/packages/cli/src/docker/archive.ts
@@ -0,0 +1,58 @@
+import * as tar from 'tar-fs'
+import * as path from 'path'
+
+export interface FilePath {
+ path: string
+ rootPath: string
+ name: string
+}
+
+export interface FileRewrite {
+ oldPath: string
+ newPath: string
+}
+
+export async function createBlobFromFiles(
+ root: string,
+ filePaths: FilePath[],
+ rewrites: FileRewrite[],
+) {
+ const absoluteRewrites = rewrites.map(({ oldPath, newPath }) => ({
+ oldPath: path.join(path.sep, oldPath),
+ newPath: path.join(path.sep, newPath),
+ }))
+
+ const blob = await new Promise<Blob>((resolve, reject) => {
+ const chunks: BlobPart[] = []
+
+ const pack = tar.pack(root, {
+ entries: filePaths
+ .filter(f =>
+ absoluteRewrites.every(({ oldPath }) => path.resolve(oldPath) !== f.path),
+ )
+ .map(({ rootPath }) => rootPath),
+ map: header => {
+ const rewrite = absoluteRewrites.find(({ oldPath }) => header.name === oldPath)
+ if (rewrite) {
+ header.name = rewrite.newPath
+ }
+ return header
+ },
+ })
+
+ pack.on('data', (chunk: BlobPart) => {
+ chunks.push(chunk)
+ })
+
+ pack.on('end', () => {
+ const blob = new Blob(chunks)
+ resolve(blob)
+ })
+
+ pack.on('error', (error: any) => {
+ reject(new Error(`Error creating tar blob: ${error.message}`))
+ })
+ })
+
+ return blob
+}
diff --git a/packages/cli/src/docker/constants.ts b/packages/cli/src/docker/constants.ts
new file mode 100644
index 000000000..b9a2f1d3d
--- /dev/null
+++ b/packages/cli/src/docker/constants.ts
@@ -0,0 +1,8 @@
+export const defaultDockerfileName = 'e2b.Dockerfile'
+export const fallbackDockerfileName = 'Dockerfile'
+
+export const basicDockerfile = `# You can use most Debian-based base images
+FROM ubuntu:22.04
+
+# Install dependencies and customize sandbox
+`
diff --git a/packages/cli/src/index.ts b/packages/cli/src/index.ts
index 15f2e848d..ddcd0cfe2 100644
--- a/packages/cli/src/index.ts
+++ b/packages/cli/src/index.ts
@@ -1,9 +1,17 @@
#!/usr/bin/env node
+
import * as updateNotifier from 'update-notifier'
import * as packageJSON from '../package.json'
-import { program } from './commands/index'
+import { program } from './commands'
+
+export const pkg = packageJSON
-updateNotifier.default({ pkg: packageJSON }).notify()
+updateNotifier.default({
+ pkg,
+ updateCheckInterval: 1000 * 60 * 60 * 8 // 8 hours
+}).notify()
-program.version(packageJSON.version, undefined, 'Display e2b CLI version').parse()
+program
+ .version(packageJSON.version, undefined, 'Display E2B CLI version')
+ .parse()
diff --git a/packages/cli/src/interactions/confirm.ts b/packages/cli/src/interactions/confirm.ts
deleted file mode 100644
index 5514018b9..000000000
--- a/packages/cli/src/interactions/confirm.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-export async function confirm(text: string, defaultAnwser = false) {
- const inquirer = await import('inquirer')
- const confirmAnswers = await inquirer.default.prompt([
- {
- name: 'confirm',
- type: 'confirm',
- default: defaultAnwser,
- message: text,
- },
- ])
-
- return confirmAnswers['confirm'] as boolean
-}
diff --git a/packages/cli/src/interactions/envs.ts b/packages/cli/src/interactions/envs.ts
deleted file mode 100644
index a58908642..000000000
--- a/packages/cli/src/interactions/envs.ts
+++ /dev/null
@@ -1,56 +0,0 @@
-import * as sdk from '@devbookhq/sdk'
-import * as chalk from 'chalk'
-import * as fs from 'fs'
-import { getConfigPath, loadConfig } from 'src/config'
-import { asFormattedEnvironment } from 'src/utils/format'
-import { sortEnvs } from 'src/utils/sort'
-
-export async function getPromptEnv(
- envs: sdk.components['schemas']['Environment'][],
- text: string,
-) {
- const inquirer = await import('inquirer')
- const envsAnwsers = await inquirer.default.prompt([
- {
- name: 'env',
- message: chalk.default.underline(text),
- type: 'list',
- pageSize: 50,
- choices: envs.sort(sortEnvs).map(e => ({
- name: asFormattedEnvironment(e),
- value: e,
- })),
- },
- ])
-
- return envsAnwsers['env'] as sdk.components['schemas']['Environment']
-}
-
-export async function getPromptEnvs(
- envs: sdk.components['schemas']['Environment'][],
- text: string,
-) {
- const inquirer = await import('inquirer')
- const envsAnwsers = await inquirer.default.prompt([
- {
- name: 'envs',
- message: chalk.default.underline(text),
- type: 'checkbox',
- pageSize: 50,
- choices: envs.sort(sortEnvs).map(e => ({
- name: asFormattedEnvironment(e),
- value: e,
- })),
- },
- ])
-
- return envsAnwsers['envs'] as sdk.components['schemas']['Environment'][]
-}
-
-export async function getRootEnv(root: string) {
- const configPath = getConfigPath(root)
-
- if (fs.existsSync(configPath)) {
- return loadConfig(configPath)
- }
-}
diff --git a/packages/cli/src/options.ts b/packages/cli/src/options.ts
index a581ac0b6..983d7b882 100644
--- a/packages/cli/src/options.ts
+++ b/packages/cli/src/options.ts
@@ -1,23 +1,10 @@
-import { Option } from 'commander'
+import * as commander from 'commander'
import { asBold } from './utils/format'
-export const allOption = new Option(
- '-a, --all',
- 'Call this command in all subdirectories',
-)
-
-export const selectOption = new Option(
- '-s, --select',
- 'Select environment from interactive list',
-)
-
-export const selectMultipleOption = new Option(
- '-s, --select',
- 'Select environments from interactive list',
-)
-
-export const pathOption = new Option(
+export const pathOption = new commander.Option(
'-p, --path <path>',
- `Call this command in ${asBold('<path>')} directory`,
+ `Change root directory where command is executed to ${asBold(
+ '<path>',
+ )} directory`,
)
diff --git a/packages/cli/src/terminal.ts b/packages/cli/src/terminal.ts
index 7a5143334..58a3ffa32 100644
--- a/packages/cli/src/terminal.ts
+++ b/packages/cli/src/terminal.ts
@@ -1,4 +1,4 @@
-import * as sdk from '@e2b/sdk'
+import * as e2b from '@e2b/sdk'
import { createDeferredPromise } from './utils/promise'
@@ -10,7 +10,7 @@ function getStdoutSize() {
}
export async function spawnConnectedTerminal(
- terminal: sdk.TerminalManager,
+ terminal: e2b.TerminalManager,
introText: string,
exitText: string,
) {
@@ -39,7 +39,7 @@ export async function spawnConnectedTerminal(
terminalSession.resize(getStdoutSize()),
)
- const stdinListener = process.stdin.on('data', data =>
+ const stdinListener = process.stdin.on('data', (data) =>
terminalSession.sendData(data.toString('utf8')),
)
@@ -50,7 +50,7 @@ export async function spawnConnectedTerminal(
})
return {
- // destroy: terminalSession.destroy.bind(terminalSession), FIXME
+ kill: terminalSession.kill.bind(terminalSession),
exited,
}
}
diff --git a/packages/cli/src/user.ts b/packages/cli/src/user.ts
new file mode 100644
index 000000000..26d715d1f
--- /dev/null
+++ b/packages/cli/src/user.ts
@@ -0,0 +1,18 @@
+import * as os from 'os'
+import * as path from 'path'
+import * as fs from 'fs'
+
+export interface UserConfig {
+ email: string
+ accessToken: string
+ defaultTeamApiKey: string
+ defaultTeamId: string
+}
+
+export const USER_CONFIG_PATH = path.join(os.homedir(), '.e2b', 'config.json') // TODO: Keep in Keychain
+export const DOCS_BASE = process.env.E2B_DOCS_BASE || 'https://e2b.dev/docs'
+
+export function getUserConfig(): UserConfig | null {
+ if (!fs.existsSync(USER_CONFIG_PATH)) return null
+ return JSON.parse(fs.readFileSync(USER_CONFIG_PATH, 'utf8'))
+}
diff --git a/packages/cli/src/utils/filesystem.ts b/packages/cli/src/utils/filesystem.ts
index 5738667b8..e24bd8e10 100644
--- a/packages/cli/src/utils/filesystem.ts
+++ b/packages/cli/src/utils/filesystem.ts
@@ -1,10 +1,8 @@
-import dockerIgnore from '@balena/dockerignore'
+import * as dockerIgnore from '@balena/dockerignore'
import * as fsWalk from '@nodelib/fs.walk'
import * as fs from 'fs'
-import * as fsPromise from 'fs/promises'
-import gitIgnore, { Ignore } from 'ignore'
+import * as gitIgnore from 'ignore'
import * as path from 'path'
-import tar from 'tar-fs'
import * as util from 'util'
const walk = util.promisify(fsWalk.walk)
@@ -22,17 +20,19 @@ const walk = util.promisify(fsWalk.walk)
export async function getFiles(
rootPath: string,
opts?: {
- extension?: string
- name?: string
- respectGitignore?: boolean
- respectDockerignore?: boolean
+ extension?: string;
+ name?: string;
+ respectGitignore?: boolean;
+ respectDockerignore?: boolean;
},
) {
- let gitignore: Ignore | undefined
+ let gitignore: gitIgnore.Ignore | undefined
if (opts?.respectGitignore) {
const gitignorePath = path.join(rootPath, '.gitignore')
if (fs.existsSync(gitignorePath)) {
- gitignore = gitIgnore().add(fs.readFileSync(gitignorePath).toString())
+ gitignore = gitIgnore
+ .default()
+ .add(fs.readFileSync(gitignorePath).toString())
}
}
@@ -41,26 +41,30 @@ export async function getFiles(
const dockerignorePath = path.join(rootPath, '.dockerignore')
if (fs.existsSync(dockerignorePath)) {
const dockerIgnoreContent = fs.readFileSync(dockerignorePath, 'utf-8')
- const dockerIgnoreLines = dockerIgnoreContent.split('\n').map(line => line.trim())
- dockerignore = dockerIgnore().add(dockerIgnoreLines)
+ const dockerIgnoreLines = dockerIgnoreContent
+ .split('\n')
+ .map((line) => line.trim())
+ dockerignore = dockerIgnore.default().add(dockerIgnoreLines)
}
}
const entries = await walk(rootPath, {
- entryFilter: e => {
+ entryFilter: (e) => {
return [
!!e.stats?.isFile(),
opts?.extension ? e.name.endsWith(opts.extension) : true,
opts?.name ? e.name === opts.name : true,
!(gitignore && gitignore.ignores(path.relative(rootPath, e.path))),
- !(dockerignore && dockerignore.ignores(path.relative(rootPath, e.path))),
+ !(
+ dockerignore && dockerignore.ignores(path.relative(rootPath, e.path))
+ ),
].every(Boolean)
},
stats: true,
})
return await Promise.all(
- entries.map(async e => {
+ entries.map(async (e) => {
return {
path: e.path as string,
rootPath: path.join('/', path.relative(rootPath, e.path)),
@@ -70,32 +74,13 @@ export async function getFiles(
)
}
-export function getRoot(envPath?: string) {
+export function getRoot(templatePath?: string) {
const defaultPath = process.cwd()
- if (!envPath) return defaultPath
- if (path.isAbsolute(envPath)) return envPath
- return path.resolve(defaultPath, envPath)
-}
-
-export async function ensureDir(dirPath: string) {
- if (!fs.existsSync(dirPath)) {
- return fsPromise.mkdir(dirPath, { recursive: true })
- }
+ if (!templatePath) return defaultPath
+ if (path.isAbsolute(templatePath)) return templatePath
+ return path.resolve(defaultPath, templatePath)
}
export function cwdRelative(absolutePath: string) {
return path.relative(process.cwd(), absolutePath)
}
-
-export const packToTar = (
- rootPath: string,
- filePaths: string[],
- tarPath: string | Buffer | URL,
-) =>
- new Promise((resolve, reject) => {
- tar
- .pack(rootPath, { entries: filePaths })
- .pipe(fs.createWriteStream(tarPath))
- .on('error', reject)
- .on('finish', resolve)
- })
diff --git a/packages/cli/src/utils/format.ts b/packages/cli/src/utils/format.ts
index 552962f5d..66d435bcc 100644
--- a/packages/cli/src/utils/format.ts
+++ b/packages/cli/src/utils/format.ts
@@ -1,22 +1,24 @@
-import * as sdk from '@devbookhq/sdk'
import * as chalk from 'chalk'
+import * as e2b from '@e2b/sdk'
import { cwdRelative } from './filesystem'
-export function asFormattedEnvironment(
- env: sdk.components['schemas']['Environment'],
- localPath?: string,
+export function asFormattedSandboxTemplate(
+ template: Pick<e2b.components['schemas']['Environment'], 'envID'>,
+ configLocalPath?: string,
) {
- const id = asBold(env.id)
- const template = env.template ? asTemplate` [${env.template}]` : ''
- const title = env.title ? ` ${env.title}` : ''
- const configPath = localPath ? asDim(' <-> ') + asLocalRelative(localPath) : ''
+ const id = asBold(template.envID)
+ const configPath = configLocalPath
+ ? asDim(' <-> ') + asLocalRelative(configLocalPath)
+ : ''
- return `${id}${template}${title}${configPath}`
+ return `${id}${configPath}`
}
-export function asFormattedError(text: string, err?: any) {
- return chalk.default.redBright(`> ${text} ${err ? ':\n' + err : ''}\n`)
+export function asFormattedError(text: string | undefined, err?: any) {
+ return chalk.default.redBright(
+ `${text ? `${text} \n` : ''}${err ? err.stack : ''}\n`,
+ )
}
export function asDim(content?: string) {
@@ -27,12 +29,12 @@ export function asBold(content: string) {
return chalk.default.bold(content)
}
-export function asEnv(pathInEnv?: string) {
- return chalk.default.green(pathInEnv)
+export function asPrimary(content: string) {
+ return chalk.default.hex('#FFB766')(content)
}
-export function asTemplate(t: TemplateStringsArray, template: string) {
- return chalk.default.dim(t[0] + template + t[1])
+export function asSandboxTemplate(pathInTemplate?: string) {
+ return chalk.default.green(pathInTemplate)
}
export function asLocal(pathInLocal?: string) {
@@ -43,3 +45,7 @@ export function asLocalRelative(absolutePathInLocal?: string) {
if (!absolutePathInLocal) return ''
return asLocal('./' + cwdRelative(absolutePathInLocal))
}
+
+export function asBuildLogs(content: string) {
+ return chalk.default.blueBright(content)
+}
diff --git a/packages/cli/src/utils/hashing.ts b/packages/cli/src/utils/hashing.ts
deleted file mode 100644
index 66596311f..000000000
--- a/packages/cli/src/utils/hashing.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import * as crypto from 'crypto'
-
-const delimiter = '\0'
-
-export function getFilesHash(files: { name: string; content: string }[]) {
- const shasum = crypto.createHash('sha1')
-
- files.forEach(({ name, content }) => {
- shasum.update(name)
- // Add delimiter to hash to prevent collisions between files where the join of the name and content is the same
- shasum.update(delimiter)
- shasum.update(content)
- shasum.update(delimiter)
- })
-
- return shasum.digest('base64')
-}
diff --git a/packages/cli/src/utils/notEmpty.ts b/packages/cli/src/utils/notEmpty.ts
deleted file mode 100644
index 26b024cd5..000000000
--- a/packages/cli/src/utils/notEmpty.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-export function notEmpty<T>(value: T | null | undefined): value is T {
- return value !== null && value !== undefined
-}
diff --git a/packages/cli/src/utils/promise.ts b/packages/cli/src/utils/promise.ts
index 33cbaed01..a28f852c3 100644
--- a/packages/cli/src/utils/promise.ts
+++ b/packages/cli/src/utils/promise.ts
@@ -1,15 +1,3 @@
-export function assertFulfilled<T>(
- item: PromiseSettledResult<T>,
-): item is PromiseFulfilledResult<T> {
- return item.status === 'fulfilled'
-}
-
-export function assertRejected<T>(
- item: PromiseSettledResult<T>,
-): item is PromiseRejectedResult {
- return item.status === 'rejected'
-}
-
export function createDeferredPromise<T = void>() {
let resolve: (value: T) => void
let reject: (reason?: any) => void
diff --git a/packages/cli/src/utils/sort.ts b/packages/cli/src/utils/sort.ts
deleted file mode 100644
index a6cd1b751..000000000
--- a/packages/cli/src/utils/sort.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-import * as sdk from '@devbookhq/sdk'
-
-export function sortEnvs<E extends sdk.components['schemas']['Environment']>(a: E, b: E) {
- if (!a.title || !b.title) return 0
- if (!a.title) return 1
- if (!b.title) return -1
-
- return a.title.localeCompare(b.title)
-}
diff --git a/packages/cli/src/utils/wait.ts b/packages/cli/src/utils/wait.ts
new file mode 100644
index 000000000..d9f64ac82
--- /dev/null
+++ b/packages/cli/src/utils/wait.ts
@@ -0,0 +1,3 @@
+export async function wait(ms: number) {
+ return new Promise(resolve => setTimeout(resolve, ms))
+}
diff --git a/packages/cli/testground/demo-basic/Dockerfile b/packages/cli/testground/demo-basic/Dockerfile
index 75375145f..2a0eb1ae9 100644
--- a/packages/cli/testground/demo-basic/Dockerfile
+++ b/packages/cli/testground/demo-basic/Dockerfile
@@ -1,19 +1,4 @@
-FROM ubuntu:22.04
+FROM ubuntu:latest
+LABEL authors="i"
-# avoid asking for input
-ARG DEBIAN_FRONTEND=noninteractive
-
-# Update default packages
-RUN apt-get update
-
-# Get Ubuntu packages
-RUN apt-get install -y \
- build-essential \
- curl socat util-linux openssh-server git chrony nano sudo htop
-
-RUN curl -sL https://deb.nodesource.com/setup_16.x | bash -
-RUN apt-get install -y nodejs
-
-WORKDIR /code
-
-RUN npm init -y
+ENTRYPOINT ["top", "-b"]
\ No newline at end of file
diff --git a/packages/cli/testground/demo-basic/main.mjs b/packages/cli/testground/demo-basic/main.mjs
index 9c7f02af1..bc091312a 100644
--- a/packages/cli/testground/demo-basic/main.mjs
+++ b/packages/cli/testground/demo-basic/main.mjs
@@ -1,4 +1,4 @@
// Console log current time with date-fns
-import { format } from 'date-fns';
+import { format } from 'date-fns'
-console.log(`Current time is ${format(new Date(), 'HH:mm:ss')}`);
+console.log(`Current time is ${format(new Date(), 'HH:mm:ss')}`)
diff --git a/packages/cli/tsconfig.json b/packages/cli/tsconfig.json
index 2163e907a..5677c5819 100644
--- a/packages/cli/tsconfig.json
+++ b/packages/cli/tsconfig.json
@@ -30,7 +30,9 @@
"src"
],
"paths": {
- "@e2b/sdk": ["../js-sdk/src"],
+ "@e2b/sdk": [
+ "../js-sdk/src"
+ ]
}
}
}
diff --git a/packages/cli/tsup.config.js b/packages/cli/tsup.config.js
index b42c766ff..ac6922e63 100644
--- a/packages/cli/tsup.config.js
+++ b/packages/cli/tsup.config.js
@@ -1,16 +1,17 @@
-import { defineConfig } from 'tsup'
+import {defineConfig} from 'tsup'
import * as packageJSON from './package.json'
-const excludedPackages = ['inquirer', 'update-notifier']
+const excludedPackages = ['update-notifier']
export default defineConfig({
entry: ['src/index.ts'],
shims: true, // Needed for "open" package, as it uses import.meta.url and we are building for cjs
- target: 'node16',
+ target: 'node18',
platform: 'node',
format: 'cjs',
+ clean: true,
noExternal: Object.keys(packageJSON.dependencies).filter(
- f => !excludedPackages.includes(f),
- ),
+ f => !excludedPackages.includes(f)
+ )
})
diff --git a/packages/js-sdk/package.json b/packages/js-sdk/package.json
index d41932030..fb4007c99 100644
--- a/packages/js-sdk/package.json
+++ b/packages/js-sdk/package.json
@@ -1,6 +1,6 @@
{
"name": "@e2b/sdk",
- "version": "0.7.5",
+ "version": "0.8.0-rc.3",
"description": "E2B SDK that give agents cloud environments",
"homepage": "https://e2b.dev",
"license": "MIT",
diff --git a/packages/js-sdk/src/api/index.ts b/packages/js-sdk/src/api/index.ts
index 272771327..00830af2a 100644
--- a/packages/js-sdk/src/api/index.ts
+++ b/packages/js-sdk/src/api/index.ts
@@ -1,29 +1,67 @@
-import { Fetcher } from 'openapi-typescript-fetch'
+import { Fetcher, OpArgType, TypedFetch } from 'openapi-typescript-fetch'
-import platform from 'platform'
-
-import { SESSION_DOMAIN } from '../constants'
+import { API_HOST } from '../constants'
import type { components, paths } from './schema.gen'
-
-import { version } from '../../package.json'
+import { defaultHeaders } from './metadata'
const client = Fetcher.for<paths>()
+type ClientType = typeof client
+
client.configure({
- baseUrl: `https://${SESSION_DOMAIN}`,
+ baseUrl: API_HOST,
init: {
- headers: {
- package_version: version,
- lang: 'js',
- engine: platform.name || 'unknown',
- lang_version: platform.version || 'unknown',
- system: platform.os?.family || 'unknown',
- publisher: 'e2b',
- },
+ headers: defaultHeaders,
},
})
-type ClientType = typeof client
+type WithAccessToken<T> = (
+ accessToken: string,
+ arg: OpArgType<T>,
+ init?: RequestInit,
+) => ReturnType<TypedFetch<T>>
+
+export function withAccessToken<T>(f: TypedFetch<T>) {
+ const wrapped = (accessToken: string, arg: OpArgType<T>, init?: RequestInit) => {
+ return f(arg, {
+ ...init,
+ headers: {
+ Authorization: `Bearer ${accessToken}`,
+ ...init?.headers,
+ },
+ })
+ }
+
+ wrapped.Error = f.Error
+
+ return wrapped as WithAccessToken<T> & {
+ Error: typeof f.Error
+ }
+}
+
+type WithAPIKey<T> = (
+ apiKey: string,
+ arg: OpArgType<T>,
+ init?: RequestInit,
+) => ReturnType<TypedFetch<T>>
+
+export function withAPIKey<T>(f: TypedFetch<T>) {
+ const wrapped = (apiKey: string, arg: OpArgType<T>, init?: RequestInit) => {
+ return f(arg, {
+ ...init,
+ headers: {
+ 'X-API-KEY': apiKey,
+ ...init?.headers,
+ },
+ })
+ }
+
+ wrapped.Error = f.Error
+
+ return wrapped as WithAPIKey<T> & {
+ Error: typeof f.Error
+ }
+}
export default client
export type { components, paths, ClientType }
diff --git a/packages/js-sdk/src/api/metadata.ts b/packages/js-sdk/src/api/metadata.ts
new file mode 100644
index 000000000..946f9f68a
--- /dev/null
+++ b/packages/js-sdk/src/api/metadata.ts
@@ -0,0 +1,13 @@
+import platform from 'platform'
+
+import { version } from '../../package.json'
+
+export const defaultHeaders = {
+ browser: (typeof window !== 'undefined' && platform.name) || 'undefined',
+ lang: 'js',
+ lang_version: platform.version || 'unknown',
+ package_version: version,
+ publisher: 'e2b',
+ sdk_runtime: typeof window === 'undefined' ? 'node' : 'browser',
+ system: platform.os?.family || 'unknown',
+}
diff --git a/packages/js-sdk/src/api/schema.gen.ts b/packages/js-sdk/src/api/schema.gen.ts
index 9e759610c..73fc6176b 100644
--- a/packages/js-sdk/src/api/schema.gen.ts
+++ b/packages/js-sdk/src/api/schema.gen.ts
@@ -4,257 +4,177 @@
*/
export interface paths {
- "/health": {
+ '/health': {
/** Health check */
get: {
responses: {
/** Request was successful */
200: unknown;
- 401: components["responses"]["401"];
+ 401: components['responses']['401'];
};
};
};
- "/sessions": {
- /** List all sessions */
- get: {
- parameters: {
- query: {
- api_key: components["parameters"]["apiKeyReq"];
- };
- };
- responses: {
- /** Successfully returned all sessions */
- 200: {
- content: {
- "application/json": components["schemas"]["Session"][];
- };
- };
- 401: components["responses"]["401"];
- 500: components["responses"]["500"];
- };
- };
- /** Create a session on the server */
+ '/instances': {
+ /** Create an instance from the environment */
post: {
- parameters: {
- query: {
- api_key?: components["parameters"]["apiKeyOpt"];
- };
- };
responses: {
- /** Successfully created a session */
+ /** The instance was created successfully */
201: {
content: {
- "application/json": components["schemas"]["Session"];
+ 'application/json': components['schemas']['Instance'];
};
};
- 400: components["responses"]["400"];
- 401: components["responses"]["401"];
- 500: components["responses"]["500"];
+ 400: components['responses']['400'];
+ 401: components['responses']['401'];
+ 500: components['responses']['500'];
};
requestBody: {
content: {
- "application/json": components["schemas"]["NewSession"];
- };
- };
- };
- };
- "/sessions/{sessionID}": {
- /** Delete a session on the server */
- delete: {
- parameters: {
- query: {
- api_key: components["parameters"]["apiKeyReq"];
- };
- path: {
- sessionID: components["parameters"]["sessionID"];
+ 'application/json': components['schemas']['NewInstance'];
};
};
- responses: {
- /** Successfully deleted the session */
- 204: never;
- 401: components["responses"]["401"];
- 500: components["responses"]["500"];
- };
};
};
- "/sessions/{sessionID}/refresh": {
- /** Refresh the session extending its time to live */
+ '/instances/{instanceID}/refreshes': {
+ /** Refresh the instance extending its time to live */
post: {
parameters: {
- query: {
- api_key?: components["parameters"]["apiKeyOpt"];
- };
path: {
- sessionID: components["parameters"]["sessionID"];
+ instanceID: components['parameters']['instanceID'];
};
};
responses: {
- /** Successfully refreshed the session */
+ /** Successfully refreshed the instance */
204: never;
- 401: components["responses"]["401"];
- /** Error refreshing session - session not found */
- 404: {
- content: {
- "application/json": components["schemas"]["Error"];
- };
- };
+ 401: components['responses']['401'];
+ 404: components['responses']['404'];
};
};
};
- "/envs": {
+ '/envs': {
/** List all environments */
get: {
- parameters: {
- query: {
- api_key: components["parameters"]["apiKeyReq"];
- };
- };
responses: {
/** Successfully returned all environments */
200: {
content: {
- "application/json": components["schemas"]["Environment"][];
+ 'application/json': components['schemas']['Environment'][];
};
};
- 401: components["responses"]["401"];
- 500: components["responses"]["500"];
+ 401: components['responses']['401'];
+ 500: components['responses']['500'];
};
};
/** Create a new environment */
post: {
- parameters: {
- query: {
- api_key: components["parameters"]["apiKeyReq"];
- };
- };
responses: {
- /** Successfully created an environment */
- 200: {
+ /** The build has started */
+ 202: {
content: {
- "application/json": components["schemas"]["Environment"];
+ 'application/json': components['schemas']['Environment'];
};
};
- 400: components["responses"]["400"];
- 401: components["responses"]["401"];
- 500: components["responses"]["500"];
+ 401: components['responses']['401'];
+ 500: components['responses']['500'];
};
requestBody: {
content: {
- "application/json": components["schemas"]["NewEnvironment"];
+ 'multipart/form-data': {
+ /**
+ * Format: binary
+ * @description Docker build context
+ */
+ buildContext: string;
+ /** @description Dockerfile content */
+ dockerfile: string;
+ };
};
};
};
};
- "/envs/{codeSnippetID}": {
- /** Create a new env for a code snippet */
+ '/envs/{envID}': {
+ /** Rebuild an environment */
post: {
parameters: {
- query: {
- api_key: components["parameters"]["apiKeyReq"];
- };
path: {
- codeSnippetID: components["parameters"]["codeSnippetID"];
+ envID: components['parameters']['envID'];
};
};
responses: {
- /** Successfully created an environment */
- 204: never;
- 400: components["responses"]["400"];
- 401: components["responses"]["401"];
- 500: components["responses"]["500"];
+ /** The build has started */
+ 202: {
+ content: {
+ 'application/json': components['schemas']['Environment'];
+ };
+ };
+ 401: components['responses']['401'];
+ 500: components['responses']['500'];
};
requestBody: {
content: {
- "application/json": components["schemas"]["NewEnvironment"];
- };
- };
- };
- /** Delete the code snippet environment */
- delete: {
- parameters: {
- query: {
- api_key: components["parameters"]["apiKeyReq"];
- };
- path: {
- codeSnippetID: components["parameters"]["codeSnippetID"];
- };
- };
- responses: {
- /** Successfully deleted the environment */
- 204: never;
- /** Cannot delete the environment */
- 400: {
- content: {
- "application/json": components["schemas"]["Error"];
+ 'multipart/form-data': {
+ /**
+ * Format: binary
+ * @description Docker build context
+ */
+ buildContext: string;
+ /** @description Dockerfile content */
+ dockerfile: string;
+ /** @description ID of the environment */
+ envID: string;
};
};
- 401: components["responses"]["401"];
- 500: components["responses"]["500"];
};
};
- /** Update the environment of the code snippet to match the edit environment */
- patch: {
+ };
+ '/envs/{envID}/builds/{buildID}': {
+ /** Get environment build info */
+ get: {
parameters: {
- query: {
- api_key: components["parameters"]["apiKeyReq"];
- };
path: {
- codeSnippetID: components["parameters"]["codeSnippetID"];
+ envID: components['parameters']['envID'];
+ buildID: components['parameters']['buildID'];
};
- };
- responses: {
- /** Updated the edit environment for code snippet */
- 204: never;
- 400: components["responses"]["400"];
- 401: components["responses"]["401"];
- 500: components["responses"]["500"];
- };
- };
- };
- "/envs/{codeSnippetID}/state": {
- /** Update the state of the environment */
- put: {
- parameters: {
query: {
- api_key: components["parameters"]["apiKeyReq"];
- };
- path: {
- codeSnippetID: components["parameters"]["codeSnippetID"];
+ /** Index of the starting build log that should be returned with the environment */
+ logsOffset?: number;
};
};
responses: {
- /** Updated the state of environment */
- 204: never;
- 400: components["responses"]["400"];
- 401: components["responses"]["401"];
- };
- requestBody: {
- content: {
- "application/json": components["schemas"]["EnvironmentStateUpdate"];
+ /** Successfully returned the environment */
+ 200: {
+ content: {
+ 'application/json': components['schemas']['EnvironmentBuild'];
+ };
};
+ 401: components['responses']['401'];
+ 404: components['responses']['404'];
+ 500: components['responses']['500'];
};
};
};
- "/envs/{codeSnippetID}/title": {
- /** Update the title of the environment */
- put: {
+ '/envs/{envID}/builds/{buildID}/logs': {
+ /** Add a build log */
+ post: {
parameters: {
- query: {
- api_key: components["parameters"]["apiKeyReq"];
- };
path: {
- codeSnippetID: components["parameters"]["codeSnippetID"];
+ envID: components['parameters']['envID'];
+ buildID: components['parameters']['buildID'];
};
};
responses: {
- /** Updated the title of the code snippet */
- 204: never;
- 400: components["responses"]["400"];
- 401: components["responses"]["401"];
+ /** Successfully added log */
+ 201: unknown;
+ 401: components['responses']['401'];
+ 404: components['responses']['404'];
};
requestBody: {
content: {
- "application/json": components["schemas"]["EnvironmentTitleUpdate"];
+ 'application/json': {
+ /** @description API secret */
+ apiSecret: string;
+ logs: string[];
+ };
};
};
};
@@ -263,50 +183,41 @@ export interface paths {
export interface components {
schemas: {
- /** @enum {string} */
- Template:
- | "Nodejs"
- | "Go"
- | "Bash"
- | "Rust"
- | "Python3"
- | "PHP"
- | "Java"
- | "Perl"
- | "DotNET";
- /** @enum {string} */
- EnvironmentState: "Building" | "Failed" | "Done";
- Environment: {
- id: string;
- template?: string;
- title?: string;
- };
- NewEnvironment: {
- title?: string;
- template: string;
+ NewInstance: {
+ /** @description Identifier of the required environment */
+ envID: string;
};
- EnvironmentStateUpdate: {
- state: components["schemas"]["EnvironmentState"];
- };
- EnvironmentTitleUpdate: {
- title?: string;
+ Environment: {
+ /** @description Identifier of the environment */
+ envID: string;
+ /** @description Identifier of the last successful build for given environment */
+ buildID: string;
+ /** @description Whether the environment is public or only accessible by the team */
+ public: boolean;
};
- NewSession: {
+ EnvironmentBuild: {
+ /**
+ * @description Build logs
+ * @default []
+ */
+ logs: string[];
+ /** @description Identifier of the environment */
+ envID: string;
+ /** @description Identifier of the build */
+ buildID: string;
/**
- * @description Option determining if the session is a shared persistent edit session
- * @default false
+ * @description Status of the environment
+ * @enum {string}
*/
- editEnabled?: boolean;
- /** @description Identifier of a code snippet which which is the environment associated */
- codeSnippetID: string;
+ status?: 'building' | 'ready' | 'error';
+ } & {
+ finished: unknown;
};
- Session: {
- /** @description Identifier of a code snippet which which is the environment associated */
- codeSnippetID: string;
- /** @description Information if the session is a shared persistent edit session */
- editEnabled: boolean;
- /** @description Identifier of the session */
- sessionID: string;
+ Instance: {
+ /** @description Identifier of the environment from which is the instance created */
+ envID: string;
+ /** @description Identifier of the instance */
+ instanceID: string;
/** @description Identifier of the client */
clientID: string;
};
@@ -324,30 +235,37 @@ export interface components {
/** Bad request */
400: {
content: {
- "application/json": components["schemas"]["Error"];
+ 'application/json': components['schemas']['Error'];
};
};
/** Authentication error */
401: {
content: {
- "application/json": components["schemas"]["Error"];
+ 'application/json': components['schemas']['Error'];
+ };
+ };
+ /** Not found */
+ 404: {
+ content: {
+ 'application/json': components['schemas']['Error'];
};
};
/** Server error */
500: {
content: {
- "application/json": components["schemas"]["Error"];
+ 'application/json': components['schemas']['Error'];
};
};
};
parameters: {
- apiKeyOpt: string;
- apiKeyReq: string;
- codeSnippetID: string;
- sessionID: string;
+ envID: string;
+ buildID: string;
+ instanceID: string;
};
}
-export interface operations {}
+export interface operations {
+}
-export interface external {}
+export interface external {
+}
diff --git a/packages/js-sdk/src/constants.ts b/packages/js-sdk/src/constants.ts
index 6966587f2..d6b2a0b0d 100644
--- a/packages/js-sdk/src/constants.ts
+++ b/packages/js-sdk/src/constants.ts
@@ -1,9 +1,14 @@
-export const SESSION_REFRESH_PERIOD = 5_000 // 5s
+export const SANDBOX_REFRESH_PERIOD = 5_000 // 5s
export const WS_RECONNECT_INTERVAL = 600 // 600ms
export const TIMEOUT = 60_000 // 60s
-export const SESSION_DOMAIN = 'ondevbook.com'
+export const API_DOMAIN = 'api.e2b.dev'
+export const API_HOST = process?.env?.DEBUG
+ ? 'http://localhost:3000'
+ : `https://${API_DOMAIN}`
+export const SANDBOX_DOMAIN = 'e2b.dev'
+
export const ENVD_PORT = 49982
export const WS_ROUTE = '/ws'
diff --git a/packages/js-sdk/src/index.ts b/packages/js-sdk/src/index.ts
index d7ec88ae0..7e8d2390d 100644
--- a/packages/js-sdk/src/index.ts
+++ b/packages/js-sdk/src/index.ts
@@ -1,25 +1,29 @@
-export { default as api } from './api'
-export type { ClientType, components } from './api'
+import { Sandbox } from './sandbox'
-export { Session } from './session'
-export type { Environment } from './session'
-export type { SessionOpts } from './session'
-export type { OpenPort } from './session/codeSnippet'
-export { Terminal, TerminalOutput } from './session/terminal'
-export type { TerminalManager } from './session/terminal'
-export type { FilesystemManager, FileInfo } from './session/filesystem'
+export { default as api, withAPIKey, withAccessToken } from './api'
+export type { ClientType, components, paths } from './api'
+
+export { SANDBOX_DOMAIN, API_HOST } from './constants'
+export { Sandbox } from './sandbox'
+export type { SandboxOpts } from './sandbox'
+export type { OpenPort } from './sandbox/codeSnippet'
+export { Terminal, TerminalOutput } from './sandbox/terminal'
+export type { TerminalManager } from './sandbox/terminal'
+export type { FilesystemManager, FileInfo } from './sandbox/filesystem'
export {
default as FilesystemWatcher,
FilesystemOperation,
-} from './session/filesystemWatcher'
+} from './sandbox/filesystemWatcher'
export type {
FilesystemEvent,
FilesystemEventListener,
-} from './session/filesystemWatcher'
+} from './sandbox/filesystemWatcher'
-export { Process, ProcessMessage, ProcessOutput } from './session/process'
-export type { ProcessManager } from './session/process'
-export type { EnvVars } from './session/envVars'
+export { Process, ProcessMessage, ProcessOutput } from './sandbox/process'
+export type { ProcessManager } from './sandbox/process'
+export type { EnvVars } from './sandbox/envVars'
export { runCode, CodeRuntime } from './runCode' // Export CodeRuntime enum as value, not as type, so it can be actually used in consumer code
// export { runCmd } from './runCmd'
-export { DataAnalysis } from './templates/dataAnalysis'
+export { Artifact, DataAnalysis} from './templates/dataAnalysis'
+export type { RunPythonOpts } from './templates/dataAnalysis'
+export default Sandbox
diff --git a/packages/js-sdk/src/runCmd.ts b/packages/js-sdk/src/runCmd.ts
index a77644c3d..aaf034045 100644
--- a/packages/js-sdk/src/runCmd.ts
+++ b/packages/js-sdk/src/runCmd.ts
@@ -1,17 +1,17 @@
-import { Session } from './session'
+import { Sandbox } from './sandbox'
export async function runCmd(command: string, opts?: { apiKey?: string }) {
- const session = await Session.create({
+ const sandbox = await Sandbox.create({
id: 'Bash',
- apiKey: opts?.apiKey || process.env.E2B_API_KEY || '', // Session.create will throw an error if the API key is not provided so no need to check here
+ apiKey: opts?.apiKey || process?.env?.E2B_API_KEY || '', // Sandbox.create will throw an error if the API key is not provided so no need to check here
})
- const proc = await session.process.start({
+ const proc = await sandbox.process.start({
cmd: command,
})
- const out = await proc.finished
+ const out = await proc.wait()
- await session.close()
+ await sandbox.close()
return {
stdout: out.stdout,
diff --git a/packages/js-sdk/src/runCode.ts b/packages/js-sdk/src/runCode.ts
index f307dc3b5..2a5d57345 100644
--- a/packages/js-sdk/src/runCode.ts
+++ b/packages/js-sdk/src/runCode.ts
@@ -1,23 +1,16 @@
-import { Session } from './session'
+import { Sandbox } from './sandbox'
export enum CodeRuntime {
Node16 = 'Node16',
Python3 = 'Python3',
Bash = 'Bash',
- Python3_DataAnalysis = 'Python3_DataAnalysis',
- // TODO: Support all runtimes that our infra supports
- // DotNET = 'DotNET',
- // Go = 'Go',
- // Java = 'Java',
- // Perl = 'Perl',
- // PHP = 'PHP',
- // Rust = 'Rust',
+ Python3_DataAnalysis = 'Python3-DataAnalysis',
}
/**
* Run code in a sandboxed cloud playground.
- * `runCode` wraps the `Session` class and provides a simple interface for running code in a sandboxed environment
- * without any need to manage lifecycle of the session.
+ * `runCode` wraps the `Sandbox` class and provides a simple interface for running code in a sandboxed environment
+ * without any need to manage lifecycle of the sandbox.
* `runCode` automatically loads the E2B API key from the `E2B_API_KEY` environment variable.
*
* @param runtime The runtime to use when running the code. Can be one of the following:
@@ -39,22 +32,22 @@ export async function runCode(
let envID = ''
switch (runtime) {
case CodeRuntime.Node16:
- envID = 'Nodejs'
+ envID = 'base'
binary = 'node'
filepath = '/index.js'
break
case CodeRuntime.Python3:
- envID = 'Python3'
+ envID = 'base'
binary = 'python3'
filepath = '/main.py'
break
case CodeRuntime.Python3_DataAnalysis:
- envID = 'YI58BPyX5KrK'
+ envID = 'Python3-DataAnalysis'
binary = 'python3'
filepath = '/main.py'
break
case CodeRuntime.Bash:
- envID = 'Bash'
+ envID = 'base'
binary = 'bash'
filepath = '/main.sh'
break
@@ -64,19 +57,19 @@ export async function runCode(
)
}
- const session = await Session.create({
+ const sandbox = await Sandbox.create({
id: envID,
- apiKey: opts?.apiKey || process.env.E2B_API_KEY || '', // Session.create will throw an error if the API key is not provided so no need to check here
+ apiKey: opts?.apiKey || process?.env?.E2B_API_KEY || '', // Sandbox.create will throw an error if the API key is not provided so no need to check here
})
- await session.filesystem.write(filepath, code)
+ await sandbox.filesystem.write(filepath, code)
- const codeProc = await session.process.start({
+ const codeProc = await sandbox.process.start({
cmd: `${binary} ${filepath}`,
})
- const out = await codeProc.finished
+ const out = await codeProc.wait()
- await session.close()
+ await sandbox.close()
return {
stdout: out.stdout,
diff --git a/packages/js-sdk/src/session/codeSnippet.ts b/packages/js-sdk/src/sandbox/codeSnippet.ts
similarity index 60%
rename from packages/js-sdk/src/session/codeSnippet.ts
rename to packages/js-sdk/src/sandbox/codeSnippet.ts
index 07eb7a8be..c4f681a61 100644
--- a/packages/js-sdk/src/session/codeSnippet.ts
+++ b/packages/js-sdk/src/sandbox/codeSnippet.ts
@@ -6,4 +6,4 @@ export interface OpenPort {
port: number
}
-export type ScanOpenedPortsHandler = (ports: OpenPort[]) => void
+export type ScanOpenedPortsHandler = (ports: OpenPort[]) => Promise<void> | void
diff --git a/packages/js-sdk/src/session/envVars.ts b/packages/js-sdk/src/sandbox/envVars.ts
similarity index 100%
rename from packages/js-sdk/src/session/envVars.ts
rename to packages/js-sdk/src/sandbox/envVars.ts
diff --git a/packages/js-sdk/src/session/filesystem.ts b/packages/js-sdk/src/sandbox/filesystem.ts
similarity index 60%
rename from packages/js-sdk/src/session/filesystem.ts
rename to packages/js-sdk/src/sandbox/filesystem.ts
index 559dde31b..22adfc326 100644
--- a/packages/js-sdk/src/session/filesystem.ts
+++ b/packages/js-sdk/src/sandbox/filesystem.ts
@@ -1,20 +1,24 @@
import FilesystemWatcher from './filesystemWatcher'
-import { CallOpts } from './sessionConnection'
+import { CallOpts } from './sandboxConnection'
export const filesystemService = 'filesystem'
export interface FileInfo {
- isDir: boolean
+ isDir: boolean;
name: string
}
export interface FilesystemManager {
- readonly write: (path: string, content: string, opts?: CallOpts) => Promise<void>
- readonly writeBytes: (path: string, content: Uint8Array) => Promise<void>
- readonly read: (path: string, opts?: CallOpts) => Promise<string>
- readonly readBytes: (path: string) => Promise<Uint8Array>
- readonly remove: (path: string, opts?: CallOpts) => Promise<void>
- readonly list: (path: string, opts?: CallOpts) => Promise<FileInfo[]>
- readonly makeDir: (path: string, opts?: CallOpts) => Promise<void>
- readonly watchDir: (path: string) => FilesystemWatcher
+ readonly write: (
+ path: string,
+ content: string,
+ opts?: CallOpts,
+ ) => Promise<void>;
+ readonly writeBytes: (path: string, content: Uint8Array) => Promise<void>;
+ readonly read: (path: string, opts?: CallOpts) => Promise<string>;
+ readonly readBytes: (path: string) => Promise<Uint8Array>;
+ readonly remove: (path: string, opts?: CallOpts) => Promise<void>;
+ readonly list: (path: string, opts?: CallOpts) => Promise<FileInfo[]>;
+ readonly makeDir: (path: string, opts?: CallOpts) => Promise<void>;
+ readonly watchDir: (path: string) => FilesystemWatcher;
}
diff --git a/packages/js-sdk/src/session/filesystemWatcher.ts b/packages/js-sdk/src/sandbox/filesystemWatcher.ts
similarity index 86%
rename from packages/js-sdk/src/session/filesystemWatcher.ts
rename to packages/js-sdk/src/sandbox/filesystemWatcher.ts
index b13d31743..fe9b4ebbe 100644
--- a/packages/js-sdk/src/session/filesystemWatcher.ts
+++ b/packages/js-sdk/src/sandbox/filesystemWatcher.ts
@@ -1,6 +1,6 @@
import { withTimeout } from '../utils/promise'
import { filesystemService } from './filesystem'
-import { CallOpts, SessionConnection } from './sessionConnection'
+import { CallOpts, SandboxConnection } from './sandboxConnection'
export enum FilesystemOperation {
Create = 'Create',
@@ -11,15 +11,15 @@ export enum FilesystemOperation {
}
export interface FilesystemEvent {
- path: string
- name: string
- operation: FilesystemOperation
+ path: string;
+ name: string;
+ operation: FilesystemOperation;
// Unix epoch in nanoseconds
- timestamp: number
- isDir: boolean
+ timestamp: number;
+ isDir: boolean;
}
-export type FilesystemEventListener = (event: FilesystemEvent) => void
+export type FilesystemEventListener = (event: FilesystemEvent) => Promise<void> | void;
class FilesystemWatcher {
// Listeners to filesystem events.
@@ -29,7 +29,7 @@ class FilesystemWatcher {
private rpcSubscriptionID?: string
constructor(
- private sessConn: SessionConnection,
+ private sessConn: SandboxConnection,
private path: string,
) {
this.listeners = new Set<FilesystemEventListener>()
@@ -67,7 +67,7 @@ class FilesystemWatcher {
}
private handleFilesystemEvents(fsChange: FilesystemEvent) {
- this.listeners.forEach(l => {
+ this.listeners.forEach((l) => {
l(fsChange)
})
}
diff --git a/packages/js-sdk/src/session/index.ts b/packages/js-sdk/src/sandbox/index.ts
similarity index 76%
rename from packages/js-sdk/src/session/index.ts
rename to packages/js-sdk/src/sandbox/index.ts
index 86084874c..f73706b6a 100644
--- a/packages/js-sdk/src/session/index.ts
+++ b/packages/js-sdk/src/sandbox/index.ts
@@ -1,52 +1,40 @@
import normalizePath from 'normalize-path'
import { ENVD_PORT, FILE_ROUTE } from '../constants'
-import { components } from '../api'
import { id } from '../utils/id'
import { createDeferredPromise, formatSettledErrors, withTimeout } from '../utils/promise'
-import {
- codeSnippetService,
- ScanOpenedPortsHandler as ScanOpenPortsHandler,
-} from './codeSnippet'
+import { codeSnippetService, ScanOpenedPortsHandler as ScanOpenPortsHandler } from './codeSnippet'
import { FileInfo, FilesystemManager, filesystemService } from './filesystem'
import FilesystemWatcher from './filesystemWatcher'
-import {
- Process,
- ProcessManager,
- ProcessMessage,
- ProcessOpts,
- ProcessOutput,
- processService,
-} from './process'
-import { CallOpts, SessionConnection, SessionConnectionOpts } from './sessionConnection'
-import {
- Terminal,
- TerminalManager,
- TerminalOpts,
- TerminalOutput,
- terminalService,
-} from './terminal'
+import { Process, ProcessManager, ProcessMessage, ProcessOpts, ProcessOutput, processService } from './process'
+import { CallOpts, SandboxConnection, SandboxConnectionOpts } from './sandboxConnection'
+import { Terminal, TerminalManager, TerminalOpts, TerminalOutput, terminalService } from './terminal'
import { resolvePath } from '../utils/filesystem'
-export type Environment = components['schemas']['Template']
-export type DownloadFileFormat = 'base64' | 'blob' | 'buffer' | 'arraybuffer' | 'text'
-
-export interface SessionOpts extends SessionConnectionOpts {
- onScanPorts?: ScanOpenPortsHandler
- timeout?: number
- onStdout?: (out: ProcessMessage) => void
- onStderr?: (out: ProcessMessage) => void
- onExit?: () => void
+export type DownloadFileFormat =
+ | 'base64'
+ | 'blob'
+ | 'buffer'
+ | 'arraybuffer'
+ | 'text';
+
+export interface SandboxOpts extends SandboxConnectionOpts {
+ onScanPorts?: ScanOpenPortsHandler;
+ timeout?: number;
+ onStdout?: (out: ProcessMessage) => Promise<void> | void;
+ onStderr?: (out: ProcessMessage) => Promise<void> | void;
+ onExit?: () => Promise<void> | void;
}
-export class Session extends SessionConnection {
+export class Sandbox extends SandboxConnection {
readonly terminal: TerminalManager
readonly filesystem: FilesystemManager
readonly process: ProcessManager
private onScanPorts?: ScanOpenPortsHandler
- constructor(opts: SessionOpts) {
+ constructor(opts?: SandboxOpts) {
+ opts = opts || {}
super(opts)
this.onScanPorts = opts.onScanPorts
@@ -89,7 +77,12 @@ export class Session extends SessionConnection {
* @param {timeout} [opts.timeout] Timeout in milliseconds (default is 60 seconds)
*/
remove: async (path, opts?: CallOpts) => {
- await this.call(filesystemService, 'remove', [_resolvePath(path)], opts)
+ await this.call(
+ filesystemService,
+ 'remove',
+ [_resolvePath(path)],
+ opts,
+ )
},
/**
* Writes content to a new file on path.
@@ -99,7 +92,12 @@ export class Session extends SessionConnection {
* @param {timeout} [opts.timeout] Timeout in milliseconds (default is 60 seconds)
*/
write: async (path, content, opts?: CallOpts) => {
- await this.call(filesystemService, 'write', [_resolvePath(path), content], opts)
+ await this.call(
+ filesystemService,
+ 'write',
+ [_resolvePath(path), content],
+ opts,
+ )
},
/**
* Write array of bytes to a file.
@@ -123,9 +121,11 @@ export class Session extends SessionConnection {
* @returns byte array representing the content of a file
*/
readBytes: async (path: string) => {
- const base64Content = (await this.call(filesystemService, 'readBase64', [
- _resolvePath(path),
- ])) as string
+ const base64Content = (await this.call(
+ filesystemService,
+ 'readBase64',
+ [_resolvePath(path)],
+ )) as string
// We need to convert the byte array to base64 string without using browser or node specific APIs.
// This should be achieved by the node polyfills.
return Buffer.from(base64Content, 'base64')
@@ -137,7 +137,12 @@ export class Session extends SessionConnection {
* @param {timeout} [opts.timeout] Timeout in milliseconds (default is 60 seconds)
*/
makeDir: async (path, opts?: CallOpts) => {
- await this.call(filesystemService, 'makeDir', [_resolvePath(path)], opts)
+ await this.call(
+ filesystemService,
+ 'makeDir',
+ [_resolvePath(path)],
+ opts,
+ )
},
/**
* Watches directory for filesystem events.
@@ -175,7 +180,9 @@ export class Session extends SessionConnection {
}: Omit<TerminalOpts, 'timeout'>) => {
this.logger.debug?.(`Starting terminal "${terminalID}"`)
if (!cwd && rootDir) {
- this.logger.warn?.('The rootDir parameter is deprecated, use cwd instead.')
+ this.logger.warn?.(
+ 'The rootDir parameter is deprecated, use cwd instead.',
+ )
cwd = rootDir
}
if (!cwd && this.cwd) {
@@ -232,7 +239,13 @@ export class Session extends SessionConnection {
throw err
}
- return new Terminal(terminalID, this, triggerExit, unsubscribing, output)
+ return new Terminal(
+ terminalID,
+ this,
+ triggerExit,
+ unsubscribing,
+ output,
+ )
}
return await withTimeout(
start,
@@ -263,7 +276,9 @@ export class Session extends SessionConnection {
processID = id(12),
}: Omit<ProcessOpts, 'timeout'>) => {
if (!cwd && rootDir) {
- this.logger.warn?.('The rootDir parameter is deprecated, use cwd instead.')
+ this.logger.warn?.(
+ 'The rootDir parameter is deprecated, use cwd instead.',
+ )
cwd = rootDir
}
if (!cwd && this.cwd) {
@@ -276,7 +291,8 @@ export class Session extends SessionConnection {
this.logger.debug?.(`Starting process "${processID}", cmd: "${cmd}"`)
- const { promise: processExited, resolve: triggerExit } = createDeferredPromise()
+ const { promise: processExited, resolve: triggerExit } =
+ createDeferredPromise()
const output = new ProcessOutput()
const handleExit = (exitCode: number) => {
@@ -285,12 +301,16 @@ export class Session extends SessionConnection {
}
const handleStdout = (data: { line: string; timestamp: number }) => {
- const message = new ProcessMessage(data.line, data.timestamp, false)
+ const message = new ProcessMessage(
+ data.line,
+ data.timestamp,
+ false,
+ )
output.addStdout(message)
if (onStdout) {
onStdout(message)
- } else if ((this.opts as SessionOpts).onStdout) {
+ } else if ((this.opts as SandboxOpts).onStdout) {
// @ts-expect-error TS2339
this.opts.onStdout(message)
}
@@ -302,7 +322,7 @@ export class Session extends SessionConnection {
if (onStderr) {
onStderr(message)
- } else if ((this.opts as SessionOpts).onStderr) {
+ } else if ((this.opts as SandboxOpts).onStderr) {
// @ts-expect-error TS2339
this.opts.onStderr(message)
}
@@ -311,8 +331,18 @@ export class Session extends SessionConnection {
const [onExitSubID, onStdoutSubID, onStderrSubID] =
await this.handleSubscriptions(
this.subscribe(processService, handleExit, 'onExit', processID),
- this.subscribe(processService, handleStdout, 'onStdout', processID),
- this.subscribe(processService, handleStderr, 'onStderr', processID),
+ this.subscribe(
+ processService,
+ handleStdout,
+ 'onStdout',
+ processID,
+ ),
+ this.subscribe(
+ processService,
+ handleStderr,
+ 'onStderr',
+ processID,
+ ),
)
const { promise: unsubscribing, resolve: handleFinishUnsubscribing } =
@@ -332,8 +362,8 @@ export class Session extends SessionConnection {
}
if (onExit) {
- onExit()
- } else if ((this.opts as SessionOpts).onExit) {
+ onExit(output.exitCode || 0)
+ } else if ((this.opts as SandboxOpts).onExit) {
// @ts-expect-error TS2339
this.opts.onExit()
}
@@ -342,14 +372,25 @@ export class Session extends SessionConnection {
})
try {
- await this.call(processService, 'start', [processID, cmd, envVars, cwd])
+ await this.call(processService, 'start', [
+ processID,
+ cmd,
+ envVars,
+ cwd,
+ ])
} catch (err) {
triggerExit()
await unsubscribing
throw err
}
- return new Process(processID, this, triggerExit, unsubscribing, output)
+ return new Process(
+ processID,
+ this,
+ triggerExit,
+ unsubscribing,
+ output,
+ )
}
const timeout = opts.timeout
return await withTimeout(start, timeout)(opts)
@@ -361,7 +402,7 @@ export class Session extends SessionConnection {
}
/**
- * URL that can be used to download or upload file to the session via a multipart/form-data POST request.
+ * URL that can be used to download or upload file to the sandbox via a multipart/form-data POST request.
* This is useful if you're uploading files directly from the browser.
* The file will be uploaded to the user's home directory with the same name.
* If a file with the same name already exists, it will be overwritten.
@@ -369,27 +410,29 @@ export class Session extends SessionConnection {
public get fileURL() {
const protocol = this.opts.__debug_devEnv === 'local' ? 'http' : 'https'
const hostname = this.getHostname(this.opts.__debug_port || ENVD_PORT)
- const fileURL = `${protocol}://${hostname}${FILE_ROUTE}`
-
- return fileURL
+ return `${protocol}://${hostname}${FILE_ROUTE}`
}
- static async create(opts: SessionOpts) {
- return new Session(opts).open({ timeout: opts?.timeout }).then(async session => {
- if (opts.cwd) {
- console.log(`Custom cwd for Session set: "${opts.cwd}"`)
- await session.filesystem.makeDir(opts.cwd)
- }
- return session
- })
+ static async create(opts?: SandboxOpts) {
+ return new Sandbox(opts)
+ ._open({ timeout: opts?.timeout })
+ .then(async (sandbox) => {
+ if (opts?.cwd) {
+ console.log(`Custom cwd for Sandbox set: "${opts.cwd}"`)
+ await sandbox.filesystem.makeDir(opts.cwd)
+ }
+ return sandbox
+ })
}
- override async open(opts: CallOpts) {
- await super.open(opts)
+ protected override async _open(opts: CallOpts) {
+ await super._open(opts)
const portsHandler = this.onScanPorts
? (ports: { State: string; Ip: string; Port: number }[]) =>
- this.onScanPorts?.(ports.map(p => ({ ip: p.Ip, port: p.Port, state: p.State })))
+ this.onScanPorts?.(
+ ports.map((p) => ({ ip: p.Ip, port: p.Port, state: p.State })),
+ )
: undefined
await this.handleSubscriptions(
@@ -402,18 +445,20 @@ export class Session extends SessionConnection {
}
/**
- * Uploads a file to the session.
+ * Uploads a file to the sandbox.
* The file will be uploaded to the user's home directory with the same name.
* If a file with the same name already exists, it will be overwritten.
*
- * **You can use the {@link Session.fileURL} property and upload file directly via POST multipart/form-data**
+ * **You can use the {@link Sandbox.fileURL} property and upload file directly via POST multipart/form-data**
*
*/
async uploadFile(file: Buffer | Blob, filename: string) {
const body = new FormData()
const blob =
- file instanceof Blob ? file : new Blob([file], { type: 'application/octet-stream' })
+ file instanceof Blob
+ ? file
+ : new Blob([file], { type: 'application/octet-stream' })
body.append('file', blob, filename)
diff --git a/packages/js-sdk/src/session/process.ts b/packages/js-sdk/src/sandbox/process.ts
similarity index 76%
rename from packages/js-sdk/src/session/process.ts
rename to packages/js-sdk/src/sandbox/process.ts
index bacb093dc..676db595a 100644
--- a/packages/js-sdk/src/session/process.ts
+++ b/packages/js-sdk/src/sandbox/process.ts
@@ -1,5 +1,5 @@
import { EnvVars } from './envVars'
-import { CallOpts, SessionConnection } from './sessionConnection'
+import { CallOpts, SandboxConnection } from './sandboxConnection'
export const processService = 'process'
@@ -15,7 +15,6 @@ export class ProcessMessage {
public readonly timestamp: number,
public readonly error: boolean,
) {
- // eslint-disable-next-line prettier/prettier
}
public toString() {
@@ -29,9 +28,19 @@ export class ProcessMessage {
export class ProcessOutput {
private readonly delimiter = '\n'
private readonly messages: ProcessMessage[] = []
+ private _finished = false
+
private _error = false
+
private _exitCode?: number
- private _finished = false
+
+ /**
+ * Whether the process has errored.
+ */
+ get error(): boolean {
+ return this._error
+ }
+
/**
* The exit code of the process.
@@ -43,20 +52,13 @@ export class ProcessOutput {
return this._exitCode
}
- /**
- * Whether the process has errored.
- */
- get error(): boolean {
- return this._error
- }
-
/**
* The stdout from the process.
*/
get stdout(): string {
return this.messages
- .filter(out => !out.error)
- .map(out => out.line)
+ .filter((out) => !out.error)
+ .map((out) => out.line)
.join(this.delimiter)
}
@@ -65,8 +67,8 @@ export class ProcessOutput {
*/
get stderr(): string {
return this.messages
- .filter(out => out.error)
- .map(out => out.line)
+ .filter((out) => out.error)
+ .map((out) => out.line)
.join(this.delimiter)
}
@@ -94,7 +96,7 @@ export class ProcessOutput {
}
/**
- * A process running in the environment.
+ * A process running in the sandbox.
*/
export class Process {
/**
@@ -104,7 +106,7 @@ export class Process {
constructor(
readonly processID: string,
- private readonly session: SessionConnection,
+ private readonly sandbox: SandboxConnection,
private readonly triggerExit: () => void,
finished: Promise<ProcessOutput>,
readonly output: ProcessOutput,
@@ -117,7 +119,7 @@ export class Process {
*/
async kill(): Promise<void> {
try {
- await this.session.call(processService, 'kill', [this.processID])
+ await this.sandbox.call(processService, 'kill', [this.processID])
} finally {
this.triggerExit()
await this.finished
@@ -139,22 +141,28 @@ export class Process {
* @param {timeout} [opts.timeout] Timeout in milliseconds (default is 60 seconds)
*/
async sendStdin(data: string, opts?: CallOpts): Promise<void> {
- await this.session.call(processService, 'stdin', [this.processID, data], opts)
+ await this.sandbox.call(
+ processService,
+ 'stdin',
+ [this.processID, data],
+ opts,
+ )
}
}
+
export interface ProcessOpts {
- cmd: string
- onStdout?: (out: ProcessMessage) => void
- onStderr?: (out: ProcessMessage) => void
- onExit?: () => void
- envVars?: EnvVars
- cwd?: string
+ cmd: string;
+ onStdout?: (out: ProcessMessage) => Promise<void> | void;
+ onStderr?: (out: ProcessMessage) => Promise<void> | void;
+ onExit?: (code: number) => Promise<void> | void;
+ envVars?: EnvVars;
+ cwd?: string;
/** @deprecated use cwd instead */
- rootDir?: string
- processID?: string
- timeout?: number
+ rootDir?: string;
+ processID?: string;
+ timeout?: number;
}
export interface ProcessManager {
- readonly start: (opts: ProcessOpts) => Promise<Process>
+ readonly start: (opts: ProcessOpts) => Promise<Process>;
}
diff --git a/packages/js-sdk/src/session/sessionConnection.ts b/packages/js-sdk/src/sandbox/sandboxConnection.ts
similarity index 61%
rename from packages/js-sdk/src/session/sessionConnection.ts
rename to packages/js-sdk/src/sandbox/sandboxConnection.ts
index ee04dd96c..9a0f70126 100644
--- a/packages/js-sdk/src/session/sessionConnection.ts
+++ b/packages/js-sdk/src/sandbox/sandboxConnection.ts
@@ -1,13 +1,7 @@
import { IRpcNotification, RpcWebSocketClient } from 'rpc-websocket-client'
-import api, { components } from '../api'
-import {
- SESSION_DOMAIN,
- SESSION_REFRESH_PERIOD,
- ENVD_PORT,
- WS_RECONNECT_INTERVAL,
- WS_ROUTE,
-} from '../constants'
+import api, { components, withAPIKey } from '../api'
+import { ENVD_PORT, SANDBOX_DOMAIN, SANDBOX_REFRESH_PERIOD, WS_RECONNECT_INTERVAL, WS_ROUTE } from '../constants'
import { AuthenticationError } from '../error'
import { assertFulfilled, formatSettledErrors, withTimeout } from '../utils/promise'
import wait from '../utils/wait'
@@ -18,54 +12,55 @@ import { terminalService } from './terminal'
import { EnvVars } from './envVars'
// eslint-disable-next-line @typescript-eslint/no-explicit-any
-type SubscriptionHandler = (result: any) => void
+type SubscriptionHandler = (result: any) => void;
type Service =
| typeof processService
| typeof codeSnippetService
| typeof filesystemService
- | typeof terminalService
+ | typeof terminalService;
interface Subscriber {
- service: Service
- subID: string
- handler: SubscriptionHandler
+ service: Service;
+ subID: string;
+ handler: SubscriptionHandler;
}
export interface Logger {
- debug?: (message: string, ...args: unknown[]) => void
- info?: (message: string, ...args: unknown[]) => void
- warn?: (message: string, ...args: unknown[]) => void
- error?: (message: string, ...args: unknown[]) => void
+ debug?: (message: string, ...args: unknown[]) => void;
+ info?: (message: string, ...args: unknown[]) => void;
+ warn?: (message: string, ...args: unknown[]) => void;
+ error?: (message: string, ...args: unknown[]) => void;
}
-export interface SessionConnectionOpts {
- id: string
- apiKey?: string
- cwd?: string
- envVars?: EnvVars
- logger?: Logger
- __debug_hostname?: string
- __debug_port?: number
- __debug_devEnv?: 'remote' | 'local'
+export interface SandboxConnectionOpts {
+ id?: string;
+ apiKey?: string;
+ cwd?: string;
+ envVars?: EnvVars;
+ logger?: Logger;
+ __debug_hostname?: string;
+ __debug_port?: number;
+ __debug_devEnv?: 'remote' | 'local';
}
export interface CallOpts {
- timeout?: number
+ timeout?: number;
}
-const createSession = api.path('/sessions').method('post').create({ api_key: true })
-const refreshSession = api
- .path('/sessions/{sessionID}/refresh')
- .method('post')
- .create({ api_key: true })
+const createSandbox = withAPIKey(
+ api.path('/instances').method('post').create(),
+)
+const refreshSandbox = withAPIKey(
+ api.path('/instances/{instanceID}/refreshes').method('post').create(),
+)
-export class SessionConnection {
+export class SandboxConnection {
cwd: string | undefined
envVars: EnvVars
protected readonly logger: Logger
- protected session?: components['schemas']['Session']
+ protected sandbox?: components['schemas']['Instance']
protected isOpen = false
private readonly apiKey: string
@@ -73,8 +68,8 @@ export class SessionConnection {
private subscribers: Subscriber[] = []
// let's keep opts readonly, but public - for convenience, mainly when debugging
- constructor(readonly opts: SessionConnectionOpts) {
- const apiKey = opts.apiKey || process.env.E2B_API_KEY
+ constructor(readonly opts: SandboxConnectionOpts) {
+ const apiKey = opts.apiKey || process?.env?.E2B_API_KEY
if (!apiKey) {
throw new AuthenticationError(
'API key is required, please visit https://e2b.dev/docs to get your API key',
@@ -95,16 +90,20 @@ export class SessionConnection {
warn: console.warn,
error: console.error,
}
- this.logger.info?.(`Session "${opts.id}" initialized`)
+ this.logger.info?.(`Sandbox "${this.templateID}" initialized`)
+ }
+
+ private get templateID(): string {
+ return this.opts.id || 'base'
}
/**
- * Get the hostname for the session or for the specified session's port.
+ * Get the hostname for the sandbox or for the specified sandbox's port.
*
* `getHostname` method requires `this` context - you may need to bind it.
*
- * @param port Specify if you want to connect to a specific port of the session
- * @returns Hostname of the session or session's port
+ * @param port Specify if you want to connect to a specific port of the sandbox
+ * @returns Hostname of the sandbox or sandbox's port
*/
getHostname(port?: number) {
if (this.opts.__debug_hostname) {
@@ -118,11 +117,11 @@ export class SessionConnection {
}
}
- if (!this.session) {
+ if (!this.sandbox) {
return undefined
}
- const hostname = `${this.session.sessionID}-${this.session.clientID}.${SESSION_DOMAIN}`
+ const hostname = `${this.sandbox.instanceID}-${this.sandbox.clientID}.${SANDBOX_DOMAIN}`
if (port) {
return `${port}-${hostname}`
} else {
@@ -131,20 +130,20 @@ export class SessionConnection {
}
/**
- * Close the connection to the session
+ * Close the connection to the sandbox
*
* `close` method requires `this` context - you may need to bind it.
*/
async close() {
if (this.isOpen) {
- this.logger.debug?.(`Closing session "${this.session?.sessionID}"`)
+ this.logger.debug?.(`Closing sandbox "${this.sandbox?.instanceID}"`)
this.isOpen = false
this.logger.debug?.('Unsubscribing...')
const results = await Promise.allSettled(
- this.subscribers.map(s => this.unsubscribe(s.subID)),
+ this.subscribers.map((s) => this.unsubscribe(s.subID)),
)
- results.forEach(r => {
+ results.forEach((r) => {
if (r.status === 'rejected') {
this.logger.warn?.(`Failed to unsubscribe: "${r.reason}"`)
}
@@ -154,53 +153,52 @@ export class SessionConnection {
this.rpc.ws?.terminate?.()
// This is the browser WebSocket way of closing connection
this.rpc.ws?.close?.()
- this.logger.info?.('Disconnected from the session')
+ this.logger.info?.('Disconnected from the sandbox')
}
}
/**
- * Open a connection to a new session
+ * Open a connection to a new sandbox
*
* `open` method requires `this` context - you may need to bind it.
* @param opts Call options
* @param {timeout} [opts.timeout] Timeout in milliseconds (default is 60 seconds)
*/
- async open(opts: CallOpts) {
+ protected async _open(opts: CallOpts) {
const open = async () => {
- if (this.isOpen || !!this.session) {
- throw new Error('Session connect was already called')
+ if (this.isOpen || !!this.sandbox) {
+ throw new Error('Sandbox connect was already called')
} else {
this.isOpen = true
}
- this.logger.debug?.('Opening session...')
+ this.logger.debug?.('Opening sandbox...')
if (!this.opts.__debug_hostname) {
try {
- const res = await createSession({
- api_key: this.apiKey,
- codeSnippetID: this.opts.id,
- editEnabled: false,
+ const res = await createSandbox(this.apiKey, {
+ envID: this.templateID,
})
- this.session = res.data
- this.logger.debug?.(`Acquired session "${this.session.sessionID}"`)
- this.refresh(this.session.sessionID)
+ this.sandbox = res.data
+ this.logger.debug?.(`Acquired sandbox "${this.sandbox.instanceID}"`)
+
+ this.refresh(this.sandbox.instanceID)
} catch (e) {
- if (e instanceof createSession.Error) {
+ if (e instanceof createSandbox.Error) {
const error = e.getActualType()
if (error.status === 400) {
throw new Error(
- `Error creating session - (${error.status}) bad request: ${error.data.message}`,
+ `Error creating sandbox - (${error.status}) bad request: ${error.data.message}`,
)
}
if (error.status === 401) {
throw new Error(
- `Error creating session - (${error.status}) unauthenticated: ${error.data.message}`,
+ `Error creating sandbox - (${error.status}) unauthenticated: ${error.data.message}`,
)
}
if (error.status === 500) {
throw new Error(
- `Error creating session - (${error.status}) server error: ${error.data.message}`,
+ `Error creating sandbox - (${error.status}) server error: ${error.data.message}`,
)
}
}
@@ -211,16 +209,16 @@ export class SessionConnection {
const hostname = this.getHostname(this.opts.__debug_port || ENVD_PORT)
if (!hostname) {
- throw new Error("Cannot get session's hostname")
+ throw new Error('Cannot get sandbox\'s hostname')
}
const protocol = this.opts.__debug_devEnv === 'local' ? 'ws' : 'wss'
- const sessionURL = `${protocol}://${hostname}${WS_ROUTE}`
+ const sandboxURL = `${protocol}://${hostname}${WS_ROUTE}`
- this.rpc.onError(err => {
+ this.rpc.onError((err) => {
// not warn, because this is somewhat expected behaviour during initialization
this.logger.debug?.(
- `Error in WS session "${this.session?.sessionID}": ${err.message ?? err.code ?? err.toString()
+ `Error in WebSocket of sandbox "${this.sandbox?.instanceID}": ${err.message ?? err.code ?? err.toString()
}. Trying to reconnect...`,
)
})
@@ -243,28 +241,34 @@ export class SessionConnection {
})
this.rpc.onOpen(() => {
- this.logger.debug?.(`Connected to session "${this.session?.sessionID}"`)
+ this.logger.debug?.(
+ `Connected to sandbox "${this.sandbox?.instanceID}"`,
+ )
resolveOpening?.()
})
this.rpc.onClose(async () => {
this.logger.debug?.(
- `Closing WS connection to session "${this.session?.sessionID}"`,
+ `Closing WebSocket connection to sandbox "${this.sandbox?.instanceID}"`,
)
if (this.isOpen) {
await wait(WS_RECONNECT_INTERVAL)
- this.logger.debug?.(`Reconnecting to session "${this.session?.sessionID}"`)
+ this.logger.debug?.(
+ `Reconnecting to sandbox "${this.sandbox?.instanceID}"`,
+ )
try {
// When the WS connection closes the subscribers in devbookd are removed.
// We want to delete the subscriber handlers here so there are no orphans.
this.subscribers = []
- await this.rpc.connect(sessionURL)
- this.logger.debug?.(`Reconnected to session "${this.session?.sessionID}"`)
+ await this.rpc.connect(sandboxURL)
+ this.logger.debug?.(
+ `Reconnected to sandbox "${this.sandbox?.instanceID}"`,
+ )
// eslint-disable-next-line @typescript-eslint/no-explicit-any
} catch (err: any) {
// not warn, because this is somewhat expected behaviour during initialization
this.logger.debug?.(
- `Failed reconnecting to session "${this.session?.sessionID}": ${err.message ?? err.code ?? err.toString()
+ `Failed reconnecting to sandbox "${this.sandbox?.instanceID}": ${err.message ?? err.code ?? err.toString()
}`,
)
}
@@ -276,14 +280,16 @@ export class SessionConnection {
this.rpc.onNotification.push(this.handleNotification.bind(this))
try {
- this.logger.debug?.(`Connection to session "${this.session?.sessionID}"`)
- await this.rpc.connect(sessionURL)
+ this.logger.debug?.(
+ `Connection to sandbox "${this.sandbox?.instanceID}"`,
+ )
+ await this.rpc.connect(sandboxURL)
// eslint-disable-next-line @typescript-eslint/no-explicit-any
} catch (err: any) {
// not warn, because this is somewhat expected behaviour during initialization
this.logger.debug?.(
- `Error connecting to session "${this.session?.sessionID}": ${err.message ?? err.code ?? err.toString()
+ `Error connecting to sandbox "${this.sandbox?.instanceID}": ${err.message ?? err.code ?? err.toString()
}`,
)
}
@@ -295,7 +301,12 @@ export class SessionConnection {
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
- async call(service: Service, method: string, params?: any[], opts?: CallOpts) {
+ async call(
+ service: Service,
+ method: string,
+ params?: any[],
+ opts?: CallOpts,
+ ) {
this.logger.debug?.(`Calling "${service}_${method}" with params:`, params)
// Without the async function, the `this` context is lost.
@@ -303,28 +314,33 @@ export class SessionConnection {
const call = async (method: string, params?: any[]) =>
await this.rpc.call(method, params)
- return await withTimeout(call, opts?.timeout)(`${service}_${method}`, params)
+ return await withTimeout(call, opts?.timeout)(
+ `${service}_${method}`,
+ params,
+ )
}
async handleSubscriptions<
- T extends (ReturnType<SessionConnection['subscribe']> | undefined)[],
+ T extends (ReturnType<SandboxConnection['subscribe']> | undefined)[],
>(
...subs: T
): Promise<{
- [P in keyof T]: Awaited<T[P]>
+ [P in keyof T]: Awaited<T[P]>;
}> {
const results = await Promise.allSettled(subs)
- if (results.every(r => r.status === 'fulfilled')) {
- return results.map(r => (r.status === 'fulfilled' ? r.value : undefined)) as {
- [P in keyof T]: Awaited<T[P]>
- }
+ if (results.every((r) => r.status === 'fulfilled')) {
+ return results.map((r) =>
+ r.status === 'fulfilled' ? r.value : undefined,
+ ) as {
+ [P in keyof T]: Awaited<T[P]>;
+ }
}
await Promise.all(
results
.filter(assertFulfilled)
- .map(r => (r.value ? this.unsubscribe(r.value) : undefined)),
+ .map((r) => (r.value ? this.unsubscribe(r.value) : undefined)),
)
throw new Error(formatSettledErrors(results))
@@ -332,13 +348,15 @@ export class SessionConnection {
// eslint-disable-next-line @typescript-eslint/member-ordering
async unsubscribe(subID: string) {
- const subscription = this.subscribers.find(s => s.subID === subID)
+ const subscription = this.subscribers.find((s) => s.subID === subID)
if (!subscription) return
await this.call(subscription.service, 'unsubscribe', [subscription.subID])
- this.subscribers = this.subscribers.filter(s => s !== subscription)
- this.logger.debug?.(`Unsubscribed '${subID}' from '${subscription.service}'`)
+ this.subscribers = this.subscribers.filter((s) => s !== subscription)
+ this.logger.debug?.(
+ `Unsubscribed '${subID}' from '${subscription.service}'`,
+ )
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any,@typescript-eslint/member-ordering
@@ -353,7 +371,6 @@ export class SessionConnection {
if (typeof subID !== 'string') {
throw new Error(
- // eslint-disable-next-line prettier/prettier
`Cannot subscribe to ${service}_${method}${params.length > 0 ? ' with params [' + params.join(', ') + ']' : ''
}. Expected response should have been a subscription ID, instead we got ${JSON.stringify(
subID,
@@ -367,7 +384,6 @@ export class SessionConnection {
subID,
})
this.logger.debug?.(
- // eslint-disable-next-line prettier/prettier
`Subscribed to "${service}_${method}"${params.length > 0 ? ' with params [' + params.join(', ') + '] and' : ''
} with id "${subID}"`,
)
@@ -378,48 +394,48 @@ export class SessionConnection {
private handleNotification(data: IRpcNotification) {
this.logger.debug?.('Handling notification:', data)
this.subscribers
- .filter(s => s.subID === data.params?.subscription)
- .forEach(s => s.handler(data.params?.result))
+ .filter((s) => s.subID === data.params?.subscription)
+ .forEach((s) => s.handler(data.params?.result))
}
- private async refresh(sessionID: string) {
- this.logger.debug?.(`Started refreshing session "${sessionID}"`)
+ private async refresh(instanceID: string) {
+ this.logger.debug?.(`Started refreshing sandbox "${instanceID}"`)
try {
// eslint-disable-next-line no-constant-condition
while (true) {
if (!this.isOpen) {
this.logger.debug?.(
- `Cannot refresh session ${this.session?.sessionID} - it was closed`,
+ `Cannot refresh sandbox ${this.sandbox?.instanceID} - it was closed`,
)
return
}
- await wait(SESSION_REFRESH_PERIOD)
+ await wait(SANDBOX_REFRESH_PERIOD)
try {
- this.logger.debug?.(`Refreshed session "${sessionID}"`)
- await refreshSession({
- api_key: this.apiKey,
- sessionID,
+ this.logger.debug?.(`Refreshed sandbox "${instanceID}"`)
+
+ await refreshSandbox(this.apiKey, {
+ instanceID,
})
} catch (e) {
- if (e instanceof refreshSession.Error) {
+ if (e instanceof refreshSandbox.Error) {
const error = e.getActualType()
if (error.status === 404) {
this.logger.warn?.(
- `Error refreshing session - (${error.status}): ${error.data.message}`,
+ `Error refreshing sandbox - (${error.status}): ${error.data.message}`,
)
return
}
this.logger.warn?.(
- `Refreshing session "${sessionID}" failed - (${error.status})`,
+ `Refreshing sandbox "${instanceID}" failed - (${error.status})`,
)
}
}
}
} finally {
- this.logger.debug?.(`Stopped refreshing session "${sessionID}"`)
+ this.logger.debug?.(`Stopped refreshing sandbox "${instanceID}"`)
await this.close()
}
}
diff --git a/packages/js-sdk/src/session/terminal.ts b/packages/js-sdk/src/sandbox/terminal.ts
similarity index 72%
rename from packages/js-sdk/src/session/terminal.ts
rename to packages/js-sdk/src/sandbox/terminal.ts
index 935a3bcb5..87596765f 100644
--- a/packages/js-sdk/src/session/terminal.ts
+++ b/packages/js-sdk/src/sandbox/terminal.ts
@@ -1,5 +1,5 @@
import { EnvVars } from './envVars'
-import { SessionConnection } from './sessionConnection'
+import { SandboxConnection } from './sandboxConnection'
export const terminalService = 'terminal'
@@ -16,7 +16,7 @@ export class TerminalOutput {
}
/**
- * A terminal session running in the environment.
+ * A terminal session running in the sandbox.
*
*/
export class Terminal {
@@ -27,7 +27,7 @@ export class Terminal {
constructor(
readonly terminalID: string,
- private readonly session: SessionConnection,
+ private readonly sandbox: SandboxConnection,
private readonly triggerExit: () => void,
finished: Promise<TerminalOutput>,
readonly output: TerminalOutput,
@@ -45,7 +45,7 @@ export class Terminal {
async kill(): Promise<void> {
try {
// TODO: Change the "destroy" to "kill" in devbookd
- await this.session.call(terminalService, 'destroy', [this.terminalID])
+ await this.sandbox.call(terminalService, 'destroy', [this.terminalID])
} finally {
this.triggerExit()
await this.finished
@@ -65,7 +65,7 @@ export class Terminal {
* @param data Data to send
*/
async sendData(data: string): Promise<void> {
- await this.session.call(terminalService, 'data', [this.terminalID, data])
+ await this.sandbox.call(terminalService, 'data', [this.terminalID, data])
}
/**
@@ -75,38 +75,42 @@ export class Terminal {
* @param rows Number of rows
*/
async resize({ cols, rows }: { cols: number; rows: number }): Promise<void> {
- await this.session.call(terminalService, 'resize', [this.terminalID, cols, rows])
+ await this.sandbox.call(terminalService, 'resize', [
+ this.terminalID,
+ cols,
+ rows,
+ ])
}
}
export type TerminalOpts = {
- onData: (data: string) => void
- onExit?: () => void
- size: { cols: number; rows: number }
- terminalID?: string
+ onData: (data: string) => Promise<void> | void;
+ onExit?: () => Promise<void> | void;
+ size: { cols: number; rows: number };
+ terminalID?: string;
/**
* If the `cmd` parameter is defined it will be executed as a command
* and this terminal session will exit when the command exits.
*/
- cmd?: string
+ cmd?: string;
/**
* Working directory where will the terminal start.
*/
- cwd?: string
+ cwd?: string;
/**
* @deprecated use cwd instead
*/
- rootDir?: string
+ rootDir?: string;
/**
* Environment variables that will be accessible inside of the terminal.
*/
- envVars?: EnvVars
+ envVars?: EnvVars;
/**
* Timeout in milliseconds (default is 60 seconds)
*/
- timeout?: number
-}
+ timeout?: number;
+};
export interface TerminalManager {
- readonly start: (opts: TerminalOpts) => Promise<Terminal>
+ readonly start: (opts: TerminalOpts) => Promise<Terminal>;
}
diff --git a/packages/js-sdk/src/session/formdata-polyfill.d.ts b/packages/js-sdk/src/session/formdata-polyfill.d.ts
deleted file mode 100644
index e481d0c27..000000000
--- a/packages/js-sdk/src/session/formdata-polyfill.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-declare module 'formdata-polyfill'
diff --git a/packages/js-sdk/src/session/out.ts b/packages/js-sdk/src/session/out.ts
deleted file mode 100644
index 3fa5ff4dd..000000000
--- a/packages/js-sdk/src/session/out.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-export enum OutType {
- Stdout = 'Stdout',
- Stderr = 'Stderr',
-}
-
-export interface OutResponse {
- type: OutType
- // Unix epoch in nanoseconds
- timestamp: number
- line: string
-}
-
-export interface OutStdoutResponse extends OutResponse {
- type: OutType.Stdout
-}
-
-export interface OutStderrResponse extends OutResponse {
- type: OutType.Stderr
-}
diff --git a/packages/js-sdk/src/templates/dataAnalysis.ts b/packages/js-sdk/src/templates/dataAnalysis.ts
index a508b4bea..dce49fadc 100644
--- a/packages/js-sdk/src/templates/dataAnalysis.ts
+++ b/packages/js-sdk/src/templates/dataAnalysis.ts
@@ -1,52 +1,52 @@
-import { Session, SessionOpts, DownloadFileFormat } from '../session'
-import type { ProcessOpts } from '../session/process'
-import { FilesystemEvent, FilesystemOperation } from '../session/filesystemWatcher'
+import { DownloadFileFormat, Sandbox, SandboxOpts } from '../sandbox'
+import type { ProcessOpts } from '../sandbox/process'
+import { FilesystemEvent, FilesystemOperation } from '../sandbox/filesystemWatcher'
-class Artifact {
+export class Artifact {
readonly path: string
- readonly _session: Session
+ readonly _sandbox: Sandbox
- constructor(path: string, session: Session) {
+ constructor(path: string, sandbox: Sandbox) {
this.path = path
- this._session = session
+ this._sandbox = sandbox
}
- download(format?: DownloadFileFormat) {
- return this._session.downloadFile(this.path, format)
+ async download(format?: DownloadFileFormat) {
+ return this._sandbox.downloadFile(this.path, format)
}
}
-interface RunPythonOpts extends Omit<ProcessOpts, 'cmd'> {
- onArtifact?: (artifact: Artifact) => void
+export interface RunPythonOpts extends Omit<ProcessOpts, 'cmd'> {
+ onArtifact?: (artifact: Artifact) => Promise<void> | void;
}
const DataAnalysisEnvId = 'Python3-DataAnalysis'
-export class DataAnalysis extends Session {
- constructor(opts: Omit<SessionOpts, 'id'>) {
+export class DataAnalysis extends Sandbox {
+ constructor(opts: Omit<SandboxOpts, 'id'>) {
super({ id: DataAnalysisEnvId, ...opts })
}
- static async create(opts?: Omit<SessionOpts, 'id'>) {
+ static override async create(opts?: Omit<SandboxOpts, 'id'>) {
return new DataAnalysis({ ...opts })
- .open({ timeout: opts?.timeout })
- .then(async session => {
+ ._open({ timeout: opts?.timeout })
+ .then(async (sandbox) => {
if (opts?.cwd) {
- console.log(`Custom cwd for Session set: "${opts.cwd}"`)
- await session.filesystem.makeDir(opts.cwd)
+ console.log(`Custom cwd for Sandbox set: "${opts.cwd}"`)
+ await sandbox.filesystem.makeDir(opts.cwd)
}
- return session
+ return sandbox
})
}
async runPython(code: string, opts: RunPythonOpts = {}) {
const artifacts: string[] = []
- const registerArtifacts = (event: FilesystemEvent) => {
+ const registerArtifacts = async (event: FilesystemEvent) => {
if (event.operation === FilesystemOperation.Create) {
const artifact = new Artifact(event.path, this)
artifacts.push(event.path)
- opts.onArtifact?.(artifact)
+ await opts.onArtifact?.(artifact)
}
}
@@ -68,35 +68,35 @@ export class DataAnalysis extends Session {
return {
stdout: proc.output.stdout,
stderr: proc.output.stderr,
- artifacts: artifacts.map(artifact => new Artifact(artifact, this)),
+ artifacts: artifacts.map((artifact) => new Artifact(artifact, this)),
}
}
- async installPythonPackages(packageName: string | string[]) {
- if (Array.isArray(packageName)) {
- packageName = packageName.join(' ')
- }
+ async installPythonPackages(packageNames: string | string[]) {
+ await this.installPackages('pip install', packageNames)
+ }
- const proc = await this.process.start({ cmd: `pip install ${packageName}` })
- await proc.wait()
+ async installSystemPackages(packageNames: string | string[]) {
+ await this.installPackages('sudo apt-get install -y', packageNames)
+ }
- if (proc.output.exitCode !== 0) {
- throw new Error(`Failed to install package ${packageName}`)
+ private async installPackages(command: string, packageNames: string | string[]) {
+ if (Array.isArray(packageNames)) {
+ packageNames = packageNames.join(' ')
}
- }
- async installSystemPackages(packageName: string | string[]) {
- if (Array.isArray(packageName)) {
- packageName = packageName.join(' ')
+ packageNames = packageNames.trim()
+ if (packageNames.length === 0) {
+ return
}
const proc = await this.process.start({
- cmd: `sudo apt-get -y install ${packageName}`,
+ cmd: `${command} ${packageNames}`,
})
await proc.wait()
if (proc.output.exitCode !== 0) {
- throw new Error(`Failed to install package ${packageName}`)
+ throw new Error(`Failed to install package ${packageNames}: ${proc.output.stderr}`)
}
}
}
diff --git a/packages/js-sdk/src/utils/filesystem.ts b/packages/js-sdk/src/utils/filesystem.ts
index b7b73764d..c0815b518 100644
--- a/packages/js-sdk/src/utils/filesystem.ts
+++ b/packages/js-sdk/src/utils/filesystem.ts
@@ -1,5 +1,6 @@
import path from 'path-browserify'
-import { Logger } from '../session/sessionConnection'
+
+import { Logger } from '../sandbox/sandboxConnection'
export const resolvePath = (
inputPath: string,
diff --git a/packages/js-sdk/test/_smoke.test.mjs b/packages/js-sdk/test/_smoke.test.mjs
index b7b7f36e1..0f7f0c058 100644
--- a/packages/js-sdk/test/_smoke.test.mjs
+++ b/packages/js-sdk/test/_smoke.test.mjs
@@ -1,14 +1,14 @@
-import { Session } from '../src'
+import { Sandbox } from '../src'
import { expect, test } from 'vitest'
import { id } from './setup.mjs'
// Smoke test = quick, high-level, basic functionality test
test.skip('Smoke test', async () => {
- const session = await Session.create({ id })
- await session.filesystem.makeDir('/test/new')
+ const sandbox = await Sandbox.create({ id })
+ await sandbox.filesystem.makeDir('/test/new')
- const ls = await session.filesystem.list('/test')
- expect(ls.map(x => x.name)).toEqual(['new'])
+ const ls = await sandbox.filesystem.list('/test')
+ expect(ls.map(x => x.name)).toEqual(['new'])
- await session.close()
+ await sandbox.close()
})
diff --git a/packages/js-sdk/test/cwd.test.mjs b/packages/js-sdk/test/cwd.test.mjs
index a8fb6a9d9..2167a2552 100644
--- a/packages/js-sdk/test/cwd.test.mjs
+++ b/packages/js-sdk/test/cwd.test.mjs
@@ -1,20 +1,20 @@
-import { Session } from '../src'
+import { Sandbox } from '../src'
import { expect, test, vi } from 'vitest'
import { id } from './setup.mjs'
test('custom cwd', async () => {
- const session = await Session.create({
+ const sandbox = await Sandbox.create({
id,
- cwd: '/code/app',
+ cwd: '/code/app'
})
// change dir to /home/user
- session.cwd = '/home/user'
+ sandbox.cwd = '/home/user'
// process respects cwd
{
- const proc = await session.process.start({ cmd: 'pwd' })
+ const proc = await sandbox.process.start({ cmd: 'pwd' })
await proc.finished
const out = proc.output.stdout
expect(out).toEqual('/home/user')
@@ -22,8 +22,8 @@ test('custom cwd', async () => {
// filesystem respects cwd
{
- await session.filesystem.write('hello.txt', 'Hello VM!')
- const proc = await session.process.start({ cmd: 'cat /home/user/hello.txt' })
+ await sandbox.filesystem.write('hello.txt', 'Hello VM!')
+ const proc = await sandbox.process.start({ cmd: 'cat /home/user/hello.txt' })
await proc.finished
const out = proc.output.stdout
expect(out).toEqual('Hello VM!')
@@ -31,73 +31,73 @@ test('custom cwd', async () => {
// call cd in process
{
- const proc = await session.process.start({ cmd: 'cd /code' })
+ const proc = await sandbox.process.start({ cmd: 'cd /code' })
await proc.finished
}
// process doesn't respect cd
{
- const proc = await session.process.start({ cmd: 'pwd' })
+ const proc = await sandbox.process.start({ cmd: 'pwd' })
await proc.finished
const out = proc.output.stdout
expect(out).toEqual('/home/user')
}
- await session.close()
+ await sandbox.close()
})
test('test_process_cwd', async () => {
- const session = await Session.create({ id, cwd: '/code/app' })
- const proc = await session.process.start({ cmd: 'pwd' })
- await proc.finished
+ const sandbox = await Sandbox.create({ id, cwd: '/code/app' })
+ const proc = await sandbox.process.start({ cmd: 'pwd' })
+ await proc.wait()
expect(proc.output.stdout).toEqual('/code/app')
- await session.close()
+ await sandbox.close()
})
test('test_filesystem_cwd', async () => {
- const session = await Session.create({ id, cwd: '/code/app' })
+ const sandbox = await Sandbox.create({ id, cwd: '/code/app' })
- await session.filesystem.write('hello.txt', 'Hello VM!')
- const proc = await session.process.start({ cmd: 'cat /code/app/hello.txt' })
+ await sandbox.filesystem.write('hello.txt', 'Hello VM!')
+ const proc = await sandbox.process.start({ cmd: 'cat /code/app/hello.txt' })
- await proc.finished
+ await proc.wait()
expect(proc.output.stdout).toEqual('Hello VM!')
- await session.close()
+ await sandbox.close()
})
test('test_initial_cwd_with_tilde', async () => {
- const session = await Session.create({ id, cwd: '~/code/' })
- const proc = await session.process.start({ cmd: 'pwd' })
- await proc.finished
+ const sandbox = await Sandbox.create({ id, cwd: '~/code/' })
+ const proc = await sandbox.process.start({ cmd: 'pwd' })
+ await proc.wait()
expect(proc.output.stdout).toEqual('/home/user/code')
- await session.close()
+ await sandbox.close()
})
test('test_relative_paths', async () => {
- const session = await Session.create({ id, cwd: '/home/user' })
- await session.filesystem.makeDir('./code')
- await session.filesystem.write('./code/hello.txt', 'Hello Vasek!')
- const proc = await session.process.start({ cmd: 'cat /home/user/code/hello.txt' })
- await proc.finished
+ const sandbox = await Sandbox.create({ id, cwd: '/home/user' })
+ await sandbox.filesystem.makeDir('./code')
+ await sandbox.filesystem.write('./code/hello.txt', 'Hello Vasek!')
+ const proc = await sandbox.process.start({ cmd: 'cat /home/user/code/hello.txt' })
+ await proc.wait()
expect(proc.output.stdout).toEqual('Hello Vasek!')
- await session.filesystem.write('../../hello.txt', 'Hello Tom!')
- const proc2 = await session.process.start({ cmd: 'cat /hello.txt' })
- await proc2.finished
+ await sandbox.filesystem.write('../../hello.txt', 'Hello Tom!')
+ const proc2 = await sandbox.process.start({ cmd: 'cat /hello.txt' })
+ await proc2.wait()
expect(proc2.output.stdout).toEqual('Hello Tom!')
- await session.close()
+ await sandbox.close()
})
test('test_warnings', async () => {
- const session = await Session.create({
+ const sandbox = await Sandbox.create({
id,
- logger: { warn: vi.spyOn(console, 'warn') },
+ logger: { warn: vi.spyOn(console, 'warn') }
})
- await session.filesystem.write('./hello.txt', 'Hello Vasek!')
+ await sandbox.filesystem.write('./hello.txt', 'Hello Vasek!')
expect(console.warn).toHaveBeenCalledTimes(1)
- await session.filesystem.write('../hello.txt', 'Hello Vasek!')
+ await sandbox.filesystem.write('../hello.txt', 'Hello Vasek!')
expect(console.warn).toHaveBeenCalledTimes(2)
- await session.filesystem.write('~/hello.txt', 'Hello Vasek!')
+ await sandbox.filesystem.write('~/hello.txt', 'Hello Vasek!')
expect(console.warn).toHaveBeenCalledTimes(3)
- await session.close()
+ await sandbox.close()
})
diff --git a/packages/js-sdk/test/envVars.test.mjs b/packages/js-sdk/test/envVars.test.mjs
index 65f77f223..a1cfed511 100644
--- a/packages/js-sdk/test/envVars.test.mjs
+++ b/packages/js-sdk/test/envVars.test.mjs
@@ -1,55 +1,55 @@
-import { Session } from '../src'
+import { Sandbox } from '../src'
import { expect, test } from 'vitest'
import { id } from './setup.mjs'
test('test_env_vars', async () => {
- const session = await Session.create({ id })
+ const sandbox = await Sandbox.create({ id })
- const process = await session.process.start({
+ const process = await sandbox.process.start({
cmd: 'echo $FOO',
- envVars: { FOO: 'BAR' },
+ envVars: { FOO: 'BAR' }
})
- await process.finished
+ await process.wait()
const output = process.output.stdout
expect(output).toEqual('BAR')
- await session.close()
+ await sandbox.close()
})
test('test_profile_env_vars', async () => {
- const session = await Session.create({ id })
+ const sandbox = await Sandbox.create({ id })
- await session.filesystem.write('/home/user/.profile', 'export FOO=BAR')
- const process = await session.process.start({ cmd: 'echo $FOO' })
- await process.finished
+ await sandbox.filesystem.write('/home/user/.profile', 'export FOO=BAR')
+ const process = await sandbox.process.start({ cmd: 'echo $FOO' })
+ await process.wait()
const output = process.output.stdout
expect(output).toEqual('BAR')
- await session.close()
+ await sandbox.close()
})
test('test_default_env_vars', async () => {
- const session = await Session.create({ id, envVars: { FOO: 'BAR' } })
+ const sandbox = await Sandbox.create({ id, envVars: { FOO: 'BAR' } })
- const process = await session.process.start({ cmd: 'echo $FOO' })
- await process.finished
+ const process = await sandbox.process.start({ cmd: 'echo $FOO' })
+ await process.wait()
const output = process.output.stdout
expect(output).toEqual('BAR')
- await session.close()
+ await sandbox.close()
})
test('test_overriding_env_vars', async () => {
- const session = await Session.create({ id, envVars: { FOO: 'BAR' } })
+ const sandbox = await Sandbox.create({ id, envVars: { FOO: 'BAR' } })
- const process = await session.process.start({
+ const process = await sandbox.process.start({
cmd: 'echo $FOO',
- envVars: { FOO: 'QUX' },
+ envVars: { FOO: 'QUX' }
})
- await process.finished
+ await process.wait()
const output = process.output.stdout
expect(output).toEqual('QUX')
- await session.close()
+ await sandbox.close()
})
diff --git a/packages/js-sdk/test/fileUploadDownload.test.mjs b/packages/js-sdk/test/fileUploadDownload.test.mjs
index 1cad431fb..a359fda9b 100644
--- a/packages/js-sdk/test/fileUploadDownload.test.mjs
+++ b/packages/js-sdk/test/fileUploadDownload.test.mjs
@@ -1,4 +1,4 @@
-import { Session } from '../src'
+import { Sandbox } from '../src'
import { expect, test } from 'vitest'
import * as fs from 'node:fs'
import * as path from 'node:path'
@@ -6,17 +6,17 @@ import * as path from 'node:path'
import { id } from './setup.mjs'
test('upload and download file', async () => {
- const session = await Session.create({ id })
+ const sandbox = await Sandbox.create({ id })
const localFile = fs.readFileSync(path.join(__dirname, '/assets/video.webm'))
- const uploadedFilePath = await session.uploadFile(localFile, 'video.webm')
+ const uploadedFilePath = await sandbox.uploadFile(localFile, 'video.webm')
- const ls = await session.filesystem.list('/home/user')
+ const ls = await sandbox.filesystem.list('/home/user')
expect(ls.map(x => x.name)).contains('video.webm')
- const downloadedFile = await session.downloadFile(uploadedFilePath, 'buffer')
+ const downloadedFile = await sandbox.downloadFile(uploadedFilePath, 'buffer')
expect(localFile).toEqual(downloadedFile)
- await session.close()
+ await sandbox.close()
})
diff --git a/packages/js-sdk/test/filesystem.test.mjs b/packages/js-sdk/test/filesystem.test.mjs
index 9c16f70c3..2546fb9dd 100644
--- a/packages/js-sdk/test/filesystem.test.mjs
+++ b/packages/js-sdk/test/filesystem.test.mjs
@@ -1,73 +1,73 @@
-import { Session } from '../src'
+import { Sandbox } from '../src'
import { expect, test } from 'vitest'
import * as fs from 'node:fs'
import * as path from 'node:path'
import { id } from './setup.mjs'
test('list files', async () => {
- const session = await Session.create({ id })
- await session.filesystem.makeDir('/test/new')
+ const sandbox = await Sandbox.create({ id })
+ await sandbox.filesystem.makeDir('/test/new')
- const ls = await session.filesystem.list('/test')
+ const ls = await sandbox.filesystem.list('/test')
expect(ls.map(x => x.name)).toEqual(['new'])
- await session.close()
+ await sandbox.close()
})
test('create file', async () => {
- const session = await Session.create({ id })
- await session.filesystem.makeDir('/test')
- await session.filesystem.write('/test/test.txt', 'Hello World!')
+ const sandbox = await Sandbox.create({ id })
+ await sandbox.filesystem.makeDir('/test')
+ await sandbox.filesystem.write('/test/test.txt', 'Hello World!')
- const ls = await session.filesystem.list('/test')
+ const ls = await sandbox.filesystem.list('/test')
expect(ls.map(x => x.name)).toEqual(['test.txt'])
- await session.close()
+ await sandbox.close()
})
test('read and write', async () => {
- const session = await Session.create({ id })
+ const sandbox = await Sandbox.create({ id })
// String
- await session.filesystem.write('/tmp/test.txt', 'Hello World!')
- const content = await session.filesystem.read('/tmp/test.txt')
+ await sandbox.filesystem.write('/tmp/test.txt', 'Hello World!')
+ const content = await sandbox.filesystem.read('/tmp/test.txt')
expect(content).toEqual('Hello World!')
// Binary file
const binaryFile = fs.readFileSync(path.join(__dirname, '/assets/video.webm'))
- await session.filesystem.writeBytes('/tmp/video.webm', binaryFile)
- const binaryContent = await session.filesystem.readBytes('/tmp/video.webm')
+ await sandbox.filesystem.writeBytes('/tmp/video.webm', binaryFile)
+ const binaryContent = await sandbox.filesystem.readBytes('/tmp/video.webm')
expect(binaryContent).toEqual(binaryFile)
- await session.close()
+ await sandbox.close()
})
test('list delete files', async () => {
- const session = await Session.create({ id })
- await session.filesystem.makeDir('/test/new')
+ const sandbox = await Sandbox.create({ id })
+ await sandbox.filesystem.makeDir('/test/new')
- let ls = await session.filesystem.list('/test')
+ let ls = await sandbox.filesystem.list('/test')
expect(ls.map(x => x.name)).toEqual(['new'])
- await session.filesystem.remove('/test/new')
+ await sandbox.filesystem.remove('/test/new')
- ls = await session.filesystem.list('/test')
+ ls = await sandbox.filesystem.list('/test')
expect(ls.map(x => x.name)).toEqual([])
- await session.close()
+ await sandbox.close()
})
test('watch dir', async () => {
- const session = await Session.create({ id })
- await session.filesystem.write('/tmp/test.txt', 'Hello')
+ const sandbox = await Sandbox.create({ id })
+ await sandbox.filesystem.write('/tmp/test.txt', 'Hello')
- const watcher = session.filesystem.watchDir('/tmp')
+ const watcher = sandbox.filesystem.watchDir('/tmp')
const events = []
watcher.addEventListener(ev => events.push(ev))
await watcher.start()
- await session.filesystem.write('/tmp/test.txt', 'World!')
+ await sandbox.filesystem.write('/tmp/test.txt', 'World!')
await new Promise(r => setTimeout(r, 2500))
await watcher.stop()
@@ -77,5 +77,5 @@ test('watch dir', async () => {
expect(event['operation']).toEqual('Write')
expect(event['path']).toEqual('/tmp/test.txt')
- await session.close()
+ await sandbox.close()
})
diff --git a/packages/js-sdk/test/logging.test.mjs b/packages/js-sdk/test/logging.test.mjs
index 86f25bec9..aeea4332a 100644
--- a/packages/js-sdk/test/logging.test.mjs
+++ b/packages/js-sdk/test/logging.test.mjs
@@ -1,4 +1,4 @@
-import { Session } from '../src'
+import { Sandbox } from '../src'
import { expect, test, vi } from 'vitest'
import { id } from './setup.mjs'
@@ -8,12 +8,12 @@ test.skip('no logs in console during very basic scenario', async () => {
debug: vi.spyOn(console, 'debug'),
info: vi.spyOn(console, 'info'),
warn: vi.spyOn(console, 'warn'),
- error: vi.spyOn(console, 'error'),
+ error: vi.spyOn(console, 'error')
}
- const session = await Session.create({ id })
- await session.filesystem.write('test.txt', 'Hello World')
- await session.close()
+ const sandbox = await Sandbox.create({ id })
+ await sandbox.filesystem.write('test.txt', 'Hello World')
+ await sandbox.close()
expect(consoleSpy.debug).toHaveBeenCalledTimes(0)
expect(consoleSpy.info).toHaveBeenCalledTimes(2)
@@ -26,15 +26,15 @@ test.skip('warn logs in console during convoluted scenario', async () => {
debug: vi.spyOn(console, 'debug'),
info: vi.spyOn(console, 'info'),
warn: vi.spyOn(console, 'warn'),
- error: vi.spyOn(console, 'error'),
+ error: vi.spyOn(console, 'error')
}
- const session = await Session.create({ id })
- await session.close() // Note that we are intentionally closing and then trying to write
+ const sandbox = await Sandbox.create({ id })
+ await sandbox.close() // Note that we are intentionally closing and then trying to write
const warnsAmount = consoleSpy.warn.mock.calls.length
// void to explicitly not awaiting, we wanna check if logging is happening correctly during retries
- void session.filesystem.read('/etc/hosts') // this should trigger retries
+ void sandbox.filesystem.read('/etc/hosts') // this should trigger retries
setTimeout(() => {
expect(consoleSpy.warn.mock.calls.length).toBeGreaterThan(warnsAmount) // should have logged a warning
}, 2000) // wait for some retries to occur
@@ -44,21 +44,21 @@ test.skip('verbose & info logs in console when opted-in', async () => {
const consoleSpy = {
info: vi.spyOn(console, 'info'),
warn: vi.spyOn(console, 'warn'),
- error: vi.spyOn(console, 'error'),
+ error: vi.spyOn(console, 'error')
}
const logger = {
info: console.info,
warn: console.warn,
- error: console.error,
+ error: console.error
}
- const session = await Session.create({
+ const sandbox = await Sandbox.create({
id,
- logger,
+ logger
})
- await session.filesystem.write('test.txt', 'Hello World')
- await session.close()
+ await sandbox.filesystem.write('test.txt', 'Hello World')
+ await sandbox.close()
expect(consoleSpy.info).toHaveBeenCalled()
expect(consoleSpy.error).toHaveBeenCalledTimes(0)
diff --git a/packages/js-sdk/test/performance.mjs b/packages/js-sdk/test/performance.mjs
index b98318950..948143b0b 100644
--- a/packages/js-sdk/test/performance.mjs
+++ b/packages/js-sdk/test/performance.mjs
@@ -1,6 +1,6 @@
import { writeFileSync } from 'fs'
-import { Session } from '../dist/cjs/index.js'
+import { Sandbox } from '../dist/index.js'
const reportSummaryFile = process.env.SUMMARY_FILE || './test.md'
@@ -8,25 +8,25 @@ const codeSnippetIDs = ['5udkAFHBVrGz']
const samplePerID = 15
const upperBoundary = 1000 // 1s
-async function spinSession(id) {
- console.log('Creating session...')
- let session
+async function spinSandbox(id) {
+ console.log('Creating sandbox...')
+ let sandbox
try {
const startTime = performance.now()
- session = new Session({
- id,
+ sandbox = new Sandbox({
+ id
// debug: true,
})
- session.open()
+ sandbox.open()
const endTime = performance.now()
return endTime - startTime
} catch (e) {
console.error(`Measuring ${id} failed`, e)
} finally {
- ; (async () => {
+ ;(async () => {
try {
- // await session?.close()
+ // await sandbox?.close()
} catch (e) {
// Do nothing
}
@@ -37,7 +37,7 @@ async function spinSession(id) {
}
function createReport(data, time) {
- let template = `# Devbook SDK - Session Performance
+ let template = `# E2B SDK - Sandbox Performance
*${time}*
@@ -64,12 +64,12 @@ function writeMeasurements(data) {
async function sample(id, size) {
let totalTime = 0
- const entryName = `Public session (${id})`
+ const entryName = `Public sandbox (${id})`
try {
for (let i = 0; i < size; i++) {
- const timeToSession = await spinSession(id)
- totalTime += timeToSession
+ const timeToSandbox = await spinSandbox(id)
+ totalTime += timeToSandbox
}
const averageTime = Math.round(totalTime / size)
@@ -77,16 +77,16 @@ async function sample(id, size) {
return {
[entryName]: {
result: `${averageTime}ms ${averageTime < upperBoundary ? ':heavy_check_mark:' : ':x:'
- }`,
- size,
- },
+ }`,
+ size
+ }
}
} catch (e) {
return {
[entryName]: {
size,
- result: e.message,
- },
+ result: e.message
+ }
}
}
}
@@ -100,7 +100,7 @@ async function main() {
}
// for (const id of codeSnippetIDs) {
- // // We do only one sample of persistent session because otherview we would get reconnected to the same session
+ // // We do only one sample of persistent sandbox because otherview we would get reconnected to the same sandbox
// const entry = await sample(id, 1, true)
// entries = { ...entries, ...entry }
// }
diff --git a/packages/js-sdk/test/process.test.mjs b/packages/js-sdk/test/process.test.mjs
index d66bb94bd..c0781078f 100644
--- a/packages/js-sdk/test/process.test.mjs
+++ b/packages/js-sdk/test/process.test.mjs
@@ -1,19 +1,19 @@
-import { Session } from '../src'
+import { Sandbox } from '../src'
import { expect, test, vi } from 'vitest'
import { id } from './setup.mjs'
test('process on stdout/stderr', async () => {
- const session = await Session.create({ id })
+ const sandbox = await Sandbox.create({ id })
const stdout = []
const stderr = []
- const process = await session.process.start({
+ const process = await sandbox.process.start({
cmd: 'pwd',
onStdout: data => stdout.push(data),
onStderr: data => stderr.push(data),
- cwd: '/tmp',
+ cwd: '/tmp'
})
const output = await process.finished
@@ -24,7 +24,7 @@ test('process on stdout/stderr', async () => {
expect(stdout.map(message => message.line)).toEqual(['/tmp'])
expect(stderr).toEqual([])
expect(process.output.exitCode).toEqual(0)
- await session.close()
+ await sandbox.close()
})
test('process expected stdout', async () => {
@@ -36,30 +36,31 @@ test('process expected stderr', async () => {
})
test('process on exit', async () => {
- const session = await Session.create({ id })
+ const sandbox = await Sandbox.create({ id })
- const onExit = vi.fn(() => { })
+ const onExit = vi.fn(() => {
+ })
- const process = await session.process.start({
+ const process = await sandbox.process.start({
cmd: 'pwd',
- onExit,
+ onExit
})
- await process.finished
+ await process.wait()
expect(onExit).toHaveBeenCalled()
- await session.close()
+ await sandbox.close()
})
test('process send stdin', async () => {
- const session = await Session.create({ id })
+ const sandbox = await Sandbox.create({ id })
- const process = await session.process.start({
+ const process = await sandbox.process.start({
cmd: 'read -r line; echo "$line"',
- cwd: '/code',
+ cwd: '/code'
})
await process.sendStdin('ping\n')
- await process.finished
+ await process.wait()
expect(process.output.stdout).toEqual('ping')
// TODO: Parity with Python SDK
@@ -68,54 +69,59 @@ test('process send stdin', async () => {
// assert.equal(message.line, "ping")
// assert.equal(message.error, false)
- await session.close()
+ await sandbox.close()
}, 10000)
test('test default on exit', async () => {
- const onExit = vi.fn(() => { })
+ const onExit = vi.fn(() => {
+ })
- const session = await Session.create({ id, onExit })
- const processOverride = await session.process.start({
+ const sandbox = await Sandbox.create({ id, onExit })
+ const processOverride = await sandbox.process.start({
cmd: 'pwd',
- onExit: console.log,
+ onExit: console.log
})
await processOverride.finished
expect(onExit).not.toHaveBeenCalled()
- const process = await session.process.start({
- cmd: 'pwd',
+ const process = await sandbox.process.start({
+ cmd: 'pwd'
})
- await process.finished
+ await process.wait()
expect(onExit).toHaveBeenCalled()
- await session.close()
+ await sandbox.close()
})
test('test default on stdout/stderr', async () => {
- const onStdout = vi.fn(() => { })
- const onStderr = vi.fn(() => { })
+ const onStdout = vi.fn(() => {
+ })
+ const onStderr = vi.fn(() => {
+ })
- const session = await Session.create({ id: 'Nodejs', onStdout, onStderr })
+ const sandbox = await Sandbox.create({ id, onStdout, onStderr })
- const processOverride = await session.process.start({
- cmd: "node -e \"console.log('Hello'); throw new Error('Ooopsie -_-')\"",
- onStdout: () => { },
- onStderr: () => { },
+ const processOverride = await sandbox.process.start({
+ cmd: 'node -e "console.log(\'Hello\'); throw new Error(\'Ooopsie -_-\')"',
+ onStdout: () => {
+ },
+ onStderr: () => {
+ }
})
- await processOverride.finished
+ await processOverride.wait()
expect(onStdout).not.toHaveBeenCalled()
expect(onStderr).not.toHaveBeenCalled()
- const process = await session.process.start({
- cmd: "node -e \"console.log('Hello'); throw new Error('Ooopsie -_-')\"",
+ const process = await sandbox.process.start({
+ cmd: 'node -e "console.log(\'Hello\'); throw new Error(\'Ooopsie -_-\')"'
})
- await process.finished
+ await process.wait()
expect(onStdout).toHaveBeenCalledOnce()
expect(onStderr).toHaveBeenCalled()
expect(process.output.exitCode).toEqual(1)
- await session.close()
+ await sandbox.close()
}, 10000)
diff --git a/packages/js-sdk/test/run.mjs b/packages/js-sdk/test/run.mjs
index c7ad7a252..617409ab1 100644
--- a/packages/js-sdk/test/run.mjs
+++ b/packages/js-sdk/test/run.mjs
@@ -1,10 +1,10 @@
import fs from 'fs'
-import { Session, runCode } from '../dist/index.js'
+import { runCode, Sandbox } from '../dist/index.js'
-async function localSession() {
- return await Session.create({
+async function localSandbox() {
+ return await Sandbox.create({
id: 'Nodejs',
- apiKey: process.env.E2B_API_KEY,
+ apiKey: process.env.E2B_API_KEY
// __debug_hostname: 'localhost',
// __debug_port: 49982,
// __debug_devEnv: 'local',
@@ -12,20 +12,20 @@ async function localSession() {
}
async function main() {
- const session = await localSession()
+ const sandbox = await localSandbox()
const f = fs.readFileSync('./package.json')
- await session.uploadFile(f, 'package.json')
+ await sandbox.uploadFile(f, 'package.json')
- const content = await session.filesystem.list('/home/user')
+ const content = await sandbox.filesystem.list('/home/user')
content.forEach(c => console.log(c.name))
process.exit()
- const response = await session.downloadFile('/.dbkenv')
+ const response = await sandbox.downloadFile('/.dbkenv')
const text = await response.text()
console.log('text', text)
process.exit()
- // const session = await Session.create({
+ // const sandbox = await Sandbox.create({
// id: 'Nodejs',
// apiKey: process.env.E2B_API_KEY,
// })
@@ -41,23 +41,23 @@ raise Exception("err")
// console.log('stdout', stdout)
// console.log('stderr', stderr)
- // await session.filesystem.write('/code/file', 'test')
- // const content = await session.filesystem.read('/code/file')
+ // await sandbox.filesystem.write('/code/file', 'test')
+ // const content = await sandbox.filesystem.read('/code/file')
// console.log('content', content)
- // const process = await session.process.start({
+ // const process = await sandbox.process.start({
// cmd: 'npm init -y',
// // onExit: () => console.log('exit'),
// // onStdout: data => console.log(data.line),
// })
// const cmd = 'npm i'
- // await session.process.start({
+ // await sandbox.process.start({
// cmd,
// onStdout: o => console.log(o),
// })
- // const term = await session.terminal.createSession({
+ // const term = await sandbox.terminal.start({
// onData: data => console.log(data),
// onExit: () => console.log('exit'),
// size: {
@@ -72,7 +72,7 @@ raise Exception("err")
// const dirWatchers = new Map()
- // const w2 = session.filesystem.watchDir('/code/dir')
+ // const w2 = sandbox.filesystem.watchDir('/code/dir')
// dirWatchers.set('/code/dir', w2)
// await w2.start()
// w2.addEventListener(fsevent => {
@@ -87,7 +87,7 @@ raise Exception("err")
// //}
// })
- // const w3 = session.filesystem.watchDir('/code/dir/subdir')
+ // const w3 = sandbox.filesystem.watchDir('/code/dir/subdir')
// dirWatchers.set('/code/dir/subdir', w3)
// await w3.start()
// w3.addEventListener(fsevent => {
@@ -97,7 +97,7 @@ raise Exception("err")
// //}
// })
} catch (e) {
- console.error('Session error', e)
+ console.error('Sandbox error', e)
}
}
diff --git a/packages/js-sdk/test/runCode.test.mjs b/packages/js-sdk/test/runCode.test.mjs
index 9c38d307d..09e5a3f1d 100644
--- a/packages/js-sdk/test/runCode.test.mjs
+++ b/packages/js-sdk/test/runCode.test.mjs
@@ -16,6 +16,6 @@ raise Exception("err")
test('run code using unsupported runtime', async () => {
await expect(() => runCode('Unsupported', 'print("hello")')).rejects.toThrowError(
- "isn't supported",
+ 'isn\'t supported'
)
})
diff --git a/packages/js-sdk/test/session.test.mjs b/packages/js-sdk/test/session.test.mjs
index 821097c6a..0c9b6f500 100644
--- a/packages/js-sdk/test/session.test.mjs
+++ b/packages/js-sdk/test/session.test.mjs
@@ -1,16 +1,16 @@
-import { Session } from '../src'
+import { Sandbox } from '../src'
import { test } from 'vitest'
import { id } from './setup.mjs'
-test('create session', async () => {
- const session = await Session.create({ id })
- await session.close()
+test('create sandbox', async () => {
+ const sandbox = await Sandbox.create({ id })
+ await sandbox.close()
})
-test('create multiple sessions', async () => {
- const session = await Session.create({ id })
- const session2 = await Session.create({ id })
- await session.close()
- await session2.close()
+test('create multiple sandbox', async () => {
+ const sandbox = await Sandbox.create({ id })
+ const sandbox2 = await Sandbox.create({ id })
+ await sandbox.close()
+ await sandbox2.close()
})
diff --git a/packages/js-sdk/test/setup.mjs b/packages/js-sdk/test/setup.mjs
index 81e928e86..c35cc06d8 100644
--- a/packages/js-sdk/test/setup.mjs
+++ b/packages/js-sdk/test/setup.mjs
@@ -1 +1 @@
-export const id = 'Bash'
+export const id = 'base'
diff --git a/packages/js-sdk/test/templates/dataAnalysis.test.mjs b/packages/js-sdk/test/templates/dataAnalysis.test.mjs
index a03cd44d5..02aab8bda 100644
--- a/packages/js-sdk/test/templates/dataAnalysis.test.mjs
+++ b/packages/js-sdk/test/templates/dataAnalysis.test.mjs
@@ -2,16 +2,33 @@ import { DataAnalysis } from '../../src'
import { expect, test } from 'vitest'
test('test_data_analysis', async () => {
- const session = await DataAnalysis.create()
- const result = await session.runPython(
+ const sandbox = await DataAnalysis.create()
+ const result = await sandbox.runPython(
`
import matplotlib.pyplot as plt
plt.plot([1, 2, 3, 4])
plt.ylabel('some numbers')
plt.show()
- `,
+ `
)
- await session.close()
+ await sandbox.close()
expect(result.artifacts.length).toEqual(1)
}, 10000)
+
+
+test('test_install_packages', async () => {
+ const sandbox = await DataAnalysis.create()
+
+ await sandbox.installPythonPackages("pandas")
+ await sandbox.installPythonPackages(["pandas"])
+ await sandbox.installPythonPackages(" ")
+ await sandbox.installPythonPackages([])
+
+ await sandbox.installSystemPackages("curl")
+ await sandbox.installSystemPackages(["curl"])
+ await sandbox.installSystemPackages("")
+ await sandbox.installSystemPackages([])
+
+ await sandbox.close()
+})
diff --git a/packages/js-sdk/test/timeout.test.mjs b/packages/js-sdk/test/timeout.test.mjs
index f73983aac..d4bbca7d4 100644
--- a/packages/js-sdk/test/timeout.test.mjs
+++ b/packages/js-sdk/test/timeout.test.mjs
@@ -1,70 +1,70 @@
import { expect, test } from 'vitest'
-import { Session } from '../src'
+import { Sandbox } from '../src'
import { TimeoutError } from '../src/error.ts'
import { id } from './setup.mjs'
// TODO: Make it work on CI and re-enable!
-test.skip('timeout session', async () => {
- await expect(Session.create({ id, timeout: 10 })).rejects.toThrow()
+test.skip('timeout sandbox', async () => {
+ await expect(Sandbox.create({ id, timeout: 10 })).rejects.toThrow()
})
// TODO: Make it work on CI and re-enable!
-test.skip('dont timeout session', async () => {
- const session = await Session.create({
+test.skip('dont timeout sandbox', async () => {
+ const sandbox = await Sandbox.create({
id,
- timeout: 10000,
+ timeout: 10000
})
- await session.close()
+ await sandbox.close()
})
// TODO: Make it work on CI and re-enable!
test.skip('timeout filesystem', async () => {
- const session = await Session.create({ id })
+ const sandbox = await Sandbox.create({ id })
await expect(
- session.filesystem.write('/home/test.txt', 'Hello World', { timeout: 10 }),
+ sandbox.filesystem.write('/home/test.txt', 'Hello World', { timeout: 10 })
).rejects.toThrow(TimeoutError)
await expect(
- session.filesystem.read('/home/test.txt', { timeout: 10 }),
+ sandbox.filesystem.read('/home/test.txt', { timeout: 10 })
).rejects.toThrow(TimeoutError)
- await expect(session.filesystem.list('/home', { timeout: 10 })).rejects.toThrow(
- TimeoutError,
+ await expect(sandbox.filesystem.list('/home', { timeout: 10 })).rejects.toThrow(
+ TimeoutError
)
await expect(
- session.filesystem.makeDir('/home/test/', { timeout: 10 }),
+ sandbox.filesystem.makeDir('/home/test/', { timeout: 10 })
).rejects.toThrow(TimeoutError)
- await session.filesystem.write('/home/test.txt', 'Hello World')
+ await sandbox.filesystem.write('/home/test.txt', 'Hello World')
await expect(
- session.filesystem.remove('/home/test.txt', { timeout: 10 }),
+ sandbox.filesystem.remove('/home/test.txt', { timeout: 10 })
).rejects.toThrow(TimeoutError)
})
// TODO: Make it work on CI and re-enable!
test.skip('timeout process', async () => {
- const session = await Session.create({ id: 'Nodejs' })
+ const sandbox = await Sandbox.create({ id: 'Nodejs' })
await expect(
- session.process.start({ cmd: "node -e 'setTimeout(() => {}, 10000)'", timeout: 10 }),
+ sandbox.process.start({ cmd: 'node -e \'setTimeout(() => {}, 10000)\'', timeout: 10 })
).rejects.toThrow(TimeoutError)
- const process = await session.process.start({
- cmd: "while true; do echo 'Hello World'; sleep 1; done",
+ const process = await sandbox.process.start({
+ cmd: 'while true; do echo \'Hello World\'; sleep 1; done'
})
await expect(process.sendStdin('Hello World', { timeout: 10 })).rejects.toThrow(
- TimeoutError,
+ TimeoutError
)
})
// TODO: Waiting for https://github.com/vitest-dev/vitest/issues/3119
test.skip('timeout longer than cmd should not leak', () =>
new Promise(async resolve => {
- const session = await Session.create({ id: 'Nodejs' })
- const proc = await session.process.start({
- cmd: "node -e 'setTimeout(() => {}, 1000)'", // should take around 1 second
+ const sandbox = await Sandbox.create({ id: 'Nodejs' })
+ const proc = await sandbox.process.start({
+ cmd: 'node -e \'setTimeout(() => {}, 1000)\'', // should take around 1 second
onExit: () => {
// TODO: Verify that process finished after successful cmd, and not after timeout
resolve()
},
- timeout: 10_000, // but we give it 10 seconds
+ timeout: 10_000 // but we give it 10 seconds
})
await proc.finished
}))
diff --git a/packages/js-sdk/testground/basic.cjs b/packages/js-sdk/testground/basic.cjs
index 7d14458f6..3858d74fd 100644
--- a/packages/js-sdk/testground/basic.cjs
+++ b/packages/js-sdk/testground/basic.cjs
@@ -1,41 +1,41 @@
-const e2b = require("../dist/cjs/index")
+const e2b = require('../dist')
async function main() {
- const session = await e2b.Session.create({
+ const sandbox = await e2b.Sandbox.create({
id: 'Nodejs',
apiKey: process.env.E2B_API_KEY
})
-
- await session.filesystem.write(
+
+ await sandbox.filesystem.write(
'/code/package.json',
JSON.stringify({
dependencies: {
- "is-odd": '3.0.1',
- },
- }),
+ 'is-odd': '3.0.1'
+ }
+ })
)
-
- const proc = await session.process.start({
+
+ const proc = await sandbox.process.start({
cmd: 'npm i --silent',
- envVars: { NPM_CONFIG_UPDATE_NOTIFIER: "false" },
+ envVars: { NPM_CONFIG_UPDATE_NOTIFIER: 'false' },
cwd: '/code',
onStdout: ({ line }) => console.log('STDOUT', line),
- onStderr: ({ line }) => console.log('STDERR', line),
+ onStderr: ({ line }) => console.log('STDERR', line)
})
-
+
await proc.finished
-
+
// list node_modules
- const files = await session.filesystem.list('/code/node_modules')
+ const files = await sandbox.filesystem.list('/code/node_modules')
console.log(
'installed node_modules (first 10 of them):',
files
.map(f => f.name)
.slice(0, 10)
- .join(', '),
+ .join(', ')
)
-
- await session.close()
+
+ await sandbox.close()
}
main().catch(console.error)
diff --git a/packages/js-sdk/testground/enhance-sdk.js b/packages/js-sdk/testground/enhance-sdk.js
index b6e065f00..6317ee1d9 100644
--- a/packages/js-sdk/testground/enhance-sdk.js
+++ b/packages/js-sdk/testground/enhance-sdk.js
@@ -1,83 +1,84 @@
// eslint-disable-next-line @typescript-eslint/no-var-requires
-const e2b = require('../dist/cjs/index')
+const e2b = require("../dist/index");
-function enhance(session) {
- session.fs = session.filesystem // alias, for convenience & consistency with stdlib
+function enhance(sandbox) {
+ sandbox.fs = sandbox.filesystem; // alias, for convenience & consistency with stdlib
- session.process._run = async function (cmd, opts) {
- const cmdSlug = cmd.substring(0, 20) // keep it short for nicer logs
+ sandbox.process._run = async function (cmd, opts) {
+ const cmdSlug = cmd.substring(0, 20); // keep it short for nicer logs
const proc = await this.start({
cmd,
...opts,
onStdout: ({ line }) => console.log(`[🔹 ${cmdSlug}]`, line),
- onStderr: ({ line }) => console.log(`[🔸 ${cmdSlug}]`, line),
- })
- await proc.finished
- return proc.output.stdout.trim()
- }
-
- session.process._cloneRepo = async function (repo, dir = '') {
- const cmd = `git clone --depth 1 ${repo} ${dir}`
- await this._run(cmd)
- }
-
- session._keepAlive = async function () {
+ onStderr: ({ line }) => console.log(`[🔸 ${cmdSlug}]`, line)
+ });
+ await proc.finished;
+ return proc.output.stdout.trim();
+ };
+
+ sandbox.process._cloneRepo = async function (repo, dir = "") {
+ const cmd = `git clone --depth 1 ${repo} ${dir}`;
+ await this._run(cmd);
+ };
+
+ sandbox._keepAlive = async function () {
const interval = setInterval(async () => {
try {
- await this.process._run('echo "♥"')
+ await this.process._run('echo "♥"');
} catch (err) {
- console.error('Keepalive failed:', err)
- clearInterval(interval)
+ console.error("Keepalive failed:", err);
+ clearInterval(interval);
}
- }, 1000 * 10)
- }
+ }, 1000 * 10);
+ };
}
-const printedPorts = []
-function printNewPortAndURL(openPorts, session) {
- openPorts.forEach(port => {
+const printedPorts = [];
+
+function printNewPortAndURL(openPorts, sandbox) {
+ openPorts.forEach((port) => {
if (!printedPorts.includes(port.port)) {
- printedPorts.push(port.port)
- console.log(port, `https://${session.getHostname(port.port)}`)
+ printedPorts.push(port.port);
+ console.log(port, `https://${sandbox.getHostname(port.port)}`);
}
- })
+ });
}
async function main() {
- const session = await e2b.Session.create({
- id: 'Nodejs',
- apiKey: process.env.E2B_API_KEY,
- // onScanPorts: openPorts => printNewPortAndURL(openPorts, session),
- })
- enhance(session)
+ const sandbox = await e2b.Sandbox.create({
+ id: "Nodejs",
+ apiKey: process.env.E2B_API_KEY
+ // onScanPorts: openPorts => printNewPortAndURL(openPorts, sandbox),
+ });
+ enhance(sandbox);
- session._keepAlive()
+ sandbox._keepAlive();
- console.log('Cloning repo...')
- await session.process._cloneRepo('https://github.com/Strajk/demo-todos')
- console.log('Repo cloned.')
+ console.log("Cloning repo...");
+ await sandbox.process._cloneRepo("https://github.com/Strajk/demo-todos");
+ console.log("Repo cloned.");
// install deps
- console.log('Installing deps...')
- await session.process._run('npm i')
- console.log('Deps installed.')
+ console.log("Installing deps...");
+ await sandbox.process._run("npm i");
+ console.log("Deps installed.");
// log deps
- console.log('Listing deps...')
- const deps = await session.process._run('npm ls --depth=0')
- console.log('Deps:', deps)
+ console.log("Listing deps...");
+ const deps = await sandbox.process._run("npm ls --depth=0");
+ console.log("Deps:", deps);
// run tests
- console.log('Running tests...')
- await session.process._run('npm test')
- console.log('Tests finished.')
+ console.log("Running tests...");
+ await sandbox.process._run("npm test");
+ console.log("Tests finished.");
// wait for 5m
- console.log('Waiting for 5m...')
+ console.log("Waiting for 5m...");
- await new Promise(resolve => setTimeout(resolve, 1000 * 60 * 5))
+ await new Promise((resolve) => setTimeout(resolve, 1000 * 60 * 5));
- await session.close()
+ await sandbox.close();
}
-main().catch(console.error)
+main().catch(console.error);
diff --git a/packages/js-sdk/testground/next-js/jsconfig.json b/packages/js-sdk/testground/next-js/jsconfig.json
index b8d6842d7..928135118 100644
--- a/packages/js-sdk/testground/next-js/jsconfig.json
+++ b/packages/js-sdk/testground/next-js/jsconfig.json
@@ -1,7 +1,9 @@
{
"compilerOptions": {
"paths": {
- "@/*": ["./src/*"]
+ "@/*": [
+ "./src/*"
+ ]
}
}
}
diff --git a/packages/js-sdk/testground/next-js/next.config.js b/packages/js-sdk/testground/next-js/next.config.js
index 8d2a9bf37..bddbae938 100644
--- a/packages/js-sdk/testground/next-js/next.config.js
+++ b/packages/js-sdk/testground/next-js/next.config.js
@@ -1,8 +1,8 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
eslint: {
- ignoreDuringBuilds: true,
- },
+ ignoreDuringBuilds: true
+ }
}
module.exports = nextConfig
diff --git a/packages/js-sdk/testground/next-js/src/app/layout.js b/packages/js-sdk/testground/next-js/src/app/layout.js
index 4e780f76c..b1a468366 100644
--- a/packages/js-sdk/testground/next-js/src/app/layout.js
+++ b/packages/js-sdk/testground/next-js/src/app/layout.js
@@ -1,16 +1,16 @@
-import { Inter } from 'next/font/google'
+import { Inter } from "next/font/google";
-const inter = Inter({ subsets: ['latin'] })
+const inter = Inter({ subsets: ["latin"] });
export const metadata = {
- title: 'Create Next App',
- description: 'Generated by create next app',
-}
+ title: "Create Next App",
+ description: "Generated by create next app"
+};
export default function RootLayout({ children }) {
return (
<html lang="en">
- <body className={inter.className}>{children}</body>
+ <body className={inter.className}>{children}</body>
</html>
- )
+ );
}
diff --git a/packages/js-sdk/testground/next-js/src/app/page.js b/packages/js-sdk/testground/next-js/src/app/page.js
index 6f040168d..133775b1c 100644
--- a/packages/js-sdk/testground/next-js/src/app/page.js
+++ b/packages/js-sdk/testground/next-js/src/app/page.js
@@ -1,10 +1,10 @@
-import Playground from '@/components/playground'
+import Playground from "@/components/playground";
export default function Home() {
return (
<>
<h1>Home</h1>
- <Playground />
+ <Playground/>
</>
- )
+ );
}
diff --git a/packages/js-sdk/testground/next-js/src/components/playground.jsx b/packages/js-sdk/testground/next-js/src/components/playground.jsx
index 54a0df3f8..c35a3b159 100644
--- a/packages/js-sdk/testground/next-js/src/components/playground.jsx
+++ b/packages/js-sdk/testground/next-js/src/components/playground.jsx
@@ -1,38 +1,33 @@
-'use client'
+"use client";
-import { Session } from '@e2b/sdk'
-import { useEffect, useState } from 'react'
+import { Sandbox } from "@e2b/sdk";
+import { useEffect, useState } from "react";
function Playground() {
- const [playground, setPlayground] = useState(null)
- const [url, setURL] = useState('')
+ const [playground, setPlayground] = useState(null);
+ const [url, setURL] = useState("");
- console.log('process.env', process.env)
+ console.log("process.env", process.env);
async function initPlayground() {
- const session = await Session.create({
- id: 'Nodejs',
- apiKey: process.env.NEXT_PUBLIC_E2B_API_KEY,
- })
- setURL('https://' + session.getHostname(3000))
- setPlayground(session)
+ const sandbox = await Sandbox.create({
+ id: "Nodejs",
+ apiKey: process.env.NEXT_PUBLIC_E2B_API_KEY
+ });
+ setURL("https://" + sandbox.getHostname(3000));
+ setPlayground(sandbox);
}
useEffect(function init() {
- void initPlayground()
- }, [])
+ void initPlayground();
+ }, []);
return (
<div>
<h2>Playground</h2>
- {url && (
- <iframe
- style={{ width: '100%', height: '400px' }}
- src={url}
- />
- )}
+ {url && <iframe style={{ width: "100%", height: "400px" }} src={url}/>}
</div>
- )
+ );
}
-export default Playground
+export default Playground;
diff --git a/packages/js-sdk/testground/playwright.mjs b/packages/js-sdk/testground/playwright.mjs
index 66c568a57..30b6011f6 100644
--- a/packages/js-sdk/testground/playwright.mjs
+++ b/packages/js-sdk/testground/playwright.mjs
@@ -1,29 +1,29 @@
-import { Session } from '../dist/umd/index.js' // should be /esm/, but getting "The requested module '../dist/esm/index.js' is a CommonJS module"
+import { Sandbox } from '../dist/index.js' // should be /esm/, but getting "The requested module '../dist/esm/index.js' is a CommonJS module"
const commonProcessOpts = {
onStdout: ({ line }) => console.log('🟢', line),
- onStderr: ({ line }) => console.log('🔴', line),
+ onStderr: ({ line }) => console.log('🔴', line)
}
-const session = await Session.create({
+const sandbox = await Sandbox.create({
id: 'Nodejs',
- apiKey: process.env.E2B_API_KEY,
+ apiKey: process.env.E2B_API_KEY
})
console.log('🟣 Creating package.json')
await (
- await session.process.start({
+ await sandbox.process.start({
cmd: 'npx playwright install',
- ...commonProcessOpts,
+ ...commonProcessOpts
})
).finished
console.log('🟣 Running playwright --version')
await (
- await session.process.start({
+ await sandbox.process.start({
cmd: 'npx playwright --version',
- ...commonProcessOpts,
+ ...commonProcessOpts
})
).finished
-await session.close()
+await sandbox.close()
diff --git a/packages/js-sdk/testground/testDataAnalysis.cjs b/packages/js-sdk/testground/testDataAnalysis.cjs
index 152cfb20a..780671df0 100644
--- a/packages/js-sdk/testground/testDataAnalysis.cjs
+++ b/packages/js-sdk/testground/testDataAnalysis.cjs
@@ -1,14 +1,14 @@
-const e2b = require("../dist/cjs/index")
-const fs = require("fs")
+const e2b = require('../dist/cjs/index')
+const fs = require('fs')
async function main() {
const s = await e2b.DataAnalysis.create({
- apiKey: process.env.E2B_API_KEY,
+ apiKey: process.env.E2B_API_KEY
})
- const response = await fetch("https://storage.googleapis.com/e2b-examples/netflix.csv")
+ const response = await fetch('https://storage.googleapis.com/e2b-examples/netflix.csv')
const buffer = await response.buffer()
- const path = await s.uploadFile(buffer, "netflix.csv")
+ const path = await s.uploadFile(buffer, 'netflix.csv')
const result = await s.runPython(`
print(1)
@@ -25,7 +25,11 @@ plt.title('Number of content')
plt.xlabel('Country')
plt.ylabel('Count')
plt.xticks(rotation=45)
-plt.show()`)
+plt.show()`, {
+ onArtifact: async (artifact) => {
+ await artifact.download()
+ }
+ })
console.log(result)
for (const artifact of result.artifacts) {
diff --git a/packages/js-sdk/testground/testDataAnalysis.mjs b/packages/js-sdk/testground/testDataAnalysis.mjs
index 6c9194f88..ec80e190a 100644
--- a/packages/js-sdk/testground/testDataAnalysis.mjs
+++ b/packages/js-sdk/testground/testDataAnalysis.mjs
@@ -12,14 +12,14 @@ let codeSnippets = []
function askUserQuestion(query) {
const rl = readline.createInterface({
input: process.stdin,
- output: process.stdout,
+ output: process.stdout
})
return new Promise(resolve =>
rl.question(query, ans => {
rl.close()
resolve(ans)
- }),
+ })
)
}
@@ -36,22 +36,22 @@ SQLAlchemy`
const exampleCodeInMarkdown = fs.readFileSync(
'/Users/mlejva/Developer/e2b/packages/js-sdk/testground/code.md',
- 'utf8',
+ 'utf8'
)
const history = [
{
role: 'system',
- content: systemPrompt,
+ content: systemPrompt
},
{
role: 'user',
content:
- 'I uploaded a CSV file here "/home/user/data.csv". What can you tell me about the data in this csv file?',
+ 'I uploaded a CSV file here "/home/user/data.csv". What can you tell me about the data in this csv file?'
},
{
role: 'assistant',
- content: `Let's start by loading the data and then we can explore its general characteristics such as the number of rows and columns, column names and types, missing values, and basic statistics. ${exampleCodeInMarkdown}`,
- },
+ content: `Let's start by loading the data and then we can explore its general characteristics such as the number of rows and columns, column names and types, missing values, and basic statistics. ${exampleCodeInMarkdown}`
+ }
// {
// role: 'assistant',
// content: ``,
@@ -70,12 +70,12 @@ const functions = [
properties: {
code: {
type: 'string',
- description: 'The Python code to run in Markdown format.',
- },
- },
+ description: 'The Python code to run in Markdown format.'
+ }
+ }
},
- required: ['code'],
- },
+ required: ['code']
+ }
]
let s
@@ -84,7 +84,7 @@ const openai = new OpenAI()
async function chat() {
const response = await openai.chat.completions.create({
model: 'gpt-4',
- messages: history,
+ messages: history
// functions,
})
return response
@@ -93,7 +93,7 @@ async function chat() {
function respond(msg) {
history.push({
role: 'user',
- content: msg,
+ content: msg
})
return chat()
}
@@ -105,7 +105,7 @@ async function handleArtifact(artifact) {
console.log('Chart saved to ', `file://${path}`)
}
-async function startSession() {
+async function startSandbox() {
s = await e2b.DataAnalysis.create()
const localFile = fs.readFileSync('/Users/mlejva/Downloads/netflix.csv')
@@ -117,7 +117,7 @@ async function runPython(code) {
const { stdout, stderr } = await s.runPython(code, {
onStdout: out => console.log(out.line),
onStderr: out => console.error(out.line),
- onArtifact: handleArtifact,
+ onArtifact: handleArtifact
})
if (stderr) {
@@ -128,7 +128,7 @@ async function runPython(code) {
// codeSnippets.pop()
console.log('Got an error in code, fixing mysekf...')
const response = await respond(
- `I ran your code and got the following error: ${stderr}`,
+ `I ran your code and got the following error: ${stderr}`
)
await parseResponse(response)
@@ -191,10 +191,10 @@ async function runFunction(name, args) {
}
}
-const remoteCSVFilePath = await startSession()
+const remoteCSVFilePath = await startSandbox()
const response = await respond(
- `I uploaded a CSV file here "${remoteCSVFilePath}". What can you tell me about the data in this csv file?`,
+ `I uploaded a CSV file here "${remoteCSVFilePath}". What can you tell me about the data in this csv file?`
)
await parseResponse(response)
diff --git a/packages/js-sdk/testground/testDataAnalysis.ts b/packages/js-sdk/testground/testDataAnalysis.ts
new file mode 100644
index 000000000..41086d444
--- /dev/null
+++ b/packages/js-sdk/testground/testDataAnalysis.ts
@@ -0,0 +1,47 @@
+import { DataAnalysis } from "../src"
+import { writeFileSync } from "fs"
+
+async function main() {
+ const s = await DataAnalysis.create({
+ apiKey: process.env.E2B_API_KEY
+ })
+ const response = await fetch('https://storage.googleapis.com/e2b-examples/netflix.csv')
+ const buffer = await response.blob()
+
+ const path = await s.uploadFile(buffer, 'netflix.csv')
+
+ const result = await s.runPython(`
+print(1)
+import pandas as pd
+import seaborn as sns
+import matplotlib.pyplot as plt
+
+data = pd.read_csv('${path}')
+top_countries = data['country'].value_counts().head(10)
+
+plt.figure(figsize=(10, 6))
+top_countries.plot(kind='bar', color='skyblue')
+plt.title('Number of content')
+plt.xlabel('Country')
+plt.ylabel('Count')
+plt.xticks(rotation=45)
+plt.show()`, {
+ onArtifact: async (artifact) => {
+ await artifact.download()
+ }
+ })
+
+ console.log(result)
+ for (const artifact of result.artifacts) {
+ const data = await s.downloadFile(artifact.path, 'buffer')
+ if (typeof data === 'string') {
+ writeFileSync(artifact.path, data)
+ }
+ }
+
+ await s.close()
+
+
+}
+
+main().catch(console.error)
diff --git a/packages/js-sdk/testground/zameest.js b/packages/js-sdk/testground/zameest.js
index b6e065f00..6317ee1d9 100644
--- a/packages/js-sdk/testground/zameest.js
+++ b/packages/js-sdk/testground/zameest.js
@@ -1,83 +1,84 @@
// eslint-disable-next-line @typescript-eslint/no-var-requires
-const e2b = require('../dist/cjs/index')
+const e2b = require("../dist/index");
-function enhance(session) {
- session.fs = session.filesystem // alias, for convenience & consistency with stdlib
+function enhance(sandbox) {
+ sandbox.fs = sandbox.filesystem; // alias, for convenience & consistency with stdlib
- session.process._run = async function (cmd, opts) {
- const cmdSlug = cmd.substring(0, 20) // keep it short for nicer logs
+ sandbox.process._run = async function (cmd, opts) {
+ const cmdSlug = cmd.substring(0, 20); // keep it short for nicer logs
const proc = await this.start({
cmd,
...opts,
onStdout: ({ line }) => console.log(`[🔹 ${cmdSlug}]`, line),
- onStderr: ({ line }) => console.log(`[🔸 ${cmdSlug}]`, line),
- })
- await proc.finished
- return proc.output.stdout.trim()
- }
-
- session.process._cloneRepo = async function (repo, dir = '') {
- const cmd = `git clone --depth 1 ${repo} ${dir}`
- await this._run(cmd)
- }
-
- session._keepAlive = async function () {
+ onStderr: ({ line }) => console.log(`[🔸 ${cmdSlug}]`, line)
+ });
+ await proc.finished;
+ return proc.output.stdout.trim();
+ };
+
+ sandbox.process._cloneRepo = async function (repo, dir = "") {
+ const cmd = `git clone --depth 1 ${repo} ${dir}`;
+ await this._run(cmd);
+ };
+
+ sandbox._keepAlive = async function () {
const interval = setInterval(async () => {
try {
- await this.process._run('echo "♥"')
+ await this.process._run('echo "♥"');
} catch (err) {
- console.error('Keepalive failed:', err)
- clearInterval(interval)
+ console.error("Keepalive failed:", err);
+ clearInterval(interval);
}
- }, 1000 * 10)
- }
+ }, 1000 * 10);
+ };
}
-const printedPorts = []
-function printNewPortAndURL(openPorts, session) {
- openPorts.forEach(port => {
+const printedPorts = [];
+
+function printNewPortAndURL(openPorts, sandbox) {
+ openPorts.forEach((port) => {
if (!printedPorts.includes(port.port)) {
- printedPorts.push(port.port)
- console.log(port, `https://${session.getHostname(port.port)}`)
+ printedPorts.push(port.port);
+ console.log(port, `https://${sandbox.getHostname(port.port)}`);
}
- })
+ });
}
async function main() {
- const session = await e2b.Session.create({
- id: 'Nodejs',
- apiKey: process.env.E2B_API_KEY,
- // onScanPorts: openPorts => printNewPortAndURL(openPorts, session),
- })
- enhance(session)
+ const sandbox = await e2b.Sandbox.create({
+ id: "Nodejs",
+ apiKey: process.env.E2B_API_KEY
+ // onScanPorts: openPorts => printNewPortAndURL(openPorts, sandbox),
+ });
+ enhance(sandbox);
- session._keepAlive()
+ sandbox._keepAlive();
- console.log('Cloning repo...')
- await session.process._cloneRepo('https://github.com/Strajk/demo-todos')
- console.log('Repo cloned.')
+ console.log("Cloning repo...");
+ await sandbox.process._cloneRepo("https://github.com/Strajk/demo-todos");
+ console.log("Repo cloned.");
// install deps
- console.log('Installing deps...')
- await session.process._run('npm i')
- console.log('Deps installed.')
+ console.log("Installing deps...");
+ await sandbox.process._run("npm i");
+ console.log("Deps installed.");
// log deps
- console.log('Listing deps...')
- const deps = await session.process._run('npm ls --depth=0')
- console.log('Deps:', deps)
+ console.log("Listing deps...");
+ const deps = await sandbox.process._run("npm ls --depth=0");
+ console.log("Deps:", deps);
// run tests
- console.log('Running tests...')
- await session.process._run('npm test')
- console.log('Tests finished.')
+ console.log("Running tests...");
+ await sandbox.process._run("npm test");
+ console.log("Tests finished.");
// wait for 5m
- console.log('Waiting for 5m...')
+ console.log("Waiting for 5m...");
- await new Promise(resolve => setTimeout(resolve, 1000 * 60 * 5))
+ await new Promise((resolve) => setTimeout(resolve, 1000 * 60 * 5));
- await session.close()
+ await sandbox.close();
}
-main().catch(console.error)
+main().catch(console.error);
diff --git a/packages/python-sdk/Makefile b/packages/python-sdk/Makefile
index de0c3792b..c21cc984e 100644
--- a/packages/python-sdk/Makefile
+++ b/packages/python-sdk/Makefile
@@ -5,11 +5,11 @@ generate-v2:
# Waiting for https://github.com/OpenAPITools/openapi-generator/pull/16655 to be merged
# Using this branch to use pydantic v2: https://github.com/fa0311/openapi-generator/tree/oshmoun-master-2
# After released, use npx -yes @openapitools/openapi-generator-cli generate
- java -jar <OPENAPI-TOOL-PATH>/openapi-generator/modules/openapi-generator-cli/target/openapi-generator-cli.jar generate \
+ java -jar ~/Work/e2b/openapi-generator/modules/openapi-generator-cli/target/openapi-generator-cli.jar generate \
-i ../../spec/openapi.yml \
-g python \
-o ./e2b/api \
- --global-property apis,models,supportingFiles,modelDocs=false \
+ --global-property apis="instances",models,supportingFiles,modelDocs=false \
--additional-properties=generateSourceCodeOnly=true \
--additional-properties=disallowAdditionalPropertiesIfNotPresent=true \
--additional-properties=usePydanticV2=true \
@@ -30,7 +30,7 @@ generate-v1:
-i ../../spec/openapi.yml \
-g python-nextgen \
-o ./e2b/api \
- --global-property apis,models,supportingFiles,modelDocs=false \
+ --global-property apis="instances",models,supportingFiles,modelDocs=false \
--additional-properties=generateSourceCodeOnly=true \
--additional-properties=disallowAdditionalPropertiesIfNotPresent=true \
--additional-properties=packageName=e2b.api.v1.client
diff --git a/packages/python-sdk/data_analysis_example.py b/packages/python-sdk/data_analysis_example.py
index 0a1ec693a..c398e31d2 100644
--- a/packages/python-sdk/data_analysis_example.py
+++ b/packages/python-sdk/data_analysis_example.py
@@ -1,4 +1,5 @@
import logging
+import os
from os import getenv
import requests
@@ -15,6 +16,7 @@ logging.basicConfig(level=logging.ERROR)
def main():
s = DataAnalysis(api_key=E2B_API_KEY)
+ os.makedirs("data", exist_ok=True)
with open("data/netflix.csv", "wb") as f:
response = requests.get(
"https://storage.googleapis.com/e2b-examples/netflix.csv"
@@ -44,8 +46,8 @@ plt.show()
)
for artifact in artifacts:
- content = artifact.read()
- with open(artifact.name, "wb") as f:
+ content = artifact.download()
+ with open(os.path.split(artifact.name)[-1], "wb") as f:
f.write(content)
s.close()
diff --git a/packages/python-sdk/e2b/__init__.py b/packages/python-sdk/e2b/__init__.py
index 62766bd06..412b1438b 100644
--- a/packages/python-sdk/e2b/__init__.py
+++ b/packages/python-sdk/e2b/__init__.py
@@ -1,5 +1,13 @@
-from .session import (
- Session,
+from .api import (
+ E2BApiClient,
+ client,
+)
+from .constants import (
+ SANDBOX_DOMAIN,
+ API_HOST,
+)
+from .sandbox import (
+ Sandbox,
FilesystemOperation,
FilesystemWatcher,
FileInfo,
@@ -11,7 +19,7 @@ from .session import (
Process,
OpenPort,
EnvVars,
- SessionException,
+ SandboxException,
TerminalException,
ProcessException,
FilesystemException,
@@ -21,7 +29,6 @@ from .session import (
TerminalOutput,
run_code,
)
-
from .templates import (
DataAnalysis,
)
diff --git a/packages/python-sdk/e2b/api/__init__.py b/packages/python-sdk/e2b/api/__init__.py
index dfc48f071..3af7c648a 100644
--- a/packages/python-sdk/e2b/api/__init__.py
+++ b/packages/python-sdk/e2b/api/__init__.py
@@ -1,5 +1,8 @@
from importlib.metadata import version
+from e2b.constants import API_HOST
+from e2b.api.metadata import default_headers
+
pydantic_version = version("pydantic")
if pydantic_version < "2.0.0":
import e2b.api.v1.client as client
@@ -10,12 +13,27 @@ else:
import e2b.api.v2.client.models as models
import e2b.api.v2.client.exceptions as exceptions
-from e2b.constants import SESSION_DOMAIN
-# Defining the host is optional and defaults to https://ondevbook.com
+# Defining the host is optional and defaults to https://api.e2b.dev
# See configuration.py for a list of all supported configuration parameters.
configuration = client.Configuration(
- host=f"https://{SESSION_DOMAIN}",
+ host=API_HOST,
)
+
+class E2BApiClient(client.ApiClient):
+ def __init__(
+ self,
+ api_key: str | None = None,
+ access_token: str | None = None,
+ *args,
+ **kwargs,
+ ):
+ configuration.api_key["ApiKeyAuth"] = api_key
+ configuration.access_token = access_token
+
+ super().__init__(configuration, *args, **kwargs)
+ self.default_headers = default_headers
+
+
__all__ = ["configuration", "client", "models"]
diff --git a/packages/python-sdk/e2b/api/metadata.py b/packages/python-sdk/e2b/api/metadata.py
new file mode 100644
index 000000000..f5db4edf6
--- /dev/null
+++ b/packages/python-sdk/e2b/api/metadata.py
@@ -0,0 +1,15 @@
+import platform
+from importlib import metadata
+
+default_headers = {
+ "lang": "python",
+ "lang_version": platform.python_version(),
+ "machine": platform.machine(),
+ "os": platform.platform(),
+ "package_version": metadata.version("e2b"),
+ "processor": platform.processor(),
+ "publisher": "e2b",
+ "release": platform.release(),
+ "sdk_runtime": "python",
+ "system": platform.system(),
+}
diff --git a/packages/python-sdk/e2b/api/v1/client/__init__.py b/packages/python-sdk/e2b/api/v1/client/__init__.py
index a897a1620..a017c4f42 100644
--- a/packages/python-sdk/e2b/api/v1/client/__init__.py
+++ b/packages/python-sdk/e2b/api/v1/client/__init__.py
@@ -3,11 +3,11 @@
# flake8: noqa
"""
- Devbook
+ E2B API
- Devbook API # noqa: E501
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: 1.0.0
+ The version of the OpenAPI document: 0.1.0
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@@ -17,9 +17,7 @@
__version__ = "1.0.0"
# import apis into sdk package
-from e2b.api.v1.client.api.default_api import DefaultApi
-from e2b.api.v1.client.api.envs_api import EnvsApi
-from e2b.api.v1.client.api.sessions_api import SessionsApi
+from e2b.api.v1.client.api.instances_api import InstancesApi
# import ApiClient
from e2b.api.v1.client.api_response import ApiResponse
@@ -34,15 +32,11 @@ from e2b.api.v1.client.exceptions import ApiException
# import models into sdk package
from e2b.api.v1.client.models.environment import Environment
-from e2b.api.v1.client.models.environment_state import EnvironmentState
-from e2b.api.v1.client.models.environment_state_update import EnvironmentStateUpdate
-from e2b.api.v1.client.models.environment_title_update import EnvironmentTitleUpdate
+from e2b.api.v1.client.models.environment_build import EnvironmentBuild
+from e2b.api.v1.client.models.envs_env_id_builds_build_id_logs_post_request import (
+ EnvsEnvIDBuildsBuildIDLogsPostRequest,
+)
from e2b.api.v1.client.models.envs_get200_response_inner import EnvsGet200ResponseInner
from e2b.api.v1.client.models.error import Error
-from e2b.api.v1.client.models.new_environment import NewEnvironment
-from e2b.api.v1.client.models.new_session import NewSession
-from e2b.api.v1.client.models.session import Session
-from e2b.api.v1.client.models.sessions_get200_response_inner import (
- SessionsGet200ResponseInner,
-)
-from e2b.api.v1.client.models.template import Template
+from e2b.api.v1.client.models.instance import Instance
+from e2b.api.v1.client.models.new_instance import NewInstance
diff --git a/packages/python-sdk/e2b/api/v1/client/api/__init__.py b/packages/python-sdk/e2b/api/v1/client/api/__init__.py
index f1ca49c03..131828c59 100644
--- a/packages/python-sdk/e2b/api/v1/client/api/__init__.py
+++ b/packages/python-sdk/e2b/api/v1/client/api/__init__.py
@@ -1,6 +1,4 @@
# flake8: noqa
# import apis into api package
-from e2b.api.v1.client.api.default_api import DefaultApi
-from e2b.api.v1.client.api.envs_api import EnvsApi
-from e2b.api.v1.client.api.sessions_api import SessionsApi
+from e2b.api.v1.client.api.instances_api import InstancesApi
diff --git a/packages/python-sdk/e2b/api/v1/client/api/default_api.py b/packages/python-sdk/e2b/api/v1/client/api/default_api.py
deleted file mode 100644
index f2dfc6964..000000000
--- a/packages/python-sdk/e2b/api/v1/client/api/default_api.py
+++ /dev/null
@@ -1,171 +0,0 @@
-# coding: utf-8
-
-"""
- Devbook
-
- Devbook API # noqa: E501
-
- The version of the OpenAPI document: 1.0.0
- Generated by OpenAPI Generator (https://openapi-generator.tech)
-
- Do not edit the class manually.
-"""
-
-
-import re # noqa: F401
-import io
-import warnings
-
-from pydantic import validate_arguments, ValidationError
-from typing_extensions import Annotated
-
-
-from e2b.api.v1.client.api_client import ApiClient
-from e2b.api.v1.client.api_response import ApiResponse
-from e2b.api.v1.client.exceptions import ApiTypeError, ApiValueError # noqa: F401
-
-
-class DefaultApi(object):
- """NOTE: This class is auto generated by OpenAPI Generator
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- def __init__(self, api_client=None):
- if api_client is None:
- api_client = ApiClient.get_default()
- self.api_client = api_client
-
- @validate_arguments
- def health_get(self, **kwargs) -> None: # noqa: E501
- """health_get # noqa: E501
-
- Health check # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.health_get(async_req=True)
- >>> result = thread.get()
-
- :param async_req: Whether to execute the request asynchronously.
- :type async_req: bool, optional
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: Returns the result object.
- If the method is called asynchronously,
- returns the request thread.
- :rtype: None
- """
- kwargs["_return_http_data_only"] = True
- if "_preload_content" in kwargs:
- raise ValueError(
- "Error! Please call the health_get_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data"
- )
- return self.health_get_with_http_info(**kwargs) # noqa: E501
-
- @validate_arguments
- def health_get_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501
- """health_get # noqa: E501
-
- Health check # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.health_get_with_http_info(async_req=True)
- >>> result = thread.get()
-
- :param async_req: Whether to execute the request asynchronously.
- :type async_req: bool, optional
- :param _preload_content: if False, the ApiResponse.data will
- be set to none and raw_data will store the
- HTTP response body without reading/decoding.
- Default is True.
- :type _preload_content: bool, optional
- :param _return_http_data_only: response data instead of ApiResponse
- object with status code, headers, etc
- :type _return_http_data_only: bool, optional
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :param _request_auth: set to override the auth_settings for an a single
- request; this effectively ignores the authentication
- in the spec for a single request.
- :type _request_auth: dict, optional
- :type _content_type: string, optional: force content-type for the request
- :return: Returns the result object.
- If the method is called asynchronously,
- returns the request thread.
- :rtype: None
- """
-
- _params = locals()
-
- _all_params = []
- _all_params.extend(
- [
- "async_req",
- "_return_http_data_only",
- "_preload_content",
- "_request_timeout",
- "_request_auth",
- "_content_type",
- "_headers",
- ]
- )
-
- # validate the arguments
- for _key, _val in _params["kwargs"].items():
- if _key not in _all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method health_get" % _key
- )
- _params[_key] = _val
- del _params["kwargs"]
-
- _collection_formats = {}
-
- # process the path parameters
- _path_params = {}
-
- # process the query parameters
- _query_params = []
- # process the header parameters
- _header_params = dict(_params.get("_headers", {}))
- # process the form parameters
- _form_params = []
- _files = {}
- # process the body parameter
- _body_params = None
- # set the HTTP header `Accept`
- _header_params["Accept"] = self.api_client.select_header_accept(
- ["application/json"]
- ) # noqa: E501
-
- # authentication setting
- _auth_settings = [] # noqa: E501
-
- _response_types_map = {}
-
- return self.api_client.call_api(
- "/health",
- "GET",
- _path_params,
- _query_params,
- _header_params,
- body=_body_params,
- post_params=_form_params,
- files=_files,
- response_types_map=_response_types_map,
- auth_settings=_auth_settings,
- async_req=_params.get("async_req"),
- _return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501
- _preload_content=_params.get("_preload_content", True),
- _request_timeout=_params.get("_request_timeout"),
- collection_formats=_collection_formats,
- _request_auth=_params.get("_request_auth"),
- )
diff --git a/packages/python-sdk/e2b/api/v1/client/api/envs_api.py b/packages/python-sdk/e2b/api/v1/client/api/envs_api.py
deleted file mode 100644
index aa7cb94c3..000000000
--- a/packages/python-sdk/e2b/api/v1/client/api/envs_api.py
+++ /dev/null
@@ -1,1190 +0,0 @@
-# coding: utf-8
-
-"""
- Devbook
-
- Devbook API # noqa: E501
-
- The version of the OpenAPI document: 1.0.0
- Generated by OpenAPI Generator (https://openapi-generator.tech)
-
- Do not edit the class manually.
-"""
-
-
-import re # noqa: F401
-import io
-import warnings
-
-from pydantic import validate_arguments, ValidationError
-from typing_extensions import Annotated
-
-from pydantic import StrictStr
-
-from typing import List
-
-from e2b.api.v1.client.models.environment import Environment
-from e2b.api.v1.client.models.environment_state_update import EnvironmentStateUpdate
-from e2b.api.v1.client.models.environment_title_update import EnvironmentTitleUpdate
-from e2b.api.v1.client.models.envs_get200_response_inner import EnvsGet200ResponseInner
-from e2b.api.v1.client.models.new_environment import NewEnvironment
-
-from e2b.api.v1.client.api_client import ApiClient
-from e2b.api.v1.client.api_response import ApiResponse
-from e2b.api.v1.client.exceptions import ApiTypeError, ApiValueError # noqa: F401
-
-
-class EnvsApi(object):
- """NOTE: This class is auto generated by OpenAPI Generator
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- def __init__(self, api_client=None):
- if api_client is None:
- api_client = ApiClient.get_default()
- self.api_client = api_client
-
- @validate_arguments
- def envs_code_snippet_id_delete(
- self, api_key: StrictStr, code_snippet_id: StrictStr, **kwargs
- ) -> None: # noqa: E501
- """envs_code_snippet_id_delete # noqa: E501
-
- Delete the code snippet environment # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.envs_code_snippet_id_delete(api_key, code_snippet_id, async_req=True)
- >>> result = thread.get()
-
- :param api_key: (required)
- :type api_key: str
- :param code_snippet_id: (required)
- :type code_snippet_id: str
- :param async_req: Whether to execute the request asynchronously.
- :type async_req: bool, optional
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: Returns the result object.
- If the method is called asynchronously,
- returns the request thread.
- :rtype: None
- """
- kwargs["_return_http_data_only"] = True
- if "_preload_content" in kwargs:
- raise ValueError(
- "Error! Please call the envs_code_snippet_id_delete_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data"
- )
- return self.envs_code_snippet_id_delete_with_http_info(
- api_key, code_snippet_id, **kwargs
- ) # noqa: E501
-
- @validate_arguments
- def envs_code_snippet_id_delete_with_http_info(
- self, api_key: StrictStr, code_snippet_id: StrictStr, **kwargs
- ) -> ApiResponse: # noqa: E501
- """envs_code_snippet_id_delete # noqa: E501
-
- Delete the code snippet environment # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.envs_code_snippet_id_delete_with_http_info(api_key, code_snippet_id, async_req=True)
- >>> result = thread.get()
-
- :param api_key: (required)
- :type api_key: str
- :param code_snippet_id: (required)
- :type code_snippet_id: str
- :param async_req: Whether to execute the request asynchronously.
- :type async_req: bool, optional
- :param _preload_content: if False, the ApiResponse.data will
- be set to none and raw_data will store the
- HTTP response body without reading/decoding.
- Default is True.
- :type _preload_content: bool, optional
- :param _return_http_data_only: response data instead of ApiResponse
- object with status code, headers, etc
- :type _return_http_data_only: bool, optional
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :param _request_auth: set to override the auth_settings for an a single
- request; this effectively ignores the authentication
- in the spec for a single request.
- :type _request_auth: dict, optional
- :type _content_type: string, optional: force content-type for the request
- :return: Returns the result object.
- If the method is called asynchronously,
- returns the request thread.
- :rtype: None
- """
-
- _params = locals()
-
- _all_params = ["api_key", "code_snippet_id"]
- _all_params.extend(
- [
- "async_req",
- "_return_http_data_only",
- "_preload_content",
- "_request_timeout",
- "_request_auth",
- "_content_type",
- "_headers",
- ]
- )
-
- # validate the arguments
- for _key, _val in _params["kwargs"].items():
- if _key not in _all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method envs_code_snippet_id_delete" % _key
- )
- _params[_key] = _val
- del _params["kwargs"]
-
- _collection_formats = {}
-
- # process the path parameters
- _path_params = {}
- if _params["code_snippet_id"]:
- _path_params["codeSnippetID"] = _params["code_snippet_id"]
-
- # process the query parameters
- _query_params = []
- if _params.get("api_key") is not None: # noqa: E501
- _query_params.append(("api_key", _params["api_key"]))
-
- # process the header parameters
- _header_params = dict(_params.get("_headers", {}))
- # process the form parameters
- _form_params = []
- _files = {}
- # process the body parameter
- _body_params = None
- # set the HTTP header `Accept`
- _header_params["Accept"] = self.api_client.select_header_accept(
- ["application/json"]
- ) # noqa: E501
-
- # authentication setting
- _auth_settings = [] # noqa: E501
-
- _response_types_map = {}
-
- return self.api_client.call_api(
- "/envs/{codeSnippetID}",
- "DELETE",
- _path_params,
- _query_params,
- _header_params,
- body=_body_params,
- post_params=_form_params,
- files=_files,
- response_types_map=_response_types_map,
- auth_settings=_auth_settings,
- async_req=_params.get("async_req"),
- _return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501
- _preload_content=_params.get("_preload_content", True),
- _request_timeout=_params.get("_request_timeout"),
- collection_formats=_collection_formats,
- _request_auth=_params.get("_request_auth"),
- )
-
- @validate_arguments
- def envs_code_snippet_id_patch(
- self, api_key: StrictStr, code_snippet_id: StrictStr, **kwargs
- ) -> None: # noqa: E501
- """envs_code_snippet_id_patch # noqa: E501
-
- Update the environment of the code snippet to match the edit environment # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.envs_code_snippet_id_patch(api_key, code_snippet_id, async_req=True)
- >>> result = thread.get()
-
- :param api_key: (required)
- :type api_key: str
- :param code_snippet_id: (required)
- :type code_snippet_id: str
- :param async_req: Whether to execute the request asynchronously.
- :type async_req: bool, optional
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: Returns the result object.
- If the method is called asynchronously,
- returns the request thread.
- :rtype: None
- """
- kwargs["_return_http_data_only"] = True
- if "_preload_content" in kwargs:
- raise ValueError(
- "Error! Please call the envs_code_snippet_id_patch_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data"
- )
- return self.envs_code_snippet_id_patch_with_http_info(
- api_key, code_snippet_id, **kwargs
- ) # noqa: E501
-
- @validate_arguments
- def envs_code_snippet_id_patch_with_http_info(
- self, api_key: StrictStr, code_snippet_id: StrictStr, **kwargs
- ) -> ApiResponse: # noqa: E501
- """envs_code_snippet_id_patch # noqa: E501
-
- Update the environment of the code snippet to match the edit environment # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.envs_code_snippet_id_patch_with_http_info(api_key, code_snippet_id, async_req=True)
- >>> result = thread.get()
-
- :param api_key: (required)
- :type api_key: str
- :param code_snippet_id: (required)
- :type code_snippet_id: str
- :param async_req: Whether to execute the request asynchronously.
- :type async_req: bool, optional
- :param _preload_content: if False, the ApiResponse.data will
- be set to none and raw_data will store the
- HTTP response body without reading/decoding.
- Default is True.
- :type _preload_content: bool, optional
- :param _return_http_data_only: response data instead of ApiResponse
- object with status code, headers, etc
- :type _return_http_data_only: bool, optional
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :param _request_auth: set to override the auth_settings for an a single
- request; this effectively ignores the authentication
- in the spec for a single request.
- :type _request_auth: dict, optional
- :type _content_type: string, optional: force content-type for the request
- :return: Returns the result object.
- If the method is called asynchronously,
- returns the request thread.
- :rtype: None
- """
-
- _params = locals()
-
- _all_params = ["api_key", "code_snippet_id"]
- _all_params.extend(
- [
- "async_req",
- "_return_http_data_only",
- "_preload_content",
- "_request_timeout",
- "_request_auth",
- "_content_type",
- "_headers",
- ]
- )
-
- # validate the arguments
- for _key, _val in _params["kwargs"].items():
- if _key not in _all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method envs_code_snippet_id_patch" % _key
- )
- _params[_key] = _val
- del _params["kwargs"]
-
- _collection_formats = {}
-
- # process the path parameters
- _path_params = {}
- if _params["code_snippet_id"]:
- _path_params["codeSnippetID"] = _params["code_snippet_id"]
-
- # process the query parameters
- _query_params = []
- if _params.get("api_key") is not None: # noqa: E501
- _query_params.append(("api_key", _params["api_key"]))
-
- # process the header parameters
- _header_params = dict(_params.get("_headers", {}))
- # process the form parameters
- _form_params = []
- _files = {}
- # process the body parameter
- _body_params = None
- # set the HTTP header `Accept`
- _header_params["Accept"] = self.api_client.select_header_accept(
- ["application/json"]
- ) # noqa: E501
-
- # authentication setting
- _auth_settings = [] # noqa: E501
-
- _response_types_map = {}
-
- return self.api_client.call_api(
- "/envs/{codeSnippetID}",
- "PATCH",
- _path_params,
- _query_params,
- _header_params,
- body=_body_params,
- post_params=_form_params,
- files=_files,
- response_types_map=_response_types_map,
- auth_settings=_auth_settings,
- async_req=_params.get("async_req"),
- _return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501
- _preload_content=_params.get("_preload_content", True),
- _request_timeout=_params.get("_request_timeout"),
- collection_formats=_collection_formats,
- _request_auth=_params.get("_request_auth"),
- )
-
- @validate_arguments
- def envs_code_snippet_id_post(
- self,
- api_key: StrictStr,
- code_snippet_id: StrictStr,
- new_environment: NewEnvironment,
- **kwargs
- ) -> None: # noqa: E501
- """envs_code_snippet_id_post # noqa: E501
-
- Create a new env for a code snippet # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.envs_code_snippet_id_post(api_key, code_snippet_id, new_environment, async_req=True)
- >>> result = thread.get()
-
- :param api_key: (required)
- :type api_key: str
- :param code_snippet_id: (required)
- :type code_snippet_id: str
- :param new_environment: (required)
- :type new_environment: NewEnvironment
- :param async_req: Whether to execute the request asynchronously.
- :type async_req: bool, optional
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: Returns the result object.
- If the method is called asynchronously,
- returns the request thread.
- :rtype: None
- """
- kwargs["_return_http_data_only"] = True
- if "_preload_content" in kwargs:
- raise ValueError(
- "Error! Please call the envs_code_snippet_id_post_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data"
- )
- return self.envs_code_snippet_id_post_with_http_info(
- api_key, code_snippet_id, new_environment, **kwargs
- ) # noqa: E501
-
- @validate_arguments
- def envs_code_snippet_id_post_with_http_info(
- self,
- api_key: StrictStr,
- code_snippet_id: StrictStr,
- new_environment: NewEnvironment,
- **kwargs
- ) -> ApiResponse: # noqa: E501
- """envs_code_snippet_id_post # noqa: E501
-
- Create a new env for a code snippet # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.envs_code_snippet_id_post_with_http_info(api_key, code_snippet_id, new_environment, async_req=True)
- >>> result = thread.get()
-
- :param api_key: (required)
- :type api_key: str
- :param code_snippet_id: (required)
- :type code_snippet_id: str
- :param new_environment: (required)
- :type new_environment: NewEnvironment
- :param async_req: Whether to execute the request asynchronously.
- :type async_req: bool, optional
- :param _preload_content: if False, the ApiResponse.data will
- be set to none and raw_data will store the
- HTTP response body without reading/decoding.
- Default is True.
- :type _preload_content: bool, optional
- :param _return_http_data_only: response data instead of ApiResponse
- object with status code, headers, etc
- :type _return_http_data_only: bool, optional
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :param _request_auth: set to override the auth_settings for an a single
- request; this effectively ignores the authentication
- in the spec for a single request.
- :type _request_auth: dict, optional
- :type _content_type: string, optional: force content-type for the request
- :return: Returns the result object.
- If the method is called asynchronously,
- returns the request thread.
- :rtype: None
- """
-
- _params = locals()
-
- _all_params = ["api_key", "code_snippet_id", "new_environment"]
- _all_params.extend(
- [
- "async_req",
- "_return_http_data_only",
- "_preload_content",
- "_request_timeout",
- "_request_auth",
- "_content_type",
- "_headers",
- ]
- )
-
- # validate the arguments
- for _key, _val in _params["kwargs"].items():
- if _key not in _all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method envs_code_snippet_id_post" % _key
- )
- _params[_key] = _val
- del _params["kwargs"]
-
- _collection_formats = {}
-
- # process the path parameters
- _path_params = {}
- if _params["code_snippet_id"]:
- _path_params["codeSnippetID"] = _params["code_snippet_id"]
-
- # process the query parameters
- _query_params = []
- if _params.get("api_key") is not None: # noqa: E501
- _query_params.append(("api_key", _params["api_key"]))
-
- # process the header parameters
- _header_params = dict(_params.get("_headers", {}))
- # process the form parameters
- _form_params = []
- _files = {}
- # process the body parameter
- _body_params = None
- if _params["new_environment"] is not None:
- _body_params = _params["new_environment"]
-
- # set the HTTP header `Accept`
- _header_params["Accept"] = self.api_client.select_header_accept(
- ["application/json"]
- ) # noqa: E501
-
- # set the HTTP header `Content-Type`
- _content_types_list = _params.get(
- "_content_type",
- self.api_client.select_header_content_type(["application/json"]),
- )
- if _content_types_list:
- _header_params["Content-Type"] = _content_types_list
-
- # authentication setting
- _auth_settings = [] # noqa: E501
-
- _response_types_map = {}
-
- return self.api_client.call_api(
- "/envs/{codeSnippetID}",
- "POST",
- _path_params,
- _query_params,
- _header_params,
- body=_body_params,
- post_params=_form_params,
- files=_files,
- response_types_map=_response_types_map,
- auth_settings=_auth_settings,
- async_req=_params.get("async_req"),
- _return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501
- _preload_content=_params.get("_preload_content", True),
- _request_timeout=_params.get("_request_timeout"),
- collection_formats=_collection_formats,
- _request_auth=_params.get("_request_auth"),
- )
-
- @validate_arguments
- def envs_code_snippet_id_state_put(
- self,
- api_key: StrictStr,
- code_snippet_id: StrictStr,
- environment_state_update: EnvironmentStateUpdate,
- **kwargs
- ) -> None: # noqa: E501
- """envs_code_snippet_id_state_put # noqa: E501
-
- Update the state of the environment # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.envs_code_snippet_id_state_put(api_key, code_snippet_id, environment_state_update, async_req=True)
- >>> result = thread.get()
-
- :param api_key: (required)
- :type api_key: str
- :param code_snippet_id: (required)
- :type code_snippet_id: str
- :param environment_state_update: (required)
- :type environment_state_update: EnvironmentStateUpdate
- :param async_req: Whether to execute the request asynchronously.
- :type async_req: bool, optional
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: Returns the result object.
- If the method is called asynchronously,
- returns the request thread.
- :rtype: None
- """
- kwargs["_return_http_data_only"] = True
- if "_preload_content" in kwargs:
- raise ValueError(
- "Error! Please call the envs_code_snippet_id_state_put_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data"
- )
- return self.envs_code_snippet_id_state_put_with_http_info(
- api_key, code_snippet_id, environment_state_update, **kwargs
- ) # noqa: E501
-
- @validate_arguments
- def envs_code_snippet_id_state_put_with_http_info(
- self,
- api_key: StrictStr,
- code_snippet_id: StrictStr,
- environment_state_update: EnvironmentStateUpdate,
- **kwargs
- ) -> ApiResponse: # noqa: E501
- """envs_code_snippet_id_state_put # noqa: E501
-
- Update the state of the environment # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.envs_code_snippet_id_state_put_with_http_info(api_key, code_snippet_id, environment_state_update, async_req=True)
- >>> result = thread.get()
-
- :param api_key: (required)
- :type api_key: str
- :param code_snippet_id: (required)
- :type code_snippet_id: str
- :param environment_state_update: (required)
- :type environment_state_update: EnvironmentStateUpdate
- :param async_req: Whether to execute the request asynchronously.
- :type async_req: bool, optional
- :param _preload_content: if False, the ApiResponse.data will
- be set to none and raw_data will store the
- HTTP response body without reading/decoding.
- Default is True.
- :type _preload_content: bool, optional
- :param _return_http_data_only: response data instead of ApiResponse
- object with status code, headers, etc
- :type _return_http_data_only: bool, optional
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :param _request_auth: set to override the auth_settings for an a single
- request; this effectively ignores the authentication
- in the spec for a single request.
- :type _request_auth: dict, optional
- :type _content_type: string, optional: force content-type for the request
- :return: Returns the result object.
- If the method is called asynchronously,
- returns the request thread.
- :rtype: None
- """
-
- _params = locals()
-
- _all_params = ["api_key", "code_snippet_id", "environment_state_update"]
- _all_params.extend(
- [
- "async_req",
- "_return_http_data_only",
- "_preload_content",
- "_request_timeout",
- "_request_auth",
- "_content_type",
- "_headers",
- ]
- )
-
- # validate the arguments
- for _key, _val in _params["kwargs"].items():
- if _key not in _all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method envs_code_snippet_id_state_put" % _key
- )
- _params[_key] = _val
- del _params["kwargs"]
-
- _collection_formats = {}
-
- # process the path parameters
- _path_params = {}
- if _params["code_snippet_id"]:
- _path_params["codeSnippetID"] = _params["code_snippet_id"]
-
- # process the query parameters
- _query_params = []
- if _params.get("api_key") is not None: # noqa: E501
- _query_params.append(("api_key", _params["api_key"]))
-
- # process the header parameters
- _header_params = dict(_params.get("_headers", {}))
- # process the form parameters
- _form_params = []
- _files = {}
- # process the body parameter
- _body_params = None
- if _params["environment_state_update"] is not None:
- _body_params = _params["environment_state_update"]
-
- # set the HTTP header `Accept`
- _header_params["Accept"] = self.api_client.select_header_accept(
- ["application/json"]
- ) # noqa: E501
-
- # set the HTTP header `Content-Type`
- _content_types_list = _params.get(
- "_content_type",
- self.api_client.select_header_content_type(["application/json"]),
- )
- if _content_types_list:
- _header_params["Content-Type"] = _content_types_list
-
- # authentication setting
- _auth_settings = [] # noqa: E501
-
- _response_types_map = {}
-
- return self.api_client.call_api(
- "/envs/{codeSnippetID}/state",
- "PUT",
- _path_params,
- _query_params,
- _header_params,
- body=_body_params,
- post_params=_form_params,
- files=_files,
- response_types_map=_response_types_map,
- auth_settings=_auth_settings,
- async_req=_params.get("async_req"),
- _return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501
- _preload_content=_params.get("_preload_content", True),
- _request_timeout=_params.get("_request_timeout"),
- collection_formats=_collection_formats,
- _request_auth=_params.get("_request_auth"),
- )
-
- @validate_arguments
- def envs_code_snippet_id_title_put(
- self,
- api_key: StrictStr,
- code_snippet_id: StrictStr,
- environment_title_update: EnvironmentTitleUpdate,
- **kwargs
- ) -> None: # noqa: E501
- """envs_code_snippet_id_title_put # noqa: E501
-
- Update the title of the environment # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.envs_code_snippet_id_title_put(api_key, code_snippet_id, environment_title_update, async_req=True)
- >>> result = thread.get()
-
- :param api_key: (required)
- :type api_key: str
- :param code_snippet_id: (required)
- :type code_snippet_id: str
- :param environment_title_update: (required)
- :type environment_title_update: EnvironmentTitleUpdate
- :param async_req: Whether to execute the request asynchronously.
- :type async_req: bool, optional
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: Returns the result object.
- If the method is called asynchronously,
- returns the request thread.
- :rtype: None
- """
- kwargs["_return_http_data_only"] = True
- if "_preload_content" in kwargs:
- raise ValueError(
- "Error! Please call the envs_code_snippet_id_title_put_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data"
- )
- return self.envs_code_snippet_id_title_put_with_http_info(
- api_key, code_snippet_id, environment_title_update, **kwargs
- ) # noqa: E501
-
- @validate_arguments
- def envs_code_snippet_id_title_put_with_http_info(
- self,
- api_key: StrictStr,
- code_snippet_id: StrictStr,
- environment_title_update: EnvironmentTitleUpdate,
- **kwargs
- ) -> ApiResponse: # noqa: E501
- """envs_code_snippet_id_title_put # noqa: E501
-
- Update the title of the environment # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.envs_code_snippet_id_title_put_with_http_info(api_key, code_snippet_id, environment_title_update, async_req=True)
- >>> result = thread.get()
-
- :param api_key: (required)
- :type api_key: str
- :param code_snippet_id: (required)
- :type code_snippet_id: str
- :param environment_title_update: (required)
- :type environment_title_update: EnvironmentTitleUpdate
- :param async_req: Whether to execute the request asynchronously.
- :type async_req: bool, optional
- :param _preload_content: if False, the ApiResponse.data will
- be set to none and raw_data will store the
- HTTP response body without reading/decoding.
- Default is True.
- :type _preload_content: bool, optional
- :param _return_http_data_only: response data instead of ApiResponse
- object with status code, headers, etc
- :type _return_http_data_only: bool, optional
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :param _request_auth: set to override the auth_settings for an a single
- request; this effectively ignores the authentication
- in the spec for a single request.
- :type _request_auth: dict, optional
- :type _content_type: string, optional: force content-type for the request
- :return: Returns the result object.
- If the method is called asynchronously,
- returns the request thread.
- :rtype: None
- """
-
- _params = locals()
-
- _all_params = ["api_key", "code_snippet_id", "environment_title_update"]
- _all_params.extend(
- [
- "async_req",
- "_return_http_data_only",
- "_preload_content",
- "_request_timeout",
- "_request_auth",
- "_content_type",
- "_headers",
- ]
- )
-
- # validate the arguments
- for _key, _val in _params["kwargs"].items():
- if _key not in _all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method envs_code_snippet_id_title_put" % _key
- )
- _params[_key] = _val
- del _params["kwargs"]
-
- _collection_formats = {}
-
- # process the path parameters
- _path_params = {}
- if _params["code_snippet_id"]:
- _path_params["codeSnippetID"] = _params["code_snippet_id"]
-
- # process the query parameters
- _query_params = []
- if _params.get("api_key") is not None: # noqa: E501
- _query_params.append(("api_key", _params["api_key"]))
-
- # process the header parameters
- _header_params = dict(_params.get("_headers", {}))
- # process the form parameters
- _form_params = []
- _files = {}
- # process the body parameter
- _body_params = None
- if _params["environment_title_update"] is not None:
- _body_params = _params["environment_title_update"]
-
- # set the HTTP header `Accept`
- _header_params["Accept"] = self.api_client.select_header_accept(
- ["application/json"]
- ) # noqa: E501
-
- # set the HTTP header `Content-Type`
- _content_types_list = _params.get(
- "_content_type",
- self.api_client.select_header_content_type(["application/json"]),
- )
- if _content_types_list:
- _header_params["Content-Type"] = _content_types_list
-
- # authentication setting
- _auth_settings = [] # noqa: E501
-
- _response_types_map = {}
-
- return self.api_client.call_api(
- "/envs/{codeSnippetID}/title",
- "PUT",
- _path_params,
- _query_params,
- _header_params,
- body=_body_params,
- post_params=_form_params,
- files=_files,
- response_types_map=_response_types_map,
- auth_settings=_auth_settings,
- async_req=_params.get("async_req"),
- _return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501
- _preload_content=_params.get("_preload_content", True),
- _request_timeout=_params.get("_request_timeout"),
- collection_formats=_collection_formats,
- _request_auth=_params.get("_request_auth"),
- )
-
- @validate_arguments
- def envs_get(
- self, api_key: StrictStr, **kwargs
- ) -> List[EnvsGet200ResponseInner]: # noqa: E501
- """envs_get # noqa: E501
-
- List all environments # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.envs_get(api_key, async_req=True)
- >>> result = thread.get()
-
- :param api_key: (required)
- :type api_key: str
- :param async_req: Whether to execute the request asynchronously.
- :type async_req: bool, optional
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: Returns the result object.
- If the method is called asynchronously,
- returns the request thread.
- :rtype: List[EnvsGet200ResponseInner]
- """
- kwargs["_return_http_data_only"] = True
- if "_preload_content" in kwargs:
- raise ValueError(
- "Error! Please call the envs_get_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data"
- )
- return self.envs_get_with_http_info(api_key, **kwargs) # noqa: E501
-
- @validate_arguments
- def envs_get_with_http_info(
- self, api_key: StrictStr, **kwargs
- ) -> ApiResponse: # noqa: E501
- """envs_get # noqa: E501
-
- List all environments # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.envs_get_with_http_info(api_key, async_req=True)
- >>> result = thread.get()
-
- :param api_key: (required)
- :type api_key: str
- :param async_req: Whether to execute the request asynchronously.
- :type async_req: bool, optional
- :param _preload_content: if False, the ApiResponse.data will
- be set to none and raw_data will store the
- HTTP response body without reading/decoding.
- Default is True.
- :type _preload_content: bool, optional
- :param _return_http_data_only: response data instead of ApiResponse
- object with status code, headers, etc
- :type _return_http_data_only: bool, optional
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :param _request_auth: set to override the auth_settings for an a single
- request; this effectively ignores the authentication
- in the spec for a single request.
- :type _request_auth: dict, optional
- :type _content_type: string, optional: force content-type for the request
- :return: Returns the result object.
- If the method is called asynchronously,
- returns the request thread.
- :rtype: tuple(List[EnvsGet200ResponseInner], status_code(int), headers(HTTPHeaderDict))
- """
-
- _params = locals()
-
- _all_params = ["api_key"]
- _all_params.extend(
- [
- "async_req",
- "_return_http_data_only",
- "_preload_content",
- "_request_timeout",
- "_request_auth",
- "_content_type",
- "_headers",
- ]
- )
-
- # validate the arguments
- for _key, _val in _params["kwargs"].items():
- if _key not in _all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method envs_get" % _key
- )
- _params[_key] = _val
- del _params["kwargs"]
-
- _collection_formats = {}
-
- # process the path parameters
- _path_params = {}
-
- # process the query parameters
- _query_params = []
- if _params.get("api_key") is not None: # noqa: E501
- _query_params.append(("api_key", _params["api_key"]))
-
- # process the header parameters
- _header_params = dict(_params.get("_headers", {}))
- # process the form parameters
- _form_params = []
- _files = {}
- # process the body parameter
- _body_params = None
- # set the HTTP header `Accept`
- _header_params["Accept"] = self.api_client.select_header_accept(
- ["application/json"]
- ) # noqa: E501
-
- # authentication setting
- _auth_settings = [] # noqa: E501
-
- _response_types_map = {
- "200": "List[EnvsGet200ResponseInner]",
- "401": "Error",
- "500": "Error",
- }
-
- return self.api_client.call_api(
- "/envs",
- "GET",
- _path_params,
- _query_params,
- _header_params,
- body=_body_params,
- post_params=_form_params,
- files=_files,
- response_types_map=_response_types_map,
- auth_settings=_auth_settings,
- async_req=_params.get("async_req"),
- _return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501
- _preload_content=_params.get("_preload_content", True),
- _request_timeout=_params.get("_request_timeout"),
- collection_formats=_collection_formats,
- _request_auth=_params.get("_request_auth"),
- )
-
- @validate_arguments
- def envs_post(
- self, api_key: StrictStr, new_environment: NewEnvironment, **kwargs
- ) -> Environment: # noqa: E501
- """envs_post # noqa: E501
-
- Create a new environment # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.envs_post(api_key, new_environment, async_req=True)
- >>> result = thread.get()
-
- :param api_key: (required)
- :type api_key: str
- :param new_environment: (required)
- :type new_environment: NewEnvironment
- :param async_req: Whether to execute the request asynchronously.
- :type async_req: bool, optional
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: Returns the result object.
- If the method is called asynchronously,
- returns the request thread.
- :rtype: Environment
- """
- kwargs["_return_http_data_only"] = True
- if "_preload_content" in kwargs:
- raise ValueError(
- "Error! Please call the envs_post_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data"
- )
- return self.envs_post_with_http_info(
- api_key, new_environment, **kwargs
- ) # noqa: E501
-
- @validate_arguments
- def envs_post_with_http_info(
- self, api_key: StrictStr, new_environment: NewEnvironment, **kwargs
- ) -> ApiResponse: # noqa: E501
- """envs_post # noqa: E501
-
- Create a new environment # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.envs_post_with_http_info(api_key, new_environment, async_req=True)
- >>> result = thread.get()
-
- :param api_key: (required)
- :type api_key: str
- :param new_environment: (required)
- :type new_environment: NewEnvironment
- :param async_req: Whether to execute the request asynchronously.
- :type async_req: bool, optional
- :param _preload_content: if False, the ApiResponse.data will
- be set to none and raw_data will store the
- HTTP response body without reading/decoding.
- Default is True.
- :type _preload_content: bool, optional
- :param _return_http_data_only: response data instead of ApiResponse
- object with status code, headers, etc
- :type _return_http_data_only: bool, optional
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :param _request_auth: set to override the auth_settings for an a single
- request; this effectively ignores the authentication
- in the spec for a single request.
- :type _request_auth: dict, optional
- :type _content_type: string, optional: force content-type for the request
- :return: Returns the result object.
- If the method is called asynchronously,
- returns the request thread.
- :rtype: tuple(Environment, status_code(int), headers(HTTPHeaderDict))
- """
-
- _params = locals()
-
- _all_params = ["api_key", "new_environment"]
- _all_params.extend(
- [
- "async_req",
- "_return_http_data_only",
- "_preload_content",
- "_request_timeout",
- "_request_auth",
- "_content_type",
- "_headers",
- ]
- )
-
- # validate the arguments
- for _key, _val in _params["kwargs"].items():
- if _key not in _all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method envs_post" % _key
- )
- _params[_key] = _val
- del _params["kwargs"]
-
- _collection_formats = {}
-
- # process the path parameters
- _path_params = {}
-
- # process the query parameters
- _query_params = []
- if _params.get("api_key") is not None: # noqa: E501
- _query_params.append(("api_key", _params["api_key"]))
-
- # process the header parameters
- _header_params = dict(_params.get("_headers", {}))
- # process the form parameters
- _form_params = []
- _files = {}
- # process the body parameter
- _body_params = None
- if _params["new_environment"] is not None:
- _body_params = _params["new_environment"]
-
- # set the HTTP header `Accept`
- _header_params["Accept"] = self.api_client.select_header_accept(
- ["application/json"]
- ) # noqa: E501
-
- # set the HTTP header `Content-Type`
- _content_types_list = _params.get(
- "_content_type",
- self.api_client.select_header_content_type(["application/json"]),
- )
- if _content_types_list:
- _header_params["Content-Type"] = _content_types_list
-
- # authentication setting
- _auth_settings = [] # noqa: E501
-
- _response_types_map = {
- "200": "Environment",
- "400": "Error",
- "401": "Error",
- "500": "Error",
- }
-
- return self.api_client.call_api(
- "/envs",
- "POST",
- _path_params,
- _query_params,
- _header_params,
- body=_body_params,
- post_params=_form_params,
- files=_files,
- response_types_map=_response_types_map,
- auth_settings=_auth_settings,
- async_req=_params.get("async_req"),
- _return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501
- _preload_content=_params.get("_preload_content", True),
- _request_timeout=_params.get("_request_timeout"),
- collection_formats=_collection_formats,
- _request_auth=_params.get("_request_auth"),
- )
diff --git a/packages/python-sdk/e2b/api/v1/client/api/instances_api.py b/packages/python-sdk/e2b/api/v1/client/api/instances_api.py
new file mode 100644
index 000000000..4f6c27273
--- /dev/null
+++ b/packages/python-sdk/e2b/api/v1/client/api/instances_api.py
@@ -0,0 +1,344 @@
+# coding: utf-8
+
+"""
+ E2B API
+
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
+
+ The version of the OpenAPI document: 0.1.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+"""
+
+
+import re # noqa: F401
+import io
+import warnings
+
+from pydantic import validate_arguments, ValidationError
+from typing_extensions import Annotated
+
+from pydantic import StrictStr
+
+from e2b.api.v1.client.models.instance import Instance
+from e2b.api.v1.client.models.new_instance import NewInstance
+
+from e2b.api.v1.client.api_client import ApiClient
+from e2b.api.v1.client.api_response import ApiResponse
+from e2b.api.v1.client.exceptions import ApiTypeError, ApiValueError # noqa: F401
+
+
+class InstancesApi(object):
+ """NOTE: This class is auto generated by OpenAPI Generator
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ def __init__(self, api_client=None):
+ if api_client is None:
+ api_client = ApiClient.get_default()
+ self.api_client = api_client
+
+ @validate_arguments
+ def instances_instance_id_refreshes_post(
+ self, instance_id: StrictStr, **kwargs
+ ) -> None: # noqa: E501
+ """instances_instance_id_refreshes_post # noqa: E501
+
+ Refresh the instance extending its time to live # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.instances_instance_id_refreshes_post(instance_id, async_req=True)
+ >>> result = thread.get()
+
+ :param instance_id: (required)
+ :type instance_id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: None
+ """
+ kwargs["_return_http_data_only"] = True
+ if "_preload_content" in kwargs:
+ raise ValueError(
+ "Error! Please call the instances_instance_id_refreshes_post_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data"
+ )
+ return self.instances_instance_id_refreshes_post_with_http_info(
+ instance_id, **kwargs
+ ) # noqa: E501
+
+ @validate_arguments
+ def instances_instance_id_refreshes_post_with_http_info(
+ self, instance_id: StrictStr, **kwargs
+ ) -> ApiResponse: # noqa: E501
+ """instances_instance_id_refreshes_post # noqa: E501
+
+ Refresh the instance extending its time to live # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.instances_instance_id_refreshes_post_with_http_info(instance_id, async_req=True)
+ >>> result = thread.get()
+
+ :param instance_id: (required)
+ :type instance_id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: None
+ """
+
+ _params = locals()
+
+ _all_params = ["instance_id"]
+ _all_params.extend(
+ [
+ "async_req",
+ "_return_http_data_only",
+ "_preload_content",
+ "_request_timeout",
+ "_request_auth",
+ "_content_type",
+ "_headers",
+ ]
+ )
+
+ # validate the arguments
+ for _key, _val in _params["kwargs"].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method instances_instance_id_refreshes_post" % _key
+ )
+ _params[_key] = _val
+ del _params["kwargs"]
+
+ _collection_formats = {}
+
+ # process the path parameters
+ _path_params = {}
+ if _params["instance_id"]:
+ _path_params["instanceID"] = _params["instance_id"]
+
+ # process the query parameters
+ _query_params = []
+ # process the header parameters
+ _header_params = dict(_params.get("_headers", {}))
+ # process the form parameters
+ _form_params = []
+ _files = {}
+ # process the body parameter
+ _body_params = None
+ # set the HTTP header `Accept`
+ _header_params["Accept"] = self.api_client.select_header_accept(
+ ["application/json"]
+ ) # noqa: E501
+
+ # authentication setting
+ _auth_settings = ["ApiKeyAuth"] # noqa: E501
+
+ _response_types_map = {}
+
+ return self.api_client.call_api(
+ "/instances/{instanceID}/refreshes",
+ "POST",
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ response_types_map=_response_types_map,
+ auth_settings=_auth_settings,
+ async_req=_params.get("async_req"),
+ _return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501
+ _preload_content=_params.get("_preload_content", True),
+ _request_timeout=_params.get("_request_timeout"),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get("_request_auth"),
+ )
+
+ @validate_arguments
+ def instances_post(
+ self, new_instance: NewInstance, **kwargs
+ ) -> Instance: # noqa: E501
+ """instances_post # noqa: E501
+
+ Create an instance from the environment # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.instances_post(new_instance, async_req=True)
+ >>> result = thread.get()
+
+ :param new_instance: (required)
+ :type new_instance: NewInstance
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: Instance
+ """
+ kwargs["_return_http_data_only"] = True
+ if "_preload_content" in kwargs:
+ raise ValueError(
+ "Error! Please call the instances_post_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data"
+ )
+ return self.instances_post_with_http_info(new_instance, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def instances_post_with_http_info(
+ self, new_instance: NewInstance, **kwargs
+ ) -> ApiResponse: # noqa: E501
+ """instances_post # noqa: E501
+
+ Create an instance from the environment # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.instances_post_with_http_info(new_instance, async_req=True)
+ >>> result = thread.get()
+
+ :param new_instance: (required)
+ :type new_instance: NewInstance
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(Instance, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ _params = locals()
+
+ _all_params = ["new_instance"]
+ _all_params.extend(
+ [
+ "async_req",
+ "_return_http_data_only",
+ "_preload_content",
+ "_request_timeout",
+ "_request_auth",
+ "_content_type",
+ "_headers",
+ ]
+ )
+
+ # validate the arguments
+ for _key, _val in _params["kwargs"].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method instances_post" % _key
+ )
+ _params[_key] = _val
+ del _params["kwargs"]
+
+ _collection_formats = {}
+
+ # process the path parameters
+ _path_params = {}
+
+ # process the query parameters
+ _query_params = []
+ # process the header parameters
+ _header_params = dict(_params.get("_headers", {}))
+ # process the form parameters
+ _form_params = []
+ _files = {}
+ # process the body parameter
+ _body_params = None
+ if _params["new_instance"] is not None:
+ _body_params = _params["new_instance"]
+
+ # set the HTTP header `Accept`
+ _header_params["Accept"] = self.api_client.select_header_accept(
+ ["application/json"]
+ ) # noqa: E501
+
+ # set the HTTP header `Content-Type`
+ _content_types_list = _params.get(
+ "_content_type",
+ self.api_client.select_header_content_type(["application/json"]),
+ )
+ if _content_types_list:
+ _header_params["Content-Type"] = _content_types_list
+
+ # authentication setting
+ _auth_settings = ["ApiKeyAuth"] # noqa: E501
+
+ _response_types_map = {
+ "201": "Instance",
+ "401": "Error",
+ "400": "Error",
+ "500": "Error",
+ }
+
+ return self.api_client.call_api(
+ "/instances",
+ "POST",
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ response_types_map=_response_types_map,
+ auth_settings=_auth_settings,
+ async_req=_params.get("async_req"),
+ _return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501
+ _preload_content=_params.get("_preload_content", True),
+ _request_timeout=_params.get("_request_timeout"),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get("_request_auth"),
+ )
diff --git a/packages/python-sdk/e2b/api/v1/client/api/sessions_api.py b/packages/python-sdk/e2b/api/v1/client/api/sessions_api.py
deleted file mode 100644
index 835830e7d..000000000
--- a/packages/python-sdk/e2b/api/v1/client/api/sessions_api.py
+++ /dev/null
@@ -1,665 +0,0 @@
-# coding: utf-8
-
-"""
- Devbook
-
- Devbook API # noqa: E501
-
- The version of the OpenAPI document: 1.0.0
- Generated by OpenAPI Generator (https://openapi-generator.tech)
-
- Do not edit the class manually.
-"""
-
-
-import re # noqa: F401
-import io
-import warnings
-
-from pydantic import validate_arguments, ValidationError
-from typing_extensions import Annotated
-
-from pydantic import StrictStr
-
-from typing import List, Optional
-
-from e2b.api.v1.client.models.new_session import NewSession
-from e2b.api.v1.client.models.session import Session
-from e2b.api.v1.client.models.sessions_get200_response_inner import (
- SessionsGet200ResponseInner,
-)
-
-from e2b.api.v1.client.api_client import ApiClient
-from e2b.api.v1.client.api_response import ApiResponse
-from e2b.api.v1.client.exceptions import ApiTypeError, ApiValueError # noqa: F401
-
-
-class SessionsApi(object):
- """NOTE: This class is auto generated by OpenAPI Generator
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- def __init__(self, api_client=None):
- if api_client is None:
- api_client = ApiClient.get_default()
- self.api_client = api_client
-
- @validate_arguments
- def sessions_get(
- self, api_key: StrictStr, **kwargs
- ) -> List[SessionsGet200ResponseInner]: # noqa: E501
- """sessions_get # noqa: E501
-
- List all sessions # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.sessions_get(api_key, async_req=True)
- >>> result = thread.get()
-
- :param api_key: (required)
- :type api_key: str
- :param async_req: Whether to execute the request asynchronously.
- :type async_req: bool, optional
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: Returns the result object.
- If the method is called asynchronously,
- returns the request thread.
- :rtype: List[SessionsGet200ResponseInner]
- """
- kwargs["_return_http_data_only"] = True
- if "_preload_content" in kwargs:
- raise ValueError(
- "Error! Please call the sessions_get_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data"
- )
- return self.sessions_get_with_http_info(api_key, **kwargs) # noqa: E501
-
- @validate_arguments
- def sessions_get_with_http_info(
- self, api_key: StrictStr, **kwargs
- ) -> ApiResponse: # noqa: E501
- """sessions_get # noqa: E501
-
- List all sessions # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.sessions_get_with_http_info(api_key, async_req=True)
- >>> result = thread.get()
-
- :param api_key: (required)
- :type api_key: str
- :param async_req: Whether to execute the request asynchronously.
- :type async_req: bool, optional
- :param _preload_content: if False, the ApiResponse.data will
- be set to none and raw_data will store the
- HTTP response body without reading/decoding.
- Default is True.
- :type _preload_content: bool, optional
- :param _return_http_data_only: response data instead of ApiResponse
- object with status code, headers, etc
- :type _return_http_data_only: bool, optional
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :param _request_auth: set to override the auth_settings for an a single
- request; this effectively ignores the authentication
- in the spec for a single request.
- :type _request_auth: dict, optional
- :type _content_type: string, optional: force content-type for the request
- :return: Returns the result object.
- If the method is called asynchronously,
- returns the request thread.
- :rtype: tuple(List[SessionsGet200ResponseInner], status_code(int), headers(HTTPHeaderDict))
- """
-
- _params = locals()
-
- _all_params = ["api_key"]
- _all_params.extend(
- [
- "async_req",
- "_return_http_data_only",
- "_preload_content",
- "_request_timeout",
- "_request_auth",
- "_content_type",
- "_headers",
- ]
- )
-
- # validate the arguments
- for _key, _val in _params["kwargs"].items():
- if _key not in _all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method sessions_get" % _key
- )
- _params[_key] = _val
- del _params["kwargs"]
-
- _collection_formats = {}
-
- # process the path parameters
- _path_params = {}
-
- # process the query parameters
- _query_params = []
- if _params.get("api_key") is not None: # noqa: E501
- _query_params.append(("api_key", _params["api_key"]))
-
- # process the header parameters
- _header_params = dict(_params.get("_headers", {}))
- # process the form parameters
- _form_params = []
- _files = {}
- # process the body parameter
- _body_params = None
- # set the HTTP header `Accept`
- _header_params["Accept"] = self.api_client.select_header_accept(
- ["application/json"]
- ) # noqa: E501
-
- # authentication setting
- _auth_settings = [] # noqa: E501
-
- _response_types_map = {
- "200": "List[SessionsGet200ResponseInner]",
- "401": "Error",
- "500": "Error",
- }
-
- return self.api_client.call_api(
- "/sessions",
- "GET",
- _path_params,
- _query_params,
- _header_params,
- body=_body_params,
- post_params=_form_params,
- files=_files,
- response_types_map=_response_types_map,
- auth_settings=_auth_settings,
- async_req=_params.get("async_req"),
- _return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501
- _preload_content=_params.get("_preload_content", True),
- _request_timeout=_params.get("_request_timeout"),
- collection_formats=_collection_formats,
- _request_auth=_params.get("_request_auth"),
- )
-
- @validate_arguments
- def sessions_post(
- self, new_session: NewSession, api_key: Optional[StrictStr] = None, **kwargs
- ) -> Session: # noqa: E501
- """sessions_post # noqa: E501
-
- Create a session on the server # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.sessions_post(new_session, api_key, async_req=True)
- >>> result = thread.get()
-
- :param new_session: (required)
- :type new_session: NewSession
- :param api_key:
- :type api_key: str
- :param async_req: Whether to execute the request asynchronously.
- :type async_req: bool, optional
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: Returns the result object.
- If the method is called asynchronously,
- returns the request thread.
- :rtype: Session
- """
- kwargs["_return_http_data_only"] = True
- if "_preload_content" in kwargs:
- raise ValueError(
- "Error! Please call the sessions_post_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data"
- )
- return self.sessions_post_with_http_info(
- new_session, api_key, **kwargs
- ) # noqa: E501
-
- @validate_arguments
- def sessions_post_with_http_info(
- self, new_session: NewSession, api_key: Optional[StrictStr] = None, **kwargs
- ) -> ApiResponse: # noqa: E501
- """sessions_post # noqa: E501
-
- Create a session on the server # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.sessions_post_with_http_info(new_session, api_key, async_req=True)
- >>> result = thread.get()
-
- :param new_session: (required)
- :type new_session: NewSession
- :param api_key:
- :type api_key: str
- :param async_req: Whether to execute the request asynchronously.
- :type async_req: bool, optional
- :param _preload_content: if False, the ApiResponse.data will
- be set to none and raw_data will store the
- HTTP response body without reading/decoding.
- Default is True.
- :type _preload_content: bool, optional
- :param _return_http_data_only: response data instead of ApiResponse
- object with status code, headers, etc
- :type _return_http_data_only: bool, optional
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :param _request_auth: set to override the auth_settings for an a single
- request; this effectively ignores the authentication
- in the spec for a single request.
- :type _request_auth: dict, optional
- :type _content_type: string, optional: force content-type for the request
- :return: Returns the result object.
- If the method is called asynchronously,
- returns the request thread.
- :rtype: tuple(Session, status_code(int), headers(HTTPHeaderDict))
- """
-
- _params = locals()
-
- _all_params = ["new_session", "api_key"]
- _all_params.extend(
- [
- "async_req",
- "_return_http_data_only",
- "_preload_content",
- "_request_timeout",
- "_request_auth",
- "_content_type",
- "_headers",
- ]
- )
-
- # validate the arguments
- for _key, _val in _params["kwargs"].items():
- if _key not in _all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method sessions_post" % _key
- )
- _params[_key] = _val
- del _params["kwargs"]
-
- _collection_formats = {}
-
- # process the path parameters
- _path_params = {}
-
- # process the query parameters
- _query_params = []
- if _params.get("api_key") is not None: # noqa: E501
- _query_params.append(("api_key", _params["api_key"]))
-
- # process the header parameters
- _header_params = dict(_params.get("_headers", {}))
- # process the form parameters
- _form_params = []
- _files = {}
- # process the body parameter
- _body_params = None
- if _params["new_session"] is not None:
- _body_params = _params["new_session"]
-
- # set the HTTP header `Accept`
- _header_params["Accept"] = self.api_client.select_header_accept(
- ["application/json"]
- ) # noqa: E501
-
- # set the HTTP header `Content-Type`
- _content_types_list = _params.get(
- "_content_type",
- self.api_client.select_header_content_type(["application/json"]),
- )
- if _content_types_list:
- _header_params["Content-Type"] = _content_types_list
-
- # authentication setting
- _auth_settings = [] # noqa: E501
-
- _response_types_map = {
- "201": "Session",
- "401": "Error",
- "400": "Error",
- "500": "Error",
- }
-
- return self.api_client.call_api(
- "/sessions",
- "POST",
- _path_params,
- _query_params,
- _header_params,
- body=_body_params,
- post_params=_form_params,
- files=_files,
- response_types_map=_response_types_map,
- auth_settings=_auth_settings,
- async_req=_params.get("async_req"),
- _return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501
- _preload_content=_params.get("_preload_content", True),
- _request_timeout=_params.get("_request_timeout"),
- collection_formats=_collection_formats,
- _request_auth=_params.get("_request_auth"),
- )
-
- @validate_arguments
- def sessions_session_id_delete(
- self, api_key: StrictStr, session_id: StrictStr, **kwargs
- ) -> None: # noqa: E501
- """sessions_session_id_delete # noqa: E501
-
- Delete a session on the server # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.sessions_session_id_delete(api_key, session_id, async_req=True)
- >>> result = thread.get()
-
- :param api_key: (required)
- :type api_key: str
- :param session_id: (required)
- :type session_id: str
- :param async_req: Whether to execute the request asynchronously.
- :type async_req: bool, optional
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: Returns the result object.
- If the method is called asynchronously,
- returns the request thread.
- :rtype: None
- """
- kwargs["_return_http_data_only"] = True
- if "_preload_content" in kwargs:
- raise ValueError(
- "Error! Please call the sessions_session_id_delete_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data"
- )
- return self.sessions_session_id_delete_with_http_info(
- api_key, session_id, **kwargs
- ) # noqa: E501
-
- @validate_arguments
- def sessions_session_id_delete_with_http_info(
- self, api_key: StrictStr, session_id: StrictStr, **kwargs
- ) -> ApiResponse: # noqa: E501
- """sessions_session_id_delete # noqa: E501
-
- Delete a session on the server # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.sessions_session_id_delete_with_http_info(api_key, session_id, async_req=True)
- >>> result = thread.get()
-
- :param api_key: (required)
- :type api_key: str
- :param session_id: (required)
- :type session_id: str
- :param async_req: Whether to execute the request asynchronously.
- :type async_req: bool, optional
- :param _preload_content: if False, the ApiResponse.data will
- be set to none and raw_data will store the
- HTTP response body without reading/decoding.
- Default is True.
- :type _preload_content: bool, optional
- :param _return_http_data_only: response data instead of ApiResponse
- object with status code, headers, etc
- :type _return_http_data_only: bool, optional
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :param _request_auth: set to override the auth_settings for an a single
- request; this effectively ignores the authentication
- in the spec for a single request.
- :type _request_auth: dict, optional
- :type _content_type: string, optional: force content-type for the request
- :return: Returns the result object.
- If the method is called asynchronously,
- returns the request thread.
- :rtype: None
- """
-
- _params = locals()
-
- _all_params = ["api_key", "session_id"]
- _all_params.extend(
- [
- "async_req",
- "_return_http_data_only",
- "_preload_content",
- "_request_timeout",
- "_request_auth",
- "_content_type",
- "_headers",
- ]
- )
-
- # validate the arguments
- for _key, _val in _params["kwargs"].items():
- if _key not in _all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method sessions_session_id_delete" % _key
- )
- _params[_key] = _val
- del _params["kwargs"]
-
- _collection_formats = {}
-
- # process the path parameters
- _path_params = {}
- if _params["session_id"]:
- _path_params["sessionID"] = _params["session_id"]
-
- # process the query parameters
- _query_params = []
- if _params.get("api_key") is not None: # noqa: E501
- _query_params.append(("api_key", _params["api_key"]))
-
- # process the header parameters
- _header_params = dict(_params.get("_headers", {}))
- # process the form parameters
- _form_params = []
- _files = {}
- # process the body parameter
- _body_params = None
- # set the HTTP header `Accept`
- _header_params["Accept"] = self.api_client.select_header_accept(
- ["application/json"]
- ) # noqa: E501
-
- # authentication setting
- _auth_settings = [] # noqa: E501
-
- _response_types_map = {}
-
- return self.api_client.call_api(
- "/sessions/{sessionID}",
- "DELETE",
- _path_params,
- _query_params,
- _header_params,
- body=_body_params,
- post_params=_form_params,
- files=_files,
- response_types_map=_response_types_map,
- auth_settings=_auth_settings,
- async_req=_params.get("async_req"),
- _return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501
- _preload_content=_params.get("_preload_content", True),
- _request_timeout=_params.get("_request_timeout"),
- collection_formats=_collection_formats,
- _request_auth=_params.get("_request_auth"),
- )
-
- @validate_arguments
- def sessions_session_id_refresh_post(
- self, session_id: StrictStr, api_key: Optional[StrictStr] = None, **kwargs
- ) -> None: # noqa: E501
- """sessions_session_id_refresh_post # noqa: E501
-
- Refresh the session extending its time to live # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.sessions_session_id_refresh_post(session_id, api_key, async_req=True)
- >>> result = thread.get()
-
- :param session_id: (required)
- :type session_id: str
- :param api_key:
- :type api_key: str
- :param async_req: Whether to execute the request asynchronously.
- :type async_req: bool, optional
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: Returns the result object.
- If the method is called asynchronously,
- returns the request thread.
- :rtype: None
- """
- kwargs["_return_http_data_only"] = True
- if "_preload_content" in kwargs:
- raise ValueError(
- "Error! Please call the sessions_session_id_refresh_post_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data"
- )
- return self.sessions_session_id_refresh_post_with_http_info(
- session_id, api_key, **kwargs
- ) # noqa: E501
-
- @validate_arguments
- def sessions_session_id_refresh_post_with_http_info(
- self, session_id: StrictStr, api_key: Optional[StrictStr] = None, **kwargs
- ) -> ApiResponse: # noqa: E501
- """sessions_session_id_refresh_post # noqa: E501
-
- Refresh the session extending its time to live # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.sessions_session_id_refresh_post_with_http_info(session_id, api_key, async_req=True)
- >>> result = thread.get()
-
- :param session_id: (required)
- :type session_id: str
- :param api_key:
- :type api_key: str
- :param async_req: Whether to execute the request asynchronously.
- :type async_req: bool, optional
- :param _preload_content: if False, the ApiResponse.data will
- be set to none and raw_data will store the
- HTTP response body without reading/decoding.
- Default is True.
- :type _preload_content: bool, optional
- :param _return_http_data_only: response data instead of ApiResponse
- object with status code, headers, etc
- :type _return_http_data_only: bool, optional
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :param _request_auth: set to override the auth_settings for an a single
- request; this effectively ignores the authentication
- in the spec for a single request.
- :type _request_auth: dict, optional
- :type _content_type: string, optional: force content-type for the request
- :return: Returns the result object.
- If the method is called asynchronously,
- returns the request thread.
- :rtype: None
- """
-
- _params = locals()
-
- _all_params = ["session_id", "api_key"]
- _all_params.extend(
- [
- "async_req",
- "_return_http_data_only",
- "_preload_content",
- "_request_timeout",
- "_request_auth",
- "_content_type",
- "_headers",
- ]
- )
-
- # validate the arguments
- for _key, _val in _params["kwargs"].items():
- if _key not in _all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method sessions_session_id_refresh_post" % _key
- )
- _params[_key] = _val
- del _params["kwargs"]
-
- _collection_formats = {}
-
- # process the path parameters
- _path_params = {}
- if _params["session_id"]:
- _path_params["sessionID"] = _params["session_id"]
-
- # process the query parameters
- _query_params = []
- if _params.get("api_key") is not None: # noqa: E501
- _query_params.append(("api_key", _params["api_key"]))
-
- # process the header parameters
- _header_params = dict(_params.get("_headers", {}))
- # process the form parameters
- _form_params = []
- _files = {}
- # process the body parameter
- _body_params = None
- # set the HTTP header `Accept`
- _header_params["Accept"] = self.api_client.select_header_accept(
- ["application/json"]
- ) # noqa: E501
-
- # authentication setting
- _auth_settings = [] # noqa: E501
-
- _response_types_map = {}
-
- return self.api_client.call_api(
- "/sessions/{sessionID}/refresh",
- "POST",
- _path_params,
- _query_params,
- _header_params,
- body=_body_params,
- post_params=_form_params,
- files=_files,
- response_types_map=_response_types_map,
- auth_settings=_auth_settings,
- async_req=_params.get("async_req"),
- _return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501
- _preload_content=_params.get("_preload_content", True),
- _request_timeout=_params.get("_request_timeout"),
- collection_formats=_collection_formats,
- _request_auth=_params.get("_request_auth"),
- )
diff --git a/packages/python-sdk/e2b/api/v1/client/api_client.py b/packages/python-sdk/e2b/api/v1/client/api_client.py
index 523285a1c..c2697b3c6 100644
--- a/packages/python-sdk/e2b/api/v1/client/api_client.py
+++ b/packages/python-sdk/e2b/api/v1/client/api_client.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Devbook
+ E2B API
- Devbook API # noqa: E501
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: 1.0.0
+ The version of the OpenAPI document: 0.1.0
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
diff --git a/packages/python-sdk/e2b/api/v1/client/configuration.py b/packages/python-sdk/e2b/api/v1/client/configuration.py
index 9b5d72b64..20fc20e66 100644
--- a/packages/python-sdk/e2b/api/v1/client/configuration.py
+++ b/packages/python-sdk/e2b/api/v1/client/configuration.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Devbook
+ E2B API
- Devbook API # noqa: E501
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: 1.0.0
+ The version of the OpenAPI document: 0.1.0
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@@ -100,7 +100,7 @@ class Configuration(object):
ssl_ca_cert=None,
):
"""Constructor"""
- self._base_path = "https://ondevbook.com" if host is None else host
+ self._base_path = "https://api.e2b.dev" if host is None else host
"""Default Base url
"""
self.server_index = 0 if server_index is None and host is None else server_index
@@ -137,6 +137,9 @@ class Configuration(object):
self.access_token = access_token
"""Access token
"""
+ self.access_token = None
+ """access token for OAuth/Bearer
+ """
self.logger = {}
"""Logging Settings
"""
@@ -395,12 +398,20 @@ class Configuration(object):
if "ApiKeyAuth" in self.api_key:
auth["ApiKeyAuth"] = {
"type": "api_key",
- "in": "query",
- "key": "api_key",
+ "in": "header",
+ "key": "X-API-Key",
"value": self.get_api_key_with_prefix(
"ApiKeyAuth",
),
}
+ if self.access_token is not None:
+ auth["AccessTokenAuth"] = {
+ "type": "bearer",
+ "in": "header",
+ "format": "access_token",
+ "key": "Authorization",
+ "value": "Bearer " + self.access_token,
+ }
return auth
def to_debug_report(self):
@@ -412,7 +423,7 @@ class Configuration(object):
"Python SDK Debug Report:\n"
"OS: {env}\n"
"Python Version: {pyversion}\n"
- "Version of the API: 1.0.0\n"
+ "Version of the API: 0.1.0\n"
"SDK Package Version: 1.0.0".format(env=sys.platform, pyversion=sys.version)
)
@@ -423,41 +434,9 @@ class Configuration(object):
"""
return [
{
- "url": "https://ondevbook.com",
- "description": "API endpoint",
- },
- {
- "url": "https://{sessionID}-{clientID}.ondevbook.com",
- "description": "Session endpoint without a specified port",
- "variables": {
- "sessionID": {
- "description": "ID of the session",
- "default_value": "_sessionID",
- },
- "clientID": {
- "description": "ID of the client",
- "default_value": "_clientID",
- },
- },
- },
- {
- "url": "https://{port}-{sessionID}-{clientID}.ondevbook.com",
- "description": "Session endpoint with a specificed port",
- "variables": {
- "sessionID": {
- "description": "ID of the session",
- "default_value": "_sessionID",
- },
- "clientID": {
- "description": "ID of the client",
- "default_value": "_clientID",
- },
- "port": {
- "description": "Devbook Daemon default port",
- "default_value": "49982",
- },
- },
- },
+ "url": "https://api.e2b.dev",
+ "description": "No description provided",
+ }
]
def get_host_from_settings(self, index, variables=None, servers=None):
diff --git a/packages/python-sdk/e2b/api/v1/client/exceptions.py b/packages/python-sdk/e2b/api/v1/client/exceptions.py
index 442c03e60..adb1ca56c 100644
--- a/packages/python-sdk/e2b/api/v1/client/exceptions.py
+++ b/packages/python-sdk/e2b/api/v1/client/exceptions.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Devbook
+ E2B API
- Devbook API # noqa: E501
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: 1.0.0
+ The version of the OpenAPI document: 0.1.0
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
diff --git a/packages/python-sdk/e2b/api/v1/client/models/__init__.py b/packages/python-sdk/e2b/api/v1/client/models/__init__.py
index 964598998..7ddc00420 100644
--- a/packages/python-sdk/e2b/api/v1/client/models/__init__.py
+++ b/packages/python-sdk/e2b/api/v1/client/models/__init__.py
@@ -2,11 +2,11 @@
# flake8: noqa
"""
- Devbook
+ E2B API
- Devbook API # noqa: E501
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: 1.0.0
+ The version of the OpenAPI document: 0.1.0
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@@ -15,15 +15,11 @@
# import models into model package
from e2b.api.v1.client.models.environment import Environment
-from e2b.api.v1.client.models.environment_state import EnvironmentState
-from e2b.api.v1.client.models.environment_state_update import EnvironmentStateUpdate
-from e2b.api.v1.client.models.environment_title_update import EnvironmentTitleUpdate
+from e2b.api.v1.client.models.environment_build import EnvironmentBuild
+from e2b.api.v1.client.models.envs_env_id_builds_build_id_logs_post_request import (
+ EnvsEnvIDBuildsBuildIDLogsPostRequest,
+)
from e2b.api.v1.client.models.envs_get200_response_inner import EnvsGet200ResponseInner
from e2b.api.v1.client.models.error import Error
-from e2b.api.v1.client.models.new_environment import NewEnvironment
-from e2b.api.v1.client.models.new_session import NewSession
-from e2b.api.v1.client.models.session import Session
-from e2b.api.v1.client.models.sessions_get200_response_inner import (
- SessionsGet200ResponseInner,
-)
-from e2b.api.v1.client.models.template import Template
+from e2b.api.v1.client.models.instance import Instance
+from e2b.api.v1.client.models.new_instance import NewInstance
diff --git a/packages/python-sdk/e2b/api/v1/client/models/environment.py b/packages/python-sdk/e2b/api/v1/client/models/environment.py
index 42b722466..c165bf4cd 100644
--- a/packages/python-sdk/e2b/api/v1/client/models/environment.py
+++ b/packages/python-sdk/e2b/api/v1/client/models/environment.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Devbook
+ E2B API
- Devbook API # noqa: E501
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: 1.0.0
+ The version of the OpenAPI document: 0.1.0
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@@ -18,8 +18,7 @@ import re # noqa: F401
import json
-from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, StrictBool, StrictStr
class Environment(BaseModel):
@@ -27,10 +26,19 @@ class Environment(BaseModel):
Environment
"""
- id: StrictStr = Field(...)
- template: Optional[StrictStr] = None
- title: Optional[StrictStr] = None
- __properties = ["id", "template", "title"]
+ env_id: StrictStr = Field(
+ ..., alias="envID", description="Identifier of the environment"
+ )
+ build_id: StrictStr = Field(
+ ...,
+ alias="buildID",
+ description="Identifier of the last successful build for given environment",
+ )
+ public: StrictBool = Field(
+ ...,
+ description="Whether the environment is public or only accessible by the team",
+ )
+ __properties = ["envID", "buildID", "public"]
class Config:
"""Pydantic configuration"""
@@ -75,9 +83,9 @@ class Environment(BaseModel):
_obj = Environment.parse_obj(
{
- "id": obj.get("id"),
- "template": obj.get("template"),
- "title": obj.get("title"),
+ "env_id": obj.get("envID"),
+ "build_id": obj.get("buildID"),
+ "public": obj.get("public"),
}
)
return _obj
diff --git a/packages/python-sdk/e2b/api/v1/client/models/environment_build.py b/packages/python-sdk/e2b/api/v1/client/models/environment_build.py
new file mode 100644
index 000000000..9e59af76c
--- /dev/null
+++ b/packages/python-sdk/e2b/api/v1/client/models/environment_build.py
@@ -0,0 +1,101 @@
+# coding: utf-8
+
+"""
+ E2B API
+
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
+
+ The version of the OpenAPI document: 0.1.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+"""
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import List, Optional
+from pydantic import BaseModel, Field, StrictStr, conlist, validator
+
+
+class EnvironmentBuild(BaseModel):
+ """
+ EnvironmentBuild
+ """
+
+ logs: conlist(StrictStr) = Field(..., description="Build logs")
+ env_id: StrictStr = Field(
+ ..., alias="envID", description="Identifier of the environment"
+ )
+ build_id: StrictStr = Field(
+ ..., alias="buildID", description="Identifier of the build"
+ )
+ status: Optional[StrictStr] = Field(None, description="Status of the environment")
+ __properties = ["logs", "envID", "buildID", "status"]
+
+ @validator("status")
+ def status_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in ("building", "ready", "error"):
+ raise ValueError(
+ "must be one of enum values ('building', 'ready', 'error')"
+ )
+ return value
+
+ class Config:
+ """Pydantic configuration"""
+
+ allow_population_by_field_name = True
+ validate_assignment = True
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.dict(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> EnvironmentBuild:
+ """Create an instance of EnvironmentBuild from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True, exclude={}, exclude_none=True)
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: dict) -> EnvironmentBuild:
+ """Create an instance of EnvironmentBuild from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return EnvironmentBuild.parse_obj(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError(
+ "Error due to additional fields (not defined in EnvironmentBuild) in the input: "
+ + obj
+ )
+
+ _obj = EnvironmentBuild.parse_obj(
+ {
+ "logs": obj.get("logs"),
+ "env_id": obj.get("envID"),
+ "build_id": obj.get("buildID"),
+ "status": obj.get("status"),
+ }
+ )
+ return _obj
diff --git a/packages/python-sdk/e2b/api/v1/client/models/environment_state.py b/packages/python-sdk/e2b/api/v1/client/models/environment_state.py
deleted file mode 100644
index 0674e93a0..000000000
--- a/packages/python-sdk/e2b/api/v1/client/models/environment_state.py
+++ /dev/null
@@ -1,36 +0,0 @@
-# coding: utf-8
-
-"""
- Devbook
-
- Devbook API # noqa: E501
-
- The version of the OpenAPI document: 1.0.0
- Generated by OpenAPI Generator (https://openapi-generator.tech)
-
- Do not edit the class manually.
-"""
-
-
-import json
-import pprint
-import re # noqa: F401
-from aenum import Enum, no_arg
-
-
-class EnvironmentState(str, Enum):
- """
- EnvironmentState
- """
-
- """
- allowed enum values
- """
- BUILDING = "Building"
- FAILED = "Failed"
- DONE = "Done"
-
- @classmethod
- def from_json(cls, json_str: str) -> EnvironmentState:
- """Create an instance of EnvironmentState from a JSON string"""
- return EnvironmentState(json.loads(json_str))
diff --git a/packages/python-sdk/e2b/api/v1/client/models/environment_state_update.py b/packages/python-sdk/e2b/api/v1/client/models/environment_state_update.py
deleted file mode 100644
index 84adc9f33..000000000
--- a/packages/python-sdk/e2b/api/v1/client/models/environment_state_update.py
+++ /dev/null
@@ -1,75 +0,0 @@
-# coding: utf-8
-
-"""
- Devbook
-
- Devbook API # noqa: E501
-
- The version of the OpenAPI document: 1.0.0
- Generated by OpenAPI Generator (https://openapi-generator.tech)
-
- Do not edit the class manually.
-"""
-
-
-from __future__ import annotations
-import pprint
-import re # noqa: F401
-import json
-
-
-from pydantic import BaseModel, Field
-from e2b.api.v1.client.models.environment_state import EnvironmentState
-
-
-class EnvironmentStateUpdate(BaseModel):
- """
- EnvironmentStateUpdate
- """
-
- state: EnvironmentState = Field(...)
- __properties = ["state"]
-
- class Config:
- """Pydantic configuration"""
-
- allow_population_by_field_name = True
- validate_assignment = True
-
- def to_str(self) -> str:
- """Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
-
- def to_json(self) -> str:
- """Returns the JSON representation of the model using alias"""
- return json.dumps(self.to_dict())
-
- @classmethod
- def from_json(cls, json_str: str) -> EnvironmentStateUpdate:
- """Create an instance of EnvironmentStateUpdate from a JSON string"""
- return cls.from_dict(json.loads(json_str))
-
- def to_dict(self):
- """Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True, exclude={}, exclude_none=True)
- return _dict
-
- @classmethod
- def from_dict(cls, obj: dict) -> EnvironmentStateUpdate:
- """Create an instance of EnvironmentStateUpdate from a dict"""
- if obj is None:
- return None
-
- if not isinstance(obj, dict):
- return EnvironmentStateUpdate.parse_obj(obj)
-
- # raise errors for additional fields in the input
- for _key in obj.keys():
- if _key not in cls.__properties:
- raise ValueError(
- "Error due to additional fields (not defined in EnvironmentStateUpdate) in the input: "
- + obj
- )
-
- _obj = EnvironmentStateUpdate.parse_obj({"state": obj.get("state")})
- return _obj
diff --git a/packages/python-sdk/e2b/api/v1/client/models/environment_title_update.py b/packages/python-sdk/e2b/api/v1/client/models/envs_env_id_builds_build_id_logs_post_request.py
similarity index 54%
rename from packages/python-sdk/e2b/api/v1/client/models/environment_title_update.py
rename to packages/python-sdk/e2b/api/v1/client/models/envs_env_id_builds_build_id_logs_post_request.py
index 4bee57af1..866998bda 100644
--- a/packages/python-sdk/e2b/api/v1/client/models/environment_title_update.py
+++ b/packages/python-sdk/e2b/api/v1/client/models/envs_env_id_builds_build_id_logs_post_request.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Devbook
+ E2B API
- Devbook API # noqa: E501
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: 1.0.0
+ The version of the OpenAPI document: 0.1.0
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@@ -18,17 +18,18 @@ import re # noqa: F401
import json
-from typing import Optional
-from pydantic import BaseModel, StrictStr
+from typing import List
+from pydantic import BaseModel, Field, StrictStr, conlist
-class EnvironmentTitleUpdate(BaseModel):
+class EnvsEnvIDBuildsBuildIDLogsPostRequest(BaseModel):
"""
- EnvironmentTitleUpdate
+ EnvsEnvIDBuildsBuildIDLogsPostRequest
"""
- title: Optional[StrictStr] = None
- __properties = ["title"]
+ api_secret: StrictStr = Field(..., alias="apiSecret", description="API secret")
+ logs: conlist(StrictStr) = Field(...)
+ __properties = ["apiSecret", "logs"]
class Config:
"""Pydantic configuration"""
@@ -45,8 +46,8 @@ class EnvironmentTitleUpdate(BaseModel):
return json.dumps(self.to_dict())
@classmethod
- def from_json(cls, json_str: str) -> EnvironmentTitleUpdate:
- """Create an instance of EnvironmentTitleUpdate from a JSON string"""
+ def from_json(cls, json_str: str) -> EnvsEnvIDBuildsBuildIDLogsPostRequest:
+ """Create an instance of EnvsEnvIDBuildsBuildIDLogsPostRequest from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self):
@@ -55,21 +56,23 @@ class EnvironmentTitleUpdate(BaseModel):
return _dict
@classmethod
- def from_dict(cls, obj: dict) -> EnvironmentTitleUpdate:
- """Create an instance of EnvironmentTitleUpdate from a dict"""
+ def from_dict(cls, obj: dict) -> EnvsEnvIDBuildsBuildIDLogsPostRequest:
+ """Create an instance of EnvsEnvIDBuildsBuildIDLogsPostRequest from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return EnvironmentTitleUpdate.parse_obj(obj)
+ return EnvsEnvIDBuildsBuildIDLogsPostRequest.parse_obj(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError(
- "Error due to additional fields (not defined in EnvironmentTitleUpdate) in the input: "
+ "Error due to additional fields (not defined in EnvsEnvIDBuildsBuildIDLogsPostRequest) in the input: "
+ obj
)
- _obj = EnvironmentTitleUpdate.parse_obj({"title": obj.get("title")})
+ _obj = EnvsEnvIDBuildsBuildIDLogsPostRequest.parse_obj(
+ {"api_secret": obj.get("apiSecret"), "logs": obj.get("logs")}
+ )
return _obj
diff --git a/packages/python-sdk/e2b/api/v1/client/models/envs_get200_response_inner.py b/packages/python-sdk/e2b/api/v1/client/models/envs_get200_response_inner.py
index 0596a79f2..867274bba 100644
--- a/packages/python-sdk/e2b/api/v1/client/models/envs_get200_response_inner.py
+++ b/packages/python-sdk/e2b/api/v1/client/models/envs_get200_response_inner.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Devbook
+ E2B API
- Devbook API # noqa: E501
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: 1.0.0
+ The version of the OpenAPI document: 0.1.0
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@@ -18,8 +18,7 @@ import re # noqa: F401
import json
-from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, StrictBool, StrictStr
class EnvsGet200ResponseInner(BaseModel):
@@ -27,10 +26,19 @@ class EnvsGet200ResponseInner(BaseModel):
EnvsGet200ResponseInner
"""
- id: StrictStr = Field(...)
- template: Optional[StrictStr] = None
- title: Optional[StrictStr] = None
- __properties = ["id", "template", "title"]
+ env_id: StrictStr = Field(
+ ..., alias="envID", description="Identifier of the environment"
+ )
+ build_id: StrictStr = Field(
+ ...,
+ alias="buildID",
+ description="Identifier of the last successful build for given environment",
+ )
+ public: StrictBool = Field(
+ ...,
+ description="Whether the environment is public or only accessible by the team",
+ )
+ __properties = ["envID", "buildID", "public"]
class Config:
"""Pydantic configuration"""
@@ -75,9 +83,9 @@ class EnvsGet200ResponseInner(BaseModel):
_obj = EnvsGet200ResponseInner.parse_obj(
{
- "id": obj.get("id"),
- "template": obj.get("template"),
- "title": obj.get("title"),
+ "env_id": obj.get("envID"),
+ "build_id": obj.get("buildID"),
+ "public": obj.get("public"),
}
)
return _obj
diff --git a/packages/python-sdk/e2b/api/v1/client/models/error.py b/packages/python-sdk/e2b/api/v1/client/models/error.py
index f5520fe65..6c960a15d 100644
--- a/packages/python-sdk/e2b/api/v1/client/models/error.py
+++ b/packages/python-sdk/e2b/api/v1/client/models/error.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Devbook
+ E2B API
- Devbook API # noqa: E501
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: 1.0.0
+ The version of the OpenAPI document: 0.1.0
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
diff --git a/packages/python-sdk/e2b/api/v1/client/models/session.py b/packages/python-sdk/e2b/api/v1/client/models/instance.py
similarity index 56%
rename from packages/python-sdk/e2b/api/v1/client/models/session.py
rename to packages/python-sdk/e2b/api/v1/client/models/instance.py
index caca7dd75..a9ba943d9 100644
--- a/packages/python-sdk/e2b/api/v1/client/models/session.py
+++ b/packages/python-sdk/e2b/api/v1/client/models/instance.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Devbook
+ E2B API
- Devbook API # noqa: E501
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: 1.0.0
+ The version of the OpenAPI document: 0.1.0
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@@ -18,31 +18,26 @@ import re # noqa: F401
import json
-from pydantic import BaseModel, Field, StrictBool, StrictStr
+from pydantic import BaseModel, Field, StrictStr
-class Session(BaseModel):
+class Instance(BaseModel):
"""
- Session
+ Instance
"""
- code_snippet_id: StrictStr = Field(
+ env_id: StrictStr = Field(
...,
- alias="codeSnippetID",
- description="Identifier of a code snippet which which is the environment associated",
+ alias="envID",
+ description="Identifier of the environment from which is the instance created",
)
- edit_enabled: StrictBool = Field(
- ...,
- alias="editEnabled",
- description="Information if the session is a shared persistent edit session",
- )
- session_id: StrictStr = Field(
- ..., alias="sessionID", description="Identifier of the session"
+ instance_id: StrictStr = Field(
+ ..., alias="instanceID", description="Identifier of the instance"
)
client_id: StrictStr = Field(
..., alias="clientID", description="Identifier of the client"
)
- __properties = ["codeSnippetID", "editEnabled", "sessionID", "clientID"]
+ __properties = ["envID", "instanceID", "clientID"]
class Config:
"""Pydantic configuration"""
@@ -59,8 +54,8 @@ class Session(BaseModel):
return json.dumps(self.to_dict())
@classmethod
- def from_json(cls, json_str: str) -> Session:
- """Create an instance of Session from a JSON string"""
+ def from_json(cls, json_str: str) -> Instance:
+ """Create an instance of Instance from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self):
@@ -69,27 +64,26 @@ class Session(BaseModel):
return _dict
@classmethod
- def from_dict(cls, obj: dict) -> Session:
- """Create an instance of Session from a dict"""
+ def from_dict(cls, obj: dict) -> Instance:
+ """Create an instance of Instance from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return Session.parse_obj(obj)
+ return Instance.parse_obj(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError(
- "Error due to additional fields (not defined in Session) in the input: "
+ "Error due to additional fields (not defined in Instance) in the input: "
+ obj
)
- _obj = Session.parse_obj(
+ _obj = Instance.parse_obj(
{
- "code_snippet_id": obj.get("codeSnippetID"),
- "edit_enabled": obj.get("editEnabled"),
- "session_id": obj.get("sessionID"),
+ "env_id": obj.get("envID"),
+ "instance_id": obj.get("instanceID"),
"client_id": obj.get("clientID"),
}
)
diff --git a/packages/python-sdk/e2b/api/v1/client/models/new_environment.py b/packages/python-sdk/e2b/api/v1/client/models/new_instance.py
similarity index 64%
rename from packages/python-sdk/e2b/api/v1/client/models/new_environment.py
rename to packages/python-sdk/e2b/api/v1/client/models/new_instance.py
index d8b17d845..e9d06ff37 100644
--- a/packages/python-sdk/e2b/api/v1/client/models/new_environment.py
+++ b/packages/python-sdk/e2b/api/v1/client/models/new_instance.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Devbook
+ E2B API
- Devbook API # noqa: E501
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: 1.0.0
+ The version of the OpenAPI document: 0.1.0
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@@ -18,18 +18,18 @@ import re # noqa: F401
import json
-from typing import Optional
from pydantic import BaseModel, Field, StrictStr
-class NewEnvironment(BaseModel):
+class NewInstance(BaseModel):
"""
- NewEnvironment
+ NewInstance
"""
- title: Optional[StrictStr] = None
- template: StrictStr = Field(...)
- __properties = ["title", "template"]
+ env_id: StrictStr = Field(
+ ..., alias="envID", description="Identifier of the required environment"
+ )
+ __properties = ["envID"]
class Config:
"""Pydantic configuration"""
@@ -46,8 +46,8 @@ class NewEnvironment(BaseModel):
return json.dumps(self.to_dict())
@classmethod
- def from_json(cls, json_str: str) -> NewEnvironment:
- """Create an instance of NewEnvironment from a JSON string"""
+ def from_json(cls, json_str: str) -> NewInstance:
+ """Create an instance of NewInstance from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self):
@@ -56,23 +56,21 @@ class NewEnvironment(BaseModel):
return _dict
@classmethod
- def from_dict(cls, obj: dict) -> NewEnvironment:
- """Create an instance of NewEnvironment from a dict"""
+ def from_dict(cls, obj: dict) -> NewInstance:
+ """Create an instance of NewInstance from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return NewEnvironment.parse_obj(obj)
+ return NewInstance.parse_obj(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
raise ValueError(
- "Error due to additional fields (not defined in NewEnvironment) in the input: "
+ "Error due to additional fields (not defined in NewInstance) in the input: "
+ obj
)
- _obj = NewEnvironment.parse_obj(
- {"title": obj.get("title"), "template": obj.get("template")}
- )
+ _obj = NewInstance.parse_obj({"env_id": obj.get("envID")})
return _obj
diff --git a/packages/python-sdk/e2b/api/v1/client/models/new_session.py b/packages/python-sdk/e2b/api/v1/client/models/new_session.py
deleted file mode 100644
index 23e0e4c35..000000000
--- a/packages/python-sdk/e2b/api/v1/client/models/new_session.py
+++ /dev/null
@@ -1,91 +0,0 @@
-# coding: utf-8
-
-"""
- Devbook
-
- Devbook API # noqa: E501
-
- The version of the OpenAPI document: 1.0.0
- Generated by OpenAPI Generator (https://openapi-generator.tech)
-
- Do not edit the class manually.
-"""
-
-
-from __future__ import annotations
-import pprint
-import re # noqa: F401
-import json
-
-
-from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr
-
-
-class NewSession(BaseModel):
- """
- NewSession
- """
-
- edit_enabled: Optional[StrictBool] = Field(
- False,
- alias="editEnabled",
- description="Option determining if the session is a shared persistent edit session",
- )
- code_snippet_id: StrictStr = Field(
- ...,
- alias="codeSnippetID",
- description="Identifier of a code snippet which which is the environment associated",
- )
- __properties = ["editEnabled", "codeSnippetID"]
-
- class Config:
- """Pydantic configuration"""
-
- allow_population_by_field_name = True
- validate_assignment = True
-
- def to_str(self) -> str:
- """Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
-
- def to_json(self) -> str:
- """Returns the JSON representation of the model using alias"""
- return json.dumps(self.to_dict())
-
- @classmethod
- def from_json(cls, json_str: str) -> NewSession:
- """Create an instance of NewSession from a JSON string"""
- return cls.from_dict(json.loads(json_str))
-
- def to_dict(self):
- """Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True, exclude={}, exclude_none=True)
- return _dict
-
- @classmethod
- def from_dict(cls, obj: dict) -> NewSession:
- """Create an instance of NewSession from a dict"""
- if obj is None:
- return None
-
- if not isinstance(obj, dict):
- return NewSession.parse_obj(obj)
-
- # raise errors for additional fields in the input
- for _key in obj.keys():
- if _key not in cls.__properties:
- raise ValueError(
- "Error due to additional fields (not defined in NewSession) in the input: "
- + obj
- )
-
- _obj = NewSession.parse_obj(
- {
- "edit_enabled": obj.get("editEnabled")
- if obj.get("editEnabled") is not None
- else False,
- "code_snippet_id": obj.get("codeSnippetID"),
- }
- )
- return _obj
diff --git a/packages/python-sdk/e2b/api/v1/client/models/sessions_get200_response_inner.py b/packages/python-sdk/e2b/api/v1/client/models/sessions_get200_response_inner.py
deleted file mode 100644
index 9f451a51b..000000000
--- a/packages/python-sdk/e2b/api/v1/client/models/sessions_get200_response_inner.py
+++ /dev/null
@@ -1,96 +0,0 @@
-# coding: utf-8
-
-"""
- Devbook
-
- Devbook API # noqa: E501
-
- The version of the OpenAPI document: 1.0.0
- Generated by OpenAPI Generator (https://openapi-generator.tech)
-
- Do not edit the class manually.
-"""
-
-
-from __future__ import annotations
-import pprint
-import re # noqa: F401
-import json
-
-
-from pydantic import BaseModel, Field, StrictBool, StrictStr
-
-
-class SessionsGet200ResponseInner(BaseModel):
- """
- SessionsGet200ResponseInner
- """
-
- code_snippet_id: StrictStr = Field(
- ...,
- alias="codeSnippetID",
- description="Identifier of a code snippet which which is the environment associated",
- )
- edit_enabled: StrictBool = Field(
- ...,
- alias="editEnabled",
- description="Information if the session is a shared persistent edit session",
- )
- session_id: StrictStr = Field(
- ..., alias="sessionID", description="Identifier of the session"
- )
- client_id: StrictStr = Field(
- ..., alias="clientID", description="Identifier of the client"
- )
- __properties = ["codeSnippetID", "editEnabled", "sessionID", "clientID"]
-
- class Config:
- """Pydantic configuration"""
-
- allow_population_by_field_name = True
- validate_assignment = True
-
- def to_str(self) -> str:
- """Returns the string representation of the model using alias"""
- return pprint.pformat(self.dict(by_alias=True))
-
- def to_json(self) -> str:
- """Returns the JSON representation of the model using alias"""
- return json.dumps(self.to_dict())
-
- @classmethod
- def from_json(cls, json_str: str) -> SessionsGet200ResponseInner:
- """Create an instance of SessionsGet200ResponseInner from a JSON string"""
- return cls.from_dict(json.loads(json_str))
-
- def to_dict(self):
- """Returns the dictionary representation of the model using alias"""
- _dict = self.dict(by_alias=True, exclude={}, exclude_none=True)
- return _dict
-
- @classmethod
- def from_dict(cls, obj: dict) -> SessionsGet200ResponseInner:
- """Create an instance of SessionsGet200ResponseInner from a dict"""
- if obj is None:
- return None
-
- if not isinstance(obj, dict):
- return SessionsGet200ResponseInner.parse_obj(obj)
-
- # raise errors for additional fields in the input
- for _key in obj.keys():
- if _key not in cls.__properties:
- raise ValueError(
- "Error due to additional fields (not defined in SessionsGet200ResponseInner) in the input: "
- + obj
- )
-
- _obj = SessionsGet200ResponseInner.parse_obj(
- {
- "code_snippet_id": obj.get("codeSnippetID"),
- "edit_enabled": obj.get("editEnabled"),
- "session_id": obj.get("sessionID"),
- "client_id": obj.get("clientID"),
- }
- )
- return _obj
diff --git a/packages/python-sdk/e2b/api/v1/client/models/template.py b/packages/python-sdk/e2b/api/v1/client/models/template.py
deleted file mode 100644
index daa6a22b8..000000000
--- a/packages/python-sdk/e2b/api/v1/client/models/template.py
+++ /dev/null
@@ -1,42 +0,0 @@
-# coding: utf-8
-
-"""
- Devbook
-
- Devbook API # noqa: E501
-
- The version of the OpenAPI document: 1.0.0
- Generated by OpenAPI Generator (https://openapi-generator.tech)
-
- Do not edit the class manually.
-"""
-
-
-import json
-import pprint
-import re # noqa: F401
-from aenum import Enum, no_arg
-
-
-class Template(str, Enum):
- """
- Template
- """
-
- """
- allowed enum values
- """
- NODEJS = "Nodejs"
- GO = "Go"
- BASH = "Bash"
- RUST = "Rust"
- PYTHON3 = "Python3"
- PHP = "PHP"
- JAVA = "Java"
- PERL = "Perl"
- DOTNET = "DotNET"
-
- @classmethod
- def from_json(cls, json_str: str) -> Template:
- """Create an instance of Template from a JSON string"""
- return Template(json.loads(json_str))
diff --git a/packages/python-sdk/e2b/api/v1/client/rest.py b/packages/python-sdk/e2b/api/v1/client/rest.py
index b74a6d3af..e9823f106 100644
--- a/packages/python-sdk/e2b/api/v1/client/rest.py
+++ b/packages/python-sdk/e2b/api/v1/client/rest.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Devbook
+ E2B API
- Devbook API # noqa: E501
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: 1.0.0
+ The version of the OpenAPI document: 0.1.0
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
diff --git a/packages/python-sdk/e2b/api/v1/client_README.md b/packages/python-sdk/e2b/api/v1/client_README.md
index d5d7ae565..9a97c9761 100644
--- a/packages/python-sdk/e2b/api/v1/client_README.md
+++ b/packages/python-sdk/e2b/api/v1/client_README.md
@@ -1,9 +1,9 @@
# e2b.api.v1.client
-Devbook API
+No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
The `e2b.api.v1.client` package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
-- API version: 1.0.0
+- API version: 0.1.0
- Package version: 1.0.0
- Build package: org.openapitools.codegen.languages.PythonNextgenClientCodegen
@@ -34,59 +34,56 @@ import e2b.api.v1.client
from e2b.api.v1.client.rest import ApiException
from pprint import pprint
-# Defining the host is optional and defaults to https://ondevbook.com
+# Defining the host is optional and defaults to https://api.e2b.dev
# See configuration.py for a list of all supported configuration parameters.
configuration = e2b.api.v1.client.Configuration(
- host = "https://ondevbook.com"
+ host = "https://api.e2b.dev"
)
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: ApiKeyAuth
+configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
# Enter a context with an instance of the API client
with e2b.api.v1.client.ApiClient(configuration) as api_client:
# Create an instance of the API class
- api_instance = e2b.api.v1.client.DefaultApi(api_client)
+ api_instance = e2b.api.v1.client.InstancesApi(api_client)
+ instance_id = 'instance_id_example' # str |
try:
- api_instance.health_get()
+ api_instance.instances_instance_id_refreshes_post(instance_id)
except ApiException as e:
- print("Exception when calling DefaultApi->health_get: %s\n" % e)
+ print("Exception when calling InstancesApi->instances_instance_id_refreshes_post: %s\n" % e)
```
## Documentation for API Endpoints
-All URIs are relative to *https://ondevbook.com*
+All URIs are relative to *https://api.e2b.dev*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
-*DefaultApi* | [**health_get**](e2b/api/v1/client/docs/DefaultApi.md#health_get) | **GET** /health |
-*EnvsApi* | [**envs_code_snippet_id_delete**](e2b/api/v1/client/docs/EnvsApi.md#envs_code_snippet_id_delete) | **DELETE** /envs/{codeSnippetID} |
-*EnvsApi* | [**envs_code_snippet_id_patch**](e2b/api/v1/client/docs/EnvsApi.md#envs_code_snippet_id_patch) | **PATCH** /envs/{codeSnippetID} |
-*EnvsApi* | [**envs_code_snippet_id_post**](e2b/api/v1/client/docs/EnvsApi.md#envs_code_snippet_id_post) | **POST** /envs/{codeSnippetID} |
-*EnvsApi* | [**envs_code_snippet_id_state_put**](e2b/api/v1/client/docs/EnvsApi.md#envs_code_snippet_id_state_put) | **PUT** /envs/{codeSnippetID}/state |
-*EnvsApi* | [**envs_code_snippet_id_title_put**](e2b/api/v1/client/docs/EnvsApi.md#envs_code_snippet_id_title_put) | **PUT** /envs/{codeSnippetID}/title |
-*EnvsApi* | [**envs_get**](e2b/api/v1/client/docs/EnvsApi.md#envs_get) | **GET** /envs |
-*EnvsApi* | [**envs_post**](e2b/api/v1/client/docs/EnvsApi.md#envs_post) | **POST** /envs |
-*SessionsApi* | [**sessions_get**](e2b/api/v1/client/docs/SessionsApi.md#sessions_get) | **GET** /sessions |
-*SessionsApi* | [**sessions_post**](e2b/api/v1/client/docs/SessionsApi.md#sessions_post) | **POST** /sessions |
-*SessionsApi* | [**sessions_session_id_delete**](e2b/api/v1/client/docs/SessionsApi.md#sessions_session_id_delete) | **DELETE** /sessions/{sessionID} |
-*SessionsApi* | [**sessions_session_id_refresh_post**](e2b/api/v1/client/docs/SessionsApi.md#sessions_session_id_refresh_post) | **POST** /sessions/{sessionID}/refresh |
+*InstancesApi* | [**instances_instance_id_refreshes_post**](e2b/api/v1/client/docs/InstancesApi.md#instances_instance_id_refreshes_post) | **POST** /instances/{instanceID}/refreshes |
+*InstancesApi* | [**instances_post**](e2b/api/v1/client/docs/InstancesApi.md#instances_post) | **POST** /instances |
## Documentation For Models
- [Environment](e2b/api/v1/client/docs/Environment.md)
- - [EnvironmentState](e2b/api/v1/client/docs/EnvironmentState.md)
- - [EnvironmentStateUpdate](e2b/api/v1/client/docs/EnvironmentStateUpdate.md)
- - [EnvironmentTitleUpdate](e2b/api/v1/client/docs/EnvironmentTitleUpdate.md)
+ - [EnvironmentBuild](e2b/api/v1/client/docs/EnvironmentBuild.md)
+ - [EnvsEnvIDBuildsBuildIDLogsPostRequest](e2b/api/v1/client/docs/EnvsEnvIDBuildsBuildIDLogsPostRequest.md)
- [EnvsGet200ResponseInner](e2b/api/v1/client/docs/EnvsGet200ResponseInner.md)
- [Error](e2b/api/v1/client/docs/Error.md)
- - [NewEnvironment](e2b/api/v1/client/docs/NewEnvironment.md)
- - [NewSession](e2b/api/v1/client/docs/NewSession.md)
- - [Session](e2b/api/v1/client/docs/Session.md)
- - [SessionsGet200ResponseInner](e2b/api/v1/client/docs/SessionsGet200ResponseInner.md)
- - [Template](e2b/api/v1/client/docs/Template.md)
+ - [Instance](e2b/api/v1/client/docs/Instance.md)
+ - [NewInstance](e2b/api/v1/client/docs/NewInstance.md)
<a id="documentation-for-authorization"></a>
@@ -98,8 +95,13 @@ Authentication schemes defined for the API:
### ApiKeyAuth
- **Type**: API key
-- **API key parameter name**: api_key
-- **Location**: URL query string
+- **API key parameter name**: X-API-Key
+- **Location**: HTTP header
+
+<a id="AccessTokenAuth"></a>
+### AccessTokenAuth
+
+- **Type**: Bearer authentication (access_token)
## Author
diff --git a/packages/python-sdk/e2b/api/v2/client/__init__.py b/packages/python-sdk/e2b/api/v2/client/__init__.py
index e93d907f1..98d4f2d24 100644
--- a/packages/python-sdk/e2b/api/v2/client/__init__.py
+++ b/packages/python-sdk/e2b/api/v2/client/__init__.py
@@ -3,11 +3,11 @@
# flake8: noqa
"""
- Devbook
+ E2B API
- Devbook API
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
- The version of the OpenAPI document: 1.0.0
+ The version of the OpenAPI document: 0.1.0
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@@ -17,9 +17,7 @@
__version__ = "1.0.0"
# import apis into sdk package
-from e2b.api.v2.client.api.default_api import DefaultApi
-from e2b.api.v2.client.api.envs_api import EnvsApi
-from e2b.api.v2.client.api.sessions_api import SessionsApi
+from e2b.api.v2.client.api.instances_api import InstancesApi
# import ApiClient
from e2b.api.v2.client.api_response import ApiResponse
@@ -34,11 +32,10 @@ from e2b.api.v2.client.exceptions import ApiException
# import models into sdk package
from e2b.api.v2.client.models.environment import Environment
-from e2b.api.v2.client.models.environment_state import EnvironmentState
-from e2b.api.v2.client.models.environment_state_update import EnvironmentStateUpdate
-from e2b.api.v2.client.models.environment_title_update import EnvironmentTitleUpdate
+from e2b.api.v2.client.models.environment_build import EnvironmentBuild
+from e2b.api.v2.client.models.envs_env_id_builds_build_id_logs_post_request import (
+ EnvsEnvIDBuildsBuildIDLogsPostRequest,
+)
from e2b.api.v2.client.models.error import Error
-from e2b.api.v2.client.models.new_environment import NewEnvironment
-from e2b.api.v2.client.models.new_session import NewSession
-from e2b.api.v2.client.models.session import Session
-from e2b.api.v2.client.models.template import Template
+from e2b.api.v2.client.models.instance import Instance
+from e2b.api.v2.client.models.new_instance import NewInstance
diff --git a/packages/python-sdk/e2b/api/v2/client/api/__init__.py b/packages/python-sdk/e2b/api/v2/client/api/__init__.py
index bb625a8f4..e61fa8544 100644
--- a/packages/python-sdk/e2b/api/v2/client/api/__init__.py
+++ b/packages/python-sdk/e2b/api/v2/client/api/__init__.py
@@ -1,6 +1,4 @@
# flake8: noqa
# import apis into api package
-from e2b.api.v2.client.api.default_api import DefaultApi
-from e2b.api.v2.client.api.envs_api import EnvsApi
-from e2b.api.v2.client.api.sessions_api import SessionsApi
+from e2b.api.v2.client.api.instances_api import InstancesApi
diff --git a/packages/python-sdk/e2b/api/v2/client/api/default_api.py b/packages/python-sdk/e2b/api/v2/client/api/default_api.py
deleted file mode 100644
index c7cf451fd..000000000
--- a/packages/python-sdk/e2b/api/v2/client/api/default_api.py
+++ /dev/null
@@ -1,170 +0,0 @@
-# coding: utf-8
-
-"""
- Devbook
-
- Devbook API
-
- The version of the OpenAPI document: 1.0.0
- Generated by OpenAPI Generator (https://openapi-generator.tech)
-
- Do not edit the class manually.
-""" # noqa: E501
-
-
-import re # noqa: F401
-import io
-import warnings
-
-from pydantic import validate_call, ValidationError
-from typing_extensions import Annotated
-
-
-from e2b.api.v2.client.api_client import ApiClient
-from e2b.api.v2.client.api_response import ApiResponse
-from e2b.api.v2.client.exceptions import ApiTypeError, ApiValueError # noqa: F401
-
-
-class DefaultApi:
- """NOTE: This class is auto generated by OpenAPI Generator
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- def __init__(self, api_client=None) -> None:
- if api_client is None:
- api_client = ApiClient.get_default()
- self.api_client = api_client
-
- @validate_call
- def health_get(self, **kwargs) -> None: # noqa: E501
- """health_get # noqa: E501
-
- Health check # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.health_get(async_req=True)
- >>> result = thread.get()
-
- :param async_req: Whether to execute the request asynchronously.
- :type async_req: bool, optional
- :param _request_timeout: timeout setting for this request.
- If one number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: Returns the result object.
- If the method is called asynchronously,
- returns the request thread.
- :rtype: None
- """
- kwargs["_return_http_data_only"] = True
- if "_preload_content" in kwargs:
- message = "Error! Please call the health_get_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
- raise ValueError(message)
- return self.health_get_with_http_info(**kwargs) # noqa: E501
-
- @validate_call
- def health_get_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501
- """health_get # noqa: E501
-
- Health check # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.health_get_with_http_info(async_req=True)
- >>> result = thread.get()
-
- :param async_req: Whether to execute the request asynchronously.
- :type async_req: bool, optional
- :param _preload_content: if False, the ApiResponse.data will
- be set to none and raw_data will store the
- HTTP response body without reading/decoding.
- Default is True.
- :type _preload_content: bool, optional
- :param _return_http_data_only: response data instead of ApiResponse
- object with status code, headers, etc
- :type _return_http_data_only: bool, optional
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :param _request_auth: set to override the auth_settings for an a single
- request; this effectively ignores the authentication
- in the spec for a single request.
- :type _request_auth: dict, optional
- :type _content_type: string, optional: force content-type for the request
- :return: Returns the result object.
- If the method is called asynchronously,
- returns the request thread.
- :rtype: None
- """
-
- _params = locals()
-
- _all_params = []
- _all_params.extend(
- [
- "async_req",
- "_return_http_data_only",
- "_preload_content",
- "_request_timeout",
- "_request_auth",
- "_content_type",
- "_headers",
- ]
- )
-
- # validate the arguments
- for _key, _val in _params["kwargs"].items():
- if _key not in _all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method health_get" % _key
- )
- _params[_key] = _val
- del _params["kwargs"]
-
- _collection_formats = {}
-
- # process the path parameters
- _path_params = {}
-
- # process the query parameters
- _query_params = []
- # process the header parameters
- _header_params = dict(_params.get("_headers", {}))
- # process the form parameters
- _form_params = []
- _files = {}
- # process the body parameter
- _body_params = None
- # set the HTTP header `Accept`
- _header_params["Accept"] = self.api_client.select_header_accept(
- ["application/json"]
- ) # noqa: E501
-
- # authentication setting
- _auth_settings = [] # noqa: E501
-
- _response_types_map = {}
-
- return self.api_client.call_api(
- "/health",
- "GET",
- _path_params,
- _query_params,
- _header_params,
- body=_body_params,
- post_params=_form_params,
- files=_files,
- response_types_map=_response_types_map,
- auth_settings=_auth_settings,
- async_req=_params.get("async_req"),
- _return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501
- _preload_content=_params.get("_preload_content", True),
- _request_timeout=_params.get("_request_timeout"),
- collection_formats=_collection_formats,
- _request_auth=_params.get("_request_auth"),
- )
diff --git a/packages/python-sdk/e2b/api/v2/client/api/envs_api.py b/packages/python-sdk/e2b/api/v2/client/api/envs_api.py
deleted file mode 100644
index 86649f35b..000000000
--- a/packages/python-sdk/e2b/api/v2/client/api/envs_api.py
+++ /dev/null
@@ -1,1180 +0,0 @@
-# coding: utf-8
-
-"""
- Devbook
-
- Devbook API
-
- The version of the OpenAPI document: 1.0.0
- Generated by OpenAPI Generator (https://openapi-generator.tech)
-
- Do not edit the class manually.
-""" # noqa: E501
-
-
-import re # noqa: F401
-import io
-import warnings
-
-from pydantic import validate_call, ValidationError
-from typing_extensions import Annotated
-
-from pydantic import StrictStr
-
-from typing import List
-
-from e2b.api.v2.client.models.environment import Environment
-from e2b.api.v2.client.models.environment_state_update import EnvironmentStateUpdate
-from e2b.api.v2.client.models.environment_title_update import EnvironmentTitleUpdate
-from e2b.api.v2.client.models.new_environment import NewEnvironment
-
-from e2b.api.v2.client.api_client import ApiClient
-from e2b.api.v2.client.api_response import ApiResponse
-from e2b.api.v2.client.exceptions import ApiTypeError, ApiValueError # noqa: F401
-
-
-class EnvsApi:
- """NOTE: This class is auto generated by OpenAPI Generator
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- def __init__(self, api_client=None) -> None:
- if api_client is None:
- api_client = ApiClient.get_default()
- self.api_client = api_client
-
- @validate_call
- def envs_code_snippet_id_delete(
- self, api_key: StrictStr, code_snippet_id: StrictStr, **kwargs
- ) -> None: # noqa: E501
- """envs_code_snippet_id_delete # noqa: E501
-
- Delete the code snippet environment # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.envs_code_snippet_id_delete(api_key, code_snippet_id, async_req=True)
- >>> result = thread.get()
-
- :param api_key: (required)
- :type api_key: str
- :param code_snippet_id: (required)
- :type code_snippet_id: str
- :param async_req: Whether to execute the request asynchronously.
- :type async_req: bool, optional
- :param _request_timeout: timeout setting for this request.
- If one number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: Returns the result object.
- If the method is called asynchronously,
- returns the request thread.
- :rtype: None
- """
- kwargs["_return_http_data_only"] = True
- if "_preload_content" in kwargs:
- message = "Error! Please call the envs_code_snippet_id_delete_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
- raise ValueError(message)
- return self.envs_code_snippet_id_delete_with_http_info(
- api_key, code_snippet_id, **kwargs
- ) # noqa: E501
-
- @validate_call
- def envs_code_snippet_id_delete_with_http_info(
- self, api_key: StrictStr, code_snippet_id: StrictStr, **kwargs
- ) -> ApiResponse: # noqa: E501
- """envs_code_snippet_id_delete # noqa: E501
-
- Delete the code snippet environment # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.envs_code_snippet_id_delete_with_http_info(api_key, code_snippet_id, async_req=True)
- >>> result = thread.get()
-
- :param api_key: (required)
- :type api_key: str
- :param code_snippet_id: (required)
- :type code_snippet_id: str
- :param async_req: Whether to execute the request asynchronously.
- :type async_req: bool, optional
- :param _preload_content: if False, the ApiResponse.data will
- be set to none and raw_data will store the
- HTTP response body without reading/decoding.
- Default is True.
- :type _preload_content: bool, optional
- :param _return_http_data_only: response data instead of ApiResponse
- object with status code, headers, etc
- :type _return_http_data_only: bool, optional
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :param _request_auth: set to override the auth_settings for an a single
- request; this effectively ignores the authentication
- in the spec for a single request.
- :type _request_auth: dict, optional
- :type _content_type: string, optional: force content-type for the request
- :return: Returns the result object.
- If the method is called asynchronously,
- returns the request thread.
- :rtype: None
- """
-
- _params = locals()
-
- _all_params = ["api_key", "code_snippet_id"]
- _all_params.extend(
- [
- "async_req",
- "_return_http_data_only",
- "_preload_content",
- "_request_timeout",
- "_request_auth",
- "_content_type",
- "_headers",
- ]
- )
-
- # validate the arguments
- for _key, _val in _params["kwargs"].items():
- if _key not in _all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method envs_code_snippet_id_delete" % _key
- )
- _params[_key] = _val
- del _params["kwargs"]
-
- _collection_formats = {}
-
- # process the path parameters
- _path_params = {}
- if _params["code_snippet_id"]:
- _path_params["codeSnippetID"] = _params["code_snippet_id"]
-
- # process the query parameters
- _query_params = []
- if _params.get("api_key") is not None: # noqa: E501
- _query_params.append(("api_key", _params["api_key"]))
-
- # process the header parameters
- _header_params = dict(_params.get("_headers", {}))
- # process the form parameters
- _form_params = []
- _files = {}
- # process the body parameter
- _body_params = None
- # set the HTTP header `Accept`
- _header_params["Accept"] = self.api_client.select_header_accept(
- ["application/json"]
- ) # noqa: E501
-
- # authentication setting
- _auth_settings = [] # noqa: E501
-
- _response_types_map = {}
-
- return self.api_client.call_api(
- "/envs/{codeSnippetID}",
- "DELETE",
- _path_params,
- _query_params,
- _header_params,
- body=_body_params,
- post_params=_form_params,
- files=_files,
- response_types_map=_response_types_map,
- auth_settings=_auth_settings,
- async_req=_params.get("async_req"),
- _return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501
- _preload_content=_params.get("_preload_content", True),
- _request_timeout=_params.get("_request_timeout"),
- collection_formats=_collection_formats,
- _request_auth=_params.get("_request_auth"),
- )
-
- @validate_call
- def envs_code_snippet_id_patch(
- self, api_key: StrictStr, code_snippet_id: StrictStr, **kwargs
- ) -> None: # noqa: E501
- """envs_code_snippet_id_patch # noqa: E501
-
- Update the environment of the code snippet to match the edit environment # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.envs_code_snippet_id_patch(api_key, code_snippet_id, async_req=True)
- >>> result = thread.get()
-
- :param api_key: (required)
- :type api_key: str
- :param code_snippet_id: (required)
- :type code_snippet_id: str
- :param async_req: Whether to execute the request asynchronously.
- :type async_req: bool, optional
- :param _request_timeout: timeout setting for this request.
- If one number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: Returns the result object.
- If the method is called asynchronously,
- returns the request thread.
- :rtype: None
- """
- kwargs["_return_http_data_only"] = True
- if "_preload_content" in kwargs:
- message = "Error! Please call the envs_code_snippet_id_patch_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
- raise ValueError(message)
- return self.envs_code_snippet_id_patch_with_http_info(
- api_key, code_snippet_id, **kwargs
- ) # noqa: E501
-
- @validate_call
- def envs_code_snippet_id_patch_with_http_info(
- self, api_key: StrictStr, code_snippet_id: StrictStr, **kwargs
- ) -> ApiResponse: # noqa: E501
- """envs_code_snippet_id_patch # noqa: E501
-
- Update the environment of the code snippet to match the edit environment # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.envs_code_snippet_id_patch_with_http_info(api_key, code_snippet_id, async_req=True)
- >>> result = thread.get()
-
- :param api_key: (required)
- :type api_key: str
- :param code_snippet_id: (required)
- :type code_snippet_id: str
- :param async_req: Whether to execute the request asynchronously.
- :type async_req: bool, optional
- :param _preload_content: if False, the ApiResponse.data will
- be set to none and raw_data will store the
- HTTP response body without reading/decoding.
- Default is True.
- :type _preload_content: bool, optional
- :param _return_http_data_only: response data instead of ApiResponse
- object with status code, headers, etc
- :type _return_http_data_only: bool, optional
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :param _request_auth: set to override the auth_settings for an a single
- request; this effectively ignores the authentication
- in the spec for a single request.
- :type _request_auth: dict, optional
- :type _content_type: string, optional: force content-type for the request
- :return: Returns the result object.
- If the method is called asynchronously,
- returns the request thread.
- :rtype: None
- """
-
- _params = locals()
-
- _all_params = ["api_key", "code_snippet_id"]
- _all_params.extend(
- [
- "async_req",
- "_return_http_data_only",
- "_preload_content",
- "_request_timeout",
- "_request_auth",
- "_content_type",
- "_headers",
- ]
- )
-
- # validate the arguments
- for _key, _val in _params["kwargs"].items():
- if _key not in _all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method envs_code_snippet_id_patch" % _key
- )
- _params[_key] = _val
- del _params["kwargs"]
-
- _collection_formats = {}
-
- # process the path parameters
- _path_params = {}
- if _params["code_snippet_id"]:
- _path_params["codeSnippetID"] = _params["code_snippet_id"]
-
- # process the query parameters
- _query_params = []
- if _params.get("api_key") is not None: # noqa: E501
- _query_params.append(("api_key", _params["api_key"]))
-
- # process the header parameters
- _header_params = dict(_params.get("_headers", {}))
- # process the form parameters
- _form_params = []
- _files = {}
- # process the body parameter
- _body_params = None
- # set the HTTP header `Accept`
- _header_params["Accept"] = self.api_client.select_header_accept(
- ["application/json"]
- ) # noqa: E501
-
- # authentication setting
- _auth_settings = [] # noqa: E501
-
- _response_types_map = {}
-
- return self.api_client.call_api(
- "/envs/{codeSnippetID}",
- "PATCH",
- _path_params,
- _query_params,
- _header_params,
- body=_body_params,
- post_params=_form_params,
- files=_files,
- response_types_map=_response_types_map,
- auth_settings=_auth_settings,
- async_req=_params.get("async_req"),
- _return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501
- _preload_content=_params.get("_preload_content", True),
- _request_timeout=_params.get("_request_timeout"),
- collection_formats=_collection_formats,
- _request_auth=_params.get("_request_auth"),
- )
-
- @validate_call
- def envs_code_snippet_id_post(
- self,
- api_key: StrictStr,
- code_snippet_id: StrictStr,
- new_environment: NewEnvironment,
- **kwargs
- ) -> None: # noqa: E501
- """envs_code_snippet_id_post # noqa: E501
-
- Create a new env for a code snippet # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.envs_code_snippet_id_post(api_key, code_snippet_id, new_environment, async_req=True)
- >>> result = thread.get()
-
- :param api_key: (required)
- :type api_key: str
- :param code_snippet_id: (required)
- :type code_snippet_id: str
- :param new_environment: (required)
- :type new_environment: NewEnvironment
- :param async_req: Whether to execute the request asynchronously.
- :type async_req: bool, optional
- :param _request_timeout: timeout setting for this request.
- If one number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: Returns the result object.
- If the method is called asynchronously,
- returns the request thread.
- :rtype: None
- """
- kwargs["_return_http_data_only"] = True
- if "_preload_content" in kwargs:
- message = "Error! Please call the envs_code_snippet_id_post_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
- raise ValueError(message)
- return self.envs_code_snippet_id_post_with_http_info(
- api_key, code_snippet_id, new_environment, **kwargs
- ) # noqa: E501
-
- @validate_call
- def envs_code_snippet_id_post_with_http_info(
- self,
- api_key: StrictStr,
- code_snippet_id: StrictStr,
- new_environment: NewEnvironment,
- **kwargs
- ) -> ApiResponse: # noqa: E501
- """envs_code_snippet_id_post # noqa: E501
-
- Create a new env for a code snippet # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.envs_code_snippet_id_post_with_http_info(api_key, code_snippet_id, new_environment, async_req=True)
- >>> result = thread.get()
-
- :param api_key: (required)
- :type api_key: str
- :param code_snippet_id: (required)
- :type code_snippet_id: str
- :param new_environment: (required)
- :type new_environment: NewEnvironment
- :param async_req: Whether to execute the request asynchronously.
- :type async_req: bool, optional
- :param _preload_content: if False, the ApiResponse.data will
- be set to none and raw_data will store the
- HTTP response body without reading/decoding.
- Default is True.
- :type _preload_content: bool, optional
- :param _return_http_data_only: response data instead of ApiResponse
- object with status code, headers, etc
- :type _return_http_data_only: bool, optional
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :param _request_auth: set to override the auth_settings for an a single
- request; this effectively ignores the authentication
- in the spec for a single request.
- :type _request_auth: dict, optional
- :type _content_type: string, optional: force content-type for the request
- :return: Returns the result object.
- If the method is called asynchronously,
- returns the request thread.
- :rtype: None
- """
-
- _params = locals()
-
- _all_params = ["api_key", "code_snippet_id", "new_environment"]
- _all_params.extend(
- [
- "async_req",
- "_return_http_data_only",
- "_preload_content",
- "_request_timeout",
- "_request_auth",
- "_content_type",
- "_headers",
- ]
- )
-
- # validate the arguments
- for _key, _val in _params["kwargs"].items():
- if _key not in _all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method envs_code_snippet_id_post" % _key
- )
- _params[_key] = _val
- del _params["kwargs"]
-
- _collection_formats = {}
-
- # process the path parameters
- _path_params = {}
- if _params["code_snippet_id"]:
- _path_params["codeSnippetID"] = _params["code_snippet_id"]
-
- # process the query parameters
- _query_params = []
- if _params.get("api_key") is not None: # noqa: E501
- _query_params.append(("api_key", _params["api_key"]))
-
- # process the header parameters
- _header_params = dict(_params.get("_headers", {}))
- # process the form parameters
- _form_params = []
- _files = {}
- # process the body parameter
- _body_params = None
- if _params["new_environment"] is not None:
- _body_params = _params["new_environment"]
-
- # set the HTTP header `Accept`
- _header_params["Accept"] = self.api_client.select_header_accept(
- ["application/json"]
- ) # noqa: E501
-
- # set the HTTP header `Content-Type`
- _content_types_list = _params.get(
- "_content_type",
- self.api_client.select_header_content_type(["application/json"]),
- )
- if _content_types_list:
- _header_params["Content-Type"] = _content_types_list
-
- # authentication setting
- _auth_settings = [] # noqa: E501
-
- _response_types_map = {}
-
- return self.api_client.call_api(
- "/envs/{codeSnippetID}",
- "POST",
- _path_params,
- _query_params,
- _header_params,
- body=_body_params,
- post_params=_form_params,
- files=_files,
- response_types_map=_response_types_map,
- auth_settings=_auth_settings,
- async_req=_params.get("async_req"),
- _return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501
- _preload_content=_params.get("_preload_content", True),
- _request_timeout=_params.get("_request_timeout"),
- collection_formats=_collection_formats,
- _request_auth=_params.get("_request_auth"),
- )
-
- @validate_call
- def envs_code_snippet_id_state_put(
- self,
- api_key: StrictStr,
- code_snippet_id: StrictStr,
- environment_state_update: EnvironmentStateUpdate,
- **kwargs
- ) -> None: # noqa: E501
- """envs_code_snippet_id_state_put # noqa: E501
-
- Update the state of the environment # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.envs_code_snippet_id_state_put(api_key, code_snippet_id, environment_state_update, async_req=True)
- >>> result = thread.get()
-
- :param api_key: (required)
- :type api_key: str
- :param code_snippet_id: (required)
- :type code_snippet_id: str
- :param environment_state_update: (required)
- :type environment_state_update: EnvironmentStateUpdate
- :param async_req: Whether to execute the request asynchronously.
- :type async_req: bool, optional
- :param _request_timeout: timeout setting for this request.
- If one number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: Returns the result object.
- If the method is called asynchronously,
- returns the request thread.
- :rtype: None
- """
- kwargs["_return_http_data_only"] = True
- if "_preload_content" in kwargs:
- message = "Error! Please call the envs_code_snippet_id_state_put_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
- raise ValueError(message)
- return self.envs_code_snippet_id_state_put_with_http_info(
- api_key, code_snippet_id, environment_state_update, **kwargs
- ) # noqa: E501
-
- @validate_call
- def envs_code_snippet_id_state_put_with_http_info(
- self,
- api_key: StrictStr,
- code_snippet_id: StrictStr,
- environment_state_update: EnvironmentStateUpdate,
- **kwargs
- ) -> ApiResponse: # noqa: E501
- """envs_code_snippet_id_state_put # noqa: E501
-
- Update the state of the environment # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.envs_code_snippet_id_state_put_with_http_info(api_key, code_snippet_id, environment_state_update, async_req=True)
- >>> result = thread.get()
-
- :param api_key: (required)
- :type api_key: str
- :param code_snippet_id: (required)
- :type code_snippet_id: str
- :param environment_state_update: (required)
- :type environment_state_update: EnvironmentStateUpdate
- :param async_req: Whether to execute the request asynchronously.
- :type async_req: bool, optional
- :param _preload_content: if False, the ApiResponse.data will
- be set to none and raw_data will store the
- HTTP response body without reading/decoding.
- Default is True.
- :type _preload_content: bool, optional
- :param _return_http_data_only: response data instead of ApiResponse
- object with status code, headers, etc
- :type _return_http_data_only: bool, optional
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :param _request_auth: set to override the auth_settings for an a single
- request; this effectively ignores the authentication
- in the spec for a single request.
- :type _request_auth: dict, optional
- :type _content_type: string, optional: force content-type for the request
- :return: Returns the result object.
- If the method is called asynchronously,
- returns the request thread.
- :rtype: None
- """
-
- _params = locals()
-
- _all_params = ["api_key", "code_snippet_id", "environment_state_update"]
- _all_params.extend(
- [
- "async_req",
- "_return_http_data_only",
- "_preload_content",
- "_request_timeout",
- "_request_auth",
- "_content_type",
- "_headers",
- ]
- )
-
- # validate the arguments
- for _key, _val in _params["kwargs"].items():
- if _key not in _all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method envs_code_snippet_id_state_put" % _key
- )
- _params[_key] = _val
- del _params["kwargs"]
-
- _collection_formats = {}
-
- # process the path parameters
- _path_params = {}
- if _params["code_snippet_id"]:
- _path_params["codeSnippetID"] = _params["code_snippet_id"]
-
- # process the query parameters
- _query_params = []
- if _params.get("api_key") is not None: # noqa: E501
- _query_params.append(("api_key", _params["api_key"]))
-
- # process the header parameters
- _header_params = dict(_params.get("_headers", {}))
- # process the form parameters
- _form_params = []
- _files = {}
- # process the body parameter
- _body_params = None
- if _params["environment_state_update"] is not None:
- _body_params = _params["environment_state_update"]
-
- # set the HTTP header `Accept`
- _header_params["Accept"] = self.api_client.select_header_accept(
- ["application/json"]
- ) # noqa: E501
-
- # set the HTTP header `Content-Type`
- _content_types_list = _params.get(
- "_content_type",
- self.api_client.select_header_content_type(["application/json"]),
- )
- if _content_types_list:
- _header_params["Content-Type"] = _content_types_list
-
- # authentication setting
- _auth_settings = [] # noqa: E501
-
- _response_types_map = {}
-
- return self.api_client.call_api(
- "/envs/{codeSnippetID}/state",
- "PUT",
- _path_params,
- _query_params,
- _header_params,
- body=_body_params,
- post_params=_form_params,
- files=_files,
- response_types_map=_response_types_map,
- auth_settings=_auth_settings,
- async_req=_params.get("async_req"),
- _return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501
- _preload_content=_params.get("_preload_content", True),
- _request_timeout=_params.get("_request_timeout"),
- collection_formats=_collection_formats,
- _request_auth=_params.get("_request_auth"),
- )
-
- @validate_call
- def envs_code_snippet_id_title_put(
- self,
- api_key: StrictStr,
- code_snippet_id: StrictStr,
- environment_title_update: EnvironmentTitleUpdate,
- **kwargs
- ) -> None: # noqa: E501
- """envs_code_snippet_id_title_put # noqa: E501
-
- Update the title of the environment # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.envs_code_snippet_id_title_put(api_key, code_snippet_id, environment_title_update, async_req=True)
- >>> result = thread.get()
-
- :param api_key: (required)
- :type api_key: str
- :param code_snippet_id: (required)
- :type code_snippet_id: str
- :param environment_title_update: (required)
- :type environment_title_update: EnvironmentTitleUpdate
- :param async_req: Whether to execute the request asynchronously.
- :type async_req: bool, optional
- :param _request_timeout: timeout setting for this request.
- If one number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: Returns the result object.
- If the method is called asynchronously,
- returns the request thread.
- :rtype: None
- """
- kwargs["_return_http_data_only"] = True
- if "_preload_content" in kwargs:
- message = "Error! Please call the envs_code_snippet_id_title_put_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
- raise ValueError(message)
- return self.envs_code_snippet_id_title_put_with_http_info(
- api_key, code_snippet_id, environment_title_update, **kwargs
- ) # noqa: E501
-
- @validate_call
- def envs_code_snippet_id_title_put_with_http_info(
- self,
- api_key: StrictStr,
- code_snippet_id: StrictStr,
- environment_title_update: EnvironmentTitleUpdate,
- **kwargs
- ) -> ApiResponse: # noqa: E501
- """envs_code_snippet_id_title_put # noqa: E501
-
- Update the title of the environment # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.envs_code_snippet_id_title_put_with_http_info(api_key, code_snippet_id, environment_title_update, async_req=True)
- >>> result = thread.get()
-
- :param api_key: (required)
- :type api_key: str
- :param code_snippet_id: (required)
- :type code_snippet_id: str
- :param environment_title_update: (required)
- :type environment_title_update: EnvironmentTitleUpdate
- :param async_req: Whether to execute the request asynchronously.
- :type async_req: bool, optional
- :param _preload_content: if False, the ApiResponse.data will
- be set to none and raw_data will store the
- HTTP response body without reading/decoding.
- Default is True.
- :type _preload_content: bool, optional
- :param _return_http_data_only: response data instead of ApiResponse
- object with status code, headers, etc
- :type _return_http_data_only: bool, optional
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :param _request_auth: set to override the auth_settings for an a single
- request; this effectively ignores the authentication
- in the spec for a single request.
- :type _request_auth: dict, optional
- :type _content_type: string, optional: force content-type for the request
- :return: Returns the result object.
- If the method is called asynchronously,
- returns the request thread.
- :rtype: None
- """
-
- _params = locals()
-
- _all_params = ["api_key", "code_snippet_id", "environment_title_update"]
- _all_params.extend(
- [
- "async_req",
- "_return_http_data_only",
- "_preload_content",
- "_request_timeout",
- "_request_auth",
- "_content_type",
- "_headers",
- ]
- )
-
- # validate the arguments
- for _key, _val in _params["kwargs"].items():
- if _key not in _all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method envs_code_snippet_id_title_put" % _key
- )
- _params[_key] = _val
- del _params["kwargs"]
-
- _collection_formats = {}
-
- # process the path parameters
- _path_params = {}
- if _params["code_snippet_id"]:
- _path_params["codeSnippetID"] = _params["code_snippet_id"]
-
- # process the query parameters
- _query_params = []
- if _params.get("api_key") is not None: # noqa: E501
- _query_params.append(("api_key", _params["api_key"]))
-
- # process the header parameters
- _header_params = dict(_params.get("_headers", {}))
- # process the form parameters
- _form_params = []
- _files = {}
- # process the body parameter
- _body_params = None
- if _params["environment_title_update"] is not None:
- _body_params = _params["environment_title_update"]
-
- # set the HTTP header `Accept`
- _header_params["Accept"] = self.api_client.select_header_accept(
- ["application/json"]
- ) # noqa: E501
-
- # set the HTTP header `Content-Type`
- _content_types_list = _params.get(
- "_content_type",
- self.api_client.select_header_content_type(["application/json"]),
- )
- if _content_types_list:
- _header_params["Content-Type"] = _content_types_list
-
- # authentication setting
- _auth_settings = [] # noqa: E501
-
- _response_types_map = {}
-
- return self.api_client.call_api(
- "/envs/{codeSnippetID}/title",
- "PUT",
- _path_params,
- _query_params,
- _header_params,
- body=_body_params,
- post_params=_form_params,
- files=_files,
- response_types_map=_response_types_map,
- auth_settings=_auth_settings,
- async_req=_params.get("async_req"),
- _return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501
- _preload_content=_params.get("_preload_content", True),
- _request_timeout=_params.get("_request_timeout"),
- collection_formats=_collection_formats,
- _request_auth=_params.get("_request_auth"),
- )
-
- @validate_call
- def envs_get(self, api_key: StrictStr, **kwargs) -> List[Environment]: # noqa: E501
- """envs_get # noqa: E501
-
- List all environments # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.envs_get(api_key, async_req=True)
- >>> result = thread.get()
-
- :param api_key: (required)
- :type api_key: str
- :param async_req: Whether to execute the request asynchronously.
- :type async_req: bool, optional
- :param _request_timeout: timeout setting for this request.
- If one number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: Returns the result object.
- If the method is called asynchronously,
- returns the request thread.
- :rtype: List[Environment]
- """
- kwargs["_return_http_data_only"] = True
- if "_preload_content" in kwargs:
- message = "Error! Please call the envs_get_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
- raise ValueError(message)
- return self.envs_get_with_http_info(api_key, **kwargs) # noqa: E501
-
- @validate_call
- def envs_get_with_http_info(
- self, api_key: StrictStr, **kwargs
- ) -> ApiResponse: # noqa: E501
- """envs_get # noqa: E501
-
- List all environments # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.envs_get_with_http_info(api_key, async_req=True)
- >>> result = thread.get()
-
- :param api_key: (required)
- :type api_key: str
- :param async_req: Whether to execute the request asynchronously.
- :type async_req: bool, optional
- :param _preload_content: if False, the ApiResponse.data will
- be set to none and raw_data will store the
- HTTP response body without reading/decoding.
- Default is True.
- :type _preload_content: bool, optional
- :param _return_http_data_only: response data instead of ApiResponse
- object with status code, headers, etc
- :type _return_http_data_only: bool, optional
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :param _request_auth: set to override the auth_settings for an a single
- request; this effectively ignores the authentication
- in the spec for a single request.
- :type _request_auth: dict, optional
- :type _content_type: string, optional: force content-type for the request
- :return: Returns the result object.
- If the method is called asynchronously,
- returns the request thread.
- :rtype: tuple(List[Environment], status_code(int), headers(HTTPHeaderDict))
- """
-
- _params = locals()
-
- _all_params = ["api_key"]
- _all_params.extend(
- [
- "async_req",
- "_return_http_data_only",
- "_preload_content",
- "_request_timeout",
- "_request_auth",
- "_content_type",
- "_headers",
- ]
- )
-
- # validate the arguments
- for _key, _val in _params["kwargs"].items():
- if _key not in _all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method envs_get" % _key
- )
- _params[_key] = _val
- del _params["kwargs"]
-
- _collection_formats = {}
-
- # process the path parameters
- _path_params = {}
-
- # process the query parameters
- _query_params = []
- if _params.get("api_key") is not None: # noqa: E501
- _query_params.append(("api_key", _params["api_key"]))
-
- # process the header parameters
- _header_params = dict(_params.get("_headers", {}))
- # process the form parameters
- _form_params = []
- _files = {}
- # process the body parameter
- _body_params = None
- # set the HTTP header `Accept`
- _header_params["Accept"] = self.api_client.select_header_accept(
- ["application/json"]
- ) # noqa: E501
-
- # authentication setting
- _auth_settings = [] # noqa: E501
-
- _response_types_map = {
- "200": "List[Environment]",
- "401": "Error",
- "500": "Error",
- }
-
- return self.api_client.call_api(
- "/envs",
- "GET",
- _path_params,
- _query_params,
- _header_params,
- body=_body_params,
- post_params=_form_params,
- files=_files,
- response_types_map=_response_types_map,
- auth_settings=_auth_settings,
- async_req=_params.get("async_req"),
- _return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501
- _preload_content=_params.get("_preload_content", True),
- _request_timeout=_params.get("_request_timeout"),
- collection_formats=_collection_formats,
- _request_auth=_params.get("_request_auth"),
- )
-
- @validate_call
- def envs_post(
- self, api_key: StrictStr, new_environment: NewEnvironment, **kwargs
- ) -> Environment: # noqa: E501
- """envs_post # noqa: E501
-
- Create a new environment # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.envs_post(api_key, new_environment, async_req=True)
- >>> result = thread.get()
-
- :param api_key: (required)
- :type api_key: str
- :param new_environment: (required)
- :type new_environment: NewEnvironment
- :param async_req: Whether to execute the request asynchronously.
- :type async_req: bool, optional
- :param _request_timeout: timeout setting for this request.
- If one number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: Returns the result object.
- If the method is called asynchronously,
- returns the request thread.
- :rtype: Environment
- """
- kwargs["_return_http_data_only"] = True
- if "_preload_content" in kwargs:
- message = "Error! Please call the envs_post_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
- raise ValueError(message)
- return self.envs_post_with_http_info(
- api_key, new_environment, **kwargs
- ) # noqa: E501
-
- @validate_call
- def envs_post_with_http_info(
- self, api_key: StrictStr, new_environment: NewEnvironment, **kwargs
- ) -> ApiResponse: # noqa: E501
- """envs_post # noqa: E501
-
- Create a new environment # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.envs_post_with_http_info(api_key, new_environment, async_req=True)
- >>> result = thread.get()
-
- :param api_key: (required)
- :type api_key: str
- :param new_environment: (required)
- :type new_environment: NewEnvironment
- :param async_req: Whether to execute the request asynchronously.
- :type async_req: bool, optional
- :param _preload_content: if False, the ApiResponse.data will
- be set to none and raw_data will store the
- HTTP response body without reading/decoding.
- Default is True.
- :type _preload_content: bool, optional
- :param _return_http_data_only: response data instead of ApiResponse
- object with status code, headers, etc
- :type _return_http_data_only: bool, optional
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :param _request_auth: set to override the auth_settings for an a single
- request; this effectively ignores the authentication
- in the spec for a single request.
- :type _request_auth: dict, optional
- :type _content_type: string, optional: force content-type for the request
- :return: Returns the result object.
- If the method is called asynchronously,
- returns the request thread.
- :rtype: tuple(Environment, status_code(int), headers(HTTPHeaderDict))
- """
-
- _params = locals()
-
- _all_params = ["api_key", "new_environment"]
- _all_params.extend(
- [
- "async_req",
- "_return_http_data_only",
- "_preload_content",
- "_request_timeout",
- "_request_auth",
- "_content_type",
- "_headers",
- ]
- )
-
- # validate the arguments
- for _key, _val in _params["kwargs"].items():
- if _key not in _all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method envs_post" % _key
- )
- _params[_key] = _val
- del _params["kwargs"]
-
- _collection_formats = {}
-
- # process the path parameters
- _path_params = {}
-
- # process the query parameters
- _query_params = []
- if _params.get("api_key") is not None: # noqa: E501
- _query_params.append(("api_key", _params["api_key"]))
-
- # process the header parameters
- _header_params = dict(_params.get("_headers", {}))
- # process the form parameters
- _form_params = []
- _files = {}
- # process the body parameter
- _body_params = None
- if _params["new_environment"] is not None:
- _body_params = _params["new_environment"]
-
- # set the HTTP header `Accept`
- _header_params["Accept"] = self.api_client.select_header_accept(
- ["application/json"]
- ) # noqa: E501
-
- # set the HTTP header `Content-Type`
- _content_types_list = _params.get(
- "_content_type",
- self.api_client.select_header_content_type(["application/json"]),
- )
- if _content_types_list:
- _header_params["Content-Type"] = _content_types_list
-
- # authentication setting
- _auth_settings = [] # noqa: E501
-
- _response_types_map = {
- "200": "Environment",
- "400": "Error",
- "401": "Error",
- "500": "Error",
- }
-
- return self.api_client.call_api(
- "/envs",
- "POST",
- _path_params,
- _query_params,
- _header_params,
- body=_body_params,
- post_params=_form_params,
- files=_files,
- response_types_map=_response_types_map,
- auth_settings=_auth_settings,
- async_req=_params.get("async_req"),
- _return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501
- _preload_content=_params.get("_preload_content", True),
- _request_timeout=_params.get("_request_timeout"),
- collection_formats=_collection_formats,
- _request_auth=_params.get("_request_auth"),
- )
diff --git a/packages/python-sdk/e2b/api/v2/client/api/instances_api.py b/packages/python-sdk/e2b/api/v2/client/api/instances_api.py
new file mode 100644
index 000000000..2c4cdd4a3
--- /dev/null
+++ b/packages/python-sdk/e2b/api/v2/client/api/instances_api.py
@@ -0,0 +1,342 @@
+# coding: utf-8
+
+"""
+ E2B API
+
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+
+ The version of the OpenAPI document: 0.1.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import re # noqa: F401
+import io
+import warnings
+
+from pydantic import validate_call, ValidationError
+from typing_extensions import Annotated
+
+from pydantic import StrictStr
+
+from e2b.api.v2.client.models.instance import Instance
+from e2b.api.v2.client.models.new_instance import NewInstance
+
+from e2b.api.v2.client.api_client import ApiClient
+from e2b.api.v2.client.api_response import ApiResponse
+from e2b.api.v2.client.exceptions import ApiTypeError, ApiValueError # noqa: F401
+
+
+class InstancesApi:
+ """NOTE: This class is auto generated by OpenAPI Generator
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ def __init__(self, api_client=None) -> None:
+ if api_client is None:
+ api_client = ApiClient.get_default()
+ self.api_client = api_client
+
+ @validate_call
+ def instances_instance_id_refreshes_post(
+ self, instance_id: StrictStr, **kwargs
+ ) -> None: # noqa: E501
+ """instances_instance_id_refreshes_post # noqa: E501
+
+ Refresh the instance extending its time to live # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.instances_instance_id_refreshes_post(instance_id, async_req=True)
+ >>> result = thread.get()
+
+ :param instance_id: (required)
+ :type instance_id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _request_timeout: timeout setting for this request.
+ If one number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: None
+ """
+ kwargs["_return_http_data_only"] = True
+ if "_preload_content" in kwargs:
+ message = "Error! Please call the instances_instance_id_refreshes_post_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.instances_instance_id_refreshes_post_with_http_info(
+ instance_id, **kwargs
+ ) # noqa: E501
+
+ @validate_call
+ def instances_instance_id_refreshes_post_with_http_info(
+ self, instance_id: StrictStr, **kwargs
+ ) -> ApiResponse: # noqa: E501
+ """instances_instance_id_refreshes_post # noqa: E501
+
+ Refresh the instance extending its time to live # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.instances_instance_id_refreshes_post_with_http_info(instance_id, async_req=True)
+ >>> result = thread.get()
+
+ :param instance_id: (required)
+ :type instance_id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: None
+ """
+
+ _params = locals()
+
+ _all_params = ["instance_id"]
+ _all_params.extend(
+ [
+ "async_req",
+ "_return_http_data_only",
+ "_preload_content",
+ "_request_timeout",
+ "_request_auth",
+ "_content_type",
+ "_headers",
+ ]
+ )
+
+ # validate the arguments
+ for _key, _val in _params["kwargs"].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method instances_instance_id_refreshes_post" % _key
+ )
+ _params[_key] = _val
+ del _params["kwargs"]
+
+ _collection_formats = {}
+
+ # process the path parameters
+ _path_params = {}
+ if _params["instance_id"]:
+ _path_params["instanceID"] = _params["instance_id"]
+
+ # process the query parameters
+ _query_params = []
+ # process the header parameters
+ _header_params = dict(_params.get("_headers", {}))
+ # process the form parameters
+ _form_params = []
+ _files = {}
+ # process the body parameter
+ _body_params = None
+ # set the HTTP header `Accept`
+ _header_params["Accept"] = self.api_client.select_header_accept(
+ ["application/json"]
+ ) # noqa: E501
+
+ # authentication setting
+ _auth_settings = ["ApiKeyAuth"] # noqa: E501
+
+ _response_types_map = {}
+
+ return self.api_client.call_api(
+ "/instances/{instanceID}/refreshes",
+ "POST",
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ response_types_map=_response_types_map,
+ auth_settings=_auth_settings,
+ async_req=_params.get("async_req"),
+ _return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501
+ _preload_content=_params.get("_preload_content", True),
+ _request_timeout=_params.get("_request_timeout"),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get("_request_auth"),
+ )
+
+ @validate_call
+ def instances_post(
+ self, new_instance: NewInstance, **kwargs
+ ) -> Instance: # noqa: E501
+ """instances_post # noqa: E501
+
+ Create an instance from the environment # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.instances_post(new_instance, async_req=True)
+ >>> result = thread.get()
+
+ :param new_instance: (required)
+ :type new_instance: NewInstance
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _request_timeout: timeout setting for this request.
+ If one number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: Instance
+ """
+ kwargs["_return_http_data_only"] = True
+ if "_preload_content" in kwargs:
+ message = "Error! Please call the instances_post_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.instances_post_with_http_info(new_instance, **kwargs) # noqa: E501
+
+ @validate_call
+ def instances_post_with_http_info(
+ self, new_instance: NewInstance, **kwargs
+ ) -> ApiResponse: # noqa: E501
+ """instances_post # noqa: E501
+
+ Create an instance from the environment # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.instances_post_with_http_info(new_instance, async_req=True)
+ >>> result = thread.get()
+
+ :param new_instance: (required)
+ :type new_instance: NewInstance
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(Instance, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ _params = locals()
+
+ _all_params = ["new_instance"]
+ _all_params.extend(
+ [
+ "async_req",
+ "_return_http_data_only",
+ "_preload_content",
+ "_request_timeout",
+ "_request_auth",
+ "_content_type",
+ "_headers",
+ ]
+ )
+
+ # validate the arguments
+ for _key, _val in _params["kwargs"].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method instances_post" % _key
+ )
+ _params[_key] = _val
+ del _params["kwargs"]
+
+ _collection_formats = {}
+
+ # process the path parameters
+ _path_params = {}
+
+ # process the query parameters
+ _query_params = []
+ # process the header parameters
+ _header_params = dict(_params.get("_headers", {}))
+ # process the form parameters
+ _form_params = []
+ _files = {}
+ # process the body parameter
+ _body_params = None
+ if _params["new_instance"] is not None:
+ _body_params = _params["new_instance"]
+
+ # set the HTTP header `Accept`
+ _header_params["Accept"] = self.api_client.select_header_accept(
+ ["application/json"]
+ ) # noqa: E501
+
+ # set the HTTP header `Content-Type`
+ _content_types_list = _params.get(
+ "_content_type",
+ self.api_client.select_header_content_type(["application/json"]),
+ )
+ if _content_types_list:
+ _header_params["Content-Type"] = _content_types_list
+
+ # authentication setting
+ _auth_settings = ["ApiKeyAuth"] # noqa: E501
+
+ _response_types_map = {
+ "201": "Instance",
+ "401": "Error",
+ "400": "Error",
+ "500": "Error",
+ }
+
+ return self.api_client.call_api(
+ "/instances",
+ "POST",
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ response_types_map=_response_types_map,
+ auth_settings=_auth_settings,
+ async_req=_params.get("async_req"),
+ _return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501
+ _preload_content=_params.get("_preload_content", True),
+ _request_timeout=_params.get("_request_timeout"),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get("_request_auth"),
+ )
diff --git a/packages/python-sdk/e2b/api/v2/client/api/sessions_api.py b/packages/python-sdk/e2b/api/v2/client/api/sessions_api.py
deleted file mode 100644
index 4336537bd..000000000
--- a/packages/python-sdk/e2b/api/v2/client/api/sessions_api.py
+++ /dev/null
@@ -1,656 +0,0 @@
-# coding: utf-8
-
-"""
- Devbook
-
- Devbook API
-
- The version of the OpenAPI document: 1.0.0
- Generated by OpenAPI Generator (https://openapi-generator.tech)
-
- Do not edit the class manually.
-""" # noqa: E501
-
-
-import re # noqa: F401
-import io
-import warnings
-
-from pydantic import validate_call, ValidationError
-from typing_extensions import Annotated
-
-from pydantic import StrictStr
-
-from typing import List, Optional
-
-from e2b.api.v2.client.models.new_session import NewSession
-from e2b.api.v2.client.models.session import Session
-
-from e2b.api.v2.client.api_client import ApiClient
-from e2b.api.v2.client.api_response import ApiResponse
-from e2b.api.v2.client.exceptions import ApiTypeError, ApiValueError # noqa: F401
-
-
-class SessionsApi:
- """NOTE: This class is auto generated by OpenAPI Generator
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- def __init__(self, api_client=None) -> None:
- if api_client is None:
- api_client = ApiClient.get_default()
- self.api_client = api_client
-
- @validate_call
- def sessions_get(self, api_key: StrictStr, **kwargs) -> List[Session]: # noqa: E501
- """sessions_get # noqa: E501
-
- List all sessions # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.sessions_get(api_key, async_req=True)
- >>> result = thread.get()
-
- :param api_key: (required)
- :type api_key: str
- :param async_req: Whether to execute the request asynchronously.
- :type async_req: bool, optional
- :param _request_timeout: timeout setting for this request.
- If one number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: Returns the result object.
- If the method is called asynchronously,
- returns the request thread.
- :rtype: List[Session]
- """
- kwargs["_return_http_data_only"] = True
- if "_preload_content" in kwargs:
- message = "Error! Please call the sessions_get_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
- raise ValueError(message)
- return self.sessions_get_with_http_info(api_key, **kwargs) # noqa: E501
-
- @validate_call
- def sessions_get_with_http_info(
- self, api_key: StrictStr, **kwargs
- ) -> ApiResponse: # noqa: E501
- """sessions_get # noqa: E501
-
- List all sessions # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.sessions_get_with_http_info(api_key, async_req=True)
- >>> result = thread.get()
-
- :param api_key: (required)
- :type api_key: str
- :param async_req: Whether to execute the request asynchronously.
- :type async_req: bool, optional
- :param _preload_content: if False, the ApiResponse.data will
- be set to none and raw_data will store the
- HTTP response body without reading/decoding.
- Default is True.
- :type _preload_content: bool, optional
- :param _return_http_data_only: response data instead of ApiResponse
- object with status code, headers, etc
- :type _return_http_data_only: bool, optional
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :param _request_auth: set to override the auth_settings for an a single
- request; this effectively ignores the authentication
- in the spec for a single request.
- :type _request_auth: dict, optional
- :type _content_type: string, optional: force content-type for the request
- :return: Returns the result object.
- If the method is called asynchronously,
- returns the request thread.
- :rtype: tuple(List[Session], status_code(int), headers(HTTPHeaderDict))
- """
-
- _params = locals()
-
- _all_params = ["api_key"]
- _all_params.extend(
- [
- "async_req",
- "_return_http_data_only",
- "_preload_content",
- "_request_timeout",
- "_request_auth",
- "_content_type",
- "_headers",
- ]
- )
-
- # validate the arguments
- for _key, _val in _params["kwargs"].items():
- if _key not in _all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method sessions_get" % _key
- )
- _params[_key] = _val
- del _params["kwargs"]
-
- _collection_formats = {}
-
- # process the path parameters
- _path_params = {}
-
- # process the query parameters
- _query_params = []
- if _params.get("api_key") is not None: # noqa: E501
- _query_params.append(("api_key", _params["api_key"]))
-
- # process the header parameters
- _header_params = dict(_params.get("_headers", {}))
- # process the form parameters
- _form_params = []
- _files = {}
- # process the body parameter
- _body_params = None
- # set the HTTP header `Accept`
- _header_params["Accept"] = self.api_client.select_header_accept(
- ["application/json"]
- ) # noqa: E501
-
- # authentication setting
- _auth_settings = [] # noqa: E501
-
- _response_types_map = {
- "200": "List[Session]",
- "401": "Error",
- "500": "Error",
- }
-
- return self.api_client.call_api(
- "/sessions",
- "GET",
- _path_params,
- _query_params,
- _header_params,
- body=_body_params,
- post_params=_form_params,
- files=_files,
- response_types_map=_response_types_map,
- auth_settings=_auth_settings,
- async_req=_params.get("async_req"),
- _return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501
- _preload_content=_params.get("_preload_content", True),
- _request_timeout=_params.get("_request_timeout"),
- collection_formats=_collection_formats,
- _request_auth=_params.get("_request_auth"),
- )
-
- @validate_call
- def sessions_post(
- self, new_session: NewSession, api_key: Optional[StrictStr] = None, **kwargs
- ) -> Session: # noqa: E501
- """sessions_post # noqa: E501
-
- Create a session on the server # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.sessions_post(new_session, api_key, async_req=True)
- >>> result = thread.get()
-
- :param new_session: (required)
- :type new_session: NewSession
- :param api_key:
- :type api_key: str
- :param async_req: Whether to execute the request asynchronously.
- :type async_req: bool, optional
- :param _request_timeout: timeout setting for this request.
- If one number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: Returns the result object.
- If the method is called asynchronously,
- returns the request thread.
- :rtype: Session
- """
- kwargs["_return_http_data_only"] = True
- if "_preload_content" in kwargs:
- message = "Error! Please call the sessions_post_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
- raise ValueError(message)
- return self.sessions_post_with_http_info(
- new_session, api_key, **kwargs
- ) # noqa: E501
-
- @validate_call
- def sessions_post_with_http_info(
- self, new_session: NewSession, api_key: Optional[StrictStr] = None, **kwargs
- ) -> ApiResponse: # noqa: E501
- """sessions_post # noqa: E501
-
- Create a session on the server # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.sessions_post_with_http_info(new_session, api_key, async_req=True)
- >>> result = thread.get()
-
- :param new_session: (required)
- :type new_session: NewSession
- :param api_key:
- :type api_key: str
- :param async_req: Whether to execute the request asynchronously.
- :type async_req: bool, optional
- :param _preload_content: if False, the ApiResponse.data will
- be set to none and raw_data will store the
- HTTP response body without reading/decoding.
- Default is True.
- :type _preload_content: bool, optional
- :param _return_http_data_only: response data instead of ApiResponse
- object with status code, headers, etc
- :type _return_http_data_only: bool, optional
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :param _request_auth: set to override the auth_settings for an a single
- request; this effectively ignores the authentication
- in the spec for a single request.
- :type _request_auth: dict, optional
- :type _content_type: string, optional: force content-type for the request
- :return: Returns the result object.
- If the method is called asynchronously,
- returns the request thread.
- :rtype: tuple(Session, status_code(int), headers(HTTPHeaderDict))
- """
-
- _params = locals()
-
- _all_params = ["new_session", "api_key"]
- _all_params.extend(
- [
- "async_req",
- "_return_http_data_only",
- "_preload_content",
- "_request_timeout",
- "_request_auth",
- "_content_type",
- "_headers",
- ]
- )
-
- # validate the arguments
- for _key, _val in _params["kwargs"].items():
- if _key not in _all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method sessions_post" % _key
- )
- _params[_key] = _val
- del _params["kwargs"]
-
- _collection_formats = {}
-
- # process the path parameters
- _path_params = {}
-
- # process the query parameters
- _query_params = []
- if _params.get("api_key") is not None: # noqa: E501
- _query_params.append(("api_key", _params["api_key"]))
-
- # process the header parameters
- _header_params = dict(_params.get("_headers", {}))
- # process the form parameters
- _form_params = []
- _files = {}
- # process the body parameter
- _body_params = None
- if _params["new_session"] is not None:
- _body_params = _params["new_session"]
-
- # set the HTTP header `Accept`
- _header_params["Accept"] = self.api_client.select_header_accept(
- ["application/json"]
- ) # noqa: E501
-
- # set the HTTP header `Content-Type`
- _content_types_list = _params.get(
- "_content_type",
- self.api_client.select_header_content_type(["application/json"]),
- )
- if _content_types_list:
- _header_params["Content-Type"] = _content_types_list
-
- # authentication setting
- _auth_settings = [] # noqa: E501
-
- _response_types_map = {
- "201": "Session",
- "401": "Error",
- "400": "Error",
- "500": "Error",
- }
-
- return self.api_client.call_api(
- "/sessions",
- "POST",
- _path_params,
- _query_params,
- _header_params,
- body=_body_params,
- post_params=_form_params,
- files=_files,
- response_types_map=_response_types_map,
- auth_settings=_auth_settings,
- async_req=_params.get("async_req"),
- _return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501
- _preload_content=_params.get("_preload_content", True),
- _request_timeout=_params.get("_request_timeout"),
- collection_formats=_collection_formats,
- _request_auth=_params.get("_request_auth"),
- )
-
- @validate_call
- def sessions_session_id_delete(
- self, api_key: StrictStr, session_id: StrictStr, **kwargs
- ) -> None: # noqa: E501
- """sessions_session_id_delete # noqa: E501
-
- Delete a session on the server # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.sessions_session_id_delete(api_key, session_id, async_req=True)
- >>> result = thread.get()
-
- :param api_key: (required)
- :type api_key: str
- :param session_id: (required)
- :type session_id: str
- :param async_req: Whether to execute the request asynchronously.
- :type async_req: bool, optional
- :param _request_timeout: timeout setting for this request.
- If one number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: Returns the result object.
- If the method is called asynchronously,
- returns the request thread.
- :rtype: None
- """
- kwargs["_return_http_data_only"] = True
- if "_preload_content" in kwargs:
- message = "Error! Please call the sessions_session_id_delete_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
- raise ValueError(message)
- return self.sessions_session_id_delete_with_http_info(
- api_key, session_id, **kwargs
- ) # noqa: E501
-
- @validate_call
- def sessions_session_id_delete_with_http_info(
- self, api_key: StrictStr, session_id: StrictStr, **kwargs
- ) -> ApiResponse: # noqa: E501
- """sessions_session_id_delete # noqa: E501
-
- Delete a session on the server # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.sessions_session_id_delete_with_http_info(api_key, session_id, async_req=True)
- >>> result = thread.get()
-
- :param api_key: (required)
- :type api_key: str
- :param session_id: (required)
- :type session_id: str
- :param async_req: Whether to execute the request asynchronously.
- :type async_req: bool, optional
- :param _preload_content: if False, the ApiResponse.data will
- be set to none and raw_data will store the
- HTTP response body without reading/decoding.
- Default is True.
- :type _preload_content: bool, optional
- :param _return_http_data_only: response data instead of ApiResponse
- object with status code, headers, etc
- :type _return_http_data_only: bool, optional
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :param _request_auth: set to override the auth_settings for an a single
- request; this effectively ignores the authentication
- in the spec for a single request.
- :type _request_auth: dict, optional
- :type _content_type: string, optional: force content-type for the request
- :return: Returns the result object.
- If the method is called asynchronously,
- returns the request thread.
- :rtype: None
- """
-
- _params = locals()
-
- _all_params = ["api_key", "session_id"]
- _all_params.extend(
- [
- "async_req",
- "_return_http_data_only",
- "_preload_content",
- "_request_timeout",
- "_request_auth",
- "_content_type",
- "_headers",
- ]
- )
-
- # validate the arguments
- for _key, _val in _params["kwargs"].items():
- if _key not in _all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method sessions_session_id_delete" % _key
- )
- _params[_key] = _val
- del _params["kwargs"]
-
- _collection_formats = {}
-
- # process the path parameters
- _path_params = {}
- if _params["session_id"]:
- _path_params["sessionID"] = _params["session_id"]
-
- # process the query parameters
- _query_params = []
- if _params.get("api_key") is not None: # noqa: E501
- _query_params.append(("api_key", _params["api_key"]))
-
- # process the header parameters
- _header_params = dict(_params.get("_headers", {}))
- # process the form parameters
- _form_params = []
- _files = {}
- # process the body parameter
- _body_params = None
- # set the HTTP header `Accept`
- _header_params["Accept"] = self.api_client.select_header_accept(
- ["application/json"]
- ) # noqa: E501
-
- # authentication setting
- _auth_settings = [] # noqa: E501
-
- _response_types_map = {}
-
- return self.api_client.call_api(
- "/sessions/{sessionID}",
- "DELETE",
- _path_params,
- _query_params,
- _header_params,
- body=_body_params,
- post_params=_form_params,
- files=_files,
- response_types_map=_response_types_map,
- auth_settings=_auth_settings,
- async_req=_params.get("async_req"),
- _return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501
- _preload_content=_params.get("_preload_content", True),
- _request_timeout=_params.get("_request_timeout"),
- collection_formats=_collection_formats,
- _request_auth=_params.get("_request_auth"),
- )
-
- @validate_call
- def sessions_session_id_refresh_post(
- self, session_id: StrictStr, api_key: Optional[StrictStr] = None, **kwargs
- ) -> None: # noqa: E501
- """sessions_session_id_refresh_post # noqa: E501
-
- Refresh the session extending its time to live # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.sessions_session_id_refresh_post(session_id, api_key, async_req=True)
- >>> result = thread.get()
-
- :param session_id: (required)
- :type session_id: str
- :param api_key:
- :type api_key: str
- :param async_req: Whether to execute the request asynchronously.
- :type async_req: bool, optional
- :param _request_timeout: timeout setting for this request.
- If one number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: Returns the result object.
- If the method is called asynchronously,
- returns the request thread.
- :rtype: None
- """
- kwargs["_return_http_data_only"] = True
- if "_preload_content" in kwargs:
- message = "Error! Please call the sessions_session_id_refresh_post_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
- raise ValueError(message)
- return self.sessions_session_id_refresh_post_with_http_info(
- session_id, api_key, **kwargs
- ) # noqa: E501
-
- @validate_call
- def sessions_session_id_refresh_post_with_http_info(
- self, session_id: StrictStr, api_key: Optional[StrictStr] = None, **kwargs
- ) -> ApiResponse: # noqa: E501
- """sessions_session_id_refresh_post # noqa: E501
-
- Refresh the session extending its time to live # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.sessions_session_id_refresh_post_with_http_info(session_id, api_key, async_req=True)
- >>> result = thread.get()
-
- :param session_id: (required)
- :type session_id: str
- :param api_key:
- :type api_key: str
- :param async_req: Whether to execute the request asynchronously.
- :type async_req: bool, optional
- :param _preload_content: if False, the ApiResponse.data will
- be set to none and raw_data will store the
- HTTP response body without reading/decoding.
- Default is True.
- :type _preload_content: bool, optional
- :param _return_http_data_only: response data instead of ApiResponse
- object with status code, headers, etc
- :type _return_http_data_only: bool, optional
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :param _request_auth: set to override the auth_settings for an a single
- request; this effectively ignores the authentication
- in the spec for a single request.
- :type _request_auth: dict, optional
- :type _content_type: string, optional: force content-type for the request
- :return: Returns the result object.
- If the method is called asynchronously,
- returns the request thread.
- :rtype: None
- """
-
- _params = locals()
-
- _all_params = ["session_id", "api_key"]
- _all_params.extend(
- [
- "async_req",
- "_return_http_data_only",
- "_preload_content",
- "_request_timeout",
- "_request_auth",
- "_content_type",
- "_headers",
- ]
- )
-
- # validate the arguments
- for _key, _val in _params["kwargs"].items():
- if _key not in _all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method sessions_session_id_refresh_post" % _key
- )
- _params[_key] = _val
- del _params["kwargs"]
-
- _collection_formats = {}
-
- # process the path parameters
- _path_params = {}
- if _params["session_id"]:
- _path_params["sessionID"] = _params["session_id"]
-
- # process the query parameters
- _query_params = []
- if _params.get("api_key") is not None: # noqa: E501
- _query_params.append(("api_key", _params["api_key"]))
-
- # process the header parameters
- _header_params = dict(_params.get("_headers", {}))
- # process the form parameters
- _form_params = []
- _files = {}
- # process the body parameter
- _body_params = None
- # set the HTTP header `Accept`
- _header_params["Accept"] = self.api_client.select_header_accept(
- ["application/json"]
- ) # noqa: E501
-
- # authentication setting
- _auth_settings = [] # noqa: E501
-
- _response_types_map = {}
-
- return self.api_client.call_api(
- "/sessions/{sessionID}/refresh",
- "POST",
- _path_params,
- _query_params,
- _header_params,
- body=_body_params,
- post_params=_form_params,
- files=_files,
- response_types_map=_response_types_map,
- auth_settings=_auth_settings,
- async_req=_params.get("async_req"),
- _return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501
- _preload_content=_params.get("_preload_content", True),
- _request_timeout=_params.get("_request_timeout"),
- collection_formats=_collection_formats,
- _request_auth=_params.get("_request_auth"),
- )
diff --git a/packages/python-sdk/e2b/api/v2/client/api_client.py b/packages/python-sdk/e2b/api/v2/client/api_client.py
index 52b65a7ba..c4492a3cf 100644
--- a/packages/python-sdk/e2b/api/v2/client/api_client.py
+++ b/packages/python-sdk/e2b/api/v2/client/api_client.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Devbook
+ E2B API
- Devbook API
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
- The version of the OpenAPI document: 1.0.0
+ The version of the OpenAPI document: 0.1.0
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
diff --git a/packages/python-sdk/e2b/api/v2/client/configuration.py b/packages/python-sdk/e2b/api/v2/client/configuration.py
index f083e0bb4..06354cf5f 100644
--- a/packages/python-sdk/e2b/api/v2/client/configuration.py
+++ b/packages/python-sdk/e2b/api/v2/client/configuration.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Devbook
+ E2B API
- Devbook API
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
- The version of the OpenAPI document: 1.0.0
+ The version of the OpenAPI document: 0.1.0
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@@ -100,7 +100,7 @@ class Configuration:
ssl_ca_cert=None,
) -> None:
"""Constructor"""
- self._base_path = "https://ondevbook.com" if host is None else host
+ self._base_path = "https://api.e2b.dev" if host is None else host
"""Default Base url
"""
self.server_index = 0 if server_index is None and host is None else server_index
@@ -395,12 +395,20 @@ class Configuration:
if "ApiKeyAuth" in self.api_key:
auth["ApiKeyAuth"] = {
"type": "api_key",
- "in": "query",
- "key": "api_key",
+ "in": "header",
+ "key": "X-API-Key",
"value": self.get_api_key_with_prefix(
"ApiKeyAuth",
),
}
+ if self.access_token is not None:
+ auth["AccessTokenAuth"] = {
+ "type": "bearer",
+ "in": "header",
+ "format": "access_token",
+ "key": "Authorization",
+ "value": "Bearer " + self.access_token,
+ }
return auth
def to_debug_report(self):
@@ -412,7 +420,7 @@ class Configuration:
"Python SDK Debug Report:\n"
"OS: {env}\n"
"Python Version: {pyversion}\n"
- "Version of the API: 1.0.0\n"
+ "Version of the API: 0.1.0\n"
"SDK Package Version: 1.0.0".format(env=sys.platform, pyversion=sys.version)
)
@@ -423,41 +431,9 @@ class Configuration:
"""
return [
{
- "url": "https://ondevbook.com",
- "description": "API endpoint",
- },
- {
- "url": "https://{sessionID}-{clientID}.ondevbook.com",
- "description": "Session endpoint without a specified port",
- "variables": {
- "sessionID": {
- "description": "ID of the session",
- "default_value": "_sessionID",
- },
- "clientID": {
- "description": "ID of the client",
- "default_value": "_clientID",
- },
- },
- },
- {
- "url": "https://{port}-{sessionID}-{clientID}.ondevbook.com",
- "description": "Session endpoint with a specificed port",
- "variables": {
- "sessionID": {
- "description": "ID of the session",
- "default_value": "_sessionID",
- },
- "clientID": {
- "description": "ID of the client",
- "default_value": "_clientID",
- },
- "port": {
- "description": "Devbook Daemon default port",
- "default_value": "49982",
- },
- },
- },
+ "url": "https://api.e2b.dev",
+ "description": "No description provided",
+ }
]
def get_host_from_settings(self, index, variables=None, servers=None):
diff --git a/packages/python-sdk/e2b/api/v2/client/exceptions.py b/packages/python-sdk/e2b/api/v2/client/exceptions.py
index 4c4b7ef7b..5a56914c5 100644
--- a/packages/python-sdk/e2b/api/v2/client/exceptions.py
+++ b/packages/python-sdk/e2b/api/v2/client/exceptions.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Devbook
+ E2B API
- Devbook API
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
- The version of the OpenAPI document: 1.0.0
+ The version of the OpenAPI document: 0.1.0
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
diff --git a/packages/python-sdk/e2b/api/v2/client/models/__init__.py b/packages/python-sdk/e2b/api/v2/client/models/__init__.py
index a1f74fef6..646ade16c 100644
--- a/packages/python-sdk/e2b/api/v2/client/models/__init__.py
+++ b/packages/python-sdk/e2b/api/v2/client/models/__init__.py
@@ -2,11 +2,11 @@
# flake8: noqa
"""
- Devbook
+ E2B API
- Devbook API
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
- The version of the OpenAPI document: 1.0.0
+ The version of the OpenAPI document: 0.1.0
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@@ -15,11 +15,10 @@
# import models into model package
from e2b.api.v2.client.models.environment import Environment
-from e2b.api.v2.client.models.environment_state import EnvironmentState
-from e2b.api.v2.client.models.environment_state_update import EnvironmentStateUpdate
-from e2b.api.v2.client.models.environment_title_update import EnvironmentTitleUpdate
+from e2b.api.v2.client.models.environment_build import EnvironmentBuild
+from e2b.api.v2.client.models.envs_env_id_builds_build_id_logs_post_request import (
+ EnvsEnvIDBuildsBuildIDLogsPostRequest,
+)
from e2b.api.v2.client.models.error import Error
-from e2b.api.v2.client.models.new_environment import NewEnvironment
-from e2b.api.v2.client.models.new_session import NewSession
-from e2b.api.v2.client.models.session import Session
-from e2b.api.v2.client.models.template import Template
+from e2b.api.v2.client.models.instance import Instance
+from e2b.api.v2.client.models.new_instance import NewInstance
diff --git a/packages/python-sdk/e2b/api/v2/client/models/environment.py b/packages/python-sdk/e2b/api/v2/client/models/environment.py
index b8e959b25..a450a7dd2 100644
--- a/packages/python-sdk/e2b/api/v2/client/models/environment.py
+++ b/packages/python-sdk/e2b/api/v2/client/models/environment.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Devbook
+ E2B API
- Devbook API
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
- The version of the OpenAPI document: 1.0.0
+ The version of the OpenAPI document: 0.1.0
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@@ -18,8 +18,7 @@ import re # noqa: F401
import json
-from typing import Optional
-from pydantic import BaseModel, Field, StrictStr
+from pydantic import BaseModel, Field, StrictBool, StrictStr
class Environment(BaseModel):
@@ -27,9 +26,18 @@ class Environment(BaseModel):
Environment
"""
- id: StrictStr = Field(...)
- template: Optional[StrictStr] = None
- title: Optional[StrictStr] = None
+ env_id: StrictStr = Field(
+ ..., alias="envID", description="Identifier of the environment"
+ )
+ build_id: StrictStr = Field(
+ ...,
+ alias="buildID",
+ description="Identifier of the last successful build for given environment",
+ )
+ public: StrictBool = Field(
+ ...,
+ description="Whether the environment is public or only accessible by the team",
+ )
"""Pydantic configuration"""
model_config = {
@@ -66,7 +74,7 @@ class Environment(BaseModel):
# raise errors for additional fields in the input
for _key in obj.keys():
- if _key not in ["id", "template", "title"]:
+ if _key not in ["envID", "buildID", "public"]:
raise ValueError(
"Error due to additional fields (not defined in Environment) in the input: "
+ obj
@@ -74,9 +82,9 @@ class Environment(BaseModel):
_obj = Environment.model_validate(
{
- "id": obj.get("id"),
- "template": obj.get("template"),
- "title": obj.get("title"),
+ "env_id": obj.get("envID"),
+ "build_id": obj.get("buildID"),
+ "public": obj.get("public"),
}
)
return _obj
diff --git a/packages/python-sdk/e2b/api/v2/client/models/environment_build.py b/packages/python-sdk/e2b/api/v2/client/models/environment_build.py
new file mode 100644
index 000000000..49e8ef17b
--- /dev/null
+++ b/packages/python-sdk/e2b/api/v2/client/models/environment_build.py
@@ -0,0 +1,100 @@
+# coding: utf-8
+
+"""
+ E2B API
+
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+
+ The version of the OpenAPI document: 0.1.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import List, Optional
+from pydantic import BaseModel, Field, StrictStr, conlist, field_validator
+
+
+class EnvironmentBuild(BaseModel):
+ """
+ EnvironmentBuild
+ """
+
+ logs: conlist(StrictStr) = Field(..., description="Build logs")
+ env_id: StrictStr = Field(
+ ..., alias="envID", description="Identifier of the environment"
+ )
+ build_id: StrictStr = Field(
+ ..., alias="buildID", description="Identifier of the build"
+ )
+ status: Optional[StrictStr] = Field(None, description="Status of the environment")
+
+ @field_validator("status")
+ def status_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in ("building", "ready", "error"):
+ raise ValueError(
+ "must be one of enum values ('building', 'ready', 'error')"
+ )
+ return value
+
+ """Pydantic configuration"""
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ }
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> EnvironmentBuild:
+ """Create an instance of EnvironmentBuild from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.model_dump(by_alias=True, exclude={}, exclude_none=True)
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: dict) -> EnvironmentBuild:
+ """Create an instance of EnvironmentBuild from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return EnvironmentBuild.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in ["logs", "envID", "buildID", "status"]:
+ raise ValueError(
+ "Error due to additional fields (not defined in EnvironmentBuild) in the input: "
+ + obj
+ )
+
+ _obj = EnvironmentBuild.model_validate(
+ {
+ "logs": obj.get("logs"),
+ "env_id": obj.get("envID"),
+ "build_id": obj.get("buildID"),
+ "status": obj.get("status"),
+ }
+ )
+ return _obj
diff --git a/packages/python-sdk/e2b/api/v2/client/models/environment_state.py b/packages/python-sdk/e2b/api/v2/client/models/environment_state.py
deleted file mode 100644
index 6ee94e4dd..000000000
--- a/packages/python-sdk/e2b/api/v2/client/models/environment_state.py
+++ /dev/null
@@ -1,36 +0,0 @@
-# coding: utf-8
-
-"""
- Devbook
-
- Devbook API
-
- The version of the OpenAPI document: 1.0.0
- Generated by OpenAPI Generator (https://openapi-generator.tech)
-
- Do not edit the class manually.
-""" # noqa: E501
-
-
-import json
-import pprint
-import re # noqa: F401
-from aenum import Enum, no_arg
-
-
-class EnvironmentState(str, Enum):
- """
- EnvironmentState
- """
-
- """
- allowed enum values
- """
- BUILDING = "Building"
- FAILED = "Failed"
- DONE = "Done"
-
- @classmethod
- def from_json(cls, json_str: str) -> EnvironmentState:
- """Create an instance of EnvironmentState from a JSON string"""
- return EnvironmentState(json.loads(json_str))
diff --git a/packages/python-sdk/e2b/api/v2/client/models/environment_title_update.py b/packages/python-sdk/e2b/api/v2/client/models/environment_title_update.py
deleted file mode 100644
index 5f9163960..000000000
--- a/packages/python-sdk/e2b/api/v2/client/models/environment_title_update.py
+++ /dev/null
@@ -1,74 +0,0 @@
-# coding: utf-8
-
-"""
- Devbook
-
- Devbook API
-
- The version of the OpenAPI document: 1.0.0
- Generated by OpenAPI Generator (https://openapi-generator.tech)
-
- Do not edit the class manually.
-""" # noqa: E501
-
-
-from __future__ import annotations
-import pprint
-import re # noqa: F401
-import json
-
-
-from typing import Optional
-from pydantic import BaseModel, StrictStr
-
-
-class EnvironmentTitleUpdate(BaseModel):
- """
- EnvironmentTitleUpdate
- """
-
- title: Optional[StrictStr] = None
-
- """Pydantic configuration"""
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True,
- }
-
- def to_str(self) -> str:
- """Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
-
- def to_json(self) -> str:
- """Returns the JSON representation of the model using alias"""
- return json.dumps(self.to_dict())
-
- @classmethod
- def from_json(cls, json_str: str) -> EnvironmentTitleUpdate:
- """Create an instance of EnvironmentTitleUpdate from a JSON string"""
- return cls.from_dict(json.loads(json_str))
-
- def to_dict(self):
- """Returns the dictionary representation of the model using alias"""
- _dict = self.model_dump(by_alias=True, exclude={}, exclude_none=True)
- return _dict
-
- @classmethod
- def from_dict(cls, obj: dict) -> EnvironmentTitleUpdate:
- """Create an instance of EnvironmentTitleUpdate from a dict"""
- if obj is None:
- return None
-
- if not isinstance(obj, dict):
- return EnvironmentTitleUpdate.model_validate(obj)
-
- # raise errors for additional fields in the input
- for _key in obj.keys():
- if _key not in ["title"]:
- raise ValueError(
- "Error due to additional fields (not defined in EnvironmentTitleUpdate) in the input: "
- + obj
- )
-
- _obj = EnvironmentTitleUpdate.model_validate({"title": obj.get("title")})
- return _obj
diff --git a/packages/python-sdk/e2b/api/v2/client/models/environment_state_update.py b/packages/python-sdk/e2b/api/v2/client/models/envs_env_id_builds_build_id_logs_post_request.py
similarity index 53%
rename from packages/python-sdk/e2b/api/v2/client/models/environment_state_update.py
rename to packages/python-sdk/e2b/api/v2/client/models/envs_env_id_builds_build_id_logs_post_request.py
index 2388f0a23..ad1f55713 100644
--- a/packages/python-sdk/e2b/api/v2/client/models/environment_state_update.py
+++ b/packages/python-sdk/e2b/api/v2/client/models/envs_env_id_builds_build_id_logs_post_request.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Devbook
+ E2B API
- Devbook API
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
- The version of the OpenAPI document: 1.0.0
+ The version of the OpenAPI document: 0.1.0
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@@ -18,16 +18,17 @@ import re # noqa: F401
import json
-from pydantic import BaseModel, Field
-from e2b.api.v2.client.models.environment_state import EnvironmentState
+from typing import List
+from pydantic import BaseModel, Field, StrictStr, conlist
-class EnvironmentStateUpdate(BaseModel):
+class EnvsEnvIDBuildsBuildIDLogsPostRequest(BaseModel):
"""
- EnvironmentStateUpdate
+ EnvsEnvIDBuildsBuildIDLogsPostRequest
"""
- state: EnvironmentState = Field(...)
+ api_secret: StrictStr = Field(..., alias="apiSecret", description="API secret")
+ logs: conlist(StrictStr) = Field(...)
"""Pydantic configuration"""
model_config = {
@@ -44,8 +45,8 @@ class EnvironmentStateUpdate(BaseModel):
return json.dumps(self.to_dict())
@classmethod
- def from_json(cls, json_str: str) -> EnvironmentStateUpdate:
- """Create an instance of EnvironmentStateUpdate from a JSON string"""
+ def from_json(cls, json_str: str) -> EnvsEnvIDBuildsBuildIDLogsPostRequest:
+ """Create an instance of EnvsEnvIDBuildsBuildIDLogsPostRequest from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self):
@@ -54,21 +55,23 @@ class EnvironmentStateUpdate(BaseModel):
return _dict
@classmethod
- def from_dict(cls, obj: dict) -> EnvironmentStateUpdate:
- """Create an instance of EnvironmentStateUpdate from a dict"""
+ def from_dict(cls, obj: dict) -> EnvsEnvIDBuildsBuildIDLogsPostRequest:
+ """Create an instance of EnvsEnvIDBuildsBuildIDLogsPostRequest from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return EnvironmentStateUpdate.model_validate(obj)
+ return EnvsEnvIDBuildsBuildIDLogsPostRequest.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
- if _key not in ["state"]:
+ if _key not in ["apiSecret", "logs"]:
raise ValueError(
- "Error due to additional fields (not defined in EnvironmentStateUpdate) in the input: "
+ "Error due to additional fields (not defined in EnvsEnvIDBuildsBuildIDLogsPostRequest) in the input: "
+ obj
)
- _obj = EnvironmentStateUpdate.model_validate({"state": obj.get("state")})
+ _obj = EnvsEnvIDBuildsBuildIDLogsPostRequest.model_validate(
+ {"api_secret": obj.get("apiSecret"), "logs": obj.get("logs")}
+ )
return _obj
diff --git a/packages/python-sdk/e2b/api/v2/client/models/error.py b/packages/python-sdk/e2b/api/v2/client/models/error.py
index 5003ab819..7eadb2165 100644
--- a/packages/python-sdk/e2b/api/v2/client/models/error.py
+++ b/packages/python-sdk/e2b/api/v2/client/models/error.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Devbook
+ E2B API
- Devbook API
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
- The version of the OpenAPI document: 1.0.0
+ The version of the OpenAPI document: 0.1.0
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
diff --git a/packages/python-sdk/e2b/api/v2/client/models/session.py b/packages/python-sdk/e2b/api/v2/client/models/instance.py
similarity index 56%
rename from packages/python-sdk/e2b/api/v2/client/models/session.py
rename to packages/python-sdk/e2b/api/v2/client/models/instance.py
index 908922918..722beac24 100644
--- a/packages/python-sdk/e2b/api/v2/client/models/session.py
+++ b/packages/python-sdk/e2b/api/v2/client/models/instance.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Devbook
+ E2B API
- Devbook API
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
- The version of the OpenAPI document: 1.0.0
+ The version of the OpenAPI document: 0.1.0
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@@ -18,26 +18,21 @@ import re # noqa: F401
import json
-from pydantic import BaseModel, Field, StrictBool, StrictStr
+from pydantic import BaseModel, Field, StrictStr
-class Session(BaseModel):
+class Instance(BaseModel):
"""
- Session
+ Instance
"""
- code_snippet_id: StrictStr = Field(
+ env_id: StrictStr = Field(
...,
- alias="codeSnippetID",
- description="Identifier of a code snippet which which is the environment associated",
+ alias="envID",
+ description="Identifier of the environment from which is the instance created",
)
- edit_enabled: StrictBool = Field(
- ...,
- alias="editEnabled",
- description="Information if the session is a shared persistent edit session",
- )
- session_id: StrictStr = Field(
- ..., alias="sessionID", description="Identifier of the session"
+ instance_id: StrictStr = Field(
+ ..., alias="instanceID", description="Identifier of the instance"
)
client_id: StrictStr = Field(
..., alias="clientID", description="Identifier of the client"
@@ -58,8 +53,8 @@ class Session(BaseModel):
return json.dumps(self.to_dict())
@classmethod
- def from_json(cls, json_str: str) -> Session:
- """Create an instance of Session from a JSON string"""
+ def from_json(cls, json_str: str) -> Instance:
+ """Create an instance of Instance from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self):
@@ -68,27 +63,26 @@ class Session(BaseModel):
return _dict
@classmethod
- def from_dict(cls, obj: dict) -> Session:
- """Create an instance of Session from a dict"""
+ def from_dict(cls, obj: dict) -> Instance:
+ """Create an instance of Instance from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return Session.model_validate(obj)
+ return Instance.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
- if _key not in ["codeSnippetID", "editEnabled", "sessionID", "clientID"]:
+ if _key not in ["envID", "instanceID", "clientID"]:
raise ValueError(
- "Error due to additional fields (not defined in Session) in the input: "
+ "Error due to additional fields (not defined in Instance) in the input: "
+ obj
)
- _obj = Session.model_validate(
+ _obj = Instance.model_validate(
{
- "code_snippet_id": obj.get("codeSnippetID"),
- "edit_enabled": obj.get("editEnabled"),
- "session_id": obj.get("sessionID"),
+ "env_id": obj.get("envID"),
+ "instance_id": obj.get("instanceID"),
"client_id": obj.get("clientID"),
}
)
diff --git a/packages/python-sdk/e2b/api/v2/client/models/new_environment.py b/packages/python-sdk/e2b/api/v2/client/models/new_instance.py
similarity index 64%
rename from packages/python-sdk/e2b/api/v2/client/models/new_environment.py
rename to packages/python-sdk/e2b/api/v2/client/models/new_instance.py
index b98a4a8f0..21927f301 100644
--- a/packages/python-sdk/e2b/api/v2/client/models/new_environment.py
+++ b/packages/python-sdk/e2b/api/v2/client/models/new_instance.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Devbook
+ E2B API
- Devbook API
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
- The version of the OpenAPI document: 1.0.0
+ The version of the OpenAPI document: 0.1.0
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
@@ -18,17 +18,17 @@ import re # noqa: F401
import json
-from typing import Optional
from pydantic import BaseModel, Field, StrictStr
-class NewEnvironment(BaseModel):
+class NewInstance(BaseModel):
"""
- NewEnvironment
+ NewInstance
"""
- title: Optional[StrictStr] = None
- template: StrictStr = Field(...)
+ env_id: StrictStr = Field(
+ ..., alias="envID", description="Identifier of the required environment"
+ )
"""Pydantic configuration"""
model_config = {
@@ -45,8 +45,8 @@ class NewEnvironment(BaseModel):
return json.dumps(self.to_dict())
@classmethod
- def from_json(cls, json_str: str) -> NewEnvironment:
- """Create an instance of NewEnvironment from a JSON string"""
+ def from_json(cls, json_str: str) -> NewInstance:
+ """Create an instance of NewInstance from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self):
@@ -55,23 +55,21 @@ class NewEnvironment(BaseModel):
return _dict
@classmethod
- def from_dict(cls, obj: dict) -> NewEnvironment:
- """Create an instance of NewEnvironment from a dict"""
+ def from_dict(cls, obj: dict) -> NewInstance:
+ """Create an instance of NewInstance from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return NewEnvironment.model_validate(obj)
+ return NewInstance.model_validate(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
- if _key not in ["title", "template"]:
+ if _key not in ["envID"]:
raise ValueError(
- "Error due to additional fields (not defined in NewEnvironment) in the input: "
+ "Error due to additional fields (not defined in NewInstance) in the input: "
+ obj
)
- _obj = NewEnvironment.model_validate(
- {"title": obj.get("title"), "template": obj.get("template")}
- )
+ _obj = NewInstance.model_validate({"env_id": obj.get("envID")})
return _obj
diff --git a/packages/python-sdk/e2b/api/v2/client/models/new_session.py b/packages/python-sdk/e2b/api/v2/client/models/new_session.py
deleted file mode 100644
index f6352af16..000000000
--- a/packages/python-sdk/e2b/api/v2/client/models/new_session.py
+++ /dev/null
@@ -1,90 +0,0 @@
-# coding: utf-8
-
-"""
- Devbook
-
- Devbook API
-
- The version of the OpenAPI document: 1.0.0
- Generated by OpenAPI Generator (https://openapi-generator.tech)
-
- Do not edit the class manually.
-""" # noqa: E501
-
-
-from __future__ import annotations
-import pprint
-import re # noqa: F401
-import json
-
-
-from typing import Optional
-from pydantic import BaseModel, Field, StrictBool, StrictStr
-
-
-class NewSession(BaseModel):
- """
- NewSession
- """
-
- edit_enabled: Optional[StrictBool] = Field(
- False,
- alias="editEnabled",
- description="Option determining if the session is a shared persistent edit session",
- )
- code_snippet_id: StrictStr = Field(
- ...,
- alias="codeSnippetID",
- description="Identifier of a code snippet which which is the environment associated",
- )
-
- """Pydantic configuration"""
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True,
- }
-
- def to_str(self) -> str:
- """Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
-
- def to_json(self) -> str:
- """Returns the JSON representation of the model using alias"""
- return json.dumps(self.to_dict())
-
- @classmethod
- def from_json(cls, json_str: str) -> NewSession:
- """Create an instance of NewSession from a JSON string"""
- return cls.from_dict(json.loads(json_str))
-
- def to_dict(self):
- """Returns the dictionary representation of the model using alias"""
- _dict = self.model_dump(by_alias=True, exclude={}, exclude_none=True)
- return _dict
-
- @classmethod
- def from_dict(cls, obj: dict) -> NewSession:
- """Create an instance of NewSession from a dict"""
- if obj is None:
- return None
-
- if not isinstance(obj, dict):
- return NewSession.model_validate(obj)
-
- # raise errors for additional fields in the input
- for _key in obj.keys():
- if _key not in ["editEnabled", "codeSnippetID"]:
- raise ValueError(
- "Error due to additional fields (not defined in NewSession) in the input: "
- + obj
- )
-
- _obj = NewSession.model_validate(
- {
- "edit_enabled": obj.get("editEnabled")
- if obj.get("editEnabled") is not None
- else False,
- "code_snippet_id": obj.get("codeSnippetID"),
- }
- )
- return _obj
diff --git a/packages/python-sdk/e2b/api/v2/client/models/template.py b/packages/python-sdk/e2b/api/v2/client/models/template.py
deleted file mode 100644
index 86004936c..000000000
--- a/packages/python-sdk/e2b/api/v2/client/models/template.py
+++ /dev/null
@@ -1,42 +0,0 @@
-# coding: utf-8
-
-"""
- Devbook
-
- Devbook API
-
- The version of the OpenAPI document: 1.0.0
- Generated by OpenAPI Generator (https://openapi-generator.tech)
-
- Do not edit the class manually.
-""" # noqa: E501
-
-
-import json
-import pprint
-import re # noqa: F401
-from aenum import Enum, no_arg
-
-
-class Template(str, Enum):
- """
- Template
- """
-
- """
- allowed enum values
- """
- NODEJS = "Nodejs"
- GO = "Go"
- BASH = "Bash"
- RUST = "Rust"
- PYTHON3 = "Python3"
- PHP = "PHP"
- JAVA = "Java"
- PERL = "Perl"
- DOTNET = "DotNET"
-
- @classmethod
- def from_json(cls, json_str: str) -> Template:
- """Create an instance of Template from a JSON string"""
- return Template(json.loads(json_str))
diff --git a/packages/python-sdk/e2b/api/v2/client/rest.py b/packages/python-sdk/e2b/api/v2/client/rest.py
index 4bb580c8c..3ac979fd9 100644
--- a/packages/python-sdk/e2b/api/v2/client/rest.py
+++ b/packages/python-sdk/e2b/api/v2/client/rest.py
@@ -1,11 +1,11 @@
# coding: utf-8
"""
- Devbook
+ E2B API
- Devbook API
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
- The version of the OpenAPI document: 1.0.0
+ The version of the OpenAPI document: 0.1.0
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
diff --git a/packages/python-sdk/e2b/api/v2/client_README.md b/packages/python-sdk/e2b/api/v2/client_README.md
index b8f10e56a..b9be88e93 100644
--- a/packages/python-sdk/e2b/api/v2/client_README.md
+++ b/packages/python-sdk/e2b/api/v2/client_README.md
@@ -1,9 +1,9 @@
# e2b.api.v2.client
-Devbook API
+No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
The `e2b.api.v2.client` package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
-- API version: 1.0.0
+- API version: 0.1.0
- Package version: 1.0.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
@@ -34,57 +34,55 @@ import e2b.api.v2.client
from e2b.api.v2.client.rest import ApiException
from pprint import pprint
-# Defining the host is optional and defaults to https://ondevbook.com
+# Defining the host is optional and defaults to https://api.e2b.dev
# See configuration.py for a list of all supported configuration parameters.
configuration = e2b.api.v2.client.Configuration(
- host = "https://ondevbook.com"
+ host = "https://api.e2b.dev"
)
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: ApiKeyAuth
+configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
# Enter a context with an instance of the API client
with e2b.api.v2.client.ApiClient(configuration) as api_client:
# Create an instance of the API class
- api_instance = e2b.api.v2.client.DefaultApi(api_client)
+ api_instance = e2b.api.v2.client.InstancesApi(api_client)
+ instance_id = 'instance_id_example' # str |
try:
- api_instance.health_get()
+ api_instance.instances_instance_id_refreshes_post(instance_id)
except ApiException as e:
- print("Exception when calling DefaultApi->health_get: %s\n" % e)
+ print("Exception when calling InstancesApi->instances_instance_id_refreshes_post: %s\n" % e)
```
## Documentation for API Endpoints
-All URIs are relative to *https://ondevbook.com*
+All URIs are relative to *https://api.e2b.dev*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
-*DefaultApi* | [**health_get**](e2b/api/v2/client/docs/DefaultApi.md#health_get) | **GET** /health |
-*EnvsApi* | [**envs_code_snippet_id_delete**](e2b/api/v2/client/docs/EnvsApi.md#envs_code_snippet_id_delete) | **DELETE** /envs/{codeSnippetID} |
-*EnvsApi* | [**envs_code_snippet_id_patch**](e2b/api/v2/client/docs/EnvsApi.md#envs_code_snippet_id_patch) | **PATCH** /envs/{codeSnippetID} |
-*EnvsApi* | [**envs_code_snippet_id_post**](e2b/api/v2/client/docs/EnvsApi.md#envs_code_snippet_id_post) | **POST** /envs/{codeSnippetID} |
-*EnvsApi* | [**envs_code_snippet_id_state_put**](e2b/api/v2/client/docs/EnvsApi.md#envs_code_snippet_id_state_put) | **PUT** /envs/{codeSnippetID}/state |
-*EnvsApi* | [**envs_code_snippet_id_title_put**](e2b/api/v2/client/docs/EnvsApi.md#envs_code_snippet_id_title_put) | **PUT** /envs/{codeSnippetID}/title |
-*EnvsApi* | [**envs_get**](e2b/api/v2/client/docs/EnvsApi.md#envs_get) | **GET** /envs |
-*EnvsApi* | [**envs_post**](e2b/api/v2/client/docs/EnvsApi.md#envs_post) | **POST** /envs |
-*SessionsApi* | [**sessions_get**](e2b/api/v2/client/docs/SessionsApi.md#sessions_get) | **GET** /sessions |
-*SessionsApi* | [**sessions_post**](e2b/api/v2/client/docs/SessionsApi.md#sessions_post) | **POST** /sessions |
-*SessionsApi* | [**sessions_session_id_delete**](e2b/api/v2/client/docs/SessionsApi.md#sessions_session_id_delete) | **DELETE** /sessions/{sessionID} |
-*SessionsApi* | [**sessions_session_id_refresh_post**](e2b/api/v2/client/docs/SessionsApi.md#sessions_session_id_refresh_post) | **POST** /sessions/{sessionID}/refresh |
+*InstancesApi* | [**instances_instance_id_refreshes_post**](e2b/api/v2/client/docs/InstancesApi.md#instances_instance_id_refreshes_post) | **POST** /instances/{instanceID}/refreshes |
+*InstancesApi* | [**instances_post**](e2b/api/v2/client/docs/InstancesApi.md#instances_post) | **POST** /instances |
## Documentation For Models
- [Environment](e2b/api/v2/client/docs/Environment.md)
- - [EnvironmentState](e2b/api/v2/client/docs/EnvironmentState.md)
- - [EnvironmentStateUpdate](e2b/api/v2/client/docs/EnvironmentStateUpdate.md)
- - [EnvironmentTitleUpdate](e2b/api/v2/client/docs/EnvironmentTitleUpdate.md)
+ - [EnvironmentBuild](e2b/api/v2/client/docs/EnvironmentBuild.md)
+ - [EnvsEnvIDBuildsBuildIDLogsPostRequest](e2b/api/v2/client/docs/EnvsEnvIDBuildsBuildIDLogsPostRequest.md)
- [Error](e2b/api/v2/client/docs/Error.md)
- - [NewEnvironment](e2b/api/v2/client/docs/NewEnvironment.md)
- - [NewSession](e2b/api/v2/client/docs/NewSession.md)
- - [Session](e2b/api/v2/client/docs/Session.md)
- - [Template](e2b/api/v2/client/docs/Template.md)
+ - [Instance](e2b/api/v2/client/docs/Instance.md)
+ - [NewInstance](e2b/api/v2/client/docs/NewInstance.md)
<a id="documentation-for-authorization"></a>
@@ -96,8 +94,13 @@ Authentication schemes defined for the API:
### ApiKeyAuth
- **Type**: API key
-- **API key parameter name**: api_key
-- **Location**: URL query string
+- **API key parameter name**: X-API-Key
+- **Location**: HTTP header
+
+<a id="AccessTokenAuth"></a>
+### AccessTokenAuth
+
+- **Type**: Bearer authentication (access_token)
## Author
diff --git a/packages/python-sdk/e2b/constants.py b/packages/python-sdk/e2b/constants.py
index 1c18a0e9a..9fece2dac 100644
--- a/packages/python-sdk/e2b/constants.py
+++ b/packages/python-sdk/e2b/constants.py
@@ -1,8 +1,14 @@
-SESSION_REFRESH_PERIOD = 5 # seconds
-WS_RECONNECT_INTERVAL = 6 # seconds
+import os
+
+SANDBOX_REFRESH_PERIOD = 5 # seconds
TIMEOUT = 60
-SESSION_DOMAIN = "ondevbook.com"
+
+API_DOMAIN = "api.e2b.dev"
+API_HOST = "http://localhost:3000" if os.getenv("DEBUG") else f"https://{API_DOMAIN}"
+
+SANDBOX_DOMAIN = "e2b.dev"
+
ENVD_PORT = 49982
WS_ROUTE = "/ws"
FILE_ROUTE = "/file"
diff --git a/packages/python-sdk/e2b/session/__init__.py b/packages/python-sdk/e2b/sandbox/__init__.py
similarity index 91%
rename from packages/python-sdk/e2b/session/__init__.py
rename to packages/python-sdk/e2b/sandbox/__init__.py
index 4b320f151..d523d64bc 100644
--- a/packages/python-sdk/e2b/session/__init__.py
+++ b/packages/python-sdk/e2b/sandbox/__init__.py
@@ -4,7 +4,7 @@ from .exception import (
FilesystemException,
ProcessException,
RpcException,
- SessionException,
+ SandboxException,
TerminalException,
)
from .filesystem import FileInfo, FilesystemManager
@@ -13,7 +13,7 @@ from .filesystem_watcher import (
FilesystemOperation,
FilesystemWatcher,
)
-from .main import Session
+from .main import Sandbox
from .process import (
Process,
ProcessManager,
diff --git a/packages/python-sdk/e2b/session/code_snippet.py b/packages/python-sdk/e2b/sandbox/code_snippet.py
similarity index 77%
rename from packages/python-sdk/e2b/session/code_snippet.py
rename to packages/python-sdk/e2b/sandbox/code_snippet.py
index 5c9d854e1..515ab1b4b 100644
--- a/packages/python-sdk/e2b/session/code_snippet.py
+++ b/packages/python-sdk/e2b/sandbox/code_snippet.py
@@ -1,9 +1,8 @@
from typing import Any, Callable, ClassVar, List, Optional
-
from pydantic import BaseModel
-from e2b.session.exception import MultipleExceptions, RpcException, SessionException
-from e2b.session.session_connection import SessionConnection
+from e2b.sandbox.exception import MultipleExceptions, RpcException, SandboxException
+from e2b.sandbox.sandbox_connection import SandboxConnection
class OpenPort(BaseModel):
@@ -21,14 +20,14 @@ class CodeSnippetManager(BaseModel):
arbitrary_types_allowed = True
service_name: ClassVar[str] = "codeSnippet"
- session: SessionConnection
+ sandbox: SandboxConnection
on_scan_ports: Optional[Callable[[List[OpenPort]], Any]] = None
def _subscribe(self):
try:
- self.session._handle_subscriptions(
- self.session._subscribe(
+ self.sandbox._handle_subscriptions(
+ self.sandbox._subscribe(
self.service_name,
lambda ports: self.on_scan_ports(
[
@@ -48,8 +47,8 @@ class CodeSnippetManager(BaseModel):
else None,
)
except RpcException as e:
- raise SessionException(e.message) from e
+ raise SandboxException(e.message) from e
except MultipleExceptions as e:
- raise SessionException("Failed to subscribe to RPC services") from e
+ raise SandboxException("Failed to subscribe to RPC services") from e
return self
diff --git a/packages/python-sdk/e2b/session/env_vars.py b/packages/python-sdk/e2b/sandbox/env_vars.py
similarity index 100%
rename from packages/python-sdk/e2b/session/env_vars.py
rename to packages/python-sdk/e2b/sandbox/env_vars.py
diff --git a/packages/python-sdk/e2b/session/exception.py b/packages/python-sdk/e2b/sandbox/exception.py
similarity index 59%
rename from packages/python-sdk/e2b/session/exception.py
rename to packages/python-sdk/e2b/sandbox/exception.py
index 7017625ce..c9230e1e0 100644
--- a/packages/python-sdk/e2b/session/exception.py
+++ b/packages/python-sdk/e2b/sandbox/exception.py
@@ -1,11 +1,11 @@
from typing import Dict, List, Optional
-class SessionException(Exception):
+class SandboxException(Exception):
pass
-class RpcException(SessionException):
+class RpcException(SandboxException):
def __init__(
self,
message: str,
@@ -20,31 +20,31 @@ class RpcException(SessionException):
self.id = id
-class MultipleExceptions(SessionException):
+class MultipleExceptions(SandboxException):
def __init__(self, message: str, exceptions: List[Exception]):
super().__init__(f"Multiple exceptions occurred: {message}")
self.exceptions = exceptions
-class FilesystemException(SessionException):
+class FilesystemException(SandboxException):
pass
-class ProcessException(SessionException):
+class ProcessException(SandboxException):
pass
-class TerminalException(SessionException):
+class TerminalException(SandboxException):
pass
-class AuthenticationException(SessionException):
+class AuthenticationException(SandboxException):
pass
-class UnsupportedRuntimeException(SessionException):
+class UnsupportedRuntimeException(SandboxException):
pass
-class TimeoutException(SessionException):
+class TimeoutException(SandboxException):
pass
diff --git a/packages/python-sdk/e2b/session/filesystem.py b/packages/python-sdk/e2b/sandbox/filesystem.py
similarity index 83%
rename from packages/python-sdk/e2b/session/filesystem.py
rename to packages/python-sdk/e2b/sandbox/filesystem.py
index 727395ec7..0667a94e0 100644
--- a/packages/python-sdk/e2b/session/filesystem.py
+++ b/packages/python-sdk/e2b/sandbox/filesystem.py
@@ -5,9 +5,9 @@ from typing import Any, List, Optional
from pydantic import BaseModel
from e2b.constants import TIMEOUT
-from e2b.session.exception import FilesystemException, RpcException
-from e2b.session.filesystem_watcher import FilesystemWatcher
-from e2b.session.session_connection import SessionConnection
+from e2b.sandbox.exception import FilesystemException, RpcException
+from e2b.sandbox.filesystem_watcher import FilesystemWatcher
+from e2b.sandbox.sandbox_connection import SandboxConnection
from e2b.utils.filesystem import resolve_path
logger = logging.getLogger(__name__)
@@ -15,7 +15,7 @@ logger = logging.getLogger(__name__)
class FileInfo(BaseModel):
"""
- Information about a file or a directory in the environment.
+ Information about a file or a directory in the sandbox.
"""
is_dir: bool
@@ -25,16 +25,16 @@ class FileInfo(BaseModel):
class FilesystemManager:
_service_name = "filesystem"
- def __init__(self, session: SessionConnection):
- self._session = session
+ def __init__(self, sandbox: SandboxConnection):
+ self._sandbox = sandbox
@property
- def cwd(self) -> str:
- return self._session.cwd
+ def cwd(self) -> Optional[str]:
+ return self._sandbox.cwd
def read_bytes(self, path: str, timeout: Optional[float] = TIMEOUT) -> bytes:
"""
- Reads the whole content of a file as a byte array.
+ Read the whole content of a file as a byte array.
This can be used when you cannot represent the data as an UTF-8 string.
:param path: path to a file
@@ -42,7 +42,7 @@ class FilesystemManager:
:return: byte array representing the content of a file
"""
path = resolve_path(path, self.cwd)
- result: str = self._session._call(
+ result: str = self._sandbox._call(
self._service_name, "readBase64", [path], timeout=timeout
)
return base64.b64decode(result)
@@ -51,7 +51,7 @@ class FilesystemManager:
self, path: str, content: bytes, timeout: Optional[float] = TIMEOUT
) -> None:
"""
- Writes content to a file as a byte array.
+ Write content to a file as a byte array.
This can be used when you cannot represent the data as an UTF-8 string.
:param path: path to a file
@@ -60,13 +60,13 @@ class FilesystemManager:
"""
path = resolve_path(path, self.cwd)
base64_content = base64.b64encode(content).decode("utf-8")
- self._session._call(
+ self._sandbox._call(
self._service_name, "writeBase64", [path, base64_content], timeout=timeout
)
def read(self, path: str, timeout: Optional[float] = TIMEOUT) -> str:
"""
- Reads the whole content of a file as an array of bytes.
+ Read the whole content of a file as an array of bytes.
:param path: Path to a file
:param timeout: Specify the duration, in seconds to give the method to finish its execution before it times out (default is 60 seconds). If set to None, the method will continue to wait until it completes, regardless of time
@@ -76,7 +76,7 @@ class FilesystemManager:
path = resolve_path(path, self.cwd)
try:
- result: str = self._session._call(
+ result: str = self._sandbox._call(
self._service_name, "read", [path], timeout=timeout
)
logger.debug(f"Read file {path}")
@@ -88,7 +88,7 @@ class FilesystemManager:
self, path: str, content: str, timeout: Optional[float] = TIMEOUT
) -> None:
"""
- Writes content to a file.
+ Write content to a file.
:param path: Path to a file
:param content: Content to write
@@ -98,7 +98,7 @@ class FilesystemManager:
path = resolve_path(path, self.cwd)
try:
- self._session._call(
+ self._sandbox._call(
self._service_name, "write", [path, content], timeout=timeout
)
logger.debug(f"Wrote file {path}")
@@ -107,7 +107,7 @@ class FilesystemManager:
def remove(self, path: str, timeout: Optional[float] = TIMEOUT) -> None:
"""
- Removes a file or a directory.
+ Remove a file or a directory.
:param path: Path to a file or a directory
:param timeout: Specify the duration, in seconds to give the method to finish its execution before it times out (default is 60 seconds). If set to None, the method will continue to wait until it completes, regardless of time
@@ -116,7 +116,7 @@ class FilesystemManager:
path = resolve_path(path, self.cwd)
try:
- self._session._call(self._service_name, "remove", [path], timeout=timeout)
+ self._sandbox._call(self._service_name, "remove", [path], timeout=timeout)
logger.debug(f"Removed file {path}")
except RpcException as e:
raise FilesystemException(e.message) from e
@@ -134,7 +134,7 @@ class FilesystemManager:
path = resolve_path(path, self.cwd)
try:
- result: List[Any] = self._session._call(
+ result: List[Any] = self._sandbox._call(
self._service_name, "list", [path], timeout=timeout
)
logger.debug(f"Listed files in {path}, result: {result}")
@@ -147,7 +147,7 @@ class FilesystemManager:
def make_dir(self, path: str, timeout: Optional[float] = TIMEOUT) -> None:
"""
- Creates a new directory and all directories along the way if needed on the specified path.
+ Create a new directory and all directories along the way if needed on the specified path.
:param path: Path to a new directory. For example '/dirA/dirB' when creating 'dirB'
:param timeout: Specify the duration, in seconds to give the method to finish its execution before it times out (default is 60 seconds). If set to None, the method will continue to wait until it completes, regardless of time
@@ -156,7 +156,7 @@ class FilesystemManager:
path = resolve_path(path, self.cwd)
try:
- self._session._call(self._service_name, "makeDir", [path], timeout=timeout)
+ self._sandbox._call(self._service_name, "makeDir", [path], timeout=timeout)
logger.debug(f"Created directory {path}")
except RpcException as e:
raise FilesystemException(e.message) from e
@@ -173,7 +173,7 @@ class FilesystemManager:
path = resolve_path(path, self.cwd)
return FilesystemWatcher(
- connection=self._session,
+ connection=self._sandbox,
path=path,
service_name=self._service_name,
)
diff --git a/packages/python-sdk/e2b/session/filesystem_watcher.py b/packages/python-sdk/e2b/sandbox/filesystem_watcher.py
similarity index 91%
rename from packages/python-sdk/e2b/session/filesystem_watcher.py
rename to packages/python-sdk/e2b/sandbox/filesystem_watcher.py
index 99a79005c..df7095842 100644
--- a/packages/python-sdk/e2b/session/filesystem_watcher.py
+++ b/packages/python-sdk/e2b/sandbox/filesystem_watcher.py
@@ -1,12 +1,13 @@
import logging
+
from enum import Enum
from typing import Any, Callable, Optional, Set
from pydantic import BaseModel
from e2b.constants import TIMEOUT
-from e2b.session.exception import FilesystemException, RpcException
-from e2b.session.session_connection import SessionConnection
+from e2b.sandbox.exception import FilesystemException, RpcException
+from e2b.sandbox.sandbox_connection import SandboxConnection
from e2b.utils.str import snake_case_to_camel_case
logger = logging.getLogger(__name__)
@@ -44,7 +45,7 @@ class FilesystemWatcher:
def __init__(
self,
- connection: SessionConnection,
+ connection: SandboxConnection,
path: str,
service_name: str,
):
@@ -56,7 +57,7 @@ class FilesystemWatcher:
def start(self, timeout: Optional[float] = TIMEOUT) -> None:
"""
- Starts the filesystem watcher.
+ Start the filesystem watcher.
:param timeout: Specify the duration, in seconds to give the method to finish its execution before it times out (default is 60 seconds). If set to None, the method will continue to wait until it completes, regardless of time
"""
@@ -78,7 +79,7 @@ class FilesystemWatcher:
def stop(self) -> None:
"""
- Stops the filesystem watcher.
+ Stop the filesystem watcher.
"""
logger.debug("Stopping filesystem watcher for %s", self.path)
@@ -93,7 +94,7 @@ class FilesystemWatcher:
def add_event_listener(self, listener: Callable[[FilesystemEvent], Any]):
"""
- Adds a listener for filesystem events.
+ Add a listener for filesystem events.
:param listener: Listener to add
diff --git a/packages/python-sdk/e2b/session/main.py b/packages/python-sdk/e2b/sandbox/main.py
similarity index 73%
rename from packages/python-sdk/e2b/session/main.py
rename to packages/python-sdk/e2b/sandbox/main.py
index 47416fa3b..b21d10ab1 100644
--- a/packages/python-sdk/e2b/session/main.py
+++ b/packages/python-sdk/e2b/sandbox/main.py
@@ -3,34 +3,24 @@ import urllib.parse
import requests
from os import path
-from typing import Any, Callable, List, Literal, Optional, Union, IO
+from typing import Any, Callable, List, Literal, Optional, IO
from e2b.constants import TIMEOUT, ENVD_PORT, FILE_ROUTE
-from e2b.session.code_snippet import CodeSnippetManager, OpenPort
-from e2b.session.env_vars import EnvVars
-from e2b.session.filesystem import FilesystemManager
-from e2b.session.process import ProcessManager
-from e2b.session.session_connection import SessionConnection
-from e2b.session.terminal import TerminalManager
+from e2b.sandbox.code_snippet import CodeSnippetManager, OpenPort
+from e2b.sandbox.env_vars import EnvVars
+from e2b.sandbox.filesystem import FilesystemManager
+from e2b.sandbox.process import ProcessManager, ProcessMessage
+from e2b.sandbox.sandbox_connection import SandboxConnection
+from e2b.sandbox.terminal import TerminalManager
logger = logging.getLogger(__name__)
-Environment = Literal[
- "Nodejs",
- "Bash",
- "Python3",
- "Java",
- "Go",
- "Rust",
- "PHP",
- "Perl",
- "DotNET",
-]
-
-class Session(SessionConnection):
+class Sandbox(SandboxConnection):
"""
- E2B cloud environment gives your agent a full cloud development environment that's sandboxed. That means:
+ E2B cloud sandbox gives your agent a full cloud development environment that's sandboxed.
+
+ That means:
- Access to Linux OS
- Using filesystem (create, list, and delete files and dirs)
@@ -38,7 +28,7 @@ class Session(SessionConnection):
- Sandboxed - you can run any code
- Access to the internet
- These cloud environments are meant to be used for agents. Like a sandboxed playgrounds, where the agent can do whatever it wants.
+ These cloud sandboxes are meant to be used for agents. Like a sandboxed playgrounds, where the agent can do whatever it wants.
"""
@property
@@ -64,13 +54,13 @@ class Session(SessionConnection):
def __init__(
self,
- id: Union[Environment, str],
+ id: str = "base",
api_key: Optional[str] = None,
cwd: Optional[str] = None,
env_vars: Optional[EnvVars] = None,
on_scan_ports: Optional[Callable[[List[OpenPort]], Any]] = None,
- on_stdout: Optional[Callable[[str], Any]] = None,
- on_stderr: Optional[Callable[[str], Any]] = None,
+ on_stdout: Optional[Callable[[ProcessMessage], Any]] = None,
+ on_stderr: Optional[Callable[[ProcessMessage], Any]] = None,
on_exit: Optional[Callable[[int], Any]] = None,
timeout: Optional[float] = TIMEOUT,
_debug_hostname: Optional[str] = None,
@@ -78,19 +68,12 @@ class Session(SessionConnection):
_debug_dev_env: Optional[Literal["remote", "local"]] = None,
):
"""
- Creates a new cloud environment session.
+ Create a new cloud sandbox.
- :param id: ID of the environment or the environment type template.
- Can be one of the following environment type templates or a custom environment ID:
- - `Nodejs`
- - `Bash`
- - `Python3`
- - `Java`
- - `Go`
- - `Rust`
- - `PHP`
- - `Perl`
- - `DotNET`
+ :param id: ID of the sandbox template or the name of prepared template.
+ Can be one of the following premade sandbox templates or a custom sandbox template ID:
+ - `base` - A basic sandbox with a Linux environment
+ - `Python3-DataAnalysis` - A Python3 sandbox with data analysis tools
:param api_key: The API key to use, if not provided, the `E2B_API_KEY` environment variable is used
:param cwd: The current working directory to use
@@ -100,18 +83,21 @@ class Session(SessionConnection):
:param on_exit: A default callback that is called when the process exits
"""
- logger.info(f"Creating session {id if isinstance(id, str) else type(id)}")
+ logger.info(f"Creating sandbox {id if isinstance(id, str) else type(id)}")
if cwd and cwd.startswith("~"):
cwd = cwd.replace("~", "/home/user")
self._code_snippet = CodeSnippetManager(
- session=self,
+ sandbox=self,
on_scan_ports=on_scan_ports,
)
- self._terminal = TerminalManager(session=self)
- self._filesystem = FilesystemManager(session=self)
+ self._terminal = TerminalManager(sandbox=self)
+ self._filesystem = FilesystemManager(sandbox=self)
self._process = ProcessManager(
- session=self, on_stdout=on_stdout, on_stderr=on_stderr, on_exit=on_exit
+ sandbox=self,
+ on_stdout=on_stdout,
+ on_stderr=on_stderr,
+ on_exit=on_exit,
)
super().__init__(
id=id,
@@ -127,14 +113,14 @@ class Session(SessionConnection):
def _open(self, timeout: Optional[float] = TIMEOUT) -> None:
"""
- Opens the session.
+ Open the sandbox.
:param timeout: Specify the duration, in seconds to give the method to finish its execution before it times out (default is 60 seconds). If set to None, the method will continue to wait until it completes, regardless of time
"""
- logger.info(f"Opening session {self._id}")
+ logger.info(f"Opening sandbox {self._id}")
super()._open(timeout=timeout)
self._code_snippet._subscribe()
- logger.info(f"Session {self._id} opened")
+ logger.info(f"Sandbox {self._id} opened")
if self.cwd:
self.filesystem.make_dir(self.cwd)
@@ -144,14 +130,14 @@ class Session(SessionConnection):
def close(self) -> None:
"""
- Closes the session.
+ Close the sandbox.
"""
super().close()
self._close()
def file_url(self) -> str:
"""
- Returns a URL that can be used to upload files to the session via a multipart/form-data POST request.
+ Return a URL that can be used to upload files to the sandbox via a multipart/form-data POST request.
This is useful if you're uploading files directly from the browser.
The file will be uploaded to the user's home directory with the same name.
If a file with the same name already exists, it will be overwritten.
@@ -165,7 +151,7 @@ class Session(SessionConnection):
def upload_file(self, file: IO, timeout: Optional[float] = TIMEOUT) -> str:
"""
- Uploads a file to the session.
+ Upload a file to the sandbox.
The file will be uploaded to the user's home (`/home/user`) directory with the same name.
If a file with the same name already exists, it will be overwritten.
@@ -184,7 +170,7 @@ class Session(SessionConnection):
self, remote_path: str, timeout: Optional[float] = TIMEOUT
) -> bytes:
"""
- Downloads a file from the session and returns it's content as bytes.
+ Download a file from the sandbox and returns it's content as bytes.
:param remote_path: The path of the file to download
:param timeout: Specify the duration, in seconds to give the method to finish its execution before it times out (default is 60 seconds). If set to None, the method will continue to wait until it completes, regardless of time
diff --git a/packages/python-sdk/e2b/session/out.py b/packages/python-sdk/e2b/sandbox/out.py
similarity index 92%
rename from packages/python-sdk/e2b/session/out.py
rename to packages/python-sdk/e2b/sandbox/out.py
index 7559a5d30..ead553da5 100644
--- a/packages/python-sdk/e2b/session/out.py
+++ b/packages/python-sdk/e2b/sandbox/out.py
@@ -11,7 +11,7 @@ class OutResponse(BaseModel):
type: OutType
timestamp: int
"""
- Unix epoch in nanoseconds
+ Unix epoch in nanoseconds.
"""
line: str
diff --git a/packages/python-sdk/e2b/session/process.py b/packages/python-sdk/e2b/sandbox/process.py
similarity index 85%
rename from packages/python-sdk/e2b/session/process.py
rename to packages/python-sdk/e2b/sandbox/process.py
index 0a69e1d13..216ddedfd 100644
--- a/packages/python-sdk/e2b/session/process.py
+++ b/packages/python-sdk/e2b/sandbox/process.py
@@ -12,10 +12,10 @@ from typing import (
from pydantic import BaseModel
from e2b.constants import TIMEOUT
-from e2b.session.env_vars import EnvVars
-from e2b.session.exception import MultipleExceptions, ProcessException, RpcException
-from e2b.session.out import OutStderrResponse, OutStdoutResponse
-from e2b.session.session_connection import SessionConnection
+from e2b.sandbox.env_vars import EnvVars
+from e2b.sandbox.exception import MultipleExceptions, ProcessException, RpcException
+from e2b.sandbox.out import OutStderrResponse, OutStdoutResponse
+from e2b.sandbox.sandbox_connection import SandboxConnection
from e2b.utils.future import DeferredFuture
from e2b.utils.id import create_id
from e2b.utils.threads import shutdown_executor
@@ -25,7 +25,7 @@ logger = logging.getLogger(__name__)
class ProcessMessage(BaseModel):
"""
- A message from a process
+ A message from a process.
"""
line: str
@@ -53,14 +53,14 @@ class ProcessOutput(BaseModel):
@property
def stdout(self) -> str:
"""
- The stdout from the process
+ The stdout from the process.
"""
return self.delimiter.join(out.line for out in self.messages if not out.error)
@property
def stderr(self) -> str:
"""
- The stderr from the process
+ The stderr from the process.
"""
return self.delimiter.join(out.line for out in self.messages if out.error)
@@ -81,25 +81,25 @@ class ProcessOutput(BaseModel):
class Process:
"""
- A process running in the environment.
+ A process running in the sandbox.
"""
def __init__(
self,
process_id: str,
- session: SessionConnection,
+ sandbox: SandboxConnection,
trigger_exit: Callable[[], Any],
finished: DeferredFuture[ProcessOutput],
output: ProcessOutput,
):
self._process_id = process_id
- self._session = session
+ self._sandbox = sandbox
self._trigger_exit = trigger_exit
self._finished = finished
self._output = output
@property
- def exit_code(self) -> int:
+ def exit_code(self) -> Optional[int]:
"""
The exit code of the last process started by this manager.
"""
@@ -110,35 +110,35 @@ class Process:
@property
def output(self) -> ProcessOutput:
"""
- The output from the process
+ The output from the process.
"""
return self._output
@property
def stdout(self) -> str:
"""
- The stdout from the process
+ The stdout from the process.
"""
return self._output.stdout
@property
def stderr(self) -> str:
"""
- The stderr from the process
+ The stderr from the process.
"""
return self._output.stderr
@property
def error(self) -> bool:
"""
- True if the process has written to stderr
+ True if the process has written to stderr.
"""
return self._output.error
@property
def output_messages(self) -> List[ProcessMessage]:
"""
- The output messages from the process
+ The output messages from the process.
"""
return self._output.messages
@@ -152,26 +152,26 @@ class Process:
@property
def process_id(self) -> str:
"""
- The process id used to identify the process in the session.
- This is not the system process id of the process running in the environment session.
+ The process id used to identify the process in the sandbox.
+ This is not the system process id of the process running in the sandbox.
"""
return self._process_id
def wait(self):
"""
- Waits for the process to exit.
+ Wait for the process to exit.
"""
return self._finished.result()
def send_stdin(self, data: str, timeout: Optional[float] = TIMEOUT) -> None:
"""
- Sends data to the process stdin.
+ Send data to the process stdin.
:param data: Data to send
:param timeout: Specify the duration, in seconds to give the method to finish its execution before it times out (default is 60 seconds). If set to None, the method will continue to wait until it completes, regardless of time
"""
try:
- self._session._call(
+ self._sandbox._call(
ProcessManager._service_name,
"stdin",
[self.process_id, data],
@@ -182,12 +182,12 @@ class Process:
def kill(self, timeout: Optional[float] = TIMEOUT) -> None:
"""
- Kills the process.
+ Kill the process.
:param timeout: Specify the duration, in seconds to give the method to finish its execution before it times out (default is 60 seconds). If set to None, the method will continue to wait until it completes, regardless of time
"""
try:
- self._session._call(
+ self._sandbox._call(
ProcessManager._service_name, "kill", [self.process_id], timeout=timeout
)
except RpcException as e:
@@ -197,19 +197,19 @@ class Process:
class ProcessManager:
"""
- Manager for starting and interacting with processes in the environment.
+ Manager for starting and interacting with processes in the sandbox.
"""
_service_name = "process"
def __init__(
self,
- session: SessionConnection,
+ sandbox: SandboxConnection,
on_stdout: Optional[Callable[[ProcessMessage], Any]] = None,
on_stderr: Optional[Callable[[ProcessMessage], Any]] = None,
- on_exit: Optional[Callable[[], Any]] = None,
+ on_exit: Optional[Callable[[int], Any]] = None,
):
- self._session = session
+ self._sandbox = sandbox
self._process_cleanup: List[Callable[[], Any]] = []
self._on_stdout = on_stdout
self._on_stderr = on_stderr
@@ -226,7 +226,7 @@ class ProcessManager:
cmd: str,
on_stdout: Optional[Callable[[ProcessMessage], Any]] = None,
on_stderr: Optional[Callable[[ProcessMessage], Any]] = None,
- on_exit: Optional[Callable[[], Any]] = None,
+ on_exit: Optional[Callable[[int], Any]] = None,
env_vars: Optional[EnvVars] = None,
cwd: str = "",
rootdir: str = "", # DEPRECATED
@@ -235,7 +235,7 @@ class ProcessManager:
) -> Process:
logger.info(f"Starting process: {cmd}")
env_vars = env_vars or {}
- env_vars = {**self._session.env_vars, **env_vars}
+ env_vars = {**self._sandbox.env_vars, **env_vars}
on_stdout = on_stdout or self._on_stdout
on_stderr = on_stderr or self._on_stderr
@@ -286,14 +286,14 @@ class ProcessManager:
logger.exception(f"Error in on_stdout callback: {error}")
try:
- unsub_all = self._session._handle_subscriptions(
- self._session._subscribe(
+ unsub_all = self._sandbox._handle_subscriptions(
+ self._sandbox._subscribe(
self._service_name, handle_exit, "onExit", process_id
),
- self._session._subscribe(
+ self._sandbox._subscribe(
self._service_name, handle_stdout, "onStdout", process_id
),
- self._session._subscribe(
+ self._sandbox._subscribe(
self._service_name, handle_stderr, "onStderr", process_id
),
)
@@ -320,7 +320,7 @@ class ProcessManager:
unsub_all()
if on_exit:
try:
- on_exit()
+ on_exit(output.exit_code or 0)
except TypeError as error:
logger.exception(f"Error in on_exit callback: {error}")
future_exit_handler_finish(output)
@@ -342,10 +342,10 @@ class ProcessManager:
cwd = rootdir
logger.warning("The rootdir parameter is deprecated, use cwd instead.")
- if not cwd and self._session.cwd:
- cwd = self._session.cwd
+ if not cwd and self._sandbox.cwd:
+ cwd = self._sandbox.cwd
- self._session._call(
+ self._sandbox._call(
self._service_name,
"start",
[
@@ -359,7 +359,7 @@ class ProcessManager:
logger.info(f"Started process (id: {process_id})")
return Process(
output=output,
- session=self._session,
+ sandbox=self._sandbox,
process_id=process_id,
trigger_exit=trigger_exit,
finished=future_exit_handler_finish,
diff --git a/packages/python-sdk/e2b/session/run_code.py b/packages/python-sdk/e2b/sandbox/run_code.py
similarity index 61%
rename from packages/python-sdk/e2b/session/run_code.py
rename to packages/python-sdk/e2b/sandbox/run_code.py
index 45d07ca3c..e181f3c3d 100644
--- a/packages/python-sdk/e2b/session/run_code.py
+++ b/packages/python-sdk/e2b/sandbox/run_code.py
@@ -1,21 +1,14 @@
from os import getenv
from typing import Literal, Union, Optional
-from . import Session
+from . import Sandbox
from .exception import UnsupportedRuntimeException
CodeRuntime = Literal[
"Node16",
"Python3",
"Bash",
- "Python3_DataAnalysis",
- # TODO: Support all runtimes that our infra supports
- # DotNET = 'DotNET',
- # Go = 'Go',
- # Java = 'Java',
- # Perl = 'Perl',
- # PHP = 'PHP',
- # Rust = 'Rust',
+ "Python3-DataAnalysis",
]
@@ -25,9 +18,10 @@ def run_code(
api_key: Optional[str] = None,
):
"""
- Runs code in a sandboxed cloud playground and return the stdout and stderr
- `run_ode` wraps the `Session` class and provides a simple interface for running code in a sandboxed environment
- without any need to manage lifecycle of the session.
+ Run code in a sandboxed cloud playground and return the stdout and stderr.
+
+ `run_code` wraps the `Sandbox` class and provides a simple interface for running code in a sandbox
+ without any need to manage lifecycle of the sandbox.
`run_code` automatically loads the E2B API key from the `E2B_API_KEY` environment variable.
:param runtime: The runtime to run the code in. One of "Node16" or "Python3".
@@ -41,19 +35,19 @@ def run_code(
api_key = getenv("E2B_API_KEY")
if runtime == "Node16":
- env_id = "Nodejs"
+ env_id = "base"
binary = "node"
filepath = "/index.js"
elif runtime == "Python3":
- env_id = "Python3"
+ env_id = "base"
binary = "python3"
filepath = "/index.py"
- elif runtime == "Python3_DataAnalysis":
- env_id = "YI58BPyX5KrK"
+ elif runtime == "Python3-DataAnalysis":
+ env_id = "Python3-DataAnalysis"
binary = "python3"
filepath = "/index.py"
elif runtime == "Bash":
- env_id = "Bash"
+ env_id = "base"
binary = "bash"
filepath = "/main.sh"
else:
@@ -61,12 +55,12 @@ def run_code(
f'Invalid runtime "{runtime}". Please contact us ([email protected]) if you need support for this runtime'
)
- session = Session(id=env_id, api_key=api_key)
- session.filesystem.write(filepath, code)
+ sandbox = Sandbox(id=env_id, api_key=api_key)
+ sandbox.filesystem.write(filepath, code)
- proc = session.process.start(cmd=f"{binary} {filepath}")
+ proc = sandbox.process.start(cmd=f"{binary} {filepath}")
proc.wait()
- session.close()
+ sandbox.close()
return proc.output.stdout, proc.output.stderr
diff --git a/packages/python-sdk/e2b/session/session_connection.py b/packages/python-sdk/e2b/sandbox/sandbox_connection.py
similarity index 67%
rename from packages/python-sdk/e2b/session/session_connection.py
rename to packages/python-sdk/e2b/sandbox/sandbox_connection.py
index 323bda2a5..b304a73e7 100644
--- a/packages/python-sdk/e2b/session/session_connection.py
+++ b/packages/python-sdk/e2b/sandbox/sandbox_connection.py
@@ -2,7 +2,7 @@ import functools
import logging
import traceback
import warnings
-from concurrent.futures import ThreadPoolExecutor, TimeoutError, Future
+from concurrent.futures import ThreadPoolExecutor, Future
from os import getenv
from time import sleep
from typing import Any, Callable, List, Literal, Optional, Union
@@ -10,22 +10,22 @@ from typing import Any, Callable, List, Literal, Optional, Union
from pydantic import BaseModel
from urllib3.exceptions import ReadTimeoutError, MaxRetryError, ConnectTimeoutError
-from e2b.api import client, configuration, exceptions, models
+from e2b.api import E2BApiClient, exceptions, models, client
from e2b.constants import (
- SESSION_DOMAIN,
- SESSION_REFRESH_PERIOD,
+ SANDBOX_DOMAIN,
+ SANDBOX_REFRESH_PERIOD,
TIMEOUT,
ENVD_PORT,
WS_ROUTE,
)
-from e2b.session.env_vars import EnvVars
-from e2b.session.exception import (
+from e2b.sandbox.env_vars import EnvVars
+from e2b.sandbox.exception import (
AuthenticationException,
MultipleExceptions,
- SessionException,
+ SandboxException,
TimeoutException,
)
-from e2b.session.session_rpc import Notification, SessionRpc
+from e2b.sandbox.sandbox_rpc import Notification, SandboxRpc
from e2b.utils.future import DeferredFuture
from e2b.utils.str import camel_case_to_snake_case
from e2b.utils.threads import shutdown_executor
@@ -39,27 +39,27 @@ class Subscription(BaseModel):
handler: Callable[[Any], None]
-class SessionConnection:
+class SandboxConnection:
_refresh_retries = 4
@property
def finished(self):
"""
- A future that is resolved when the session exits.
+ A future that is resolved when the sandbox exits.
"""
return self._finished
@property
def is_open(self) -> bool:
"""
- Whether the session is open.
+ Whether the sandbox is open.
"""
return self._is_open
def __init__(
self,
id: str,
- api_key: Optional[str],
+ api_key: Optional[str] = None,
cwd: Optional[str] = None,
env_vars: Optional[EnvVars] = None,
on_close: Optional[Callable[[], Any]] = None,
@@ -84,35 +84,33 @@ class SessionConnection:
self._debug_dev_env = _debug_dev_env
self._on_close_child = on_close
- self._session: Optional[models.Session] = None
+ self._sandbox: Optional[models.Instance] = None
self._is_open = False
self._process_cleanup: List[Callable[[], Any]] = []
self._refreshing_task: Optional[Future] = None
self._subscribers = {}
- self._rpc: Optional[SessionRpc] = None
+ self._rpc: Optional[SandboxRpc] = None
self._finished = DeferredFuture(self._process_cleanup)
- logger.info(f"Session for code snippet {self._id} initialized")
+ logger.info(f"Sandbox for code snippet {self._id} initialized")
self._open(timeout=timeout)
@classmethod
def create(cls, *args, **kwargs):
- warnings.warn("Session.create() is deprecated, use Session() instead")
+ warnings.warn("Sandbox.create() is deprecated, use Sandbox() instead")
return cls(*args, **kwargs)
def get_hostname(self, port: Optional[int] = None):
"""
- Get the hostname for the session or for the specified session's port.
+ Get the hostname for the sandbox or for the specified sandbox's port.
- :param port: Specify if you want to connect to a specific port of the session
+ :param port: Specify if you want to connect to a specific port of the sandbox
- :return: Hostname of the session or session's port
+ :return: Hostname of the sandbox or sandbox's port
"""
- if not self._session:
- raise SessionException(
- "Session is not running. You have to run `await session.open()` first or create the session with `await Session.create()"
- )
+ if not self._sandbox:
+ raise SandboxException("Sandbox is not running.")
if self._debug_hostname:
if port and self._debug_dev_env == "remote":
@@ -123,7 +121,7 @@ class SessionConnection:
return self._debug_hostname
hostname = (
- f"{self._session.session_id}-{self._session.client_id}.{SESSION_DOMAIN}"
+ f"{self._sandbox.instance_id}-{self._sandbox.client_id}.{SANDBOX_DOMAIN}"
)
if port:
return f"{port}-{hostname}"
@@ -131,15 +129,15 @@ class SessionConnection:
def close(self) -> None:
"""
- Close the session and unsubscribe from all the subscriptions.
+ Close the sandbox and unsubscribe from all the subscriptions.
"""
self._close()
- logger.info(f"Session closed")
+ logger.info(f"Sandbox closed")
def _close(self):
- if self._is_open and self._session:
+ if self._is_open and self._sandbox:
logger.info(
- f"Closing session {self._session.code_snippet_id} (id: {self._session.session_id})"
+ f"Closing sandbox {self._sandbox.env_id} (id: {self._sandbox.instance_id})"
)
self._is_open = False
if self._rpc:
@@ -156,67 +154,63 @@ class SessionConnection:
def _open(self, timeout: Optional[float] = TIMEOUT) -> None:
"""
- Open a connection to a new session.
+ Open a connection to a new sandbox.
- You must call this method before using the session.
+ You must call this method before using the sandbox.
"""
- if self._is_open or self._session:
- raise SessionException("Session connect was already called")
+ if self._is_open or self._sandbox:
+ raise SandboxException("Sandbox connect was already called")
else:
self._is_open = True
try:
- with client.ApiClient(configuration) as api_client:
- api = client.SessionsApi(api_client)
+ with E2BApiClient(api_key=self._api_key) as api_client:
+ api = client.InstancesApi(api_client)
- self._session = api.sessions_post(
- models.NewSession(codeSnippetID=self._id, editEnabled=False),
- api_key=self._api_key,
+ self._sandbox = api.instances_post(
+ models.NewInstance(envID=self._id),
_request_timeout=timeout,
)
logger.info(
- f"Session {self._session.code_snippet_id} created (id:{self._session.session_id})"
+ f"Sandbox {self._sandbox.env_id} created (id:{self._sandbox.instance_id})"
)
executor = ThreadPoolExecutor(thread_name_prefix="e2b-refresh")
self._refreshing_task = executor.submit(
- self._refresh, self._session.session_id
+ self._refresh, self._sandbox.instance_id
)
self._process_cleanup.append(self._refreshing_task.cancel)
self._process_cleanup.append(lambda: shutdown_executor(executor))
except ReadTimeoutError as e:
- logger.error(f"Failed to acquire session")
+ logger.error(f"Failed to acquire sandbox")
self._close()
raise TimeoutException(
- f"Failed to acquire session: {e}",
+ f"Failed to acquire sandbox: {e}",
) from e
except MaxRetryError as e:
if isinstance(e.reason, ConnectTimeoutError):
raise TimeoutException(
- f"Failed to acquire session: {e}",
+ f"Failed to acquire sandbox: {e}",
) from e
raise e
except Exception as e:
- logger.error(f"Failed to acquire session")
+ logger.error(f"Failed to acquire sandbox")
self._close()
raise e
hostname = self.get_hostname(self._debug_port or ENVD_PORT)
protocol = "ws" if self._debug_dev_env == "local" else "wss"
- session_url = f"{protocol}://{hostname}{WS_ROUTE}"
+ sandbox_url = f"{protocol}://{hostname}{WS_ROUTE}"
try:
- self._rpc = SessionRpc(
- url=session_url,
+ self._rpc = SandboxRpc(
+ url=sandbox_url,
on_message=self._handle_notification,
)
- self._rpc.connect()
- except TimeoutError as e:
- print(e)
- raise e
+ self._rpc.connect(timeout=timeout)
except Exception as e:
print(e)
self._close()
@@ -226,16 +220,19 @@ class SessionConnection:
self,
service: str,
method: str,
- params: List[Any] = None,
+ params: Optional[List[Any]] = None,
timeout: Optional[float] = TIMEOUT,
) -> Any:
if not params:
params = []
if not self.is_open:
- raise SessionException("Session is not open")
+ raise SandboxException("Sandbox is not open")
+
+ if not self._rpc:
+ raise SandboxException("Sandbox is not connected")
- return self._rpc.send_message(f"{service}_{method}", params, timeout=timeout)
+ return self._rpc.send_message(f"{service}_{method}", params, timeout)
def _handle_subscriptions(
self,
@@ -308,48 +305,50 @@ class SessionConnection:
if id == data.params["subscription"]:
sub.handler(data.params["result"])
- def _refresh(self, session_id: str):
+ def _refresh(self, instance_id: str):
+ if not self._sandbox:
+ logger.info("No sandbox to refresh. Sandbox was not created")
+ return
+
try:
logger.info(
- f"Started refreshing session {self._session.code_snippet_id} (id: {session_id})"
+ f"Started refreshing sandbox {self._sandbox.env_id} (id: {instance_id})"
)
current_retry = 0
- with client.ApiClient(configuration) as api_client:
- api = client.SessionsApi(api_client)
+ with E2BApiClient(api_key=self._api_key) as api_client:
+ api = client.InstancesApi(api_client)
while True:
if not self._is_open:
logger.debug(
- f"Cannot refresh session - it was closed. {self._session}"
+ f"Cannot refresh sandbox - it was closed. {self._sandbox.instance_id}"
)
return
- sleep(SESSION_REFRESH_PERIOD)
+ sleep(SANDBOX_REFRESH_PERIOD)
try:
- api.sessions_session_id_refresh_post(session_id)
- logger.debug(f"Refreshed session {session_id}")
+ api.instances_instance_id_refreshes_post(instance_id)
+ logger.debug(f"Refreshed sandbox {instance_id}")
except exceptions.ApiException as e:
if e.status == 404:
- raise SessionException(
- f"Session {session_id} failed because it cannot be found"
+ raise SandboxException(
+ f"Sandbox {instance_id} failed because it cannot be found"
) from e
else:
if current_retry < self._refresh_retries:
logger.error(
- f"Refreshing session {session_id} failed. Retrying..."
+ f"Refreshing sandbox {instance_id} failed. Retrying..."
)
current_retry += 1
else:
logger.error(
- f"Refreshing session {session_id} failed. Max retries exceeded"
+ f"Refreshing sandbox {instance_id} failed. Max retries exceeded"
)
raise e
finally:
- if self._session:
- logger.info(
- f"Stopped refreshing session (id: {self._session.session_id})"
- )
+ if self._sandbox:
+ logger.info(f"Stopped refreshing sandbox (id: {instance_id})")
else:
- logger.info("No session to stop refreshing. Session was not created")
+ logger.info("No sandbox to stop refreshing. Sandbox was not created")
self._close()
diff --git a/packages/python-sdk/e2b/session/session_rpc.py b/packages/python-sdk/e2b/sandbox/sandbox_rpc.py
similarity index 85%
rename from packages/python-sdk/e2b/session/session_rpc.py
rename to packages/python-sdk/e2b/sandbox/sandbox_rpc.py
index 0dd23a6cc..593924b9a 100644
--- a/packages/python-sdk/e2b/session/session_rpc.py
+++ b/packages/python-sdk/e2b/sandbox/sandbox_rpc.py
@@ -1,12 +1,13 @@
from __future__ import annotations
+import asyncio
import json
import logging
+
from concurrent.futures import ThreadPoolExecutor, TimeoutError
from queue import Queue
from threading import Event
-from typing import Any, Callable, Dict, Iterator, List, Union
-
+from typing import Any, Callable, Dict, Iterator, List, Union, Optional
from jsonrpcclient import Error, Ok, request_json
from jsonrpcclient.id_generators import decimal as decimal_id_generator
from jsonrpcclient.responses import Response
@@ -14,9 +15,9 @@ from pydantic import BaseModel, PrivateAttr, ConfigDict
from websockets.typing import Data
from e2b.constants import TIMEOUT
-from e2b.session.exception import RpcException, TimeoutException
-from e2b.session.websocket_client import WebSocket
-from e2b.utils.future import DeferredFuture, run_async_func_in_new_loop
+from e2b.sandbox.exception import RpcException, TimeoutException
+from e2b.sandbox.websocket_client import WebSocket
+from e2b.utils.future import DeferredFuture, run_async_func_in_loop
from e2b.utils.threads import shutdown_executor
logger = logging.getLogger(__name__)
@@ -24,7 +25,7 @@ STOP_SIGN = object()
class Notification(BaseModel):
- """Nofification"""
+ """Nofification."""
method: str
params: Dict
@@ -34,7 +35,7 @@ Message = Union[Response, Notification]
def to_response_or_notification(response: Dict[str, Any]) -> Message:
- """Create a Response namedtuple from a dict"""
+ """Create a Response namedtuple from a dict."""
if "error" in response:
return Error(
response["error"]["code"],
@@ -51,7 +52,7 @@ def to_response_or_notification(response: Dict[str, Any]) -> Message:
raise ValueError("Invalid response", response)
-class SessionRpc(BaseModel):
+class SandboxRpc(BaseModel):
model_config = ConfigDict(arbitrary_types_allowed=True)
url: str
@@ -73,7 +74,8 @@ class SessionRpc(BaseModel):
self._receive_message(data)
self._queue_out.task_done()
- def connect(self):
+ def connect(self, timeout: Optional[float] = None):
+ timeout = timeout or TIMEOUT
started = Event()
stopped = Event()
self._process_cleanup.append(stopped.set)
@@ -87,8 +89,10 @@ class SessionRpc(BaseModel):
self._process_cleanup.append(lambda: shutdown_executor(messages_executor))
executor = ThreadPoolExecutor(thread_name_prefix="e2b-websocket")
+ loop = asyncio.new_event_loop()
websocket_task = executor.submit(
- run_async_func_in_new_loop,
+ run_async_func_in_loop,
+ loop,
WebSocket(
url=self.url,
queue_in=self._queue_in,
@@ -101,12 +105,26 @@ class SessionRpc(BaseModel):
self._process_cleanup.append(lambda: shutdown_executor(executor))
logger.info("WebSocket waiting to start")
- started.wait()
+
+ signaled = started.wait(timeout=timeout)
+ if not signaled:
+ logger.error("WebSocket failed to start")
+ if loop.is_running():
+ loop.stop()
+
+ self.close()
+ raise TimeoutException("WebSocket failed to start")
+
logger.info("WebSocket started")
def send_message(
- self, method: str, params: List[Any], timeout: float = TIMEOUT
+ self,
+ method: str,
+ params: List[Any],
+ timeout: Optional[float],
) -> Any:
+ timeout = timeout or TIMEOUT
+
id = next(self._id_generator)
request = request_json(method, params, id)
future_reply = DeferredFuture(self._process_cleanup)
diff --git a/packages/python-sdk/e2b/session/terminal.py b/packages/python-sdk/e2b/sandbox/terminal.py
similarity index 89%
rename from packages/python-sdk/e2b/session/terminal.py
rename to packages/python-sdk/e2b/sandbox/terminal.py
index bb0556f27..4e11606f7 100644
--- a/packages/python-sdk/e2b/session/terminal.py
+++ b/packages/python-sdk/e2b/sandbox/terminal.py
@@ -5,9 +5,9 @@ from typing import Any, Callable, List, Optional
from pydantic import BaseModel
from e2b.constants import TIMEOUT
-from e2b.session.env_vars import EnvVars
-from e2b.session.exception import MultipleExceptions, RpcException, TerminalException
-from e2b.session.session_connection import SessionConnection
+from e2b.sandbox.env_vars import EnvVars
+from e2b.sandbox.exception import MultipleExceptions, RpcException, TerminalException
+from e2b.sandbox.sandbox_connection import SandboxConnection
from e2b.utils.future import DeferredFuture
from e2b.utils.id import create_id
from e2b.utils.threads import shutdown_executor
@@ -57,33 +57,33 @@ class Terminal:
def wait(self):
"""
- Waits till the terminal session exits.
+ Wait till the terminal session exits.
"""
return self.finished.result()
def __init__(
self,
terminal_id: str,
- session: SessionConnection,
+ sandbox: SandboxConnection,
trigger_exit: Callable[[], Any],
finished: DeferredFuture[TerminalOutput],
output: TerminalOutput,
):
self._terminal_id = terminal_id
- self._session = session
+ self._sandbox = sandbox
self._trigger_exit = trigger_exit
self._finished = finished
self._output = output
def send_data(self, data: str, timeout: Optional[float] = TIMEOUT) -> None:
"""
- Sends data to the terminal standard input.
+ Send data to the terminal standard input.
:param data: Data to send
:param timeout: Specify the duration, in seconds to give the method to finish its execution before it times out (default is 60 seconds). If set to None, the method will continue to wait until it completes, regardless of time
"""
try:
- self._session._call(
+ self._sandbox._call(
TerminalManager._service_name,
"data",
[self.terminal_id, data],
@@ -101,7 +101,7 @@ class Terminal:
:param timeout: Specify the duration, in seconds to give the method to finish its execution before it times out (default is 60 seconds). If set to None, the method will continue to wait until it completes, regardless of time
"""
try:
- self._session._call(
+ self._sandbox._call(
TerminalManager._service_name,
"resize",
[self.terminal_id, cols, rows],
@@ -117,7 +117,7 @@ class Terminal:
:param timeout: Specify the duration, in seconds to give the method to finish its execution before it times out (default is 60 seconds). If set to None, the method will continue to wait until it completes, regardless of time
"""
try:
- self._session._call(
+ self._sandbox._call(
TerminalManager._service_name,
"destroy",
[self.terminal_id],
@@ -130,13 +130,13 @@ class Terminal:
class TerminalManager:
"""
- Manager for starting and interacting with terminal sessions in the environment.
+ Manager for starting and interacting with terminal sessions in the sandbox.
"""
_service_name = "terminal"
- def __init__(self, session: SessionConnection):
- self._session = session
+ def __init__(self, sandbox: SandboxConnection):
+ self._sandbox = sandbox
self._process_cleanup: List[Callable[[], Any]] = []
def _close(self):
@@ -173,7 +173,7 @@ class TerminalManager:
:return: Terminal session
"""
- env_vars = self._session.env_vars.update(env_vars or {})
+ env_vars = self._sandbox.env_vars.update(env_vars or {})
future_exit = DeferredFuture(self._process_cleanup)
terminal_id = terminal_id or create_id(12)
@@ -187,11 +187,11 @@ class TerminalManager:
on_data(data)
try:
- unsub_all = self._session._handle_subscriptions(
- self._session._subscribe(
+ unsub_all = self._sandbox._handle_subscriptions(
+ self._sandbox._subscribe(
self._service_name, handle_data, "onData", terminal_id
),
- self._session._subscribe(
+ self._sandbox._subscribe(
self._service_name, future_exit, "onExit", terminal_id
),
)
@@ -231,10 +231,10 @@ class TerminalManager:
future_exit_handler_finish.result()
try:
- if not cwd and self._session.cwd:
- cwd = self._session.cwd
+ if not cwd and self._sandbox.cwd:
+ cwd = self._sandbox.cwd
- self._session._call(
+ self._sandbox._call(
self._service_name,
"start",
[
@@ -249,7 +249,7 @@ class TerminalManager:
)
return Terminal(
terminal_id=terminal_id,
- session=self._session,
+ sandbox=self._sandbox,
trigger_exit=trigger_exit,
finished=future_exit_handler_finish,
output=output,
diff --git a/packages/python-sdk/e2b/session/websocket_client.py b/packages/python-sdk/e2b/sandbox/websocket_client.py
similarity index 96%
rename from packages/python-sdk/e2b/session/websocket_client.py
rename to packages/python-sdk/e2b/sandbox/websocket_client.py
index abeb66b50..c87052453 100644
--- a/packages/python-sdk/e2b/session/websocket_client.py
+++ b/packages/python-sdk/e2b/sandbox/websocket_client.py
@@ -2,6 +2,7 @@ from __future__ import annotations
import asyncio
import logging
+
from queue import Queue
from threading import Event
from typing import Any, Callable, List, Optional
@@ -51,6 +52,9 @@ class WebSocket:
async def _receive_message(self):
try:
+ if not self._ws:
+ logger.error("No WebSocket connection")
+ return
async for message in self._ws:
logger.debug(f"WebSocket received message: {message}".strip())
self._queue_out.put(message)
diff --git a/packages/python-sdk/e2b/templates/__init__.py b/packages/python-sdk/e2b/templates/__init__.py
index c3ef08453..8aaeeadb6 100644
--- a/packages/python-sdk/e2b/templates/__init__.py
+++ b/packages/python-sdk/e2b/templates/__init__.py
@@ -1 +1 @@
-from .data_analysis import DataAnalysis
+from .data_analysis import Artifact, DataAnalysis
diff --git a/packages/python-sdk/e2b/templates/data_analysis.py b/packages/python-sdk/e2b/templates/data_analysis.py
index 79e920737..778b35c01 100644
--- a/packages/python-sdk/e2b/templates/data_analysis.py
+++ b/packages/python-sdk/e2b/templates/data_analysis.py
@@ -1,10 +1,11 @@
import logging
import time
from typing import Optional, Callable, Any, Tuple, List, Union
+from e2b.sandbox.process import ProcessMessage
from pydantic import BaseModel, PrivateAttr
-from e2b import EnvVars, Session
+from e2b import EnvVars, Sandbox
from e2b.constants import TIMEOUT
logger = logging.getLogger(__name__)
@@ -12,20 +13,20 @@ logger = logging.getLogger(__name__)
class Artifact(BaseModel):
name: str
- _session: Session = PrivateAttr()
+ _sandbox: Sandbox = PrivateAttr()
- def __init__(self, **data: Any):
+ def __init__(self, sandbox: Sandbox, **data: Any):
super().__init__(**data)
- self._session = data["_session"]
+ self._sandbox = sandbox
def __hash__(self):
return hash(self.name)
def download(self) -> bytes:
- return self._session.download_file(self.name)
+ return self._sandbox.download_file(self.name)
-class DataAnalysis(Session):
+class DataAnalysis(Sandbox):
env_id = "Python3-DataAnalysis"
def __init__(
@@ -33,8 +34,9 @@ class DataAnalysis(Session):
api_key: Optional[str] = None,
cwd: Optional[str] = None,
env_vars: Optional[EnvVars] = None,
- on_stdout: Optional[Callable[[str], Any]] = None,
- on_stderr: Optional[Callable[[str], Any]] = None,
+ timeout: Optional[float] = TIMEOUT,
+ on_stdout: Optional[Callable[[ProcessMessage], Any]] = None,
+ on_stderr: Optional[Callable[[ProcessMessage], Any]] = None,
on_artifact: Optional[Callable[[Artifact], Any]] = None,
on_exit: Optional[Callable[[int], Any]] = None,
):
@@ -44,6 +46,7 @@ class DataAnalysis(Session):
api_key=api_key,
cwd=cwd,
env_vars=env_vars,
+ timeout=timeout,
on_stdout=on_stdout,
on_stderr=on_stderr,
on_exit=on_exit,
@@ -52,8 +55,8 @@ class DataAnalysis(Session):
def run_python(
self,
code: str,
- on_stdout: Optional[Callable[[str], Any]] = None,
- on_stderr: Optional[Callable[[str], Any]] = None,
+ on_stdout: Optional[Callable[[ProcessMessage], Any]] = None,
+ on_stderr: Optional[Callable[[ProcessMessage], Any]] = None,
on_artifact: Optional[Callable[[Artifact], Any]] = None,
on_exit: Optional[Callable[[int], Any]] = None,
env_vars: Optional[EnvVars] = None,
@@ -66,7 +69,7 @@ class DataAnalysis(Session):
def register_artifacts(event: Any) -> None:
on_artifact_func = on_artifact or self.on_artifact
if event.operation == "Create":
- artifact = Artifact(name=event.path, _session=self)
+ artifact = Artifact(name=event.path, sandbox=self)
artifacts.add(artifact)
if on_artifact_func:
try:
@@ -98,30 +101,27 @@ class DataAnalysis(Session):
return process.output.stdout, process.output.stderr, list(artifacts)
- def install_python_packages(
- self, package_names: Union[str, List[str]], timeout: Optional[float] = TIMEOUT
- ) -> None:
+ def _install_packages(self, command: str, package_names: Union[str, List[str]], timeout: Optional[float] = TIMEOUT) -> None:
if isinstance(package_names, list):
package_names = " ".join(package_names)
- process = self.process.start(f"pip install {package_names}", timeout=timeout)
+ package_names = package_names.strip()
+ if not package_names:
+ return
+
+ process = self.process.start(f"{command} {package_names}", timeout=timeout)
process.wait()
if process.exit_code != 0:
raise Exception(
f"Failed to install package {package_names}: {process.output.stderr}"
)
+ def install_python_packages(
+ self, package_names: Union[str, List[str]], timeout: Optional[float] = TIMEOUT
+ ) -> None:
+ self._install_packages("pip install", package_names, timeout=timeout)
def install_system_packages(
self, package_names: Union[str, List[str]], timeout: Optional[float] = TIMEOUT
) -> None:
- if isinstance(package_names, list):
- package_names = " ".join(package_names)
-
- process = self.process.start(f"sudo apt-get -y install {package_names}", timeout=timeout)
- process.wait()
-
- if process.exit_code != 0:
- raise Exception(
- f"Failed to install package {package_names}: {process.output.stderr}"
- )
+ self._install_packages("sudo apt-get install -y", package_names, timeout=timeout)
\ No newline at end of file
diff --git a/packages/python-sdk/e2b/utils/filesystem.py b/packages/python-sdk/e2b/utils/filesystem.py
index 208a2f75d..ace99e839 100644
--- a/packages/python-sdk/e2b/utils/filesystem.py
+++ b/packages/python-sdk/e2b/utils/filesystem.py
@@ -1,4 +1,5 @@
import warnings
+
from pathlib import PurePosixPath
from typing import Optional
diff --git a/packages/python-sdk/e2b/utils/future.py b/packages/python-sdk/e2b/utils/future.py
index 8ef145bde..a093ac1f8 100644
--- a/packages/python-sdk/e2b/utils/future.py
+++ b/packages/python-sdk/e2b/utils/future.py
@@ -1,4 +1,6 @@
import asyncio
+from asyncio import AbstractEventLoop
+
from concurrent.futures import Future
from typing import Any, Awaitable, Callable, Generic, List, Optional, TypeVar
@@ -31,9 +33,7 @@ class DeferredFuture(Generic[T]):
self._future.set_exception(reason)
-def run_async_func_in_new_loop(coro: Awaitable):
- # Create a new loop
- loop = asyncio.new_event_loop()
+def run_async_func_in_loop(loop: AbstractEventLoop, coro: Awaitable):
asyncio.set_event_loop(loop)
try:
diff --git a/packages/python-sdk/e2b/utils/threads.py b/packages/python-sdk/e2b/utils/threads.py
index 39dc9badc..b87eafcd9 100644
--- a/packages/python-sdk/e2b/utils/threads.py
+++ b/packages/python-sdk/e2b/utils/threads.py
@@ -1,5 +1,6 @@
import queue
import sys
+
from concurrent.futures import ThreadPoolExecutor
diff --git a/packages/python-sdk/example.py b/packages/python-sdk/example.py
index 1e7f0185e..65708ef2a 100644
--- a/packages/python-sdk/example.py
+++ b/packages/python-sdk/example.py
@@ -3,7 +3,7 @@ from os import getenv
from dotenv import load_dotenv
-from e2b import Session
+from e2b import Sandbox
load_dotenv()
id = "Python3"
@@ -13,7 +13,7 @@ logging.basicConfig(level=logging.ERROR)
def main():
- s = Session("Nodejs", api_key=E2B_API_KEY)
+ s = Sandbox(api_key=E2B_API_KEY)
a = s.process.start("ls -la /var ")
a.wait()
print(a.stdout)
diff --git a/packages/python-sdk/pyproject.toml b/packages/python-sdk/pyproject.toml
index 7865c8648..d12061a26 100644
--- a/packages/python-sdk/pyproject.toml
+++ b/packages/python-sdk/pyproject.toml
@@ -1,6 +1,6 @@
[tool.poetry]
name = "e2b"
-version = "0.9.7"
+version = "0.10.0-rc.0"
description = "E2B SDK that give agents cloud environments"
authors = ["e2b <[email protected]>"]
license = "MIT"
@@ -35,6 +35,3 @@ build-backend = "poetry.core.masonry.api"
[tool.poetry.urls]
"Bug Tracker" = "https://github.com/e2b-dev/e2b/issues"
-
-[tool.pytest.ini_options]
-asyncio_mode = "auto"
diff --git a/packages/python-sdk/python-sdk-example.ipynb b/packages/python-sdk/python-sdk-example.ipynb
index b2f6a9910..7aca16f6a 100644
--- a/packages/python-sdk/python-sdk-example.ipynb
+++ b/packages/python-sdk/python-sdk-example.ipynb
@@ -40,8 +40,8 @@
"text": [
"Collecting e2b==0.1.4\n",
" Downloading e2b-0.1.4-py3-none-any.whl (71 kB)\n",
- "\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",
+ "\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",
@@ -65,8 +65,8 @@
" 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",
+ "\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"
]
}
@@ -88,7 +88,7 @@
"metadata": {},
"outputs": [],
"source": [
- "from e2b import Session\n",
+ "from e2b import Sandbox\n",
"\n",
"id = \"Nodejs\""
]
@@ -108,10 +108,10 @@
"source": [
"# You can use some of the predefined environments by using specific id:\n",
"# 'Nodejs', 'Bash', 'Python3', 'Java', 'Go', 'Rust', 'PHP', 'Perl', 'DotNET'\n",
- "session = await Session.create(id)\n",
+ "sandbox = Sandbox.create(id)\n",
"\n",
"# Close the session after you are done\n",
- "await session.close()"
+ "sandbox.close()"
]
},
{
@@ -137,16 +137,16 @@
"source": [
"# Create, read and delete file\n",
"\n",
- "session = await Session.create(id)\n",
+ "sandbox = Sandbox.create(id)\n",
"\n",
- "await session.filesystem.write(\"/tmp/test.txt\", \"Hello World!\")\n",
+ "sandbox.filesystem.write(\"/tmp/test.txt\", \"Hello World!\")\n",
"\n",
- "content = await session.filesystem.read(\"/tmp/test.txt\")\n",
+ "content = sandbox.filesystem.read(\"/tmp/test.txt\")\n",
"print(content)\n",
"\n",
- "await session.filesystem.remove(\"/tmp/test.txt\")\n",
+ "sandbox.filesystem.remove(\"/tmp/test.txt\")\n",
"\n",
- "await session.close()"
+ "sandbox.close()"
]
},
{
@@ -167,22 +167,22 @@
"source": [
"# List files in a directory, create a new directory and remove a directory\n",
"\n",
- "session = await Session.create(id)\n",
+ "sandbox = Sandbox.create(id)\n",
"\n",
- "ls = await session.filesystem.list(\"/\")\n",
+ "ls = sandbox.filesystem.list(\"/\")\n",
"print([x.name for x in ls if x.name.startswith(\"test\")])\n",
"\n",
- "await session.filesystem.make_dir(\"/test/new\")\n",
+ "sandbox.filesystem.make_dir(\"/test/new\")\n",
"\n",
- "ls = await session.filesystem.list(\"/\")\n",
+ "ls = sandbox.filesystem.list(\"/\")\n",
"print([x.name for x in ls if x.name.startswith(\"test\")])\n",
"\n",
- "await session.filesystem.remove(\"/test\")\n",
+ "sandbox.filesystem.remove(\"/test\")\n",
"\n",
- "ls = await session.filesystem.list(\"/\")\n",
+ "ls = sandbox.filesystem.list(\"/\")\n",
"print([x.name for x in ls if x.name.startswith(\"test\")])\n",
"\n",
- "await session.close()"
+ "sandbox.close()"
]
},
{
@@ -202,18 +202,18 @@
"source": [
"# Watch directory for changes (WIP)\n",
"\n",
- "session = Session(id)\n",
- "await session.open()\n",
+ "sandbox = Sandbox(id)\n",
+ "sandbox.open()\n",
"\n",
- "watcher = await session.filesystem.watch_dir(\"/\")\n",
+ "watcher = sandbox.filesystem.watch_dir(\"/\")\n",
"watcher.add_event_listener(lambda event: print(\"Event\", event))\n",
- "await watcher.start()\n",
+ "watcher.start()\n",
"\n",
- "await session.filesystem.write(\"/test.txt\", \"Hello World!\")\n",
+ "sandbox.filesystem.write(\"/test.txt\", \"Hello World!\")\n",
"\n",
- "await watcher.stop()\n",
+ "watcher.stop()\n",
"\n",
- "await session.close()"
+ "sandbox.close()"
]
},
{
@@ -249,15 +249,15 @@
"source": [
"# Execute a command and get the output\n",
"\n",
- "session = await Session.create(id)\n",
+ "sandbox = Sandbox.create(id)\n",
"\n",
- "proc = await session.process.start(\n",
+ "proc = sandbox.process.start(\n",
" \"pwd\",\n",
" # If you add a callback for stdout you will get the stderr data as it comes in. \n",
- " # You can still access the stdout after `output = await proc` as `output.stdout` or anytime as `proc.output.stdout`.\n",
+ " # You can still access the stdout after `output = proc.wait()` as `output.stdout` or anytime as `proc.output.stdout`.\n",
" on_stdout=lambda data: print(\"Stdout\", data),\n",
" # If you add a callback for stderr you will get the stderr data as it comes in.\n",
- " # You can still access the stderr after `output = await proc` as `output.stderr` or anytime as `proc.output.stderr`.\n",
+ " # You can still access the stderr after `output = proc.wait()` as `output.stderr` or anytime as `proc.output.stderr`.\n",
" on_stderr=lambda data: print(\"Stderr\", data),\n",
" on_exit=lambda: print(\"Exit\"),\n",
" cwd=\"/code\",\n",
@@ -267,8 +267,8 @@
"# You can access `proc.output...` even before the process finishes\n",
"print(\"Current output\", proc.output.messages)\n",
"\n",
- "# You can directly await the started process to wait for exit\n",
- "output = await proc\n",
+ "# You can wait for the process to end\n",
+ "output = proc.wait()\n",
"\n",
"# List of all output messages\n",
"print(\"Output\", output.messages)\n",
@@ -276,7 +276,7 @@
"print(\"Stdout\", output.stdout)\n",
"# Concatenated stderr\n",
"print(\"Stderr\", output.stderr)\n",
- "await session.close()"
+ "sandbox.close()"
]
},
{
@@ -305,27 +305,27 @@
"source": [
"# Start command, send stdin to it and then kill it\n",
"\n",
- "session = await Session.create(id)\n",
+ "sandbox = Sandbox.create(id)\n",
"\n",
- "proc = await session.process.start(\n",
+ "proc = sandbox.process.start(\n",
" \"while IFS= read -r line; do echo \\\"$line\\\"; sleep 1; done\",\n",
" # If you add a callback for stdout you will get the stderr data as it comes in. \n",
- " # You can still access the stdout after `output = await proc` as `output.stdout` or anytime as `proc.output.stdout`.\n",
+ " # You can still access the stdout after `output = proc.wait()` as `output.stdout` or anytime as `proc.output.stdout`.\n",
" on_stdout=lambda data: print(\"Stdout\", data),\n",
" # If you add a callback for stderr you will get the stderr data as it comes in.\n",
- " # You can still access the stderr after `output = await proc` as `output.stderr` or anytime as `proc.output.stderr`.\n",
+ " # You can still access the stderr after `output = proc.wait()` as `output.stderr` or anytime as `proc.output.stderr`.\n",
" on_stderr=lambda data: print(\"Stderr\", data),\n",
" on_exit=lambda: print(\"Exit\"),\n",
" cwd=\"/code\",\n",
")\n",
- "await proc.send_stdin(\"marco\\n\")\n",
- "await proc.kill()\n",
+ "proc.send_stdin(\"marco\\n\")\n",
+ "proc.kill()\n",
"\n",
"print(\"Output\", proc.output.messages)\n",
"print(\"Stdout\", proc.output.stdout)\n",
"print(\"Stdout\", proc.output.stderr)\n",
"\n",
- "await session.close()"
+ "sandbox.close()"
]
},
{
@@ -345,13 +345,13 @@
"output_type": "stream",
"text": [
"Terminal session ID FSSpmurO9BNP\n",
- "\u001b[?2004h\n",
+ "\u001B[?2004h\n",
"/code $ \n",
"ls -a\n",
- "\u001b[?2004l\n",
- "\u001b[0m\u001b[01;34m.\u001b[0m \u001b[01;34m..\u001b[0m package.json\n",
+ "\u001B[?2004l\n",
+ "\u001B[0m\u001B[01;34m.\u001B[0m \u001B[01;34m..\u001B[0m package.json\n",
"\n",
- "\u001b[?2004h/code $ \n",
+ "\u001B[?2004h/code $ \n",
"Exit\n"
]
}
@@ -359,9 +359,9 @@
"source": [
"# Start and interact with a terminal session\n",
"\n",
- "session = await Session.create(id)\n",
+ "sandbox = Sandbox.create(id)\n",
"\n",
- "term = await session.terminal.start(\n",
+ "term = sandbox.terminal.start(\n",
" on_data=lambda data: print(data),\n",
" on_exit=lambda: print(\"Exit\"),\n",
" cols=80,\n",
@@ -369,13 +369,13 @@
" cwd=\"/code\",\n",
")\n",
"print(\"Terminal session ID\", term.terminal_id)\n",
- "await term.resize(80, 30)\n",
+ "term.resize(80, 30)\n",
"\n",
- "await term.send_data(\"ls -a\\n\")\n",
+ "term.send_data(\"ls -a\\n\")\n",
"\n",
- "await term.kill()\n",
+ "term.kill()\n",
"\n",
- "await session.close()"
+ "sandbox.close()"
]
},
{
@@ -394,11 +394,11 @@
}
],
"source": [
- "# Execute one command inside of a terminal session\n",
+ "# Execute one command inside a terminal session\n",
"\n",
- "session = await Session.create(id)\n",
+ "sandbox = Sandbox.create(id)\n",
"\n",
- "term = await session.terminal.start(\n",
+ "term = sandbox.terminal.start(\n",
" on_data=lambda data: print(\"Data:\", data),\n",
" on_exit=lambda: print(\"Exit\"),\n",
" cols=80,\n",
@@ -408,9 +408,9 @@
" cmd=\"echo Hello World\",\n",
")\n",
"\n",
- "await term\n",
+ "term.wait()\n",
"\n",
- "await session.close()"
+ "sandbox.close()"
]
},
{
@@ -451,25 +451,24 @@
],
"source": [
"# Get notified when a port opens and how to get a public hostname for an open port in the cloud environment\n",
+ "import time\n",
"\n",
- "import asyncio\n",
- "\n",
- "session = await Session.create(\n",
+ "sandbox = Sandbox.create(\n",
" id,\n",
" on_scan_ports=lambda ports: print(\"Open ports:\", [port.port for port in ports]),\n",
")\n",
"\n",
"port = 8000\n",
- "proc = await session.process.start(f\"python3 -m http.server {port}\")\n",
+ "proc = sandbox.process.start(f\"python3 -m http.server {port}\")\n",
"\n",
- "hostname = session.get_hostname(port)\n",
+ "hostname = sandbox.get_hostname(port)\n",
"print(f\"Hostname: https://{hostname}\")\n",
"\n",
- "await asyncio.sleep(10)\n",
+ "time.sleep(10)\n",
"\n",
- "await proc.kill()\n",
+ "proc.kill()\n",
"\n",
- "await session.close()"
+ "sandbox.close()"
]
},
{
@@ -490,9 +489,9 @@
],
"source": [
"# One line initialization\n",
- "session = await Session.create(id)\n",
+ "sandbox = Sandbox.create(id)\n",
"\n",
- "proc = await session.process.start(\n",
+ "proc = sandbox.process.start(\n",
" \"pwd\",\n",
" cwd=\"/code\",\n",
")\n",
@@ -500,8 +499,8 @@
"# You can access `proc.output...` even before the process finishes\n",
"print(\"Current output\", proc.output.messages)\n",
"\n",
- "# You can directly await the started process to wait for exit\n",
- "output = await proc\n",
+ "# You can wait for the result\n",
+ "output = proc.wait()\n",
"\n",
"# List of all output messages\n",
"print(\"Output\", output.messages)\n",
@@ -510,7 +509,7 @@
"# Concatenated stderr\n",
"print(\"Stderr\", output.stderr)\n",
"\n",
- "await session.close()"
+ "sandbox.close()"
]
}
],
diff --git a/packages/python-sdk/tests/infra/test_homedir.py b/packages/python-sdk/tests/infra/test_homedir.py
index 67c3727e9..b9b204add 100644
--- a/packages/python-sdk/tests/infra/test_homedir.py
+++ b/packages/python-sdk/tests/infra/test_homedir.py
@@ -1,11 +1,11 @@
-from e2b import Session
+from e2b import Sandbox
def test_homedir():
- session = Session("Bash")
+ sandbox = Sandbox()
- process = session.process.start("echo $HOME")
+ process = sandbox.process.start("echo $HOME")
process.wait()
output = process.stdout
assert output == "/home/user"
- session.close()
+ sandbox.close()
diff --git a/packages/python-sdk/tests/infra/test_install_package.py b/packages/python-sdk/tests/infra/test_install_package.py
index 0fc4080b7..7b41796b4 100644
--- a/packages/python-sdk/tests/infra/test_install_package.py
+++ b/packages/python-sdk/tests/infra/test_install_package.py
@@ -1,14 +1,14 @@
-from e2b import Session
+from e2b import Sandbox
def test_python_package():
- session = Session("Python3")
+ sandbox = Sandbox()
- process = session.process.start("pip install pip-install-test")
+ process = sandbox.process.start("pip install pip-install-test")
process.wait()
- process = session.process.start('python -c "import pip_install_test"')
+ process = sandbox.process.start('python -c "import pip_install_test"')
process.wait()
output = process.stdout
assert "Good job!" in output
- session.close()
+ sandbox.close()
diff --git a/packages/python-sdk/tests/infra/test_sudo.py b/packages/python-sdk/tests/infra/test_sudo.py
index 7d70129fd..17ccaded4 100644
--- a/packages/python-sdk/tests/infra/test_sudo.py
+++ b/packages/python-sdk/tests/infra/test_sudo.py
@@ -1,11 +1,11 @@
-from e2b import Session
+from e2b import Sandbox
def test_sudo():
- session = Session("Bash")
+ sandbox = Sandbox()
- process = session.process.start("sudo echo test")
+ process = sandbox.process.start("sudo echo test")
process.wait()
output = process.stdout
assert output == "test"
- session.close()
+ sandbox.close()
diff --git a/packages/python-sdk/tests/setup.py b/packages/python-sdk/tests/setup.py
deleted file mode 100644
index 269964ded..000000000
--- a/packages/python-sdk/tests/setup.py
+++ /dev/null
@@ -1 +0,0 @@
-id = "Bash"
diff --git a/packages/python-sdk/tests/templates/test_data_analysis.py b/packages/python-sdk/tests/templates/test_data_analysis.py
index d4eb2df46..1277ce400 100644
--- a/packages/python-sdk/tests/templates/test_data_analysis.py
+++ b/packages/python-sdk/tests/templates/test_data_analysis.py
@@ -14,3 +14,18 @@ plt.show()
)
s.close()
assert len(artifacts) == 1
+
+
+def test_install_packages():
+ s = DataAnalysis()
+
+ s.install_python_packages("pandas")
+ s.install_python_packages(["pandas"])
+ s.install_python_packages(" ")
+ s.install_python_packages([])
+
+ s.install_system_packages("curl")
+ s.install_system_packages(["curl"])
+ s.install_system_packages("")
+ s.install_system_packages([])
+ s.close()
diff --git a/packages/python-sdk/tests/test_cwd.py b/packages/python-sdk/tests/test_cwd.py
index 6a69a207b..949297f4e 100644
--- a/packages/python-sdk/tests/test_cwd.py
+++ b/packages/python-sdk/tests/test_cwd.py
@@ -1,84 +1,84 @@
import pytest
-from e2b import Session
+from e2b import Sandbox
def test_process_cwd():
- session = Session("Bash", cwd="/code/app")
+ sandbox = Sandbox(cwd="/code/app")
- proc = session.process.start("pwd")
+ proc = sandbox.process.start("pwd")
output = proc.wait()
assert output.stdout == "/code/app"
- session.close()
+ sandbox.close()
def test_filesystem_cwd():
- session = Session("Bash", cwd="/code/app")
+ sandbox = Sandbox(cwd="/code/app")
- session.filesystem.write("hello.txt", "Hello VM!")
- proc = session.process.start("cat /code/app/hello.txt")
+ sandbox.filesystem.write("hello.txt", "Hello VM!")
+ proc = sandbox.process.start("cat /code/app/hello.txt")
output = proc.wait()
assert output.stdout == "Hello VM!"
- session.close()
+ sandbox.close()
def test_change_cwd():
- session = Session("Bash", cwd="/code/app")
+ sandbox = Sandbox(cwd="/code/app")
# change dir to /home/user
- session.cwd = "/home/user"
+ sandbox.cwd = "/home/user"
# process respects cwd
- proc = session.process.start("pwd")
+ proc = sandbox.process.start("pwd")
output = proc.wait()
assert output.stdout == "/home/user"
# filesystem respects cwd
- session.filesystem.write("hello.txt", "Hello VM!")
- proc = session.process.start("cat /home/user/hello.txt")
+ sandbox.filesystem.write("hello.txt", "Hello VM!")
+ proc = sandbox.process.start("cat /home/user/hello.txt")
output = proc.wait()
assert output.stdout == "Hello VM!"
- session.close()
+ sandbox.close()
def test_initial_cwd_with_tilde():
- session = Session("Bash", cwd="~/code/")
+ sandbox = Sandbox(cwd="~/code/")
- proc = session.process.start("pwd")
+ proc = sandbox.process.start("pwd")
output = proc.wait()
assert output.stdout == "/home/user/code"
- session.close()
+ sandbox.close()
def test_relative_paths():
- session = Session("Bash", cwd="/home/user")
+ sandbox = Sandbox(cwd="/home/user")
- session.filesystem.make_dir("./code")
- session.filesystem.write("./code/hello.txt", "Hello Vasek!")
- proc = session.process.start("cat /home/user/code/hello.txt")
+ sandbox.filesystem.make_dir("./code")
+ sandbox.filesystem.write("./code/hello.txt", "Hello Vasek!")
+ proc = sandbox.process.start("cat /home/user/code/hello.txt")
output = proc.wait()
assert output.stdout == "Hello Vasek!"
- session.filesystem.write("../../hello.txt", "Hello Tom!")
- proc = session.process.start("cat /hello.txt")
+ sandbox.filesystem.write("../../hello.txt", "Hello Tom!")
+ proc = sandbox.process.start("cat /hello.txt")
output = proc.wait()
assert output.stdout == "Hello Tom!"
- session.close()
+ sandbox.close()
def test_warnings():
- session = Session("Bash")
+ sandbox = Sandbox()
with pytest.warns(Warning):
- session.filesystem.write("./hello.txt", "Hello Vasek!")
+ sandbox.filesystem.write("./hello.txt", "Hello Vasek!")
with pytest.warns(Warning):
- session.filesystem.write("../hello.txt", "Hello Vasek!")
+ sandbox.filesystem.write("../hello.txt", "Hello Vasek!")
with pytest.warns(Warning):
- session.filesystem.write("~/hello.txt", "Hello Vasek!")
+ sandbox.filesystem.write("~/hello.txt", "Hello Vasek!")
- session.close()
+ sandbox.close()
diff --git a/packages/python-sdk/tests/test_env_vars.py b/packages/python-sdk/tests/test_env_vars.py
index 03f26cb61..899e8a8bd 100644
--- a/packages/python-sdk/tests/test_env_vars.py
+++ b/packages/python-sdk/tests/test_env_vars.py
@@ -1,45 +1,45 @@
-from e2b import Session
+from e2b import Sandbox
def test_env_vars():
- session = Session("Bash")
+ sandbox = Sandbox()
- process = session.process.start("echo $FOO", env_vars={"FOO": "BAR"})
+ process = sandbox.process.start("echo $FOO", env_vars={"FOO": "BAR"})
process.wait()
output = process.stdout
assert output == "BAR"
- session.close()
+ sandbox.close()
def test_profile_env_vars():
- session = Session("Bash")
+ sandbox = Sandbox()
- session.filesystem.write("/home/user/.profile", "export FOO=BAR")
- process = session.process.start("echo $FOO")
+ sandbox.filesystem.write("/home/user/.profile", "export FOO=BAR")
+ process = sandbox.process.start("echo $FOO")
process.wait()
output = process.stdout
assert output == "BAR"
- session.close()
+ sandbox.close()
def test_default_env_vars():
- session = Session("Bash", env_vars={"FOO": "BAR"})
- process = session.process.start("echo $FOO")
+ sandbox = Sandbox(env_vars={"FOO": "BAR"})
+ process = sandbox.process.start("echo $FOO")
process.wait()
output = process.stdout
assert output == "BAR"
- session.close()
+ sandbox.close()
def test_overriding_env_vars():
- session = Session("Bash", env_vars={"FOO": "BAR"})
+ sandbox = Sandbox(env_vars={"FOO": "BAR"})
- process = session.process.start("echo $FOO", env_vars={"FOO": "QUX"})
+ process = sandbox.process.start("echo $FOO", env_vars={"FOO": "QUX"})
process.wait()
output = process.stdout
assert output == "QUX"
- session.close()
+ sandbox.close()
diff --git a/packages/python-sdk/tests/test_file_upload_download.py b/packages/python-sdk/tests/test_file_upload_download.py
index d64fca4f8..9cab56ad8 100644
--- a/packages/python-sdk/tests/test_file_upload_download.py
+++ b/packages/python-sdk/tests/test_file_upload_download.py
@@ -1,7 +1,7 @@
import filecmp
from os import path
-from e2b import Session
+from e2b import Sandbox
def test_download():
@@ -10,18 +10,18 @@ def test_download():
local_path = path.join(local_dir, file_name)
- session = Session("Bash")
+ sandbox = Sandbox()
# Upload the file first (it's uploaded to /home/user)
with open(local_path, "rb") as f:
- uploaded_file_path = session.upload_file(file=f)
+ uploaded_file_path = sandbox.upload_file(file=f)
# Download the file back and save it in the local filesystem
- file_content = session.download_file(uploaded_file_path)
+ file_content = sandbox.download_file(uploaded_file_path)
with open(path.join(local_dir, "video-downloaded.webm"), "wb") as f:
f.write(file_content)
# Compare the downloaded file with the original
assert filecmp.cmp(local_path, path.join(local_dir, "video-downloaded.webm"))
- session.close()
+ sandbox.close()
diff --git a/packages/python-sdk/tests/test_filesystem.py b/packages/python-sdk/tests/test_filesystem.py
index fc74279b7..66e421b00 100644
--- a/packages/python-sdk/tests/test_filesystem.py
+++ b/packages/python-sdk/tests/test_filesystem.py
@@ -4,67 +4,67 @@ from os import path
from time import sleep
from typing import List
-from e2b import Session, FilesystemEvent
+from e2b import Sandbox, FilesystemEvent
def test_list_files():
- session = Session("Bash")
- session.filesystem.make_dir("/test/new")
+ sandbox = Sandbox()
+ sandbox.filesystem.make_dir("/test/new")
- ls = session.filesystem.list("/test")
+ ls = sandbox.filesystem.list("/test")
assert ["new"] == [x.name for x in ls]
- session.close()
+ sandbox.close()
def test_create_file():
- session = Session("Bash")
- session.filesystem.make_dir("/test")
- session.filesystem.write("/test/test.txt", "Hello World!")
+ sandbox = Sandbox()
+ sandbox.filesystem.make_dir("/test")
+ sandbox.filesystem.write("/test/test.txt", "Hello World!")
- ls = session.filesystem.list("/test")
+ ls = sandbox.filesystem.list("/test")
assert ["test.txt"] == [x.name for x in ls]
- session.close()
+ sandbox.close()
def test_read_and_write():
- session = Session("Bash")
+ sandbox = Sandbox()
- session.filesystem.write("/tmp/test.txt", "Hello World!")
+ sandbox.filesystem.write("/tmp/test.txt", "Hello World!")
- content = session.filesystem.read("/tmp/test.txt")
+ content = sandbox.filesystem.read("/tmp/test.txt")
assert content == "Hello World!"
- session.close()
+ sandbox.close()
def test_list_delete_files():
- session = Session("Bash")
- session.filesystem.make_dir("/test/new")
+ sandbox = Sandbox()
+ sandbox.filesystem.make_dir("/test/new")
- ls = session.filesystem.list("/test")
+ ls = sandbox.filesystem.list("/test")
assert ["new"] == [x.name for x in ls]
- session.filesystem.remove("/test/new")
+ sandbox.filesystem.remove("/test/new")
- ls = session.filesystem.list("/test")
+ ls = sandbox.filesystem.list("/test")
assert [] == [x.name for x in ls]
- session.close()
+ sandbox.close()
def test_watch_dir():
- session = Session("Bash")
- session.filesystem.write("/tmp/test.txt", "Hello")
+ sandbox = Sandbox()
+ sandbox.filesystem.write("/tmp/test.txt", "Hello")
- watcher = session.filesystem.watch_dir("/tmp")
+ watcher = sandbox.filesystem.watch_dir("/tmp")
events: List[FilesystemEvent] = []
watcher.add_event_listener(lambda e: events.append(e))
watcher.start()
- session.filesystem.write("/tmp/test.txt", "World!")
+ sandbox.filesystem.write("/tmp/test.txt", "World!")
sleep(1)
watcher.stop()
@@ -74,7 +74,7 @@ def test_watch_dir():
assert event.operation == "Write"
assert event.path == "/tmp/test.txt"
- session.close()
+ sandbox.close()
def test_write_bytes():
@@ -85,21 +85,21 @@ def test_write_bytes():
local_path = path.join(local_dir, file_name)
remote_path = path.join(remote_dir, file_name)
- # TODO: This test isn't complete since we can't verify the size of the file inside session.
- # We don't have any SDK function to get the size of a file inside session.
+ # TODO: This test isn't complete since we can't verify the size of the file inside sandbox.
+ # We don't have any SDK function to get the size of a file inside sandbox.
- session = Session("Bash")
+ sandbox = Sandbox()
# Upload the file
with open(local_path, "rb") as f:
content = f.read()
- session.filesystem.write_bytes(remote_path, content)
+ sandbox.filesystem.write_bytes(remote_path, content)
- # Check if the file exists inside session
- files = session.filesystem.list(remote_dir)
+ # Check if the file exists inside sandbox
+ files = sandbox.filesystem.list(remote_dir)
assert file_name in [x.name for x in files]
- session.close()
+ sandbox.close()
def test_read_bytes():
@@ -110,18 +110,18 @@ def test_read_bytes():
local_path = path.join(local_dir, file_name)
remote_path = path.join(remote_dir, file_name)
- # TODO: This test isn't complete since we can't verify the size of the file inside session.
- # We don't have any SDK function to get the size of a file inside session.
+ # TODO: This test isn't complete since we can't verify the size of the file inside sandbox.
+ # We don't have any SDK function to get the size of a file inside sandbox.
- session = Session("Bash")
+ sandbox = Sandbox()
# Upload the file first
with open(local_path, "rb") as f:
content = f.read()
- session.filesystem.write_bytes(remote_path, content)
+ sandbox.filesystem.write_bytes(remote_path, content)
# Download the file
- content = session.filesystem.read_bytes(remote_path)
+ content = sandbox.filesystem.read_bytes(remote_path)
# Save the file
downloaded_path = path.join(local_dir, "video-downloaded.webm")
@@ -131,4 +131,4 @@ def test_read_bytes():
# Compare if both files are equal
assert filecmp.cmp(local_path, downloaded_path)
- session.close()
+ sandbox.close()
diff --git a/packages/python-sdk/tests/test_process.py b/packages/python-sdk/tests/test_process.py
index db7f3206a..fdd6ebc3f 100644
--- a/packages/python-sdk/tests/test_process.py
+++ b/packages/python-sdk/tests/test_process.py
@@ -1,6 +1,6 @@
from unittest.mock import MagicMock
-from e2b import Session
+from e2b import Sandbox
def test_process_expected_stdout():
@@ -14,12 +14,12 @@ def test_process_expected_stderr():
def test_process_on_stdout_stderr():
- session = Session("Bash")
+ sandbox = Sandbox()
stdout = []
stderr = []
- proc = session.process.start(
+ proc = sandbox.process.start(
"pwd",
on_stdout=lambda data: stdout.append(data),
on_stderr=lambda data: stderr.append(data),
@@ -35,29 +35,29 @@ def test_process_on_stdout_stderr():
assert stderr == []
assert proc.exit_code == 0
- session.close()
+ sandbox.close()
def test_process_on_exit():
- session = Session("Bash")
+ sandbox = Sandbox()
on_exit = MagicMock()
- proc = session.process.start(
+ proc = sandbox.process.start(
"pwd",
- on_exit=lambda: on_exit(),
+ on_exit=lambda exit_code: on_exit(exit_code),
)
proc.wait()
on_exit.assert_called_once()
- session.close()
+ sandbox.close()
def test_process_send_stdin():
- session = Session("Bash")
+ sandbox = Sandbox()
- proc = session.process.start(
+ proc = sandbox.process.start(
'read -r line; echo "$line"',
cwd="/code",
)
@@ -71,35 +71,34 @@ def test_process_send_stdin():
assert message.line == "ping"
assert not message.error
- session.close()
+ sandbox.close()
def test_default_on_exit():
on_exit = MagicMock()
- session = Session("Bash", on_exit=lambda: on_exit())
- proc = session.process.start(
+ sandbox = Sandbox(on_exit=lambda exit_code: on_exit(exit_code))
+ proc = sandbox.process.start(
"pwd",
on_exit=lambda: print("EXIT"),
)
proc.wait()
on_exit.assert_not_called()
- proc = session.process.start(
+ proc = sandbox.process.start(
"pwd",
)
proc.wait()
on_exit.assert_called_once()
- session.close()
+ sandbox.close()
def test_process_default_on_stdout_stderr():
on_stdout = MagicMock()
on_stderr = MagicMock()
- session = Session(
- "Nodejs",
+ sandbox = Sandbox(
on_stdout=lambda data: on_stdout(),
on_stderr=lambda data: on_stderr(),
)
@@ -108,7 +107,7 @@ def test_process_default_on_stdout_stderr():
stdout = []
stderr = []
- proc = session.process.start(
+ proc = sandbox.process.start(
code,
on_stdout=lambda data: stdout.append(data),
on_stderr=lambda data: stderr.append(data),
@@ -118,11 +117,11 @@ def test_process_default_on_stdout_stderr():
on_stdout.assert_not_called()
on_stderr.assert_not_called()
- proc = session.process.start(code)
+ proc = sandbox.process.start(code)
proc.wait()
on_stdout.assert_called_once()
on_stderr.assert_called()
assert proc.exit_code == 1
- session.close()
+ sandbox.close()
diff --git a/packages/python-sdk/tests/test_run_code.py b/packages/python-sdk/tests/test_run_code.py
index b87852bdb..2f71a4787 100644
--- a/packages/python-sdk/tests/test_run_code.py
+++ b/packages/python-sdk/tests/test_run_code.py
@@ -1,7 +1,7 @@
import pytest
from e2b import run_code
-from e2b.session.exception import UnsupportedRuntimeException
+from e2b.sandbox.exception import UnsupportedRuntimeException
def test_run_code():
diff --git a/packages/python-sdk/tests/test_session.py b/packages/python-sdk/tests/test_session.py
index 21d4bab10..4390b3858 100644
--- a/packages/python-sdk/tests/test_session.py
+++ b/packages/python-sdk/tests/test_session.py
@@ -1,13 +1,13 @@
-from e2b import Session
+from e2b import Sandbox
-def test_create_session():
- session = Session("Bash")
- session.close()
+def test_create_sandbox():
+ sandbox = Sandbox()
+ sandbox.close()
-def test_create_multiple_sessions():
- session = Session("Bash")
- session2 = Session("Bash")
- session.close()
- session2.close()
+def test_create_multiple_sandboxes():
+ sandbox = Sandbox()
+ sandbox2 = Sandbox()
+ sandbox.close()
+ sandbox2.close()
diff --git a/packages/python-sdk/tests/test_timeout.py b/packages/python-sdk/tests/test_timeout.py
index d5418231c..a84a8177f 100644
--- a/packages/python-sdk/tests/test_timeout.py
+++ b/packages/python-sdk/tests/test_timeout.py
@@ -1,43 +1,43 @@
import pytest
-from e2b import Session
-from e2b.session.exception import TimeoutException
+from e2b import Sandbox
+from e2b.sandbox.exception import TimeoutException
-def test_create_session_timeout():
- session: Session | None = None
+def test_create_sandbox_timeout():
+ sandbox: Sandbox | None = None
with pytest.raises(TimeoutException):
- session = Session("Bash", timeout=0.01)
+ sandbox = Sandbox(timeout=0.01)
- if session:
- session.close()
+ if sandbox:
+ sandbox.close()
def test_process_timeout():
- session: Session | None = None
+ sandbox: Sandbox | None = None
with pytest.raises(TimeoutException):
- session = Session("Bash")
- session.process.start(
+ sandbox = Sandbox()
+ sandbox.process.start(
"sleep 1",
timeout=0.01,
)
- if session:
- session.close()
+ if sandbox:
+ sandbox.close()
def test_filesystem_timeout():
- session: Session | None = None
+ sandbox: Sandbox | None = None
with pytest.raises(TimeoutException):
- session = Session("Bash")
- session.filesystem.write(
+ sandbox = Sandbox()
+ sandbox.filesystem.write(
"test.txt",
"Hello World",
timeout=0.01,
)
- if session:
- session.close()
+ if sandbox:
+ sandbox.close()
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 0323e18a7..42b8253c5 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -37,8 +37,8 @@ importers:
specifier: ^1.7.3
'@e2b/sdk':
- specifier: ^0.7.5
- version: 0.7.5
+ specifier: 0.8.0
+ version: 0.8.0
'@headlessui/react':
specifier: ^1.7.15
@@ -207,7 +207,7 @@ importers:
dependencies:
next:
specifier: latest
react:
specifier: latest
version: 18.2.0
@@ -220,10 +220,10 @@ importers:
version: 20.8.7
'@types/react':
specifier: latest
- version: 18.2.31
+ version: 18.2.30
'@types/react-dom':
specifier: latest
- version: 18.2.14
+ version: 18.2.8
typescript:
specifier: latest
version: 5.2.2
@@ -233,66 +233,36 @@ importers:
'@balena/dockerignore':
specifier: ^1.0.2
version: 1.0.2
- '@devbookhq/sdk':
- specifier: ^2.6.88
- version: 2.6.95
'@e2b/sdk':
- specifier: ^0.7.3
- version: 0.7.3
+ specifier: ^0.7.5
+ version: 0.7.5
'@iarna/toml':
specifier: ^2.2.5
version: 2.2.5
'@nodelib/fs.walk':
- specifier: ^1.2.8
- version: 1.2.8
- '@types/tar-fs':
- specifier: ^2.0.2
- version: 2.0.3
+ specifier: ^2.0.0
+ version: 2.0.0
async-listen:
specifier: ^3.0.1
version: 3.0.1
boxen:
- specifier: ^7.0.0
+ specifier: ^7.1.1
version: 7.1.1
chalk:
- specifier: ^5.1.2
+ specifier: ^5.3.0
version: 5.3.0
- chokidar:
- specifier: ^3.5.3
- version: 3.5.3
commander:
- specifier: ^9.4.1
- version: 9.5.0
+ specifier: ^11.1.0
+ version: 11.1.0
common-tags:
specifier: ^1.8.2
version: 1.8.2
- cross-blob:
- specifier: ^3.0.2
- version: 3.0.2
- docker-names:
- specifier: ^1.2.1
- version: 1.2.1
- formdata-node:
- specifier: ^5.0.1
- version: 5.0.1
- get-port:
- specifier: ^7.0.0
- version: 7.0.0
ignore:
specifier: ^5.2.4
version: 5.2.4
- inquirer:
- specifier: ^8.0.0
- version: 8.2.6
- node-fetch:
- specifier: ^3.3.2
- version: 3.3.2
open:
- specifier: ^8.4.2
- version: 8.4.2
- parse-gitignore:
- specifier: ^2.0.0
- version: 2.0.0
+ specifier: ^9.1.0
+ version: 9.1.0
tar-fs:
specifier: ^3.0.4
version: 3.0.4
@@ -300,39 +270,36 @@ importers:
specifier: 5.1.0
version: 5.1.0
yup:
- specifier: ^0.32.11
- version: 0.32.11
+ specifier: ^1.3.2
+ version: 1.3.2
devDependencies:
'@types/common-tags':
specifier: ^1.8.2
version: 1.8.3
- '@types/inquirer':
- specifier: ^8.0.0
- version: 8.2.9
'@types/node':
- specifier: '16.11'
- version: 16.11.68
- '@types/node-fetch':
- specifier: ^2.6.5
- version: 2.6.7
- '@types/parse-gitignore':
- specifier: ^1.0.0
- version: 1.0.1
- '@types/platform':
- specifier: ^1.3.4
- version: 1.3.5
+ specifier: ^18.18.6
+ version: 18.18.6
+ '@types/tar-fs':
+ specifier: ^2.0.3
+ version: 2.0.3
'@types/update-notifier':
- specifier: 5.1.0
- version: 5.1.0
- platform:
- specifier: ^1.3.6
- version: 1.3.6
+ specifier: 6.0.5
+ version: 6.0.5
+ knip:
+ specifier: ^2.33.4
+ version: 2.35.0
+ npm-check-updates:
+ specifier: ^16.14.6
+ version: 16.14.6
tsup:
- specifier: ^6.5.0
- version: 6.7.0([email protected])
+ specifier: ^7.2.0
+ version: 7.2.0([email protected])
typescript:
- specifier: ^4.9.3
- version: 4.9.5
+ specifier: ^5.2.2
+ version: 5.2.2
+ vitest:
+ specifier: ^0.34.6
+ version: 0.34.6
packages/js-sdk:
dependencies:
@@ -751,21 +718,8 @@ packages:
dev: true
optional: true
- /@devbookhq/[email protected]:
- resolution: {integrity: sha512-nAj/BWV30Miemt/bPhAwUnh8J5dzXOhLtF4AtcTDuSPFFhmc6IhJLy+pgvQhOP9FELrwo/NXdcGQZftVt16EQw==}
- dependencies:
- cross-fetch: 3.1.8
- normalize-path: 3.0.0
- openapi-typescript-fetch: 1.1.3
- rpc-websocket-client: 1.1.4
- transitivePeerDependencies:
- - bufferutil
- - encoding
- - utf-8-validate
- dev: false
-
- resolution: {integrity: sha512-vWoiJWBWvCVbwzHGKqQ6+KLsspSrQZF281aFHV9q4WEGCKBJDZStT88dI7pAe1lqg4gqD3kf1IbSpbp3s4NJGw==}
+ resolution: {integrity: sha512-SwpHZ0wKkYHlhSLQZUf+KyTOjXJYW9pWjIZtgavNbLb5n2RFN6CsZXjKbsTYcuHwg+SkJSs17zZWiqZaEKWMNw==}
engines: {node: '>=18'}
dependencies:
normalize-path: 3.0.0
@@ -778,8 +732,8 @@ packages:
- utf-8-validate
dev: false
- resolution: {integrity: sha512-SwpHZ0wKkYHlhSLQZUf+KyTOjXJYW9pWjIZtgavNbLb5n2RFN6CsZXjKbsTYcuHwg+SkJSs17zZWiqZaEKWMNw==}
+ resolution: {integrity: sha512-19ZeFVbclpzZrw8zqGkyKma+TGouDl14it+YLe2tNPbZP1AeTqQPJ3bPciqGMdJVNqfA7jEfsZYKghtCm+cHBg==}
engines: {node: '>=18'}
dependencies:
normalize-path: 3.0.0
@@ -1510,8 +1464,8 @@ packages:
resolution: {integrity: sha512-RmHanbV21saP/6OEPBJ7yJMuys68cIf8OBBWd7+uj40LdpmswVAwe1uzeuFyUsd6SfeITWT3XnQfn6wULeKwDQ==}
dev: false
- resolution: {integrity: sha512-Yac/bV5sBGkkEXmAX5FWPS9Mmo2rthrOPRQQNfycJPkjUAUclomCPH7QFVCDQ4Mp2k2K1SSM6m0zrxYrOwtFQw==}
+ resolution: {integrity: sha512-X4te86vsbjsB7iO4usY9jLPtZ827Mbx+WcwNBGUOIuswuTAKQtzsuoxc/6KLxCMvogKG795MhrR1LDhYgDvasg==}
dev: false
@@ -1545,8 +1499,8 @@ packages:
dev: false
optional: true
- resolution: {integrity: sha512-5nvXMzKtZfvcu4BhtV0KH1oGv4XEW+B+jOfmBdpFI3C7FrB/MfujRpWYSBBO64+qbW8pkZiSyQv9eiwnn5VIQA==}
+ resolution: {integrity: sha512-6hiYNJxJmyYvvKGrVThzo4nTcqvqUTA/JvKim7Auaj33NexDqSNwN5YrrQu+QhZJCIpv2tULSHt+lf+rUflLSw==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [darwin]
@@ -1563,8 +1517,8 @@ packages:
dev: false
optional: true
- resolution: {integrity: sha512-6cgBfxg98oOCSr4BckWjLLgiVwlL3vlLj8hXg2b+nDgm4bC/qVXXLfpLB9FHdoDu4057hzywbxKvmYGmi7yUzA==}
+ resolution: {integrity: sha512-UpBKxu2ob9scbpJyEq/xPgpdrgBgN3aLYlxyGqlYX5/KnwpJpFuIHU2lx8upQQ7L+MEmz+fA1XSgesoK92ppwQ==}
engines: {node: '>= 10'}
cpu: [x64]
os: [darwin]
@@ -1581,8 +1535,8 @@ packages:
dev: false
optional: true
- resolution: {integrity: sha512-txagBbj1e1w47YQjcKgSU4rRVQ7uF29YpnlHV5xuVUsgCUf2FmyfJ3CPjZUvpIeXCJAoMCFAoGnbtX86BK7+sg==}
+ resolution: {integrity: sha512-5AzM7Yx1Ky+oLY6pHs7tjONTF22JirDPd5Jw/3/NazJ73uGB05NqhGhB4SbeCchg7SlVYVBeRMrMSZwJwq/xoA==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [linux]
@@ -1599,8 +1553,8 @@ packages:
dev: false
optional: true
- resolution: {integrity: sha512-cGd+H8amifT86ZldVJtAKDxUqeFyLWW+v2NlBULnLAdWsiuuN8TuhVBt8ZNpCqcAuoruoSWynvMWixTFcroq+Q==}
+ resolution: {integrity: sha512-A/C1shbyUhj7wRtokmn73eBksjTM7fFQoY2v/0rTM5wehpkjQRLOXI8WJsag2uLhnZ4ii5OzR1rFPwoD9cvOgA==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [linux]
@@ -1617,8 +1571,8 @@ packages:
dev: false
optional: true
- resolution: {integrity: sha512-Mc2b4xiIWKXIhBy2NBTwOxGD3nHLmq4keFk+d4/WL5fMsB8XdJRdtUlL87SqVCTSaf1BRuQQf1HvXZcy+rq3Nw==}
+ resolution: {integrity: sha512-FubPuw/Boz8tKkk+5eOuDHOpk36F80rbgxlx4+xty/U71e3wZZxVYHfZXmf0IRToBn1Crb8WvLM9OYj/Ur815g==}
engines: {node: '>= 10'}
cpu: [x64]
os: [linux]
@@ -1635,8 +1589,8 @@ packages:
dev: false
optional: true
- resolution: {integrity: sha512-CFHvP9Qz98NruJiUnCe61O6GveKKHpJLloXbDSWRhqhkJdZD2zU5hG+gtVJR//tyW897izuHpM6Gtf6+sNgJPQ==}
+ resolution: {integrity: sha512-DPw8nFuM1uEpbX47tM3wiXIR0Qa+atSzs9Q3peY1urkhofx44o7E1svnq+a5Q0r8lAcssLrwiM+OyJJgV/oj7g==}
engines: {node: '>= 10'}
cpu: [x64]
os: [linux]
@@ -1653,8 +1607,8 @@ packages:
dev: false
optional: true
- resolution: {integrity: sha512-aFv1ejfkbS7PUa1qVPwzDHjQWQtknzAZWGTKYIAaS4NMtBlk3VyA6AYn593pqNanlicewqyl2jUhQAaFV/qXsg==}
+ resolution: {integrity: sha512-zBPSP8cHL51Gub/YV8UUePW7AVGukp2D8JU93IHbVDu2qmhFAn9LWXiOOLKplZQKxnIPUkJTQAJDCWBWU4UWUA==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [win32]
@@ -1671,8 +1625,8 @@ packages:
dev: false
optional: true
- resolution: {integrity: sha512-XqqpHgEIlBHvzwG8sp/JXMFkLAfGLqkbVsyN+/Ih1mR8INb6YCc2x/Mbwi6hsAgUnqQztz8cvEbHJUbSl7RHDg==}
+ resolution: {integrity: sha512-ONcL/lYyGUj4W37D4I2I450SZtSenmFAvapkJQNIJhrPMhzDU/AdfLkW98NvH1D2+7FXwe7yclf3+B7v28uzBQ==}
engines: {node: '>= 10'}
cpu: [ia32]
os: [win32]
@@ -1689,8 +1643,8 @@ packages:
dev: false
optional: true
- resolution: {integrity: sha512-Cqfe1YmOS7k+5mGu92nl5ULkzpKuxJrP3+4AEuPmrpFZ3BHxTY3TnHmU1On3bFmFFs6FbTcdF58CCUProGpIGQ==}
+ resolution: {integrity: sha512-2Vz2tYWaLqJvLcWbbTlJ5k9AN6JD7a5CN2pAeIzpbecK8ZF/yobA39cXtv6e+Z8c5UJuVOmaTldEAIxvsIux/Q==}
engines: {node: '>= 10'}
cpu: [x64]
os: [win32]
@@ -1711,7 +1665,6 @@ packages:
dependencies:
'@nodelib/fs.stat': 3.0.0
run-parallel: 1.2.0
- dev: true
/@nodelib/[email protected]:
resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==}
@@ -1720,7 +1673,6 @@ packages:
/@nodelib/[email protected]:
resolution: {integrity: sha512-2tQOI38s19P9i7X/Drt0v8iMA+KMsgdhB/dyPER+e+2Y8L1Z7QvnuRdW/uLuf5YRFUYmnj4bMA6qCuZHFI1GDQ==}
engines: {node: '>=16.14.0'}
- dev: true
/@nodelib/[email protected]:
resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==}
@@ -1735,7 +1687,6 @@ packages:
dependencies:
'@nodelib/fs.scandir': 3.0.0
fastq: 1.15.0
- dev: true
resolution: {integrity: sha512-7kZUAaLscfgbwBQRbvdMYaZOWyMEcPTH/tJjnyAWJ/dvvs9Ef+CERx/qJb9GExJpl1qipaDGn7KqHnFGGixd0w==}
@@ -2860,13 +2811,6 @@ packages:
resolution: {integrity: sha512-V46MYLFp08Wf2mmaBhvgjStM3tPa+2GAdy/iqoX+noX1//zje2x4XmrIU0cAwyClATsTmahbtoQ2EwP7I5WSiA==}
dev: true
- resolution: {integrity: sha512-5IEO2PwCy4NZDgj977dho4Qbdiw6dJZJzD4ZaB/9j7dfppf7z0xxFPKZz/FtTAUQbDjmWHJ6Jlz/gn0YzWHPsw==}
- dependencies:
- '@types/through': 0.0.32
- rxjs: 7.8.1
- dev: true
-
resolution: {integrity: sha512-Q0Op0hdWbYd1iahB+IFNQcWXFq4O0Q5MwQP7uN0souuQ4rPg1vEYcnIOfr1gY+M+6rc8FGoRaBO1mOOvL29sEQ==}
dependencies:
@@ -2883,11 +2827,7 @@ packages:
resolution: {integrity: sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==}
dependencies:
- '@types/node': 20.8.7
- dev: false
-
- resolution: {integrity: sha512-YI/M/4HRImtNf3pJgbF+W6FrXovqj+T+/HpENLTooK9PnkacBsDpeP3IpHab40CClUfhNmdM2WTNP2sa2dni5Q==}
+ '@types/node': 18.18.6
dev: false
@@ -2910,7 +2850,7 @@ packages:
resolution: {integrity: sha512-lX17GZVpJ/fuCjguZ5b3TjEbSENxmEk1B2z02yoXSK9WMEWRivhdSY73wWMn6bpcCDAOh6qAdktpKHIlkDk2lg==}
dependencies:
- '@types/node': 20.8.7
+ '@types/node': 18.18.6
form-data: 4.0.0
dev: true
@@ -2918,13 +2858,8 @@ packages:
resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==}
dev: false
- resolution: {integrity: sha512-JkRpuVz3xCNCWaeQ5EHLR/6woMbHZz/jZ7Kmc63AkU+1HxnoUugzSWMck7dsR4DvNYX8jp9wTi9K7WvnxOIQZQ==}
- dev: true
-
resolution: {integrity: sha512-wf3Vz+jCmOQ2HV1YUJuCWdL64adYxumkrxtc+H1VUQlnQI04+5HtH+qZCOE21lBE7gIrt+CwX2Wv8Acrw5Ak6w==}
- dev: true
resolution: {integrity: sha512-HksnYH4Ljr4VQgEy2lTStbCKv/P590tmPe5HqOnv9Gprffgv5WXAY+Y5Gqniu0GGqeTCUdBnzC3QSrzPkBkAMA==}
@@ -2934,6 +2869,7 @@ packages:
resolution: {integrity: sha512-21TKHHh3eUHIi2MloeptJWALuCu5H7HQTdTrWIFReA8ad+aggoX+lRes3ex7/FtpC+sVUpFMQ+QTfYr74mruiQ==}
dependencies:
undici-types: 5.25.3
+ dev: true
resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==}
@@ -2943,12 +2879,6 @@ packages:
resolution: {integrity: sha512-zELDXIlrZySwjFjU6HMUfvt0GqQPKSwBOyWgae9Tcsc/hFCkvYavZDXruVHyVasN2pCxnluh2S4rA0iuer7Z2g==}
dev: true
- resolution: {integrity: sha512-1GWhOQmViONHm+QhIusko1M6oH5xwgKkbmZwRUtAPM3RayEI3vKMCd3FDxiUrfAk+WK9nK6ohwVN6eURwQy2JA==}
- dependencies:
- '@types/node': 20.8.7
- dev: true
-
resolution: {integrity: sha512-rUSqIy7fAfK6sRasdFCukWO4S77pXcTxViURlLdo1VKuekTDS8ASMdX1LA0TFlbzT3fZgFlgQTCrqmJBuTHpxA==}
dev: true
@@ -2964,18 +2894,18 @@ packages:
resolution: {integrity: sha512-RK/kBbYOQQHLYj9Z95eh7S6t7gq4Ojt/NT8HTk8bWVhA5DaF+5SMnxHKkP4gPNN3wAZkKP+VjAf0ebtYzf+fxg==}
- resolution: {integrity: sha512-V835xgdSVmyQmI1KLV2BEIUgqEuinxp9O4G6g3FqO/SqLac049E53aysv0oEFD2kHfejeKU+ZqL2bcFWj9gLAQ==}
- dependencies:
- '@types/react': 18.2.31
- dev: true
-
resolution: {integrity: sha512-GRaAEriuT4zp9N4p1i8BDBYmEyfo+xQ3yHjJU4eiK5NDa1RmUZG+unZABUTK4/Ox/M+GaHwb6Ow8rUITrtjszA==}
dependencies:
'@types/react': 18.2.28
dev: false
+ resolution: {integrity: sha512-bAIvO5lN/U8sPGvs1Xm61rlRHHaq5rp5N3kp9C+NJ/Q41P8iqjkXSu0+/qu8POsjH9pNWb0OYabFez7taP7omw==}
+ dependencies:
+ '@types/react': 18.2.33
+ dev: true
+
resolution: {integrity: sha512-KITBX3xzheQLu2s3bUgLmRE7ekmhc52zRjRTwkKayQARh30L4fjEGzGm7ULK9TuX2LgxWWavZqyQGDGjAHbL3w==}
dependencies:
@@ -3006,8 +2936,16 @@ packages:
csstype: 3.1.2
dev: false
- resolution: {integrity: sha512-c2UnPv548q+5DFh03y8lEDeMfDwBn9G3dRwfkrxQMo/dOtRHUUO57k6pHvBIfH/VF4Nh+98mZ5aaSe+2echD5g==}
+ resolution: {integrity: sha512-OfqdJnDsSo4UNw0bqAjFCuBpLYQM7wvZidz0hVxHRjrEkzRlvZL1pJVyOSY55HMiKvRNEo9DUBRuEl7FNlJ/Vg==}
+ dependencies:
+ '@types/prop-types': 15.7.6
+ '@types/scheduler': 0.16.3
+ csstype: 3.1.2
+ dev: true
+
+ resolution: {integrity: sha512-v+I7S+hu3PIBoVkKGpSYYpiBT1ijqEzWpzQD62/jm4K74hPpSP7FF9BnKG6+fg2+62weJYkkBWDJlZt5JO/9hg==}
dependencies:
'@types/prop-types': 15.7.6
'@types/scheduler': 0.16.3
@@ -3017,7 +2955,7 @@ packages:
resolution: {integrity: sha512-/4YQT5Kp6HxUDb4yhRkm0bJ7TbjvTddqX7PZ5hz6qV3pxSo72f/6YPRo+Mu2DU307tm9IioO69l7uAwn5XNcFA==}
dependencies:
- '@types/node': 20.8.7
+ '@types/node': 18.18.6
dev: false
@@ -3029,37 +2967,31 @@ packages:
resolution: {integrity: sha512-ADS99HAnztB8MD+LSOdzDrDLcSe5oBIg+SUQwwsgnsOgZobWoSqYmg9ZJWdvLppoKV8R8kZinX6Om+LlsNuIlQ==}
dependencies:
- '@types/node': 20.8.7
+ '@types/node': 18.18.6
'@types/tar-stream': 3.1.2
- dev: false
+ dev: true
resolution: {integrity: sha512-qnIpUItVb5u8jl3kbrHofkM40ggO3YKSzc7TWqLYjDdwlrL7CiEAkDySaGfeUBLtC50RTfh2acdz51ItUbV7pQ==}
dependencies:
- '@types/node': 20.8.7
- dev: false
-
- resolution: {integrity: sha512-7XsfXIsjdfJM2wFDRAtEWp3zb2aVPk5QeyZxGlVK57q4u26DczMHhJmlhr0Jqv0THwxam/L8REXkj8M2I/lcvw==}
- dependencies:
- '@types/node': 20.8.7
+ '@types/node': 18.18.6
dev: true
resolution: {integrity: sha512-d0XxK3YTObnWVp6rZuev3c49+j4Lo8g4L1ZRm9z5L0xpoZycUPshHgczK5gsUMaZOstjVYYi09p5gYvUtfChYw==}
dev: false
- resolution: {integrity: sha512-aGY5pH1Q/DcToKXl4MCj1c0uDUB+zSVFDRCI7Q7js5sguzBTqJV/5kJA2awofbtWYF3xnon1TYdZYnFditRPtQ==}
+ resolution: {integrity: sha512-uUOhxsJ3edPHu06r3k4I2yJ4eoyqBt+53ra9+caXEx0ruoPwqNHTlkq75CUvI4yWsrCA5+31tih+opunLCYnXw==}
dependencies:
'@types/configstore': 6.0.1
- boxen: 4.2.0
+ boxen: 7.1.1
dev: true
resolution: {integrity: sha512-JXkliwz93B2cMWOI1ukElQBPN88vMg3CruvW4KVSKpflt3NyNCJImnhIuB/f97rG7kakqRJGFiwkA895Kn02Dg==}
dependencies:
- '@types/node': 20.8.7
+ '@types/node': 18.18.6
dev: false
@@ -3638,13 +3570,6 @@ packages:
engines: {node: '>=6'}
dev: false
- resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==}
- engines: {node: '>=8'}
- dependencies:
- type-fest: 0.21.3
- dev: false
-
resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==}
engines: {node: '>=8'}
@@ -3891,6 +3816,7 @@ packages:
resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==}
+ dev: true
resolution: {integrity: sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==}
@@ -3899,6 +3825,11 @@ packages:
is-windows: 1.0.2
dev: false
+ resolution: {integrity: sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==}
+ engines: {node: '>=0.6'}
+ dev: false
+
resolution: {integrity: sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==}
dev: false
@@ -3913,10 +3844,7 @@ packages:
buffer: 5.7.1
inherits: 2.0.4
readable-stream: 3.6.2
-
- resolution: {integrity: sha512-oD8Ydw+5lNoqq+en24iuPt1QixdPpe/nUF8azTHnviCZYu9zUC+TwdzIp5orpblJosNlgNbVmmAb//c6d6ImUQ==}
- dev: false
+ dev: true
resolution: {integrity: sha512-35GeBG6T7GW9VmLDF2IoKAtFCqMjmmq1uICbsICI0pID7ZAyUKlf7dg1wpXmn9GcMKHtg0S19CPMU5yfY3tv+g==}
@@ -3925,20 +3853,6 @@ packages:
individual: 3.0.0
dev: true
- resolution: {integrity: sha512-eB4uT9RGzg2odpER62bBwSLvUeGC+WbRjjyyFhGsKnc8wp/m0+hQsMUvUe3H2V0D5vw0nBdO1hCJoZo5mKeuIQ==}
- engines: {node: '>=8'}
- dependencies:
- ansi-align: 3.0.1
- camelcase: 5.3.1
- chalk: 3.0.0
- cli-boxes: 2.2.1
- string-width: 4.2.3
- term-size: 2.2.1
- type-fest: 0.8.1
- widest-line: 3.1.0
- dev: true
-
resolution: {integrity: sha512-9gYgQKXx+1nP8mP7CzFyaUARhg7D3n1dF/FnErWmu9l6JvGpNUN278h0aSb+QjoiKSWG+iZ3uHrcqk0qrY9RQQ==}
engines: {node: '>=10'}
@@ -3966,6 +3880,13 @@ packages:
widest-line: 4.0.1
wrap-ansi: 8.1.0
+ resolution: {integrity: sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw==}
+ engines: {node: '>= 5.10.0'}
+ dependencies:
+ big-integer: 1.6.51
+ dev: false
+
resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==}
dependencies:
@@ -4008,6 +3929,7 @@ packages:
dependencies:
base64-js: 1.5.1
ieee754: 1.2.1
+ dev: true
resolution: {integrity: sha512-kukuqc39WOHtdxtw4UScxF/WVnMFVSQVKhtx3AjZJzhd0RGZZldcrfSEbVsWWe6KNH253574cq5F+wpv0G9pJw==}
@@ -4023,6 +3945,13 @@ packages:
semver: 7.5.4
dev: true
+ resolution: {integrity: sha512-PKA4BeSvBpQKQ8iPOGCSiell+N8P+Tf1DlwqmYhpe2gAhKPHn8EYOxVT+ShuGmhg8lN8XiSlS80yiExKXrURlw==}
+ engines: {node: '>=12'}
+ dependencies:
+ run-applescript: 5.0.0
+ dev: false
+
resolution: {integrity: sha512-jwzPOChofl67PSTW2SGubV9HBQAhhR2i6nskiOThauo9dzwDUgOWQScFVaJkjEfYX+UXiD+LEx8EblQMc2wIag==}
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
@@ -4033,6 +3962,16 @@ packages:
load-tsconfig: 0.2.5
dev: true
+ resolution: {integrity: sha512-jwzPOChofl67PSTW2SGubV9HBQAhhR2i6nskiOThauo9dzwDUgOWQScFVaJkjEfYX+UXiD+LEx8EblQMc2wIag==}
+ engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
+ peerDependencies:
+ esbuild: '>=0.17'
+ dependencies:
+ esbuild: 0.18.20
+ load-tsconfig: 0.2.5
+ dev: true
+
resolution: {integrity: sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==}
engines: {node: '>=10.16.0'}
@@ -4051,7 +3990,7 @@ packages:
dependencies:
'@npmcli/fs': 3.1.0
fs-minipass: 3.0.3
- glob: 10.3.4
+ glob: 10.3.10
lru-cache: 7.18.3
minipass: 7.0.3
minipass-collect: 1.0.2
@@ -4121,6 +4060,7 @@ packages:
resolution: {integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==}
engines: {node: '>=6'}
+ dev: false
resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==}
@@ -4166,6 +4106,7 @@ packages:
dependencies:
ansi-styles: 4.3.0
supports-color: 7.2.0
+ dev: false
resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==}
@@ -4265,23 +4206,12 @@ packages:
resolution: {integrity: sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==}
engines: {node: '>=6'}
+ dev: false
resolution: {integrity: sha512-/lzGpEWL/8PfI0BmBOPRwp0c/wFNX1RdUML3jK/RcSBA9T8mZDdQpqYBKtCFTOfQbwPqWEOpjqW+Fnayc0969g==}
engines: {node: '>=10'}
- resolution: {integrity: sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==}
- engines: {node: '>=8'}
- dependencies:
- restore-cursor: 3.1.0
- dev: false
-
- resolution: {integrity: sha512-jHgecW0pxkonBJdrKsqxgRX9AcG+u/5k0Q7WPDfi8AogLAdwxEkyYYNWwZ5GvVFoFx2uiY1eNcSK00fh+1+FyQ==}
- engines: {node: '>=6'}
- dev: false
-
resolution: {integrity: sha512-w5Jac5SykAeZJKntOxJCrm63Eg5/4dhMWIcuTbo9rpE+brgaSZo0RuNJZeOyMgsUdhDeojvgyQLmjI+K50ZGyg==}
engines: {node: 10.* || >= 12.*}
@@ -4291,11 +4221,6 @@ packages:
'@colors/colors': 1.5.0
dev: true
- resolution: {integrity: sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==}
- engines: {node: '>= 10'}
- dev: false
-
resolution: {integrity: sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==}
dev: false
@@ -4391,6 +4316,11 @@ packages:
engines: {node: '>=14'}
dev: true
+ resolution: {integrity: sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==}
+ engines: {node: '>=16'}
+ dev: false
+
resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==}
dev: false
@@ -4399,11 +4329,6 @@ packages:
resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==}
engines: {node: '>= 6'}
- resolution: {integrity: sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==}
- engines: {node: ^12.20.0 || >=14}
- dev: false
-
resolution: {integrity: sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==}
engines: {node: '>=4.0.0'}
@@ -4461,14 +4386,6 @@ packages:
engines: {node: '>= 0.6'}
dev: false
- resolution: {integrity: sha512-u+7xq68MAjIqvoEKrdgIEupKJNBeU8MSl/cpfPmJ3rm9yvxrgbMPr8TkZS9qnwCgiVC8BsEt9kDkeD7He2zmNA==}
- engines: {node: ^12.20 || >=14.13}
- dependencies:
- blob-polyfill: 7.0.20220408
- fetch-blob: 3.2.0
- dev: false
-
resolution: {integrity: sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==}
dependencies:
@@ -4492,7 +4409,6 @@ packages:
path-key: 3.1.1
shebang-command: 2.0.0
which: 2.0.2
- dev: true
resolution: {integrity: sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==}
@@ -4555,11 +4471,6 @@ packages:
engines: {node: '>= 6'}
dev: true
- resolution: {integrity: sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==}
- engines: {node: '>= 12'}
- dev: false
-
resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==}
peerDependencies:
@@ -4645,6 +4556,24 @@ packages:
resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==}
dev: true
+ resolution: {integrity: sha512-OZ1y3y0SqSICtE8DE4S8YOE9UZOJ8wO16fKWVP5J1Qz42kV9jcnMVFrEE/noXb/ss3Q4pZIH79kxofzyNNtUNA==}
+ engines: {node: '>=12'}
+ dependencies:
+ bplist-parser: 0.2.0
+ untildify: 4.0.0
+ dev: false
+
+ resolution: {integrity: sha512-wX5pXO1+BrhMkSbROFsyxUm0i/cJEScyNhA4PPxc41ICuv05ZZB/MX28s8aZx6xjmatvebIapF6hLEKEcpneUA==}
+ engines: {node: '>=14.16'}
+ dependencies:
+ bundle-name: 3.0.0
+ default-browser-id: 3.0.0
+ execa: 7.2.0
+ titleize: 3.0.0
+ dev: false
+
resolution: {integrity: sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==}
requiresBuild: true
@@ -4668,9 +4597,9 @@ packages:
gopd: 1.0.1
has-property-descriptors: 1.0.0
- resolution: {integrity: sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==}
- engines: {node: '>=8'}
+ resolution: {integrity: sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==}
+ engines: {node: '>=12'}
dev: false
@@ -4737,10 +4666,6 @@ packages:
resolution: {integrity: sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==}
- resolution: {integrity: sha512-uh42tvWBp10fnMyJ9z0YL9kql+iolxEnQ+pGZANj+gcg/N2NxjrdHbMXT2Y2Y07A8Jf7KJp/6LkElPCfukCdWg==}
- dev: false
-
resolution: {integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==}
engines: {node: '>=0.10.0'}
@@ -5461,7 +5386,21 @@ packages:
onetime: 5.1.2
signal-exit: 3.0.7
strip-final-newline: 2.0.0
- dev: true
+
+ resolution: {integrity: sha512-UduyVP7TLB5IcAQl+OzLyLcS/l32W/GLg+AhHJ+ow40FOk2U3SAllPwR44v4vmdFwIWqpdwxxpQbF1n5ta9seA==}
+ engines: {node: ^14.18.0 || ^16.14.0 || >=18.0.0}
+ dependencies:
+ cross-spawn: 7.0.3
+ get-stream: 6.0.1
+ human-signals: 4.3.1
+ is-stream: 3.0.0
+ merge-stream: 2.0.0
+ npm-run-path: 5.1.0
+ onetime: 6.0.0
+ signal-exit: 3.0.7
+ strip-final-newline: 3.0.0
+ dev: false
resolution: {integrity: sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==}
@@ -5541,25 +5480,10 @@ packages:
optional: true
dev: true
- resolution: {integrity: sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==}
- engines: {node: ^12.20 || >= 14.13}
- dependencies:
- node-domexception: 1.0.0
- web-streams-polyfill: 3.2.1
- dev: false
-
resolution: {integrity: sha512-FJqqoDBR00Mdj9ppamLa/Y7vxm+PRmNWA67N846RvsoYVMKB4q3y/de5PA7gUmRMYK/8CMz2GDZQmCRN1wBcWA==}
dev: false
- resolution: {integrity: sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==}
- engines: {node: '>=8'}
- dependencies:
- escape-string-regexp: 1.0.5
- dev: false
-
resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==}
engines: {node: ^10.12.0 || >=12.0.0}
@@ -5660,21 +5584,6 @@ packages:
web-streams-polyfill: 4.0.0-beta.3
dev: true
- resolution: {integrity: sha512-8xnIjMYGKPj+rY2BTbAmpqVpi8der/2FT4d9f7J32FlsCpO5EzZPq3C/N56zdv8KweHzVF6TGijsS1JT6r1H2g==}
- engines: {node: '>= 14.17'}
- dependencies:
- node-domexception: 1.0.0
- web-streams-polyfill: 4.0.0-beta.3
- dev: false
-
- resolution: {integrity: sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==}
- engines: {node: '>=12.20.0'}
- dependencies:
- fetch-blob: 3.2.0
- dev: false
-
resolution: {integrity: sha512-+yRYRhpnFPWXSly/6V4Lw9IfOV26uu30kynGJ03PW+MnjOEQe45RZ141QcS0aJehYBYA50GfCDnsRbFJdhssRw==}
engines: {node: '>=10'}
@@ -5805,11 +5714,6 @@ packages:
engines: {node: '>=6'}
dev: false
- resolution: {integrity: sha512-mDHFgApoQd+azgMdwylJrv2DX47ywGq1i5VFJE7fZ0dttNq3iQMfsU4IvEgBHojA3KqEudyu7Vq+oN8kNaNkWw==}
- engines: {node: '>=16'}
- dev: false
-
resolution: {integrity: sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg==}
engines: {node: '>=10'}
@@ -5832,7 +5736,6 @@ packages:
resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==}
engines: {node: '>=10'}
- dev: true
resolution: {integrity: sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==}
@@ -6201,7 +6104,11 @@ packages:
resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==}
engines: {node: '>=10.17.0'}
- dev: true
+
+ resolution: {integrity: sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ==}
+ engines: {node: '>=14.18.0'}
+ dev: false
resolution: {integrity: sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==}
@@ -6231,6 +6138,7 @@ packages:
resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==}
+ dev: true
resolution: {integrity: sha512-C7FfFoTA+bI10qfeydT8aZbvr91vAEU+2W5BZUlzPec47oNb07SsOfwYrtxuvOYdUApPP/Qlh4DtAO51Ekk2QA==}
@@ -6302,27 +6210,6 @@ packages:
resolution: {integrity: sha512-7NXolsK4CAS5+xvdj5OMMbI962hU/wvwoxk+LWR9Ek9bVtyuuYScDN6eS0rUm6TxApFpw7CX1o4uJzcd4AyD3Q==}
dev: false
- resolution: {integrity: sha512-M1WuAmb7pn9zdFRtQYk26ZBoY043Sse0wVDdk4Bppr+JOXyQYybdtvK+l9wUibhtjdjvtoiNy8tk+EgsYIUqKg==}
- engines: {node: '>=12.0.0'}
- dependencies:
- ansi-escapes: 4.3.2
- chalk: 4.1.2
- cli-cursor: 3.1.0
- cli-width: 3.0.0
- external-editor: 3.1.0
- figures: 3.2.0
- lodash: 4.17.21
- mute-stream: 0.0.8
- ora: 5.4.1
- run-async: 2.4.1
- rxjs: 7.8.1
- string-width: 4.2.3
- strip-ansi: 6.0.1
- through: 2.3.8
- wrap-ansi: 6.2.0
- dev: false
-
resolution: {integrity: sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==}
engines: {node: '>= 0.4'}
@@ -6438,6 +6325,12 @@ packages:
hasBin: true
dev: false
+ resolution: {integrity: sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==}
+ engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
+ hasBin: true
+ dev: false
+
resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==}
engines: {node: '>=0.10.0'}
@@ -6469,6 +6362,14 @@ packages:
resolution: {integrity: sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg==}
dev: false
+ resolution: {integrity: sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==}
+ engines: {node: '>=14.16'}
+ hasBin: true
+ dependencies:
+ is-docker: 3.0.0
+ dev: false
+
resolution: {integrity: sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==}
engines: {node: '>=10'}
@@ -6476,11 +6377,6 @@ packages:
global-dirs: 3.0.1
is-path-inside: 3.0.3
- resolution: {integrity: sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==}
- engines: {node: '>=8'}
- dev: false
-
resolution: {integrity: sha512-EdOZCr0NsGE00Pot+x1ZFx9MJK3C6wy91geZpXwvwexDLJvA4nzYyZf7r+EIwSeVsOLDdBz7ATg9NqKTzuNYuQ==}
engines: {node: '>= 4'}
@@ -6572,7 +6468,11 @@ packages:
resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==}
engines: {node: '>=8'}
- dev: true
+
+ resolution: {integrity: sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==}
+ engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
+ dev: false
resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==}
@@ -6602,11 +6502,6 @@ packages:
resolution: {integrity: sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==}
- resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==}
- engines: {node: '>=10'}
- dev: false
-
resolution: {integrity: sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA==}
dev: true
@@ -6695,7 +6590,7 @@ packages:
resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==}
engines: {node: '>= 10.13.0'}
dependencies:
- '@types/node': 20.8.7
+ '@types/node': 18.18.6
merge-stream: 2.0.0
supports-color: 8.1.1
dev: false
@@ -7004,10 +6899,6 @@ packages:
dependencies:
p-locate: 5.0.0
- resolution: {integrity: sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==}
- dev: false
-
resolution: {integrity: sha512-aVx8ztPv7/2ULbArGJ2Y42bG1mEQ5mGjpdvrbJcJFU3TbYybe+QlLS4pst9zV52ymy2in1KpFPiZnAOATxD4+Q==}
dev: false
@@ -7037,14 +6928,7 @@ packages:
resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==}
-
- resolution: {integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==}
- engines: {node: '>=10'}
- dependencies:
- chalk: 4.1.2
- is-unicode-supported: 0.1.0
- dev: false
+ dev: true
resolution: {integrity: sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g==}
@@ -7825,6 +7709,11 @@ packages:
engines: {node: '>=8'}
dev: true
+ resolution: {integrity: sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==}
+ engines: {node: '>=12'}
+ dev: false
+
resolution: {integrity: sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==}
engines: {node: '>=4'}
@@ -7993,10 +7882,6 @@ packages:
resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==}
dev: true
- resolution: {integrity: sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==}
- dev: false
-
resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==}
dependencies:
@@ -8004,10 +7889,6 @@ packages:
object-assign: 4.1.1
thenify-all: 1.6.0
- resolution: {integrity: sha512-wynEP02LmIbLpcYw8uBKpcfF6dmg2vcpKqxeH5UcoKEYdExslsdUA4ugFauuaeYdTB76ez6gJW8XAZ6CgkXYxA==}
- dev: false
-
resolution: {integrity: sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==}
engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
@@ -8101,8 +7982,8 @@ packages:
- babel-plugin-macros
dev: false
- resolution: {integrity: sha512-Y2wTcTbO4WwEsVb4A8VSnOsG1I9ok+h74q0ZdxkwM3EODqrs4pasq7O0iUxbcS9VtWMicG7f3+HAj0r1+NtKSw==}
+ resolution: {integrity: sha512-4Nt4HRLYDW/yRpJ/QR2t1v63UOMS55A38dnWv3UDOWGezuY0ZyFO1ABNbD7mulVzs9qVhgy2+ppjdsANpKP1mg==}
engines: {node: '>=16.14.0'}
hasBin: true
peerDependencies:
@@ -8116,25 +7997,26 @@ packages:
sass:
optional: true
dependencies:
- '@next/env': 13.5.6
+ '@next/env': 13.5.3
'@swc/helpers': 0.5.2
busboy: 1.6.0
caniuse-lite: 1.0.30001538
- postcss: 8.4.31
+ postcss: 8.4.14
react: 18.2.0
react-dom: 18.2.0([email protected])
styled-jsx: 5.1.1([email protected])
watchpack: 2.4.0
+ zod: 3.21.4
optionalDependencies:
- '@next/swc-darwin-arm64': 13.5.6
- '@next/swc-darwin-x64': 13.5.6
- '@next/swc-linux-arm64-gnu': 13.5.6
- '@next/swc-linux-arm64-musl': 13.5.6
- '@next/swc-linux-x64-gnu': 13.5.6
- '@next/swc-linux-x64-musl': 13.5.6
- '@next/swc-win32-arm64-msvc': 13.5.6
- '@next/swc-win32-ia32-msvc': 13.5.6
- '@next/swc-win32-x64-msvc': 13.5.6
+ '@next/swc-darwin-arm64': 13.5.3
+ '@next/swc-darwin-x64': 13.5.3
+ '@next/swc-linux-arm64-gnu': 13.5.3
+ '@next/swc-linux-arm64-musl': 13.5.3
+ '@next/swc-linux-x64-gnu': 13.5.3
+ '@next/swc-linux-x64-musl': 13.5.3
+ '@next/swc-win32-arm64-msvc': 13.5.3
+ '@next/swc-win32-ia32-msvc': 13.5.3
+ '@next/swc-win32-x64-msvc': 13.5.3
transitivePeerDependencies:
- '@babel/core'
- babel-plugin-macros
@@ -8154,6 +8036,7 @@ packages:
resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==}
engines: {node: '>=10.5.0'}
+ dev: true
resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==}
@@ -8176,15 +8059,6 @@ packages:
- domexception
dev: true
- resolution: {integrity: sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==}
- engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
- dependencies:
- data-uri-to-buffer: 4.0.1
- fetch-blob: 3.2.0
- formdata-polyfill: 4.0.10
- dev: false
-
resolution: {integrity: sha512-24vnklJmyRS8ViBNI8KbtK/r/DmXQMRiOMXTNz2nrTnAYUwjmEEbnnpB/+kt+yWRv73bPsSPRFddrcIbAxSiMQ==}
hasBin: true
@@ -8368,7 +8242,13 @@ packages:
engines: {node: '>=8'}
dependencies:
path-key: 3.1.1
- dev: true
+
+ resolution: {integrity: sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==}
+ engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
+ dependencies:
+ path-key: 4.0.0
+ dev: false
resolution: {integrity: sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg==}
@@ -8467,12 +8347,20 @@ packages:
dependencies:
mimic-fn: 2.1.0
- resolution: {integrity: sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==}
+ resolution: {integrity: sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==}
engines: {node: '>=12'}
dependencies:
- define-lazy-prop: 2.0.0
- is-docker: 2.2.1
+ mimic-fn: 4.0.0
+ dev: false
+
+ resolution: {integrity: sha512-OS+QTnw1/4vrf+9hh1jc1jnYjzSG4ttTBB8UxOwAnInG3Uo4ssetzC1ihqaIHjLJnA5GGlRl6QlZXOTQhRBUvg==}
+ engines: {node: '>=14.16'}
+ dependencies:
+ default-browser: 4.0.0
+ define-lazy-prop: 3.0.0
+ is-inside-container: 1.0.0
is-wsl: 2.2.0
dev: false
@@ -8523,21 +8411,6 @@ packages:
type-check: 0.4.0
dev: true
- resolution: {integrity: sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==}
- engines: {node: '>=10'}
- dependencies:
- bl: 4.1.0
- chalk: 4.1.2
- cli-cursor: 3.1.0
- cli-spinners: 2.9.1
- is-interactive: 1.0.0
- is-unicode-supported: 0.1.0
- log-symbols: 4.1.0
- strip-ansi: 6.0.1
- wcwidth: 1.0.1
- dev: false
-
resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==}
engines: {node: '>=0.10.0'}
@@ -8701,11 +8574,6 @@ packages:
hasBin: true
dev: true
- resolution: {integrity: sha512-RmVuCHWsfu0QPNW+mraxh/xjQVw/lhUCUru8Zni3Ctq3AoMhpDTq0OVdKS6iesd6Kqb7viCV3isAL43dciOSog==}
- engines: {node: '>=14'}
- dev: false
-
resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==}
engines: {node: '>=8'}
@@ -8742,7 +8610,11 @@ packages:
resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==}
engines: {node: '>=8'}
- dev: true
+
+ resolution: {integrity: sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==}
+ engines: {node: '>=12'}
+ dev: false
resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==}
@@ -8819,6 +8691,7 @@ packages:
resolution: {integrity: sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg==}
+ dev: false
resolution: {integrity: sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==}
@@ -9221,7 +9094,7 @@ packages:
resolution: {integrity: sha512-AEtWXYfopBj2z5N5PbkAOeNHRPUg5q+Nen7QLxV8M2zJq1ym6/lCz3fYNTCXe19puu2d06jfHhrP7v/S2PtMMw==}
engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0}
dependencies:
- glob: 10.3.4
+ glob: 10.3.10
json-parse-even-better-errors: 3.0.0
normalize-package-data: 5.0.0
npm-normalize-package-bin: 3.0.1
@@ -9263,6 +9136,7 @@ packages:
inherits: 2.0.4
string_decoder: 1.3.0
util-deprecate: 1.0.2
+ dev: true
resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==}
@@ -9461,14 +9335,6 @@ packages:
lowercase-keys: 3.0.0
dev: true
- resolution: {integrity: sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==}
- engines: {node: '>=8'}
- dependencies:
- onetime: 5.1.2
- signal-exit: 3.0.7
- dev: false
-
resolution: {integrity: sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==}
engines: {node: '>= 4'}
@@ -9525,9 +9391,11 @@ packages:
- utf-8-validate
dev: false
- resolution: {integrity: sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==}
- engines: {node: '>=0.12.0'}
+ resolution: {integrity: sha512-XcT5rBksx1QdIhlFOCtgZkB99ZEouFZ1E2Kc2LHqNW13U3/74YGdkQRmThTwxy4QIyookibDKYZOPqX//6BlAg==}
+ engines: {node: '>=12'}
+ dependencies:
+ execa: 5.1.1
dev: false
@@ -9535,11 +9403,6 @@ packages:
dependencies:
queue-microtask: 1.2.3
- resolution: {integrity: sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==}
- dependencies:
- tslib: 2.6.2
-
resolution: {integrity: sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==}
engines: {node: '>=6'}
@@ -9671,7 +9534,6 @@ packages:
engines: {node: '>=8'}
dependencies:
shebang-regex: 3.0.0
- dev: true
resolution: {integrity: sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==}
@@ -9681,7 +9543,6 @@ packages:
resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==}
engines: {node: '>=8'}
- dev: true
resolution: {integrity: sha512-lT297f1WLAdq0A4O+AknIFRP6kkiI3s8C913eJ0XqBxJbZPGWUNkRQk2u8zk4bEAjUJ5i+fSLwB6z1HzeT+DEg==}
@@ -9981,6 +9842,7 @@ packages:
resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==}
dependencies:
safe-buffer: 5.2.1
+ dev: true
resolution: {integrity: sha512-BP9nNHMhhfcMbiuQKCqMjhDP5yBCAxsPu4pHFFzJ6Alo9dZgY4VLDPutXqIjpRiMoKdp7Av85Gr73Q5uH9k7+g==}
@@ -10013,7 +9875,11 @@ packages:
resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==}
engines: {node: '>=6'}
- dev: true
+
+ resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==}
+ engines: {node: '>=12'}
+ dev: false
resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==}
@@ -10209,6 +10075,7 @@ packages:
resolution: {integrity: sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==}
engines: {node: '>=8'}
+ dev: false
resolution: {integrity: sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==}
@@ -10266,8 +10133,8 @@ packages:
readable-stream: 3.6.2
dev: true
- resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==}
+ resolution: {integrity: sha512-Eet/eeMhkO6TX8mnUteS9zgPbUMQa4I6Kkp5ORiBD5476/m+PIRiumP5tmh5ioJpH7k51Kehawy2UDfsnxxY8Q==}
dev: false
@@ -10291,6 +10158,11 @@ packages:
engines: {node: '>=14.0.0'}
dev: true
+ resolution: {integrity: sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ==}
+ engines: {node: '>=12'}
+ dev: false
+
resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==}
engines: {node: '>=0.6.0'}
@@ -10392,8 +10264,9 @@ packages:
resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==}
+ dev: false
resolution: {integrity: sha512-L3o8hGkaHnu5TdJns+mCqFsDBo83bJ44rlK7e6VdanIvpea4ArPcU3swWGsLVbXak1PqQx/V+SSmFPujBK+zEQ==}
engines: {node: '>=14.18'}
hasBin: true
@@ -10423,15 +10296,15 @@ packages:
source-map: 0.8.0-beta.0
sucrase: 3.34.0
tree-kill: 1.2.2
- typescript: 4.9.5
+ typescript: 5.2.2
transitivePeerDependencies:
- supports-color
- ts-node
dev: true
- resolution: {integrity: sha512-L3o8hGkaHnu5TdJns+mCqFsDBo83bJ44rlK7e6VdanIvpea4ArPcU3swWGsLVbXak1PqQx/V+SSmFPujBK+zEQ==}
- engines: {node: '>=14.18'}
+ resolution: {integrity: sha512-vDHlczXbgUvY3rWvqFEbSqmC1L7woozbzngMqTtL2PGBODTtWlRwGDDawhvWzr5c1QjKe4OAKqJGfE1xeXUvtQ==}
+ engines: {node: '>=16.14'}
hasBin: true
peerDependencies:
'@swc/core': ^1
@@ -10445,15 +10318,15 @@ packages:
typescript:
optional: true
dependencies:
- bundle-require: 4.0.2([email protected])
+ bundle-require: 4.0.2([email protected])
cac: 6.7.14
chokidar: 3.5.3
debug: 4.3.4
- esbuild: 0.17.19
+ esbuild: 0.18.20
execa: 5.1.1
globby: 11.1.0
joycon: 3.1.1
- postcss-load-config: 3.1.4
+ postcss-load-config: 4.0.1([email protected])
resolve-from: 5.0.0
rollup: 3.29.4
source-map: 0.8.0-beta.0
@@ -10517,11 +10390,6 @@ packages:
resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==}
engines: {node: '>=10'}
- resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==}
- engines: {node: '>=10'}
- dev: false
-
resolution: {integrity: sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==}
engines: {node: '>=8'}
@@ -10534,6 +10402,7 @@ packages:
resolution: {integrity: sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==}
engines: {node: '>=8'}
+ dev: false
resolution: {integrity: sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==}
@@ -10591,12 +10460,6 @@ packages:
dependencies:
is-typedarray: 1.0.0
- resolution: {integrity: sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==}
- engines: {node: '>=4.2.0'}
- hasBin: true
- dev: true
-
resolution: {integrity: sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==}
engines: {node: '>=14.17'}
@@ -10634,6 +10497,7 @@ packages:
resolution: {integrity: sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA==}
+ dev: true
resolution: {integrity: sha512-OG+QOf0fTLtazL9P9X7yqWxQ+Z0395Wk6DSkyTxtaq3wQEjIroVe7Y4asCX/vcCxYpNGMnwz8F0qbRYUoaQVMw==}
@@ -10758,7 +10622,6 @@ packages:
resolution: {integrity: sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==}
engines: {node: '>=8'}
- dev: true
resolution: {integrity: sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==}
@@ -10944,7 +10807,7 @@ packages:
vfile-message: 3.1.4
dev: false
resolution: {integrity: sha512-nlBMJ9x6n7/Amaz6F3zJ97EBwR2FkzhBRxF5e+jE6LA3yi6Wtc2lyTij1OnDMIr34v5g/tVQtsVAzhT0jc5ygA==}
engines: {node: '>=v14.18.0'}
hasBin: true
@@ -10954,7 +10817,7 @@ packages:
mlly: 1.4.2
pathe: 1.1.1
picocolors: 1.0.0
- vite: 4.5.0(@types/[email protected])
+ vite: 4.5.0(@types/[email protected])
transitivePeerDependencies:
- '@types/node'
- less
@@ -10966,7 +10829,7 @@ packages:
- terser
dev: true
resolution: {integrity: sha512-ulr8rNLA6rkyFAlVWw2q5YJ91v098AFQ2R0PRFwPzREXOUJQPtFUG0t+/ZikhaOCDqFoDhN6/v8Sq0o4araFAw==}
engines: {node: ^14.18.0 || >=16.0.0}
hasBin: true
@@ -10994,7 +10857,7 @@ packages:
terser:
optional: true
dependencies:
- '@types/node': 20.8.7
+ '@types/node': 18.18.6
esbuild: 0.18.20
postcss: 8.4.31
rollup: 3.29.4
@@ -11035,7 +10898,7 @@ packages:
dependencies:
'@types/chai': 4.3.9
'@types/chai-subset': 1.3.4
- '@types/node': 20.8.7
+ '@types/node': 18.18.6
'@vitest/expect': 0.34.6
'@vitest/runner': 0.34.6
'@vitest/snapshot': 0.34.6
@@ -11054,8 +10917,8 @@ packages:
strip-literal: 1.3.0
tinybench: 2.5.1
tinypool: 0.7.0
- vite: 4.5.0(@types/[email protected])
- vite-node: 0.34.6(@types/[email protected])
+ vite: 4.5.0(@types/[email protected])
+ vite-node: 0.34.6(@types/[email protected])
why-is-node-running: 2.2.2
transitivePeerDependencies:
- less
@@ -11096,10 +10959,12 @@ packages:
resolution: {integrity: sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==}
engines: {node: '>= 8'}
+ dev: true
resolution: {integrity: sha512-QW95TCTaHmsYfHDybGMwO5IJIM93I/6vTRk+daHTWFPhwh+C8Cg7j7XyKrwrj8Ib6vYXe0ocYNrmzY4xAAN6ug==}
engines: {node: '>= 14'}
+ dev: true
resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==}
@@ -11281,6 +11146,7 @@ packages:
engines: {node: '>=8'}
dependencies:
string-width: 4.2.3
+ dev: false
resolution: {integrity: sha512-o0cyEG0e8GPzT4iGHphIOh0cJOV8fivsXxddQasHPHfoZf1ZexrfeA21w2NaEN1RHE+fXlfISmOE8R9N3u3Qig==}
@@ -11428,17 +11294,13 @@ packages:
engines: {node: '>=12.20'}
dev: true
- resolution: {integrity: sha512-Z2Fe1bn+eLstG8DRR6FTavGD+MeAwyfmouhHsIUgaADz8jvFKbO/fXc2trJKZg+5EBjh4gGm3iU/t3onKlXHIg==}
- engines: {node: '>=10'}
+ resolution: {integrity: sha512-6KCM971iQtJ+/KUaHdrhVr2LDkfhBtFPRnsG1P8F4q3uUVQ2RfEM9xekpha9aA4GXWJevjM10eDcPQ1FfWlmaQ==}
dependencies:
- '@babel/runtime': 7.22.15
- '@types/lodash': 4.14.200
- lodash: 4.17.21
- lodash-es: 4.17.21
- nanoclone: 0.2.1
property-expr: 2.0.6
+ tiny-case: 1.0.3
toposort: 2.0.2
+ type-fest: 2.19.0
dev: false
diff --git a/spec/openapi.yml b/spec/openapi.yml
index c6cb7dfab..c64498409 100644
--- a/spec/openapi.yml
+++ b/spec/openapi.yml
@@ -1,62 +1,37 @@
openapi: 3.0.0
info:
- version: 1.0.0
- title: Devbook
- description: Devbook API
+ version: 0.1.0
+ title: E2B API
servers:
- - url: https://ondevbook.com/
- description: API endpoint
- - url: https://{sessionID}-{clientID}.ondevbook.com/
- description: Session endpoint without a specified port
- variables:
- sessionID:
- description: ID of the session
- default: _sessionID
- clientID:
- description: ID of the client
- default: _clientID
- - url: https://{port}-{sessionID}-{clientID}.ondevbook.com/
- description: Session endpoint with a specificed port
- variables:
- sessionID:
- description: ID of the session
- default: _sessionID
- clientID:
- description: ID of the client
- default: _clientID
- port:
- description: Devbook Daemon default port
- default: "49982"
+ - url: https://api.e2b.dev
components:
securitySchemes:
ApiKeyAuth:
- name: api_key
type: apiKey
- in: query
+ in: header
+ name: X-API-Key
+ AccessTokenAuth:
+ type: http
+ scheme: bearer
+ bearerFormat: access_token
parameters:
- apiKeyOpt:
- name: api_key
- in: query
- required: false
- schema:
- type: string
- apiKeyReq:
- name: api_key
- in: query
+ envID:
+ name: envID
+ in: path
required: true
schema:
type: string
- codeSnippetID:
- name: codeSnippetID
+ buildID:
+ name: buildID
in: path
required: true
schema:
type: string
- sessionID:
- name: sessionID
+ instanceID:
+ name: instanceID
in: path
required: true
schema:
@@ -75,6 +50,13 @@ components:
application/json:
schema:
$ref: "#/components/schemas/Error"
+ 404:
+ description: Not found
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Error"
+
500:
description: Server error
content:
@@ -83,85 +65,68 @@ components:
$ref: "#/components/schemas/Error"
schemas:
- Template:
- type: string
- enum:
- - Nodejs
- - Go
- - Bash
- - Rust
- - Python3
- - PHP
- - Java
- - Perl
- - DotNET
-
- EnvironmentState:
- type: string
- enum:
- - Building
- - Failed
- - Done
-
- Environment:
+ NewInstance:
required:
- - id
+ - envID
properties:
- id:
- type: string
- template:
- type: string
- title:
+ envID:
type: string
+ description: Identifier of the required environment
- NewEnvironment:
+ Environment:
required:
- - template
+ - envID
+ - buildID
+ - public
properties:
- title:
+ envID:
type: string
- template:
+ description: Identifier of the environment
+ buildID:
type: string
-
- EnvironmentStateUpdate:
+ description: Identifier of the last successful build for given environment
+ public:
+ type: boolean
+ description: Whether the environment is public or only accessible by the team
+ EnvironmentBuild:
required:
- - state
+ - envID
+ - buildID
+ - finished
+ - logs
properties:
- state:
- $ref: "#/components/schemas/EnvironmentState"
-
- EnvironmentTitleUpdate:
- properties:
- title:
+ logs:
+ default: []
+ description: Build logs
+ type: array
+ items:
+ type: string
+ envID:
type: string
-
- NewSession:
- required:
- - codeSnippetID
- properties:
- editEnabled:
- type: boolean
- default: false
- description: Option determining if the session is a shared persistent edit session
- codeSnippetID:
+ description: Identifier of the environment
+ buildID:
+ type: string
+ description: Identifier of the build
+ status:
type: string
- description: Identifier of a code snippet which which is the environment associated
- Session:
+ description: Status of the environment
+ enum:
+ - building
+ - ready
+ - error
+
+ Instance:
required:
- - sessionID
+ - envID
+ - instanceID
- clientID
- - editEnabled
- - codeSnippetID
properties:
- codeSnippetID:
+ envID:
type: string
- description: Identifier of a code snippet which which is the environment associated
- editEnabled:
- type: boolean
- description: Information if the session is a shared persistent edit session
- sessionID:
+ description: Identifier of the environment from which is the instance created
+ instanceID:
type: string
- description: Identifier of the session
+ description: Identifier of the instance
clientID:
type: string
description: Identifier of the client
@@ -180,10 +145,8 @@ components:
description: Error
tags:
- - name: sessions
- description: Managing VM sessions
+ - name: instances
- name: envs
- description: Environment for VM
paths:
/health:
@@ -195,44 +158,25 @@ paths:
401:
$ref: "#/components/responses/401"
- /sessions:
- get:
- description: List all sessions
- tags: [ sessions ]
- parameters:
- - $ref: "#/components/parameters/apiKeyReq"
- responses:
- 200:
- description: Successfully returned all sessions
- content:
- application/json:
- schema:
- type: array
- items:
- allOf:
- - $ref: "#/components/schemas/Session"
- 401:
- $ref: "#/components/responses/401"
- 500:
- $ref: "#/components/responses/500"
+ /instances:
post:
- description: Create a session on the server
- tags: [ sessions ]
- parameters:
- - $ref: "#/components/parameters/apiKeyOpt"
+ description: Create an instance from the environment
+ tags: [instances]
+ security:
+ - ApiKeyAuth: []
requestBody:
required: true
content:
application/json:
schema:
- $ref: "#/components/schemas/NewSession"
+ $ref: "#/components/schemas/NewInstance"
responses:
201:
- description: Successfully created a session
+ description: The instance was created successfully
content:
application/json:
schema:
- $ref: "#/components/schemas/Session"
+ $ref: "#/components/schemas/Instance"
401:
$ref: "#/components/responses/401"
400:
@@ -240,46 +184,27 @@ paths:
500:
$ref: "#/components/responses/500"
- /sessions/{sessionID}:
- delete:
- description: Delete a session on the server
- tags: [ sessions ]
- parameters:
- - $ref: "#/components/parameters/apiKeyReq"
- - $ref: "#/components/parameters/sessionID"
- responses:
- 204:
- description: Successfully deleted the session
- 401:
- $ref: "#/components/responses/401"
- 500:
- $ref: "#/components/responses/500"
-
- /sessions/{sessionID}/refresh:
+ /instances/{instanceID}/refreshes:
post:
- description: Refresh the session extending its time to live
- tags: [ sessions ]
+ description: Refresh the instance extending its time to live
+ security:
+ - ApiKeyAuth: []
+ tags: [instances]
parameters:
- - $ref: "#/components/parameters/apiKeyOpt"
- - $ref: "#/components/parameters/sessionID"
+ - $ref: "#/components/parameters/instanceID"
responses:
204:
- description: Successfully refreshed the session
+ description: Successfully refreshed the instance
401:
$ref: "#/components/responses/401"
404:
- description: Error refreshing session - session not found
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
-
+ $ref: "#/components/responses/404"
/envs:
get:
description: List all environments
- tags: [ envs ]
- parameters:
- - $ref: "#/components/parameters/apiKeyReq"
+ tags: [envs]
+ security:
+ - AccessTokenAuth: []
responses:
200:
description: Successfully returned all environments
@@ -296,125 +221,144 @@ paths:
$ref: "#/components/responses/500"
post:
description: Create a new environment
- tags: [ envs ]
- parameters:
- - $ref: "#/components/parameters/apiKeyReq"
+ tags: [envs]
+ security:
+ - AccessTokenAuth: []
requestBody:
required: true
content:
- application/json:
+ multipart/form-data:
schema:
- $ref: "#/components/schemas/NewEnvironment"
+ type: object
+ required:
+ - buildContext
+ - dockerfile
+ properties:
+ buildContext:
+ description: Docker build context
+ type: string
+ format: binary
+ dockerfile:
+ type: string
+ description: Dockerfile content
+ encoding:
+ buildContext:
+ contentType: application/octet-stream
+
responses:
- 200:
- description: Successfully created an environment
+ 202:
+ description: The build has started
content:
application/json:
schema:
$ref: "#/components/schemas/Environment"
- 400:
- $ref: "#/components/responses/400"
401:
$ref: "#/components/responses/401"
500:
$ref: "#/components/responses/500"
- # This method will be replaced by POST /envs
- /envs/{codeSnippetID}:
+ /envs/{envID}:
post:
- description: Create a new env for a code snippet
- tags: [ envs ]
+ description: Rebuild an environment
+ tags: [envs]
+ security:
+ - AccessTokenAuth: []
parameters:
- - $ref: "#/components/parameters/apiKeyReq"
- - $ref: "#/components/parameters/codeSnippetID"
+ - $ref: "#/components/parameters/envID"
requestBody:
required: true
content:
- application/json:
+ multipart/form-data:
schema:
- $ref: "#/components/schemas/NewEnvironment"
- responses:
- 204:
- description: Successfully created an environment
- 400:
- $ref: "#/components/responses/400"
- 401:
- $ref: "#/components/responses/401"
- 500:
- $ref: "#/components/responses/500"
- delete:
- description: Delete the code snippet environment
- tags: [ envs ]
- parameters:
- - $ref: "#/components/parameters/apiKeyReq"
- - $ref: "#/components/parameters/codeSnippetID"
+ type: object
+ required:
+ - buildContext
+ - dockerfile
+ - envID
+ properties:
+ buildContext:
+ description: Docker build context
+ type: string
+ format: binary
+ dockerfile:
+ type: string
+ description: Dockerfile content
+ envID:
+ type: string
+ description: ID of the environment
+ encoding:
+ buildContext:
+ contentType: application/octet-stream
+
responses:
- 204:
- description: Successfully deleted the environment
- 400:
- description: Cannot delete the environment
+ 202:
+ description: The build has started
content:
application/json:
schema:
- $ref: "#/components/schemas/Error"
+ $ref: "#/components/schemas/Environment"
401:
$ref: "#/components/responses/401"
500:
$ref: "#/components/responses/500"
- patch:
- description: Update the environment of the code snippet to match the edit environment
- tags: [ envs ]
+
+ /envs/{envID}/builds/{buildID}:
+ get:
+ description: Get environment build info
+ tags: [envs]
+ security:
+ - AccessTokenAuth: []
parameters:
- - $ref: "#/components/parameters/apiKeyReq"
- - $ref: "#/components/parameters/codeSnippetID"
+ - $ref: "#/components/parameters/envID"
+ - $ref: "#/components/parameters/buildID"
+ - in: query
+ name: logsOffset
+ schema:
+ default: 0
+ type: integer
+ description: Index of the starting build log that should be returned with the environment
responses:
- 204:
- description: Updated the edit environment for code snippet
- 400:
- $ref: "#/components/responses/400"
+ 200:
+ description: Successfully returned the environment
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/EnvironmentBuild"
401:
$ref: "#/components/responses/401"
+ 404:
+ $ref: "#/components/responses/404"
500:
$ref: "#/components/responses/500"
- /envs/{codeSnippetID}/state:
- put:
- description: Update the state of the environment
- tags: [ envs ]
+ /envs/{envID}/builds/{buildID}/logs:
+ post:
+ description: Add a build log
+ tags: [envs]
parameters:
- - $ref: "#/components/parameters/apiKeyReq"
- - $ref: "#/components/parameters/codeSnippetID"
+ - $ref: "#/components/parameters/envID"
+ - $ref: "#/components/parameters/buildID"
requestBody:
required: true
content:
application/json:
schema:
- $ref: "#/components/schemas/EnvironmentStateUpdate"
+ type: object
+ required:
+ - apiSecret
+ - logs
+ properties:
+ apiSecret:
+ description: API secret
+ type: string
+ logs:
+ type: array
+ items:
+ type: string
responses:
- 204:
- description: Updated the state of environment
- 400:
- $ref: "#/components/responses/400"
+ 201:
+ description: Successfully added log
401:
$ref: "#/components/responses/401"
-
- /envs/{codeSnippetID}/title:
- put:
- description: Update the title of the environment
- tags: [ envs ]
- parameters:
- - $ref: "#/components/parameters/apiKeyReq"
- - $ref: "#/components/parameters/codeSnippetID"
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/EnvironmentTitleUpdate"
- responses:
- 204:
- description: Updated the title of the code snippet
- 400:
- $ref: "#/components/responses/400"
- 401:
- $ref: "#/components/responses/401"
\ No newline at end of file
+ 404:
+ $ref: "#/components/responses/404"
\ No newline at end of file
diff --git a/templates/base/Dockerfile b/templates/base/Dockerfile
new file mode 100644
index 000000000..7cafc9c69
--- /dev/null
+++ b/templates/base/Dockerfile
@@ -0,0 +1,79 @@
+FROM python:3.11.6
+
+# Inspired by https://github.com/nodejs/docker-node/blob/main/20/bookworm/Dockerfile
+RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y \
+ build-essential curl git util-linux \
+ libbluetooth-dev tk-dev uuid-dev; \
+ rm -rf /var/lib/apt/lists/*
+
+RUN groupadd --gid 1000 node \
+ && useradd --uid 1000 --gid node --shell /bin/bash --create-home node
+
+ENV NODE_VERSION 20.9.0
+
+RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
+ && case "${dpkgArch##*-}" in \
+ amd64) ARCH='x64';; \
+ ppc64el) ARCH='ppc64le';; \
+ s390x) ARCH='s390x';; \
+ arm64) ARCH='arm64';; \
+ armhf) ARCH='armv7l';; \
+ i386) ARCH='x86';; \
+ *) echo "unsupported architecture"; exit 1 ;; \
+ esac \
+ # use pre-existing gpg directory, see https://github.com/nodejs/docker-node/pull/1895#issuecomment-1550389150
+ && export GNUPGHOME="$(mktemp -d)" \
+ # gpg keys listed at https://github.com/nodejs/node#release-keys
+ && set -ex \
+ && for key in \
+ 4ED778F539E3634C779C87C6D7062848A1AB005C \
+ 141F07595B7B3FFE74309A937405533BE57C7D57 \
+ 74F12602B6F1C4E913FAA37AD3A89613643B6201 \
+ DD792F5973C6DE52C432CBDAC77ABFA00DDBF2B7 \
+ 61FC681DFB92A079F1685E77973F295594EC4689 \
+ 8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600 \
+ C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8 \
+ 890C08DB8579162FEE0DF9DB8BEAB4DFCF555EF4 \
+ C82FA3AE1CBEDC6BE46B9360C43CEC45C17AB93C \
+ 108F52B48DB57BB0CC439B2997B01419BD92F80A \
+ A363A499291CBBC940DD62E41F10027AF002F8B0 \
+ ; do \
+ gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$key" || \
+ gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" ; \
+ done \
+ && curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \
+ && curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
+ && gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
+ && gpgconf --kill all \
+ && rm -rf "$GNUPGHOME" \
+ && grep " node-v$NODE_VERSION-linux-$ARCH.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
+ && tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \
+ && rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \
+ && ln -s /usr/local/bin/node /usr/local/bin/nodejs \
+ # smoke tests
+ && node --version \
+ && npm --version
+
+ENV YARN_VERSION 1.22.19
+
+RUN set -ex \
+ # use pre-existing gpg directory, see https://github.com/nodejs/docker-node/pull/1895#issuecomment-1550389150
+ && export GNUPGHOME="$(mktemp -d)" \
+ && for key in \
+ 6A010C5166006599AA17F08146C2130DFD2497F5 \
+ ; do \
+ gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$key" || \
+ gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" ; \
+ done \
+ && curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \
+ && curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz.asc" \
+ && gpg --batch --verify yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
+ && gpgconf --kill all \
+ && rm -rf "$GNUPGHOME" \
+ && mkdir -p /opt \
+ && tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/ \
+ && ln -s /opt/yarn-v$YARN_VERSION/bin/yarn /usr/local/bin/yarn \
+ && ln -s /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg \
+ && rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
+ # smoke test
+ && yarn --version
diff --git a/templates/base/e2b.toml b/templates/base/e2b.toml
new file mode 100644
index 000000000..3eba8c355
--- /dev/null
+++ b/templates/base/e2b.toml
@@ -0,0 +1,4 @@
+# This is a config for E2B sandbox template
+
+id = "rki5dems9wqfm4r03t7g"
+dockerfile = "Dockerfile"
diff --git a/templates/data_analysis/Dockerfile b/templates/data_analysis/Dockerfile
new file mode 100644
index 000000000..ab07be71f
--- /dev/null
+++ b/templates/data_analysis/Dockerfile
@@ -0,0 +1,18 @@
+FROM python:3.11.6
+
+RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y \
+ build-essential curl git util-linux
+
+ENV PIP_DEFAULT_TIMEOUT=100 \
+ PIP_DISABLE_PIP_VERSION_CHECK=1 \
+ PIP_NO_CACHE_DIR=1
+
+WORKDIR /code
+
+COPY ./requirements.txt requirements.txt
+RUN pip install -r requirements.txt
+
+RUN mkdir -p /home/user/artifacts
+
+RUN echo "export MPLBACKEND=module://e2b_matplotlib_backend" >>~/.bashrc
+COPY e2b_matplotlib_backend.py /usr/local/lib/python3.11/site-packages/e2b_matplotlib_backend.py
diff --git a/templates/data_analysis/e2b.toml b/templates/data_analysis/e2b.toml
new file mode 100644
index 000000000..67fb30b2b
--- /dev/null
+++ b/templates/data_analysis/e2b.toml
@@ -0,0 +1,4 @@
+# This is a config for E2B sandbox template
+
+id = "fv7bfqp4wyo42829htzt"
+dockerfile = "Dockerfile"
diff --git a/templates/data_analysis/e2b_matplotlib_backend.py b/templates/data_analysis/e2b_matplotlib_backend.py
new file mode 100644
index 000000000..f10af0ab6
--- /dev/null
+++ b/templates/data_analysis/e2b_matplotlib_backend.py
@@ -0,0 +1,17 @@
+from time import strftime
+
+from matplotlib.backend_bases import Gcf
+from matplotlib.backends.backend_agg import FigureCanvasAgg
+from matplotlib.backend_bases import FigureManagerBase
+
+dateformat = '%Y%m%d-%H%M%S'
+FigureCanvas = FigureCanvasAgg
+
+class FigureManager(FigureManagerBase):
+ def show(self):
+ self.canvas.figure.savefig(f'/home/user/artifacts/figure_{strftime(dateformat)}.png')
+
+
+def show(*args, **kwargs):
+ for _, figmanager in enumerate(Gcf.get_all_fig_managers()):
+ figmanager.canvas.figure.savefig(f'/home/user/artifacts/figure_{strftime(dateformat)}.png')
\ No newline at end of file
diff --git a/templates/data_analysis/requirements.txt b/templates/data_analysis/requirements.txt
new file mode 100644
index 000000000..290c4ce2c
--- /dev/null
+++ b/templates/data_analysis/requirements.txt
@@ -0,0 +1,29 @@
+pandas
+opencv-python
+imageio
+scikit-learn
+spacy
+bokeh
+pytest
+aiohttp
+python-docx
+nltk
+textblob
+beautifulsoup4
+seaborn
+plotly
+tornado
+matplotlib
+xarray
+librosa
+gensim
+soundfile
+pytz
+requests
+scikit-image
+xlrd
+scipy
+numpy
+openpyxl
+joblib
+urllib3
\ No newline at end of file