diff --git a/.github/scripts/is_new_sdk_ref.sh b/.github/scripts/is_new_sdk_ref.sh deleted file mode 100755 index 70685851..00000000 --- a/.github/scripts/is_new_sdk_ref.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -# This script checks for diffs in the js/ and python/ directory. -# If there are diffs, it means we need to generate new SDK references. -if git diff --name-only HEAD^ | grep -q '^js/\|^python/'; then - echo "true" -else - echo "false" -fi diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5cd11506..8c66f04d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -356,18 +356,6 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Generate SDK reference - id: sdk-ref - run: pnpm run --recursive generate-ref - - - name: Show docs file structure - run: | - if [ -d "./sdk-reference" ]; then - tree ./sdk-reference - else - echo "sdk-reference directory does not exist" - fi - - name: Release new versions uses: changesets/action@v1 with: @@ -385,7 +373,6 @@ jobs: run: | git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" - git add ./sdk-reference git commit -am "[skip ci] Release new versions" || exit 0 git push env: diff --git a/js/package.json b/js/package.json index 411551a0..4d54a7fc 100644 --- a/js/package.json +++ b/js/package.json @@ -34,7 +34,6 @@ "example": "npx tsx example.mts", "test:bun": "bun test tests/runtimes/bun --env-file=.env", "test:deno": "deno test tests/runtimes/deno/ --allow-net --allow-read --allow-env --unstable-sloppy-imports --trace-leaks", - "generate-ref": "./scripts/generate_sdk_ref.sh", "lint": "eslint src/ tests/", "format": "prettier --write src/ tests/ example.mts" }, @@ -44,8 +43,6 @@ "knip": "^5.25.1", "npm-check-updates": "^17.1.14", "tsup": "^8.5.1", - "typedoc": "0.26.8", - "typedoc-plugin-markdown": "4.2.7", "typescript": "^5.5.3", "vitest": "^3.2.4" }, diff --git a/js/scripts/CustomMarkdownTheme.js b/js/scripts/CustomMarkdownTheme.js deleted file mode 100644 index 6046d845..00000000 --- a/js/scripts/CustomMarkdownTheme.js +++ /dev/null @@ -1,64 +0,0 @@ -const { MarkdownTheme, MarkdownPageEvent } = require('typedoc-plugin-markdown') - -function load(app) { - // Listen to the render event - app.renderer.on(MarkdownPageEvent.END, (page) => { - // Remove Markdown links from the document contents - page.contents = removeMarkdownLinks( - removeFirstNLines( - convertH5toH3(removeLinesWithConditions(page.contents)), - 6 - ) - ) - }) -} - -// this is a hacky way to make methods in the js-sdk sdk reference look more prominent -function convertH5toH3(text) { - return text.replace(/^##### (.*)$/gm, '### $1') -} - -// Function to remove Markdown-style links -function removeMarkdownLinks(text) { - // Regular expression to match Markdown links [text](url) - return text.replace(/\[([^\]]+)\]\(([^)]+)\)/g, '$1') // Replace with just the link text -} - -function removeFirstNLines(text, n, condition) { - // Split the text into lines, then join back excluding the first four lines - return text.split('\n').slice(n).join('\n') -} - -// Function to remove lines based on conditions -function removeLinesWithConditions(text) { - const lines = text.split('\n') - const filteredLines = [] - - for (let i = 0; i < lines.length; i++) { - // Check if the current line starts with "#### Extends" or "###### Overrides" - if ( - lines[i].startsWith('#### Extends') || - lines[i].startsWith('###### Overrides') || - lines[i].startsWith('###### Inherited from') - ) { - // If it does, skip this line and the next three lines - i += 3 // Skip this line and the next three - continue - } - - if (lines[i].startsWith('##### new')) { - // avoid promoting constructors - i += 1 - continue - } - - // If not removed, add the line to filteredLines - filteredLines.push(convertH5toH3(lines[i])) - } - - // Join the filtered lines back into a single string - return filteredLines.join('\n') -} - -// Export the load function -module.exports = { load } diff --git a/js/scripts/generate_sdk_ref.sh b/js/scripts/generate_sdk_ref.sh deleted file mode 100755 index b2bb4c34..00000000 --- a/js/scripts/generate_sdk_ref.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -# This script generates the Code Interpreter JS SDK reference markdown files -# Run it in the `js/` directory - -# generate raw SDK reference markdown files -npx typedoc - -PKG_VERSION="v$(node -p "require('./package.json').version")" -ROUTES_DIR="../sdk-reference/code-interpreter-js-sdk/${PKG_VERSION}" -mkdir -p "${ROUTES_DIR}" - -rm -rf sdk_ref/README.md - -# Flatten the sdk_ref directory by moving all nested files to the root level and remove empty subdirectories -find sdk_ref -mindepth 2 -type f | while read -r file; do - mv "$file" sdk_ref/ -done -find sdk_ref -type d -empty -delete - -# Transfrom top level MD files into folders of the same name with page.mdx inside -find sdk_ref -maxdepth 1 -type f -name "*.md" | while read -r file; do - # Extract the filename without extension - filename=$(basename "$file" .md) - # Create the directory of the same name in sdk_ref - mkdir -p "sdk_ref/${filename}" - # Move the file inside the newly created directory - mv "$file" "sdk_ref/${filename}/page.mdx" -done - -cp -r sdk_ref/* "${ROUTES_DIR}" - -rm -rf sdk_ref diff --git a/js/typedoc.json b/js/typedoc.json deleted file mode 100644 index 09eb343a..00000000 --- a/js/typedoc.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "out": "sdk_ref", - "plugin": ["typedoc-plugin-markdown", "./scripts/CustomMarkdownTheme.js"], - "exclude": ["**/*.spec.ts"], - "entryPoints": [ - "src/index.ts", - "src/charts.ts", - "src/consts.ts", - "src/messaging.ts", - "src/sandbox.ts" - ], - "excludeExternals": true, - "excludePrivate": true, - "excludeProtected": true, - "navigation": { - "includeGroups": false, - "includeCategories": false - }, - "outputFileStrategy": "modules", - "readme": "none", - "disableSources": true, - // typedoc-plugin-markdown options - "classPropertiesFormat": "table", - "typeDeclarationFormat": "table", - "enumMembersFormat": "table", - "parametersFormat": "table", - "expandParameters": true, - "useCodeBlocks": true, - "hidePageTitle": true, - "hideBreadcrumbs": true -} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3bae84f8..205c48b3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -66,12 +66,6 @@ importers: tsup: specifier: ^8.5.1 version: 8.5.1(jiti@2.4.2)(postcss@8.5.3)(typescript@5.7.3)(yaml@2.7.0) - typedoc: - specifier: 0.26.8 - version: 0.26.8(typescript@5.7.3) - typedoc-plugin-markdown: - specifier: 4.2.7 - version: 4.2.7(typedoc@0.26.8(typescript@5.7.3)) typescript: specifier: ^5.5.3 version: 5.7.3 @@ -617,27 +611,6 @@ packages: cpu: [x64] os: [win32] - '@shikijs/core@1.29.2': - resolution: {integrity: sha512-vju0lY9r27jJfOY4Z7+Rt/nIOjzJpZ3y+nYpqtUZInVoXQ/TJZcfGnNOGnKjFdVZb8qexiCuSlZRKcGfhhTTZQ==} - - '@shikijs/engine-javascript@1.29.2': - resolution: {integrity: sha512-iNEZv4IrLYPv64Q6k7EPpOCE/nuvGiKl7zxdq0WFuRPF5PAE9PRo2JGq/d8crLusM59BRemJ4eOqrFrC4wiQ+A==} - - '@shikijs/engine-oniguruma@1.29.2': - resolution: {integrity: sha512-7iiOx3SG8+g1MnlzZVDYiaeHe7Ez2Kf2HrJzdmGwkRisT7r4rak0e655AcM/tF9JG/kg5fMNYlLLKglbN7gBqA==} - - '@shikijs/langs@1.29.2': - resolution: {integrity: sha512-FIBA7N3LZ+223U7cJDUYd5shmciFQlYkFXlkKVaHsCPgfVLiO+e12FmQE6Tf9vuyEsFe3dIl8qGWKXgEHL9wmQ==} - - '@shikijs/themes@1.29.2': - resolution: {integrity: sha512-i9TNZlsq4uoyqSbluIcZkmPL9Bfi3djVxRnofUHwvx/h6SRW3cwgBC5SML7vsDcWyukY0eCzVN980rqP6qNl9g==} - - '@shikijs/types@1.29.2': - resolution: {integrity: sha512-VJjK0eIijTZf0QSTODEXCqinjBn0joAHQ+aPSBzrv4O2d/QSbsMw+ZeSRx03kV34Hy7NzUvV/7NqfYGRLrASmw==} - - '@shikijs/vscode-textmate@10.0.1': - resolution: {integrity: sha512-fTIQwLF+Qhuws31iw7Ncl1R3HUDtGwIipiJ9iU+UsDUwMhegFcQKQHd51nZjb7CArq0MvON8rbgCGQYWHUKAdg==} - '@snyk/github-codeowners@1.1.0': resolution: {integrity: sha512-lGFf08pbkEac0NYgVf4hdANpAgApRjNByLXB+WBip3qj1iendOIyAwP2GKkKbQMNVy2r1xxDf0ssfWscoiC+Vw==} engines: {node: '>=8.10'} @@ -667,15 +640,9 @@ packages: '@types/estree@1.0.7': resolution: {integrity: sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==} - '@types/hast@3.0.4': - resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==} - '@types/json-schema@7.0.15': resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} - '@types/mdast@4.0.4': - resolution: {integrity: sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==} - '@types/node@12.20.55': resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} @@ -685,9 +652,6 @@ packages: '@types/semver@7.7.0': resolution: {integrity: sha512-k107IF4+Xr7UHjwDc7Cfd6PRQfbdkiRabXGRjo07b4WyPahFBZCZ1sE+BNxYIJPPg73UkfOsVOLwqVc/6ETrIA==} - '@types/unist@3.0.3': - resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==} - '@typescript-eslint/eslint-plugin@6.21.0': resolution: {integrity: sha512-oy9+hTPCUFpngkEZUSzbf9MxI65wbKFoQYsgPdILTfbUldp5ovUuphZVe4i30emU9M/kP+T64Di0mxl7dSw3MA==} engines: {node: ^16.0.0 || >=18.0.0} @@ -917,9 +881,6 @@ packages: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} - ccount@2.0.1: - resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==} - chai@5.2.0: resolution: {integrity: sha512-mCuXncKXk5iCLhfhwTc0izo0gtEmpz5CtG2y8GiOINBlMVS6v8TMRc5TaLWKS6692m9+dVVfzgeVxR5UxWHTYw==} engines: {node: '>=12'} @@ -935,12 +896,6 @@ packages: changeset@0.2.6: resolution: {integrity: sha512-d21ym9zLPOKMVhIa8ulJo5IV3QR2NNdK6BWuwg48qJA0XSQaMeDjo1UGThcTn7YDmU08j3UpKyFNvb3zplk8mw==} - character-entities-html4@2.1.0: - resolution: {integrity: sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==} - - character-entities-legacy@3.0.0: - resolution: {integrity: sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==} - check-error@2.1.1: resolution: {integrity: sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==} engines: {node: '>= 16'} @@ -968,9 +923,6 @@ packages: color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} - comma-separated-tokens@2.0.3: - resolution: {integrity: sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==} - commander@4.1.1: resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==} engines: {node: '>= 6'} @@ -1020,13 +972,6 @@ packages: defaults@1.0.4: resolution: {integrity: sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==} - dequal@2.0.3: - resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} - engines: {node: '>=6'} - - devlop@1.1.0: - resolution: {integrity: sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==} - dir-glob@3.0.1: resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} engines: {node: '>=8'} @@ -1049,17 +994,10 @@ packages: easy-table@1.2.0: resolution: {integrity: sha512-OFzVOv03YpvtcWGe5AayU5G2hgybsg3iqA6drU8UaoZyB9jLGMTrz9+asnLp/E+6qPh88yEI1gvyZFZ41dmgww==} - emoji-regex-xs@1.0.0: - resolution: {integrity: sha512-LRlerrMYoIDrT6jgpeZ2YYl/L8EulRTt5hQcYjy5AInh7HWXKimpqx68aknBFpGL2+/IcogTcaydJEgaTmOpDg==} - enhanced-resolve@5.18.1: resolution: {integrity: sha512-ZSW3ma5GkcQBIpwZTSRAI8N71Uuwgs93IezB7mf7R60tC8ZbJideoDNKjHn2O9KIlx6rkGTTEk1xUCK2E1Y2Yg==} engines: {node: '>=10.13.0'} - entities@4.5.0: - resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} - engines: {node: '>=0.12'} - es-module-lexer@1.7.0: resolution: {integrity: sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==} @@ -1247,15 +1185,6 @@ packages: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} engines: {node: '>=8'} - hast-util-to-html@9.0.5: - resolution: {integrity: sha512-OguPdidb+fbHQSU4Q4ZiLKnzWo8Wwsf5bZfbvu7//a9oTYoqD/fWpe96NuHkoS9h0ccGOTe0C4NGXdtS0iObOw==} - - hast-util-whitespace@3.0.0: - resolution: {integrity: sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw==} - - html-void-elements@3.0.0: - resolution: {integrity: sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg==} - ignore@5.3.1: resolution: {integrity: sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==} engines: {node: '>= 4'} @@ -1363,9 +1292,6 @@ packages: lines-and-columns@1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} - linkify-it@5.0.0: - resolution: {integrity: sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==} - load-tsconfig@0.2.5: resolution: {integrity: sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -1395,41 +1321,13 @@ packages: resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} engines: {node: '>=10'} - lunr@2.3.9: - resolution: {integrity: sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==} - magic-string@0.30.17: resolution: {integrity: sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==} - markdown-it@14.1.0: - resolution: {integrity: sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==} - hasBin: true - - mdast-util-to-hast@13.2.1: - resolution: {integrity: sha512-cctsq2wp5vTsLIcaymblUriiTcZd0CwWtCbLvrOzYCDZoWyMNV8sZ7krj09FSnsiJi3WVsHLM4k6Dq/yaPyCXA==} - - mdurl@2.0.0: - resolution: {integrity: sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==} - merge2@1.4.1: resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} engines: {node: '>= 8'} - micromark-util-character@2.1.1: - resolution: {integrity: sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==} - - micromark-util-encode@2.0.1: - resolution: {integrity: sha512-c3cVx2y4KqUnwopcO9b/SCdo2O67LwJJ/UyqGfbigahfegL9myoEFoDYZgkT7f36T0bLrM9hZTAaAyH+PCAXjw==} - - micromark-util-sanitize-uri@2.0.1: - resolution: {integrity: sha512-9N9IomZ/YuGGZZmQec1MbgxtlgougxTodVwDzzEouPKo3qFWvymFHWcnDi2vzV1ff6kas9ucW+o3yzJK9YB1AQ==} - - micromark-util-symbol@2.0.1: - resolution: {integrity: sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==} - - micromark-util-types@2.0.2: - resolution: {integrity: sha512-Yw0ECSpJoViF1qTU4DC6NwtC4aWGt1EkzaQB8KPPyCRR8z9TWeV0HbEFGTO+ZY1wB22zmxnJqhPyTpOVCpeHTA==} - micromatch@4.0.8: resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} engines: {node: '>=8.6'} @@ -1445,10 +1343,6 @@ packages: resolution: {integrity: sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==} engines: {node: '>=16 || 14 >=14.17'} - minimatch@9.0.5: - resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} - engines: {node: '>=16 || 14 >=14.17'} - minimatch@9.0.9: resolution: {integrity: sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==} engines: {node: '>=16 || 14 >=14.17'} @@ -1493,9 +1387,6 @@ packages: once@1.4.0: resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} - oniguruma-to-es@2.3.0: - resolution: {integrity: sha512-bwALDxriqfKGfUufKGGepCzu9x7nJQuoRoAFp4AnwehhC2crqrDIAP/uN2qdlsAvSMpeRC3+Yzhqc7hLmle5+g==} - openapi-fetch@0.14.1: resolution: {integrity: sha512-l7RarRHxlEZYjMLd/PR0slfMVse2/vvIAGm75/F7J6MlQ8/b9uUQmUF2kCPrQhJqMXSxmYWObVgeYXbFYzZR+A==} @@ -1640,13 +1531,6 @@ packages: resolution: {integrity: sha512-E9e9HJ9R9NasGOgPaPE8VMeiPKAyWR5jcFpNnwIejslIhWqdqOrb2wShBsncMPUb+BcCd2OPYfh7p2W6oemTng==} engines: {node: '>=18'} - property-information@7.0.0: - resolution: {integrity: sha512-7D/qOz/+Y4X/rzSB6jKxKUsQnphO046ei8qxG59mtM3RG3DHgTK81HrxrmoDVINJb8NKT5ZsRbwHvQ6B68Iyhg==} - - punycode.js@2.3.1: - resolution: {integrity: sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==} - engines: {node: '>=6'} - punycode@2.3.1: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} @@ -1662,15 +1546,6 @@ packages: resolution: {integrity: sha512-h80JrZu/MHUZCyHu5ciuoI0+WxsCxzxJTILn6Fs8rxSnFPh+UVHYfeIxK1nVGugMqkfC4vJcBOYbkfkwYK0+gw==} engines: {node: '>= 14.18.0'} - regex-recursion@5.1.1: - resolution: {integrity: sha512-ae7SBCbzVNrIjgSbh7wMznPcQel1DNlDtzensnFxpiNpXt1U2ju/bHugH422r+4LAVS1FpW1YCwilmnNsjum9w==} - - regex-utilities@2.3.0: - resolution: {integrity: sha512-8VhliFJAWRaUiVvREIiW2NXXTmHs4vMNnSzuJVhscgmGav3g9VDxLrQndI3dZZVVdp0ZO/5v0xmX516/7M9cng==} - - regex@5.1.1: - resolution: {integrity: sha512-dN5I359AVGPnwzJm2jN1k0W9LPZ+ePvoOeVMMfqIMFz53sSwXkxaJoxr50ptnsC771lK95BnTrVSZxq0b9yCGw==} - resolve-from@4.0.0: resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} engines: {node: '>=4'} @@ -1709,9 +1584,6 @@ packages: resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} engines: {node: '>=8'} - shiki@1.29.2: - resolution: {integrity: sha512-njXuliz/cP+67jU2hukkxCNuH1yUi4QfdZZY+sMr5PPrIyXSu5iTb/qYC4BiWWB0vZ+7TbdvYUCeL23zpwCfbg==} - siginfo@2.0.0: resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} @@ -1735,9 +1607,6 @@ packages: resolution: {integrity: sha512-i5uvt8C3ikiWeNZSVZNWcfZPItFQOsYTUAOkcUPGd8DqDy1uOUikjt5dG+uRlwyvR108Fb9DOd4GvXfT0N2/uQ==} engines: {node: '>= 12'} - space-separated-tokens@2.0.2: - resolution: {integrity: sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==} - spawndamnit@3.0.1: resolution: {integrity: sha512-MmnduQUuHCoFckZoWnXsTg7JaiLBJrKFj9UI2MbRPGaJeVpsLcVBu6P/IGZovziM/YBsellCmsprgNA+w0CzVg==} @@ -1750,9 +1619,6 @@ packages: std-env@3.9.0: resolution: {integrity: sha512-UGvjygr6F6tpH7o2qyqR6QYpwraIjKSdtzyBdyytFOHmPZY917kwdwLG0RbOjWOnKmnm3PeHjaoLLMie7kPLQw==} - stringify-entities@4.0.4: - resolution: {integrity: sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg==} - strip-ansi@6.0.1: resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} engines: {node: '>=8'} @@ -1832,9 +1698,6 @@ packages: resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} hasBin: true - trim-lines@3.0.1: - resolution: {integrity: sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==} - ts-api-utils@1.4.3: resolution: {integrity: sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==} engines: {node: '>=16'} @@ -1871,27 +1734,11 @@ packages: resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} engines: {node: '>=10'} - typedoc-plugin-markdown@4.2.7: - resolution: {integrity: sha512-bLsQdweSm48P9j6kGqQ3/4GCH5zu2EnURSkkxqirNc+uVFE9YK825ogDw+WbNkRHIV6eZK/1U43gT7YfglyYOg==} - engines: {node: '>= 18'} - peerDependencies: - typedoc: 0.26.x - - typedoc@0.26.8: - resolution: {integrity: sha512-QBF0BMbnNeUc6U7pRHY7Jb8pjhmiNWZNQT8LU6uk9qP9t3goP9bJptdlNqMC0wBB2w9sQrxjZt835bpRSSq1LA==} - engines: {node: '>= 18'} - hasBin: true - peerDependencies: - typescript: 4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x - typescript@5.7.3: resolution: {integrity: sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==} engines: {node: '>=14.17'} hasBin: true - uc.micro@2.1.0: - resolution: {integrity: sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==} - udc@1.0.1: resolution: {integrity: sha512-jv+D9de1flsum5QkFtBdjyppCQAdz9kTck/0xST5Vx48T9LL2BYnw0Iw77dSKDQ9KZ/PS3qPO1vfXHDpLZlxcQ==} @@ -1904,21 +1751,6 @@ packages: undici-types@6.21.0: resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==} - unist-util-is@6.0.0: - resolution: {integrity: sha512-2qCTHimwdxLfz+YzdGfkqNlH0tLi9xjTnHddPmJwtIG9MGsdbutfTc4P+haPD7l7Cjxf/WZj+we5qfVPvvxfYw==} - - unist-util-position@5.0.0: - resolution: {integrity: sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA==} - - unist-util-stringify-position@4.0.0: - resolution: {integrity: sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==} - - unist-util-visit-parents@6.0.1: - resolution: {integrity: sha512-L/PqWzfTP9lzzEa6CKs0k2nARxTdZduw3zyh8d2NVBnsyvHjSX4TWse388YrrQKbvI8w20fGjGlhgT96WwKykw==} - - unist-util-visit@5.0.0: - resolution: {integrity: sha512-MR04uvD+07cwl/yhVuVWAtw+3GOR/knlL55Nd/wAdblk27GCVt3lqpTivy/tkJcZoNPzTwS1Y+KMojlLDhoTzg==} - universalify@0.1.2: resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} engines: {node: '>= 4.0.0'} @@ -1926,12 +1758,6 @@ packages: uri-js@4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} - vfile-message@4.0.2: - resolution: {integrity: sha512-jRDZ1IMLttGj41KcZvlrYAaI3CfqpLpfpf+Mfig13viT6NKvRzWZ+lXz0Y5D60w6uJIBAOGq9mSHf0gktF0duw==} - - vfile@6.0.3: - resolution: {integrity: sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==} - vite-node@3.2.4: resolution: {integrity: sha512-EbKSKh+bh1E1IFxeO0pg1n4dvoOTt0UDiXMd/qn++r98+jPO1xtJilvXldeuQ8giIB5IkpjCgMleHMNEsGH6pg==} engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} @@ -2056,9 +1882,6 @@ packages: zod@3.22.4: resolution: {integrity: sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==} - zwitch@2.0.4: - resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==} - snapshots: '@babel/runtime@7.28.6': {} @@ -2420,41 +2243,6 @@ snapshots: '@rollup/rollup-win32-x64-msvc@4.39.0': optional: true - '@shikijs/core@1.29.2': - dependencies: - '@shikijs/engine-javascript': 1.29.2 - '@shikijs/engine-oniguruma': 1.29.2 - '@shikijs/types': 1.29.2 - '@shikijs/vscode-textmate': 10.0.1 - '@types/hast': 3.0.4 - hast-util-to-html: 9.0.5 - - '@shikijs/engine-javascript@1.29.2': - dependencies: - '@shikijs/types': 1.29.2 - '@shikijs/vscode-textmate': 10.0.1 - oniguruma-to-es: 2.3.0 - - '@shikijs/engine-oniguruma@1.29.2': - dependencies: - '@shikijs/types': 1.29.2 - '@shikijs/vscode-textmate': 10.0.1 - - '@shikijs/langs@1.29.2': - dependencies: - '@shikijs/types': 1.29.2 - - '@shikijs/themes@1.29.2': - dependencies: - '@shikijs/types': 1.29.2 - - '@shikijs/types@1.29.2': - dependencies: - '@shikijs/vscode-textmate': 10.0.1 - '@types/hast': 3.0.4 - - '@shikijs/vscode-textmate@10.0.1': {} - '@snyk/github-codeowners@1.1.0': dependencies: commander: 4.1.1 @@ -2494,16 +2282,8 @@ snapshots: '@types/estree@1.0.7': {} - '@types/hast@3.0.4': - dependencies: - '@types/unist': 3.0.3 - '@types/json-schema@7.0.15': {} - '@types/mdast@4.0.4': - dependencies: - '@types/unist': 3.0.3 - '@types/node@12.20.55': {} '@types/node@20.19.37': @@ -2512,8 +2292,6 @@ snapshots: '@types/semver@7.7.0': {} - '@types/unist@3.0.3': {} - '@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.7.3))(eslint@8.57.1)(typescript@5.7.3)': dependencies: '@eslint-community/regexpp': 4.12.1 @@ -2795,8 +2573,6 @@ snapshots: callsites@3.1.0: {} - ccount@2.0.1: {} - chai@5.2.0: dependencies: assertion-error: 2.0.1 @@ -2817,10 +2593,6 @@ snapshots: udc: 1.0.1 underscore: 1.13.6 - character-entities-html4@2.1.0: {} - - character-entities-legacy@3.0.0: {} - check-error@2.1.1: {} chokidar@4.0.3: @@ -2840,8 +2612,6 @@ snapshots: color-name@1.1.4: {} - comma-separated-tokens@2.0.3: {} - commander@4.1.1: {} compare-versions@6.1.1: {} @@ -2875,12 +2645,6 @@ snapshots: clone: 1.0.4 optional: true - dequal@2.0.3: {} - - devlop@1.1.0: - dependencies: - dequal: 2.0.3 - dir-glob@3.0.1: dependencies: path-type: 4.0.0 @@ -2915,15 +2679,11 @@ snapshots: optionalDependencies: wcwidth: 1.0.1 - emoji-regex-xs@1.0.0: {} - enhanced-resolve@5.18.1: dependencies: graceful-fs: 4.2.11 tapable: 2.2.1 - entities@4.5.0: {} - es-module-lexer@1.7.0: {} esbuild@0.25.0: @@ -3193,26 +2953,6 @@ snapshots: has-flag@4.0.0: {} - hast-util-to-html@9.0.5: - dependencies: - '@types/hast': 3.0.4 - '@types/unist': 3.0.3 - ccount: 2.0.1 - comma-separated-tokens: 2.0.3 - hast-util-whitespace: 3.0.0 - html-void-elements: 3.0.0 - mdast-util-to-hast: 13.2.1 - property-information: 7.0.0 - space-separated-tokens: 2.0.2 - stringify-entities: 4.0.4 - zwitch: 2.0.4 - - hast-util-whitespace@3.0.0: - dependencies: - '@types/hast': 3.0.4 - - html-void-elements@3.0.0: {} - ignore@5.3.1: {} import-fresh@3.3.1: @@ -3312,10 +3052,6 @@ snapshots: lines-and-columns@1.2.4: {} - linkify-it@5.0.0: - dependencies: - uc.micro: 2.1.0 - load-tsconfig@0.2.5: {} locate-path@5.0.0: @@ -3338,54 +3074,12 @@ snapshots: dependencies: yallist: 4.0.0 - lunr@2.3.9: {} - magic-string@0.30.17: dependencies: '@jridgewell/sourcemap-codec': 1.5.0 - markdown-it@14.1.0: - dependencies: - argparse: 2.0.1 - entities: 4.5.0 - linkify-it: 5.0.0 - mdurl: 2.0.0 - punycode.js: 2.3.1 - uc.micro: 2.1.0 - - mdast-util-to-hast@13.2.1: - dependencies: - '@types/hast': 3.0.4 - '@types/mdast': 4.0.4 - '@ungap/structured-clone': 1.3.0 - devlop: 1.1.0 - micromark-util-sanitize-uri: 2.0.1 - trim-lines: 3.0.1 - unist-util-position: 5.0.0 - unist-util-visit: 5.0.0 - vfile: 6.0.3 - - mdurl@2.0.0: {} - merge2@1.4.1: {} - micromark-util-character@2.1.1: - dependencies: - micromark-util-symbol: 2.0.1 - micromark-util-types: 2.0.2 - - micromark-util-encode@2.0.1: {} - - micromark-util-sanitize-uri@2.0.1: - dependencies: - micromark-util-character: 2.1.1 - micromark-util-encode: 2.0.1 - micromark-util-symbol: 2.0.1 - - micromark-util-symbol@2.0.1: {} - - micromark-util-types@2.0.2: {} - micromatch@4.0.8: dependencies: braces: 3.0.3 @@ -3403,10 +3097,6 @@ snapshots: dependencies: brace-expansion: 2.0.2 - minimatch@9.0.5: - dependencies: - brace-expansion: 2.0.2 - minimatch@9.0.9: dependencies: brace-expansion: 2.0.2 @@ -3446,12 +3136,6 @@ snapshots: dependencies: wrappy: 1.0.2 - oniguruma-to-es@2.3.0: - dependencies: - emoji-regex-xs: 1.0.0 - regex: 5.1.1 - regex-recursion: 5.1.1 - openapi-fetch@0.14.1: dependencies: openapi-typescript-helpers: 0.0.15 @@ -3562,10 +3246,6 @@ snapshots: dependencies: parse-ms: 4.0.0 - property-information@7.0.0: {} - - punycode.js@2.3.1: {} - punycode@2.3.1: {} queue-microtask@1.2.3: {} @@ -3579,17 +3259,6 @@ snapshots: readdirp@4.1.1: {} - regex-recursion@5.1.1: - dependencies: - regex: 5.1.1 - regex-utilities: 2.3.0 - - regex-utilities@2.3.0: {} - - regex@5.1.1: - dependencies: - regex-utilities: 2.3.0 - resolve-from@4.0.0: {} resolve-from@5.0.0: {} @@ -3640,17 +3309,6 @@ snapshots: shebang-regex@3.0.0: {} - shiki@1.29.2: - dependencies: - '@shikijs/core': 1.29.2 - '@shikijs/engine-javascript': 1.29.2 - '@shikijs/engine-oniguruma': 1.29.2 - '@shikijs/langs': 1.29.2 - '@shikijs/themes': 1.29.2 - '@shikijs/types': 1.29.2 - '@shikijs/vscode-textmate': 10.0.1 - '@types/hast': 3.0.4 - siginfo@2.0.0: {} signal-exit@4.1.0: {} @@ -3663,8 +3321,6 @@ snapshots: source-map@0.7.6: {} - space-separated-tokens@2.0.2: {} - spawndamnit@3.0.1: dependencies: cross-spawn: 7.0.6 @@ -3676,11 +3332,6 @@ snapshots: std-env@3.9.0: {} - stringify-entities@4.0.4: - dependencies: - character-entities-html4: 2.1.0 - character-entities-legacy: 3.0.0 - strip-ansi@6.0.1: dependencies: ansi-regex: 5.0.1 @@ -3752,8 +3403,6 @@ snapshots: tree-kill@1.2.2: {} - trim-lines@3.0.1: {} - ts-api-utils@1.4.3(typescript@5.7.3): dependencies: typescript: 5.7.3 @@ -3794,23 +3443,8 @@ snapshots: type-fest@0.20.2: {} - typedoc-plugin-markdown@4.2.7(typedoc@0.26.8(typescript@5.7.3)): - dependencies: - typedoc: 0.26.8(typescript@5.7.3) - - typedoc@0.26.8(typescript@5.7.3): - dependencies: - lunr: 2.3.9 - markdown-it: 14.1.0 - minimatch: 9.0.5 - shiki: 1.29.2 - typescript: 5.7.3 - yaml: 2.7.0 - typescript@5.7.3: {} - uc.micro@2.1.0: {} - udc@1.0.1: {} ufo@1.6.1: {} @@ -3819,45 +3453,12 @@ snapshots: undici-types@6.21.0: {} - unist-util-is@6.0.0: - dependencies: - '@types/unist': 3.0.3 - - unist-util-position@5.0.0: - dependencies: - '@types/unist': 3.0.3 - - unist-util-stringify-position@4.0.0: - dependencies: - '@types/unist': 3.0.3 - - unist-util-visit-parents@6.0.1: - dependencies: - '@types/unist': 3.0.3 - unist-util-is: 6.0.0 - - unist-util-visit@5.0.0: - dependencies: - '@types/unist': 3.0.3 - unist-util-is: 6.0.0 - unist-util-visit-parents: 6.0.1 - universalify@0.1.2: {} uri-js@4.4.1: dependencies: punycode: 2.3.1 - vfile-message@4.0.2: - dependencies: - '@types/unist': 3.0.3 - unist-util-stringify-position: 4.0.0 - - vfile@6.0.3: - dependencies: - '@types/unist': 3.0.3 - vfile-message: 4.0.2 - vite-node@3.2.4(@types/node@20.19.37)(jiti@2.4.2)(yaml@2.7.0): dependencies: cac: 6.7.14 @@ -3960,7 +3561,8 @@ snapshots: yallist@5.0.0: {} - yaml@2.7.0: {} + yaml@2.7.0: + optional: true yocto-queue@0.1.0: {} @@ -3969,5 +3571,3 @@ snapshots: zod: 3.22.4 zod@3.22.4: {} - - zwitch@2.0.4: {} diff --git a/python/package.json b/python/package.json index ecb7e5a1..8a486671 100644 --- a/python/package.json +++ b/python/package.json @@ -10,7 +10,6 @@ "postVersion": "poetry version $(pnpm pkg get version --workspaces=false | tr -d \\\")", "postPublish": "poetry build && poetry config pypi-token.pypi ${PYPI_TOKEN} && poetry publish --skip-existing", "pretest": "poetry install", - "generate-ref": "poetry install && ./scripts/generate_sdk_ref.sh", "lint": "poetry run ruff check .", "format": "poetry run ruff format ." } diff --git a/python/poetry.lock b/python/poetry.lock index 734f2a66..b75f949b 100644 --- a/python/poetry.lock +++ b/python/poetry.lock @@ -43,53 +43,6 @@ tests = ["attrs[tests-no-zope]", "zope-interface"] tests-mypy = ["mypy (>=1.6) ; platform_python_implementation == \"CPython\" and python_version >= \"3.8\"", "pytest-mypy-plugins ; platform_python_implementation == \"CPython\" and python_version >= \"3.8\""] tests-no-zope = ["attrs[tests-mypy]", "cloudpickle ; platform_python_implementation == \"CPython\"", "hypothesis", "pympler", "pytest (>=4.3.0)", "pytest-xdist[psutil]"] -[[package]] -name = "black" -version = "23.12.1" -description = "The uncompromising code formatter." -optional = false -python-versions = ">=3.8" -groups = ["dev"] -files = [ - {file = "black-23.12.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e0aaf6041986767a5e0ce663c7a2f0e9eaf21e6ff87a5f95cbf3675bfd4c41d2"}, - {file = "black-23.12.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c88b3711d12905b74206227109272673edce0cb29f27e1385f33b0163c414bba"}, - {file = "black-23.12.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a920b569dc6b3472513ba6ddea21f440d4b4c699494d2e972a1753cdc25df7b0"}, - {file = "black-23.12.1-cp310-cp310-win_amd64.whl", hash = "sha256:3fa4be75ef2a6b96ea8d92b1587dd8cb3a35c7e3d51f0738ced0781c3aa3a5a3"}, - {file = "black-23.12.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:8d4df77958a622f9b5a4c96edb4b8c0034f8434032ab11077ec6c56ae9f384ba"}, - {file = "black-23.12.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:602cfb1196dc692424c70b6507593a2b29aac0547c1be9a1d1365f0d964c353b"}, - {file = "black-23.12.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9c4352800f14be5b4864016882cdba10755bd50805c95f728011bcb47a4afd59"}, - {file = "black-23.12.1-cp311-cp311-win_amd64.whl", hash = "sha256:0808494f2b2df923ffc5723ed3c7b096bd76341f6213989759287611e9837d50"}, - {file = "black-23.12.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:25e57fd232a6d6ff3f4478a6fd0580838e47c93c83eaf1ccc92d4faf27112c4e"}, - {file = "black-23.12.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:2d9e13db441c509a3763a7a3d9a49ccc1b4e974a47be4e08ade2a228876500ec"}, - {file = "black-23.12.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6d1bd9c210f8b109b1762ec9fd36592fdd528485aadb3f5849b2740ef17e674e"}, - {file = "black-23.12.1-cp312-cp312-win_amd64.whl", hash = "sha256:ae76c22bde5cbb6bfd211ec343ded2163bba7883c7bc77f6b756a1049436fbb9"}, - {file = "black-23.12.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1fa88a0f74e50e4487477bc0bb900c6781dbddfdfa32691e780bf854c3b4a47f"}, - {file = "black-23.12.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:a4d6a9668e45ad99d2f8ec70d5c8c04ef4f32f648ef39048d010b0689832ec6d"}, - {file = "black-23.12.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b18fb2ae6c4bb63eebe5be6bd869ba2f14fd0259bda7d18a46b764d8fb86298a"}, - {file = "black-23.12.1-cp38-cp38-win_amd64.whl", hash = "sha256:c04b6d9d20e9c13f43eee8ea87d44156b8505ca8a3c878773f68b4e4812a421e"}, - {file = "black-23.12.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3e1b38b3135fd4c025c28c55ddfc236b05af657828a8a6abe5deec419a0b7055"}, - {file = "black-23.12.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4f0031eaa7b921db76decd73636ef3a12c942ed367d8c3841a0739412b260a54"}, - {file = "black-23.12.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:97e56155c6b737854e60a9ab1c598ff2533d57e7506d97af5481141671abf3ea"}, - {file = "black-23.12.1-cp39-cp39-win_amd64.whl", hash = "sha256:dd15245c8b68fe2b6bd0f32c1556509d11bb33aec9b5d0866dd8e2ed3dba09c2"}, - {file = "black-23.12.1-py3-none-any.whl", hash = "sha256:78baad24af0f033958cad29731e27363183e140962595def56423e626f4bee3e"}, - {file = "black-23.12.1.tar.gz", hash = "sha256:4ce3ef14ebe8d9509188014d96af1c456a910d5b5cbf434a09fef7e024b3d0d5"}, -] - -[package.dependencies] -click = ">=8.0.0" -mypy-extensions = ">=0.4.3" -packaging = ">=22.0" -pathspec = ">=0.9.0" -platformdirs = ">=2" -tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} -typing-extensions = {version = ">=4.0.1", markers = "python_version < \"3.11\""} - -[package.extras] -colorama = ["colorama (>=0.4.3)"] -d = ["aiohttp (>=3.7.4) ; sys_platform != \"win32\" or implementation_name != \"pypy\"", "aiohttp (>=3.7.4,!=3.9.0) ; sys_platform == \"win32\" and implementation_name == \"pypy\""] -jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"] -uvloop = ["uvloop (>=0.15.2)"] - [[package]] name = "bracex" version = "2.6" @@ -114,136 +67,6 @@ files = [ {file = "certifi-2024.7.4.tar.gz", hash = "sha256:5a1e7645bc0ec61a09e26c36f6106dd4cf40c6db3a1fb6352b0244e7fb057c7b"}, ] -[[package]] -name = "charset-normalizer" -version = "3.4.0" -description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." -optional = false -python-versions = ">=3.7.0" -groups = ["dev"] -files = [ - {file = "charset_normalizer-3.4.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:4f9fc98dad6c2eaa32fc3af1417d95b5e3d08aff968df0cd320066def971f9a6"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0de7b687289d3c1b3e8660d0741874abe7888100efe14bd0f9fd7141bcbda92b"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:5ed2e36c3e9b4f21dd9422f6893dec0abf2cca553af509b10cd630f878d3eb99"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:40d3ff7fc90b98c637bda91c89d51264a3dcf210cade3a2c6f838c7268d7a4ca"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1110e22af8ca26b90bd6364fe4c763329b0ebf1ee213ba32b68c73de5752323d"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:86f4e8cca779080f66ff4f191a685ced73d2f72d50216f7112185dc02b90b9b7"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7f683ddc7eedd742e2889d2bfb96d69573fde1d92fcb811979cdb7165bb9c7d3"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:27623ba66c183eca01bf9ff833875b459cad267aeeb044477fedac35e19ba907"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:f606a1881d2663630ea5b8ce2efe2111740df4b687bd78b34a8131baa007f79b"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:0b309d1747110feb25d7ed6b01afdec269c647d382c857ef4663bbe6ad95a912"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:136815f06a3ae311fae551c3df1f998a1ebd01ddd424aa5603a4336997629e95"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:14215b71a762336254351b00ec720a8e85cada43b987da5a042e4ce3e82bd68e"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:79983512b108e4a164b9c8d34de3992f76d48cadc9554c9e60b43f308988aabe"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-win32.whl", hash = "sha256:c94057af19bc953643a33581844649a7fdab902624d2eb739738a30e2b3e60fc"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-win_amd64.whl", hash = "sha256:55f56e2ebd4e3bc50442fbc0888c9d8c94e4e06a933804e2af3e89e2f9c1c749"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:0d99dd8ff461990f12d6e42c7347fd9ab2532fb70e9621ba520f9e8637161d7c"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c57516e58fd17d03ebe67e181a4e4e2ccab1168f8c2976c6a334d4f819fe5944"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:6dba5d19c4dfab08e58d5b36304b3f92f3bd5d42c1a3fa37b5ba5cdf6dfcbcee"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bf4475b82be41b07cc5e5ff94810e6a01f276e37c2d55571e3fe175e467a1a1c"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ce031db0408e487fd2775d745ce30a7cd2923667cf3b69d48d219f1d8f5ddeb6"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8ff4e7cdfdb1ab5698e675ca622e72d58a6fa2a8aa58195de0c0061288e6e3ea"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3710a9751938947e6327ea9f3ea6332a09bf0ba0c09cae9cb1f250bd1f1549bc"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:82357d85de703176b5587dbe6ade8ff67f9f69a41c0733cf2425378b49954de5"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:47334db71978b23ebcf3c0f9f5ee98b8d65992b65c9c4f2d34c2eaf5bcaf0594"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:8ce7fd6767a1cc5a92a639b391891bf1c268b03ec7e021c7d6d902285259685c"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:f1a2f519ae173b5b6a2c9d5fa3116ce16e48b3462c8b96dfdded11055e3d6365"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:63bc5c4ae26e4bc6be6469943b8253c0fd4e4186c43ad46e713ea61a0ba49129"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:bcb4f8ea87d03bc51ad04add8ceaf9b0f085ac045ab4d74e73bbc2dc033f0236"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-win32.whl", hash = "sha256:9ae4ef0b3f6b41bad6366fb0ea4fc1d7ed051528e113a60fa2a65a9abb5b1d99"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-win_amd64.whl", hash = "sha256:cee4373f4d3ad28f1ab6290684d8e2ebdb9e7a1b74fdc39e4c211995f77bec27"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:0713f3adb9d03d49d365b70b84775d0a0d18e4ab08d12bc46baa6132ba78aaf6"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:de7376c29d95d6719048c194a9cf1a1b0393fbe8488a22008610b0361d834ecf"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:4a51b48f42d9358460b78725283f04bddaf44a9358197b889657deba38f329db"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b295729485b06c1a0683af02a9e42d2caa9db04a373dc38a6a58cdd1e8abddf1"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ee803480535c44e7f5ad00788526da7d85525cfefaf8acf8ab9a310000be4b03"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3d59d125ffbd6d552765510e3f31ed75ebac2c7470c7274195b9161a32350284"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8cda06946eac330cbe6598f77bb54e690b4ca93f593dee1568ad22b04f347c15"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:07afec21bbbbf8a5cc3651aa96b980afe2526e7f048fdfb7f1014d84acc8b6d8"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:6b40e8d38afe634559e398cc32b1472f376a4099c75fe6299ae607e404c033b2"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:b8dcd239c743aa2f9c22ce674a145e0a25cb1566c495928440a181ca1ccf6719"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:84450ba661fb96e9fd67629b93d2941c871ca86fc38d835d19d4225ff946a631"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:44aeb140295a2f0659e113b31cfe92c9061622cadbc9e2a2f7b8ef6b1e29ef4b"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:1db4e7fefefd0f548d73e2e2e041f9df5c59e178b4c72fbac4cc6f535cfb1565"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-win32.whl", hash = "sha256:5726cf76c982532c1863fb64d8c6dd0e4c90b6ece9feb06c9f202417a31f7dd7"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-win_amd64.whl", hash = "sha256:b197e7094f232959f8f20541ead1d9862ac5ebea1d58e9849c1bf979255dfac9"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:dd4eda173a9fcccb5f2e2bd2a9f423d180194b1bf17cf59e3269899235b2a114"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:e9e3c4c9e1ed40ea53acf11e2a386383c3304212c965773704e4603d589343ed"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:92a7e36b000bf022ef3dbb9c46bfe2d52c047d5e3f3343f43204263c5addc250"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:54b6a92d009cbe2fb11054ba694bc9e284dad30a26757b1e372a1fdddaf21920"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1ffd9493de4c922f2a38c2bf62b831dcec90ac673ed1ca182fe11b4d8e9f2a64"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:35c404d74c2926d0287fbd63ed5d27eb911eb9e4a3bb2c6d294f3cfd4a9e0c23"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4796efc4faf6b53a18e3d46343535caed491776a22af773f366534056c4e1fbc"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e7fdd52961feb4c96507aa649550ec2a0d527c086d284749b2f582f2d40a2e0d"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:92db3c28b5b2a273346bebb24857fda45601aef6ae1c011c0a997106581e8a88"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:ab973df98fc99ab39080bfb0eb3a925181454d7c3ac8a1e695fddfae696d9e90"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:4b67fdab07fdd3c10bb21edab3cbfe8cf5696f453afce75d815d9d7223fbe88b"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:aa41e526a5d4a9dfcfbab0716c7e8a1b215abd3f3df5a45cf18a12721d31cb5d"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:ffc519621dce0c767e96b9c53f09c5d215578e10b02c285809f76509a3931482"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-win32.whl", hash = "sha256:f19c1585933c82098c2a520f8ec1227f20e339e33aca8fa6f956f6691b784e67"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-win_amd64.whl", hash = "sha256:707b82d19e65c9bd28b81dde95249b07bf9f5b90ebe1ef17d9b57473f8a64b7b"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:dbe03226baf438ac4fda9e2d0715022fd579cb641c4cf639fa40d53b2fe6f3e2"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dd9a8bd8900e65504a305bf8ae6fa9fbc66de94178c420791d0293702fce2df7"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b8831399554b92b72af5932cdbbd4ddc55c55f631bb13ff8fe4e6536a06c5c51"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a14969b8691f7998e74663b77b4c36c0337cb1df552da83d5c9004a93afdb574"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dcaf7c1524c0542ee2fc82cc8ec337f7a9f7edee2532421ab200d2b920fc97cf"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:425c5f215d0eecee9a56cdb703203dda90423247421bf0d67125add85d0c4455"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_aarch64.whl", hash = "sha256:d5b054862739d276e09928de37c79ddeec42a6e1bfc55863be96a36ba22926f6"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_i686.whl", hash = "sha256:f3e73a4255342d4eb26ef6df01e3962e73aa29baa3124a8e824c5d3364a65748"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_ppc64le.whl", hash = "sha256:2f6c34da58ea9c1a9515621f4d9ac379871a8f21168ba1b5e09d74250de5ad62"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_s390x.whl", hash = "sha256:f09cb5a7bbe1ecae6e87901a2eb23e0256bb524a79ccc53eb0b7629fbe7677c4"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:0099d79bdfcf5c1f0c2c72f91516702ebf8b0b8ddd8905f97a8aecf49712c621"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-win32.whl", hash = "sha256:9c98230f5042f4945f957d006edccc2af1e03ed5e37ce7c373f00a5a4daa6149"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-win_amd64.whl", hash = "sha256:62f60aebecfc7f4b82e3f639a7d1433a20ec32824db2199a11ad4f5e146ef5ee"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:af73657b7a68211996527dbfeffbb0864e043d270580c5aef06dc4b659a4b578"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:cab5d0b79d987c67f3b9e9c53f54a61360422a5a0bc075f43cab5621d530c3b6"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:9289fd5dddcf57bab41d044f1756550f9e7cf0c8e373b8cdf0ce8773dc4bd417"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6b493a043635eb376e50eedf7818f2f322eabbaa974e948bd8bdd29eb7ef2a51"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9fa2566ca27d67c86569e8c85297aaf413ffab85a8960500f12ea34ff98e4c41"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a8e538f46104c815be19c975572d74afb53f29650ea2025bbfaef359d2de2f7f"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6fd30dc99682dc2c603c2b315bded2799019cea829f8bf57dc6b61efde6611c8"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2006769bd1640bdf4d5641c69a3d63b71b81445473cac5ded39740a226fa88ab"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:dc15e99b2d8a656f8e666854404f1ba54765871104e50c8e9813af8a7db07f12"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:ab2e5bef076f5a235c3774b4f4028a680432cded7cad37bba0fd90d64b187d19"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:4ec9dd88a5b71abfc74e9df5ebe7921c35cbb3b641181a531ca65cdb5e8e4dea"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:43193c5cda5d612f247172016c4bb71251c784d7a4d9314677186a838ad34858"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:aa693779a8b50cd97570e5a0f343538a8dbd3e496fa5dcb87e29406ad0299654"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-win32.whl", hash = "sha256:7706f5850360ac01d80c89bcef1640683cc12ed87f42579dab6c5d3ed6888613"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-win_amd64.whl", hash = "sha256:c3e446d253bd88f6377260d07c895816ebf33ffffd56c1c792b13bff9c3e1ade"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:980b4f289d1d90ca5efcf07958d3eb38ed9c0b7676bf2831a54d4f66f9c27dfa"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:f28f891ccd15c514a0981f3b9db9aa23d62fe1a99997512b0491d2ed323d229a"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a8aacce6e2e1edcb6ac625fb0f8c3a9570ccc7bfba1f63419b3769ccf6a00ed0"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bd7af3717683bea4c87acd8c0d3d5b44d56120b26fd3f8a692bdd2d5260c620a"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5ff2ed8194587faf56555927b3aa10e6fb69d931e33953943bc4f837dfee2242"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e91f541a85298cf35433bf66f3fab2a4a2cff05c127eeca4af174f6d497f0d4b"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:309a7de0a0ff3040acaebb35ec45d18db4b28232f21998851cfa709eeff49d62"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:285e96d9d53422efc0d7a17c60e59f37fbf3dfa942073f666db4ac71e8d726d0"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:5d447056e2ca60382d460a604b6302d8db69476fd2015c81e7c35417cfabe4cd"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:20587d20f557fe189b7947d8e7ec5afa110ccf72a3128d61a2a387c3313f46be"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:130272c698667a982a5d0e626851ceff662565379baf0ff2cc58067b81d4f11d"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:ab22fbd9765e6954bc0bcff24c25ff71dcbfdb185fcdaca49e81bac68fe724d3"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:7782afc9b6b42200f7362858f9e73b1f8316afb276d316336c0ec3bd73312742"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-win32.whl", hash = "sha256:2de62e8801ddfff069cd5c504ce3bc9672b23266597d4e4f50eda28846c322f2"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-win_amd64.whl", hash = "sha256:95c3c157765b031331dd4db3c775e58deaee050a3042fcad72cbc4189d7c8dca"}, - {file = "charset_normalizer-3.4.0-py3-none-any.whl", hash = "sha256:fe9f97feb71aa9896b81973a7bbada8c49501dc73e58a10fcef6663af95e5079"}, - {file = "charset_normalizer-3.4.0.tar.gz", hash = "sha256:223217c3d4f82c3ac5e29032b3f1c2eb0fb591b72161f86d93f5719079dae93e"}, -] - -[[package]] -name = "click" -version = "8.1.7" -description = "Composable command line interface toolkit" -optional = false -python-versions = ">=3.7" -groups = ["dev"] -files = [ - {file = "click-8.1.7-py3-none-any.whl", hash = "sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28"}, - {file = "click-8.1.7.tar.gz", hash = "sha256:ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de"}, -] - -[package.dependencies] -colorama = {version = "*", markers = "platform_system == \"Windows\""} - [[package]] name = "colorama" version = "0.4.6" @@ -358,74 +181,6 @@ files = [ docs = ["ipython", "matplotlib", "numpydoc", "sphinx"] tests = ["pytest", "pytest-cov", "pytest-xdist"] -[[package]] -name = "databind" -version = "4.5.2" -description = "Databind is a library inspired by jackson-databind to de-/serialize Python dataclasses. The `databind` package will install the full suite of databind packages. Compatible with Python 3.8 and newer." -optional = false -python-versions = "<4.0.0,>=3.8.0" -groups = ["dev"] -files = [ - {file = "databind-4.5.2-py3-none-any.whl", hash = "sha256:b9c3a03c0414aa4567f095d7218ac904bd2b267b58e3763dac28e83d64b69770"}, - {file = "databind-4.5.2.tar.gz", hash = "sha256:0a8aa0ff130a0306581c559388f5ef65e0fae7ef4b86412eacb1f4a0420006c4"}, -] - -[package.dependencies] -Deprecated = ">=1.2.12,<2.0.0" -nr-date = ">=2.0.0,<3.0.0" -nr-stream = ">=1.0.0,<2.0.0" -setuptools = {version = ">=40.8.0", markers = "python_version < \"3.10\""} -typeapi = ">=2.0.1,<3" -typing-extensions = ">=3.10.0,<5" - -[[package]] -name = "databind-core" -version = "4.5.2" -description = "Databind is a library inspired by jackson-databind to de-/serialize Python dataclasses. Compatible with Python 3.8 and newer. Deprecated, use `databind` package." -optional = false -python-versions = "<4.0.0,>=3.8.0" -groups = ["dev"] -files = [ - {file = "databind.core-4.5.2-py3-none-any.whl", hash = "sha256:a1dd1c6bd8ca9907d1292d8df9ec763ce91543e27f7eda4268e4a1a84fcd1c42"}, - {file = "databind.core-4.5.2.tar.gz", hash = "sha256:b8ac8127bc5d6b239a2a81aeddb268b0c4cadd53fbce7e8b2c7a9ef6413bccb3"}, -] - -[package.dependencies] -databind = ">=4.5.2,<5.0.0" - -[[package]] -name = "databind-json" -version = "4.5.2" -description = "De-/serialize Python dataclasses to or from JSON payloads. Compatible with Python 3.8 and newer. Deprecated, use `databind` module instead." -optional = false -python-versions = "<4.0.0,>=3.8.0" -groups = ["dev"] -files = [ - {file = "databind.json-4.5.2-py3-none-any.whl", hash = "sha256:a803bf440634685984361cb2a5a975887e487c854ed48d81ff7aaf3a1ed1e94c"}, - {file = "databind.json-4.5.2.tar.gz", hash = "sha256:6cc9b5c6fddaebd49b2433932948eb3be8a41633b90aa37998d7922504b8f165"}, -] - -[package.dependencies] -databind = ">=4.5.2,<5.0.0" - -[[package]] -name = "deprecated" -version = "1.2.15" -description = "Python @deprecated decorator to deprecate old python classes, functions or methods." -optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,>=2.7" -groups = ["dev"] -files = [ - {file = "Deprecated-1.2.15-py2.py3-none-any.whl", hash = "sha256:353bc4a8ac4bfc96800ddab349d89c25dec1079f65fd53acdcc1e0b975b21320"}, - {file = "deprecated-1.2.15.tar.gz", hash = "sha256:683e561a90de76239796e6b6feac66b99030d2dd3fcf61ef996330f14bbb9b0d"}, -] - -[package.dependencies] -wrapt = ">=1.10,<2" - -[package.extras] -dev = ["PyTest", "PyTest-Cov", "bump2version (<1)", "jinja2 (>=3.0.3,<3.1.0)", "setuptools ; python_version >= \"3.12\"", "sphinx (<2)", "tox"] - [[package]] name = "dockerfile-parse" version = "2.0.1" @@ -438,54 +193,6 @@ files = [ {file = "dockerfile_parse-2.0.1-py2.py3-none-any.whl", hash = "sha256:bdffd126d2eb26acf1066acb54cb2e336682e1d72b974a40894fac76a4df17f6"}, ] -[[package]] -name = "docspec" -version = "2.2.1" -description = "Docspec is a JSON object specification for representing API documentation of programming languages." -optional = false -python-versions = ">=3.7,<4.0" -groups = ["dev"] -files = [ - {file = "docspec-2.2.1-py3-none-any.whl", hash = "sha256:7538f750095a9688c6980ff9a4e029a823a500f64bd00b6b4bdb27951feb31cb"}, - {file = "docspec-2.2.1.tar.gz", hash = "sha256:4854e77edc0e2de40e785e57e95880f7095a05fe978f8b54cef7a269586e15ff"}, -] - -[package.dependencies] -"databind.core" = ">=4.2.6,<5.0.0" -"databind.json" = ">=4.2.6,<5.0.0" -Deprecated = ">=1.2.12,<2.0.0" - -[[package]] -name = "docspec-python" -version = "2.2.1" -description = "A parser based on lib2to3 producing docspec data from Python source code." -optional = false -python-versions = ">=3.7,<4.0" -groups = ["dev"] -files = [ - {file = "docspec_python-2.2.1-py3-none-any.whl", hash = "sha256:76ac41d35a8face35b2d766c2e8a416fb8832359785d396f0d53bcb00f178e54"}, - {file = "docspec_python-2.2.1.tar.gz", hash = "sha256:c41b850b4d6f4de30999ea6f82c9cdb9183d9bcba45559ee9173d3dab7281559"}, -] - -[package.dependencies] -black = ">=23.1.0,<24.0.0" -docspec = ">=2.2.1,<3.0.0" -"nr.util" = ">=0.7.0" - -[[package]] -name = "docstring-parser" -version = "0.11" -description = "\"Parse Python docstrings in reST, Google and Numpydoc format\"" -optional = false -python-versions = ">=3.6" -groups = ["dev"] -files = [ - {file = "docstring_parser-0.11.tar.gz", hash = "sha256:93b3f8f481c7d24e37c5d9f30293c89e2933fa209421c8abd731dd3ef0715ecb"}, -] - -[package.extras] -test = ["black", "pytest"] - [[package]] name = "e2b" version = "2.10.2" @@ -729,24 +436,6 @@ files = [ {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, ] -[[package]] -name = "jinja2" -version = "3.1.6" -description = "A very fast and expressive template engine." -optional = false -python-versions = ">=3.7" -groups = ["dev"] -files = [ - {file = "jinja2-3.1.6-py3-none-any.whl", hash = "sha256:85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67"}, - {file = "jinja2-3.1.6.tar.gz", hash = "sha256:0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d"}, -] - -[package.dependencies] -MarkupSafe = ">=2.0" - -[package.extras] -i18n = ["Babel (>=2.7)"] - [[package]] name = "kiwisolver" version = "1.4.7" @@ -896,76 +585,6 @@ profiling = ["gprof2dot"] rtd = ["jupyter_sphinx", "mdit-py-plugins", "myst-parser", "pyyaml", "sphinx", "sphinx-copybutton", "sphinx-design", "sphinx_book_theme"] testing = ["coverage", "pytest", "pytest-cov", "pytest-regressions"] -[[package]] -name = "markupsafe" -version = "2.1.5" -description = "Safely add untrusted strings to HTML/XML markup." -optional = false -python-versions = ">=3.7" -groups = ["dev"] -files = [ - {file = "MarkupSafe-2.1.5-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:a17a92de5231666cfbe003f0e4b9b3a7ae3afb1ec2845aadc2bacc93ff85febc"}, - {file = "MarkupSafe-2.1.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:72b6be590cc35924b02c78ef34b467da4ba07e4e0f0454a2c5907f473fc50ce5"}, - {file = "MarkupSafe-2.1.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e61659ba32cf2cf1481e575d0462554625196a1f2fc06a1c777d3f48e8865d46"}, - {file = "MarkupSafe-2.1.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2174c595a0d73a3080ca3257b40096db99799265e1c27cc5a610743acd86d62f"}, - {file = "MarkupSafe-2.1.5-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ae2ad8ae6ebee9d2d94b17fb62763125f3f374c25618198f40cbb8b525411900"}, - {file = "MarkupSafe-2.1.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:075202fa5b72c86ad32dc7d0b56024ebdbcf2048c0ba09f1cde31bfdd57bcfff"}, - {file = "MarkupSafe-2.1.5-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:598e3276b64aff0e7b3451b72e94fa3c238d452e7ddcd893c3ab324717456bad"}, - {file = "MarkupSafe-2.1.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:fce659a462a1be54d2ffcacea5e3ba2d74daa74f30f5f143fe0c58636e355fdd"}, - {file = "MarkupSafe-2.1.5-cp310-cp310-win32.whl", hash = "sha256:d9fad5155d72433c921b782e58892377c44bd6252b5af2f67f16b194987338a4"}, - {file = "MarkupSafe-2.1.5-cp310-cp310-win_amd64.whl", hash = "sha256:bf50cd79a75d181c9181df03572cdce0fbb75cc353bc350712073108cba98de5"}, - {file = "MarkupSafe-2.1.5-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:629ddd2ca402ae6dbedfceeba9c46d5f7b2a61d9749597d4307f943ef198fc1f"}, - {file = "MarkupSafe-2.1.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:5b7b716f97b52c5a14bffdf688f971b2d5ef4029127f1ad7a513973cfd818df2"}, - {file = "MarkupSafe-2.1.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6ec585f69cec0aa07d945b20805be741395e28ac1627333b1c5b0105962ffced"}, - {file = "MarkupSafe-2.1.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b91c037585eba9095565a3556f611e3cbfaa42ca1e865f7b8015fe5c7336d5a5"}, - {file = "MarkupSafe-2.1.5-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7502934a33b54030eaf1194c21c692a534196063db72176b0c4028e140f8f32c"}, - {file = "MarkupSafe-2.1.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:0e397ac966fdf721b2c528cf028494e86172b4feba51d65f81ffd65c63798f3f"}, - {file = "MarkupSafe-2.1.5-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:c061bb86a71b42465156a3ee7bd58c8c2ceacdbeb95d05a99893e08b8467359a"}, - {file = "MarkupSafe-2.1.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:3a57fdd7ce31c7ff06cdfbf31dafa96cc533c21e443d57f5b1ecc6cdc668ec7f"}, - {file = "MarkupSafe-2.1.5-cp311-cp311-win32.whl", hash = "sha256:397081c1a0bfb5124355710fe79478cdbeb39626492b15d399526ae53422b906"}, - {file = "MarkupSafe-2.1.5-cp311-cp311-win_amd64.whl", hash = "sha256:2b7c57a4dfc4f16f7142221afe5ba4e093e09e728ca65c51f5620c9aaeb9a617"}, - {file = "MarkupSafe-2.1.5-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:8dec4936e9c3100156f8a2dc89c4b88d5c435175ff03413b443469c7c8c5f4d1"}, - {file = "MarkupSafe-2.1.5-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:3c6b973f22eb18a789b1460b4b91bf04ae3f0c4234a0a6aa6b0a92f6f7b951d4"}, - {file = "MarkupSafe-2.1.5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ac07bad82163452a6884fe8fa0963fb98c2346ba78d779ec06bd7a6262132aee"}, - {file = "MarkupSafe-2.1.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f5dfb42c4604dddc8e4305050aa6deb084540643ed5804d7455b5df8fe16f5e5"}, - {file = "MarkupSafe-2.1.5-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ea3d8a3d18833cf4304cd2fc9cbb1efe188ca9b5efef2bdac7adc20594a0e46b"}, - {file = "MarkupSafe-2.1.5-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:d050b3361367a06d752db6ead6e7edeb0009be66bc3bae0ee9d97fb326badc2a"}, - {file = "MarkupSafe-2.1.5-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:bec0a414d016ac1a18862a519e54b2fd0fc8bbfd6890376898a6c0891dd82e9f"}, - {file = "MarkupSafe-2.1.5-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:58c98fee265677f63a4385256a6d7683ab1832f3ddd1e66fe948d5880c21a169"}, - {file = "MarkupSafe-2.1.5-cp312-cp312-win32.whl", hash = "sha256:8590b4ae07a35970728874632fed7bd57b26b0102df2d2b233b6d9d82f6c62ad"}, - {file = "MarkupSafe-2.1.5-cp312-cp312-win_amd64.whl", hash = "sha256:823b65d8706e32ad2df51ed89496147a42a2a6e01c13cfb6ffb8b1e92bc910bb"}, - {file = "MarkupSafe-2.1.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:c8b29db45f8fe46ad280a7294f5c3ec36dbac9491f2d1c17345be8e69cc5928f"}, - {file = "MarkupSafe-2.1.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ec6a563cff360b50eed26f13adc43e61bc0c04d94b8be985e6fb24b81f6dcfdf"}, - {file = "MarkupSafe-2.1.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a549b9c31bec33820e885335b451286e2969a2d9e24879f83fe904a5ce59d70a"}, - {file = "MarkupSafe-2.1.5-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4f11aa001c540f62c6166c7726f71f7573b52c68c31f014c25cc7901deea0b52"}, - {file = "MarkupSafe-2.1.5-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:7b2e5a267c855eea6b4283940daa6e88a285f5f2a67f2220203786dfa59b37e9"}, - {file = "MarkupSafe-2.1.5-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:2d2d793e36e230fd32babe143b04cec8a8b3eb8a3122d2aceb4a371e6b09b8df"}, - {file = "MarkupSafe-2.1.5-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:ce409136744f6521e39fd8e2a24c53fa18ad67aa5bc7c2cf83645cce5b5c4e50"}, - {file = "MarkupSafe-2.1.5-cp37-cp37m-win32.whl", hash = "sha256:4096e9de5c6fdf43fb4f04c26fb114f61ef0bf2e5604b6ee3019d51b69e8c371"}, - {file = "MarkupSafe-2.1.5-cp37-cp37m-win_amd64.whl", hash = "sha256:4275d846e41ecefa46e2015117a9f491e57a71ddd59bbead77e904dc02b1bed2"}, - {file = "MarkupSafe-2.1.5-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:656f7526c69fac7f600bd1f400991cc282b417d17539a1b228617081106feb4a"}, - {file = "MarkupSafe-2.1.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:97cafb1f3cbcd3fd2b6fbfb99ae11cdb14deea0736fc2b0952ee177f2b813a46"}, - {file = "MarkupSafe-2.1.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1f3fbcb7ef1f16e48246f704ab79d79da8a46891e2da03f8783a5b6fa41a9532"}, - {file = "MarkupSafe-2.1.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fa9db3f79de01457b03d4f01b34cf91bc0048eb2c3846ff26f66687c2f6d16ab"}, - {file = "MarkupSafe-2.1.5-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ffee1f21e5ef0d712f9033568f8344d5da8cc2869dbd08d87c84656e6a2d2f68"}, - {file = "MarkupSafe-2.1.5-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:5dedb4db619ba5a2787a94d877bc8ffc0566f92a01c0ef214865e54ecc9ee5e0"}, - {file = "MarkupSafe-2.1.5-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:30b600cf0a7ac9234b2638fbc0fb6158ba5bdcdf46aeb631ead21248b9affbc4"}, - {file = "MarkupSafe-2.1.5-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:8dd717634f5a044f860435c1d8c16a270ddf0ef8588d4887037c5028b859b0c3"}, - {file = "MarkupSafe-2.1.5-cp38-cp38-win32.whl", hash = "sha256:daa4ee5a243f0f20d528d939d06670a298dd39b1ad5f8a72a4275124a7819eff"}, - {file = "MarkupSafe-2.1.5-cp38-cp38-win_amd64.whl", hash = "sha256:619bc166c4f2de5caa5a633b8b7326fbe98e0ccbfacabd87268a2b15ff73a029"}, - {file = "MarkupSafe-2.1.5-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:7a68b554d356a91cce1236aa7682dc01df0edba8d043fd1ce607c49dd3c1edcf"}, - {file = "MarkupSafe-2.1.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:db0b55e0f3cc0be60c1f19efdde9a637c32740486004f20d1cff53c3c0ece4d2"}, - {file = "MarkupSafe-2.1.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3e53af139f8579a6d5f7b76549125f0d94d7e630761a2111bc431fd820e163b8"}, - {file = "MarkupSafe-2.1.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:17b950fccb810b3293638215058e432159d2b71005c74371d784862b7e4683f3"}, - {file = "MarkupSafe-2.1.5-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4c31f53cdae6ecfa91a77820e8b151dba54ab528ba65dfd235c80b086d68a465"}, - {file = "MarkupSafe-2.1.5-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:bff1b4290a66b490a2f4719358c0cdcd9bafb6b8f061e45c7a2460866bf50c2e"}, - {file = "MarkupSafe-2.1.5-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:bc1667f8b83f48511b94671e0e441401371dfd0f0a795c7daa4a3cd1dde55bea"}, - {file = "MarkupSafe-2.1.5-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5049256f536511ee3f7e1b3f87d1d1209d327e818e6ae1365e8653d7e3abb6a6"}, - {file = "MarkupSafe-2.1.5-cp39-cp39-win32.whl", hash = "sha256:00e046b6dd71aa03a41079792f8473dc494d564611a8f89bbbd7cb93295ebdcf"}, - {file = "MarkupSafe-2.1.5-cp39-cp39-win_amd64.whl", hash = "sha256:fa173ec60341d6bb97a89f5ea19c85c5643c1e7dedebc22f5181eb73573142c5"}, - {file = "MarkupSafe-2.1.5.tar.gz", hash = "sha256:d283d37a890ba4c1ae73ffadf8046435c76e7bc2247bbb63c00bd1a709c6544b"}, -] - [[package]] name = "matplotlib" version = "3.9.4" @@ -1044,58 +663,6 @@ files = [ {file = "mdurl-0.1.2.tar.gz", hash = "sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba"}, ] -[[package]] -name = "mypy-extensions" -version = "1.0.0" -description = "Type system extensions for programs checked with the mypy type checker." -optional = false -python-versions = ">=3.5" -groups = ["dev"] -files = [ - {file = "mypy_extensions-1.0.0-py3-none-any.whl", hash = "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d"}, - {file = "mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782"}, -] - -[[package]] -name = "nr-date" -version = "2.1.0" -description = "" -optional = false -python-versions = ">=3.6,<4.0" -groups = ["dev"] -files = [ - {file = "nr_date-2.1.0-py3-none-any.whl", hash = "sha256:bd672a9dfbdcf7c4b9289fea6750c42490eaee08036a72059dcc78cb236ed568"}, - {file = "nr_date-2.1.0.tar.gz", hash = "sha256:0643aea13bcdc2a8bc56af9d5e6a89ef244c9744a1ef00cdc735902ba7f7d2e6"}, -] - -[[package]] -name = "nr-stream" -version = "1.1.5" -description = "" -optional = false -python-versions = ">=3.6,<4.0" -groups = ["dev"] -files = [ - {file = "nr_stream-1.1.5-py3-none-any.whl", hash = "sha256:47e12150b331ad2cb729cfd9d2abd281c9949809729ba461c6aa87dd9927b2d4"}, - {file = "nr_stream-1.1.5.tar.gz", hash = "sha256:eb0216c6bfc61a46d4568dba3b588502c610ec8ddef4ac98f3932a2bd7264f65"}, -] - -[[package]] -name = "nr-util" -version = "0.8.12" -description = "General purpose Python utility library." -optional = false -python-versions = ">=3.7,<4.0" -groups = ["dev"] -files = [ - {file = "nr.util-0.8.12-py3-none-any.whl", hash = "sha256:91da02ac9795eb8e015372275c1efe54bac9051231ee9b0e7e6f96b0b4e7d2bb"}, - {file = "nr.util-0.8.12.tar.gz", hash = "sha256:a4549c2033d99d2f0379b3f3d233fd2a8ade286bbf0b3ad0cc7cea16022214f4"}, -] - -[package.dependencies] -deprecated = ">=1.2.0,<2.0.0" -typing-extensions = ">=3.0.0" - [[package]] name = "numpy" version = "2.0.2" @@ -1163,18 +730,6 @@ files = [ {file = "packaging-24.1.tar.gz", hash = "sha256:026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002"}, ] -[[package]] -name = "pathspec" -version = "0.12.1" -description = "Utility library for gitignore style pattern matching of file paths." -optional = false -python-versions = ">=3.8" -groups = ["dev"] -files = [ - {file = "pathspec-0.12.1-py3-none-any.whl", hash = "sha256:a0d503e138a4c123b27490a4f7beda6a01c6f288df0e4a8b79c7eb0dc7b4cc08"}, - {file = "pathspec-0.12.1.tar.gz", hash = "sha256:a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712"}, -] - [[package]] name = "pillow" version = "11.3.0" @@ -1300,23 +855,6 @@ tests = ["check-manifest", "coverage (>=7.4.2)", "defusedxml", "markdown2", "ole typing = ["typing-extensions ; python_version < \"3.10\""] xmp = ["defusedxml"] -[[package]] -name = "platformdirs" -version = "4.3.6" -description = "A small Python package for determining appropriate platform-specific dirs, e.g. a `user data dir`." -optional = false -python-versions = ">=3.8" -groups = ["dev"] -files = [ - {file = "platformdirs-4.3.6-py3-none-any.whl", hash = "sha256:73e575e1408ab8103900836b97580d5307456908a03e92031bab39e4554cc3fb"}, - {file = "platformdirs-4.3.6.tar.gz", hash = "sha256:357fb2acbc885b0419afd3ce3ed34564c13c9b95c89360cd9563f73aa5e2b907"}, -] - -[package.extras] -docs = ["furo (>=2024.8.6)", "proselint (>=0.14)", "sphinx (>=8.0.2)", "sphinx-autodoc-typehints (>=2.4)"] -test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=8.3.2)", "pytest-cov (>=5)", "pytest-mock (>=3.14)"] -type = ["mypy (>=1.11.2)"] - [[package]] name = "pluggy" version = "1.5.0" @@ -1353,34 +891,6 @@ files = [ {file = "protobuf-6.33.5.tar.gz", hash = "sha256:6ddcac2a081f8b7b9642c09406bc6a4290128fce5f471cddd165960bb9119e5c"}, ] -[[package]] -name = "pydoc-markdown" -version = "4.8.2" -description = "Create Python API documentation in Markdown format." -optional = false -python-versions = ">=3.7,<4.0" -groups = ["dev"] -files = [ - {file = "pydoc_markdown-4.8.2-py3-none-any.whl", hash = "sha256:203f74119e6bb2f9deba43d452422de7c8ec31955b61e0620fa4dd8c2611715f"}, - {file = "pydoc_markdown-4.8.2.tar.gz", hash = "sha256:fb6c927e31386de17472d42f9bd3d3be2905977d026f6216881c65145aa67f0b"}, -] - -[package.dependencies] -click = ">=7.1,<9.0" -"databind.core" = ">=4.4.0,<5.0.0" -"databind.json" = ">=4.4.0,<5.0.0" -docspec = ">=2.2.1,<3.0.0" -docspec-python = ">=2.2.1,<3.0.0" -docstring-parser = ">=0.11,<0.12" -jinja2 = ">=3.0.0,<4.0.0" -"nr.util" = ">=0.7.5,<1.0.0" -PyYAML = ">=5.0,<7.0" -requests = ">=2.23.0,<3.0.0" -tomli = ">=2.0.0,<3.0.0" -tomli_w = ">=1.0.0,<2.0.0" -watchdog = "*" -yapf = ">=0.30.0" - [[package]] name = "pygments" version = "2.19.2" @@ -1521,91 +1031,6 @@ files = [ [package.extras] cli = ["click (>=5.0)"] -[[package]] -name = "pyyaml" -version = "6.0.2" -description = "YAML parser and emitter for Python" -optional = false -python-versions = ">=3.8" -groups = ["dev"] -files = [ - {file = "PyYAML-6.0.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0a9a2848a5b7feac301353437eb7d5957887edbf81d56e903999a75a3d743086"}, - {file = "PyYAML-6.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:29717114e51c84ddfba879543fb232a6ed60086602313ca38cce623c1d62cfbf"}, - {file = "PyYAML-6.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8824b5a04a04a047e72eea5cec3bc266db09e35de6bdfe34c9436ac5ee27d237"}, - {file = "PyYAML-6.0.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7c36280e6fb8385e520936c3cb3b8042851904eba0e58d277dca80a5cfed590b"}, - {file = "PyYAML-6.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ec031d5d2feb36d1d1a24380e4db6d43695f3748343d99434e6f5f9156aaa2ed"}, - {file = "PyYAML-6.0.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:936d68689298c36b53b29f23c6dbb74de12b4ac12ca6cfe0e047bedceea56180"}, - {file = "PyYAML-6.0.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:23502f431948090f597378482b4812b0caae32c22213aecf3b55325e049a6c68"}, - {file = "PyYAML-6.0.2-cp310-cp310-win32.whl", hash = "sha256:2e99c6826ffa974fe6e27cdb5ed0021786b03fc98e5ee3c5bfe1fd5015f42b99"}, - {file = "PyYAML-6.0.2-cp310-cp310-win_amd64.whl", hash = "sha256:a4d3091415f010369ae4ed1fc6b79def9416358877534caf6a0fdd2146c87a3e"}, - {file = "PyYAML-6.0.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:cc1c1159b3d456576af7a3e4d1ba7e6924cb39de8f67111c735f6fc832082774"}, - {file = "PyYAML-6.0.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1e2120ef853f59c7419231f3bf4e7021f1b936f6ebd222406c3b60212205d2ee"}, - {file = "PyYAML-6.0.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5d225db5a45f21e78dd9358e58a98702a0302f2659a3c6cd320564b75b86f47c"}, - {file = "PyYAML-6.0.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5ac9328ec4831237bec75defaf839f7d4564be1e6b25ac710bd1a96321cc8317"}, - {file = "PyYAML-6.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3ad2a3decf9aaba3d29c8f537ac4b243e36bef957511b4766cb0057d32b0be85"}, - {file = "PyYAML-6.0.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:ff3824dc5261f50c9b0dfb3be22b4567a6f938ccce4587b38952d85fd9e9afe4"}, - {file = "PyYAML-6.0.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:797b4f722ffa07cc8d62053e4cff1486fa6dc094105d13fea7b1de7d8bf71c9e"}, - {file = "PyYAML-6.0.2-cp311-cp311-win32.whl", hash = "sha256:11d8f3dd2b9c1207dcaf2ee0bbbfd5991f571186ec9cc78427ba5bd32afae4b5"}, - {file = "PyYAML-6.0.2-cp311-cp311-win_amd64.whl", hash = "sha256:e10ce637b18caea04431ce14fabcf5c64a1c61ec9c56b071a4b7ca131ca52d44"}, - {file = "PyYAML-6.0.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:c70c95198c015b85feafc136515252a261a84561b7b1d51e3384e0655ddf25ab"}, - {file = "PyYAML-6.0.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:ce826d6ef20b1bc864f0a68340c8b3287705cae2f8b4b1d932177dcc76721725"}, - {file = "PyYAML-6.0.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1f71ea527786de97d1a0cc0eacd1defc0985dcf6b3f17bb77dcfc8c34bec4dc5"}, - {file = "PyYAML-6.0.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9b22676e8097e9e22e36d6b7bda33190d0d400f345f23d4065d48f4ca7ae0425"}, - {file = "PyYAML-6.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:80bab7bfc629882493af4aa31a4cfa43a4c57c83813253626916b8c7ada83476"}, - {file = "PyYAML-6.0.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:0833f8694549e586547b576dcfaba4a6b55b9e96098b36cdc7ebefe667dfed48"}, - {file = "PyYAML-6.0.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8b9c7197f7cb2738065c481a0461e50ad02f18c78cd75775628afb4d7137fb3b"}, - {file = "PyYAML-6.0.2-cp312-cp312-win32.whl", hash = "sha256:ef6107725bd54b262d6dedcc2af448a266975032bc85ef0172c5f059da6325b4"}, - {file = "PyYAML-6.0.2-cp312-cp312-win_amd64.whl", hash = "sha256:7e7401d0de89a9a855c839bc697c079a4af81cf878373abd7dc625847d25cbd8"}, - {file = "PyYAML-6.0.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:efdca5630322a10774e8e98e1af481aad470dd62c3170801852d752aa7a783ba"}, - {file = "PyYAML-6.0.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:50187695423ffe49e2deacb8cd10510bc361faac997de9efef88badc3bb9e2d1"}, - {file = "PyYAML-6.0.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0ffe8360bab4910ef1b9e87fb812d8bc0a308b0d0eef8c8f44e0254ab3b07133"}, - {file = "PyYAML-6.0.2-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:17e311b6c678207928d649faa7cb0d7b4c26a0ba73d41e99c4fff6b6c3276484"}, - {file = "PyYAML-6.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:70b189594dbe54f75ab3a1acec5f1e3faa7e8cf2f1e08d9b561cb41b845f69d5"}, - {file = "PyYAML-6.0.2-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:41e4e3953a79407c794916fa277a82531dd93aad34e29c2a514c2c0c5fe971cc"}, - {file = "PyYAML-6.0.2-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:68ccc6023a3400877818152ad9a1033e3db8625d899c72eacb5a668902e4d652"}, - {file = "PyYAML-6.0.2-cp313-cp313-win32.whl", hash = "sha256:bc2fa7c6b47d6bc618dd7fb02ef6fdedb1090ec036abab80d4681424b84c1183"}, - {file = "PyYAML-6.0.2-cp313-cp313-win_amd64.whl", hash = "sha256:8388ee1976c416731879ac16da0aff3f63b286ffdd57cdeb95f3f2e085687563"}, - {file = "PyYAML-6.0.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:24471b829b3bf607e04e88d79542a9d48bb037c2267d7927a874e6c205ca7e9a"}, - {file = "PyYAML-6.0.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d7fded462629cfa4b685c5416b949ebad6cec74af5e2d42905d41e257e0869f5"}, - {file = "PyYAML-6.0.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d84a1718ee396f54f3a086ea0a66d8e552b2ab2017ef8b420e92edbc841c352d"}, - {file = "PyYAML-6.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9056c1ecd25795207ad294bcf39f2db3d845767be0ea6e6a34d856f006006083"}, - {file = "PyYAML-6.0.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:82d09873e40955485746739bcb8b4586983670466c23382c19cffecbf1fd8706"}, - {file = "PyYAML-6.0.2-cp38-cp38-win32.whl", hash = "sha256:43fa96a3ca0d6b1812e01ced1044a003533c47f6ee8aca31724f78e93ccc089a"}, - {file = "PyYAML-6.0.2-cp38-cp38-win_amd64.whl", hash = "sha256:01179a4a8559ab5de078078f37e5c1a30d76bb88519906844fd7bdea1b7729ff"}, - {file = "PyYAML-6.0.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:688ba32a1cffef67fd2e9398a2efebaea461578b0923624778664cc1c914db5d"}, - {file = "PyYAML-6.0.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a8786accb172bd8afb8be14490a16625cbc387036876ab6ba70912730faf8e1f"}, - {file = "PyYAML-6.0.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d8e03406cac8513435335dbab54c0d385e4a49e4945d2909a581c83647ca0290"}, - {file = "PyYAML-6.0.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f753120cb8181e736c57ef7636e83f31b9c0d1722c516f7e86cf15b7aa57ff12"}, - {file = "PyYAML-6.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3b1fdb9dc17f5a7677423d508ab4f243a726dea51fa5e70992e59a7411c89d19"}, - {file = "PyYAML-6.0.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:0b69e4ce7a131fe56b7e4d770c67429700908fc0752af059838b1cfb41960e4e"}, - {file = "PyYAML-6.0.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:a9f8c2e67970f13b16084e04f134610fd1d374bf477b17ec1599185cf611d725"}, - {file = "PyYAML-6.0.2-cp39-cp39-win32.whl", hash = "sha256:6395c297d42274772abc367baaa79683958044e5d3835486c16da75d2a694631"}, - {file = "PyYAML-6.0.2-cp39-cp39-win_amd64.whl", hash = "sha256:39693e1f8320ae4f43943590b49779ffb98acb81f788220ea932a6b6c51004d8"}, - {file = "pyyaml-6.0.2.tar.gz", hash = "sha256:d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e"}, -] - -[[package]] -name = "requests" -version = "2.32.4" -description = "Python HTTP for Humans." -optional = false -python-versions = ">=3.8" -groups = ["dev"] -files = [ - {file = "requests-2.32.4-py3-none-any.whl", hash = "sha256:27babd3cda2a6d50b30443204ee89830707d396671944c998b5975b031ac2b2c"}, - {file = "requests-2.32.4.tar.gz", hash = "sha256:27d0316682c8a29834d3264820024b62a36942083d52caf2f14c0591336d3422"}, -] - -[package.dependencies] -certifi = ">=2017.4.17" -charset_normalizer = ">=2,<4" -idna = ">=2.5,<4" -urllib3 = ">=1.21.1,<3" - -[package.extras] -socks = ["PySocks (>=1.5.6,!=1.5.7)"] -use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] - [[package]] name = "rich" version = "14.2.0" @@ -1653,28 +1078,6 @@ files = [ {file = "ruff-0.11.13.tar.gz", hash = "sha256:26fa247dc68d1d4e72c179e08889a25ac0c7ba4d78aecfc835d49cbfd60bf514"}, ] -[[package]] -name = "setuptools" -version = "78.1.1" -description = "Easily download, build, install, upgrade, and uninstall Python packages" -optional = false -python-versions = ">=3.9" -groups = ["dev"] -markers = "python_version == \"3.9\"" -files = [ - {file = "setuptools-78.1.1-py3-none-any.whl", hash = "sha256:c3a9c4211ff4c309edb8b8c4f1cbfa7ae324c4ba9f91ff254e3d305b9fd54561"}, - {file = "setuptools-78.1.1.tar.gz", hash = "sha256:fcc17fd9cd898242f6b4adfaca46137a9edef687f43e6f78469692a5e70d851d"}, -] - -[package.extras] -check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1) ; sys_platform != \"cygwin\"", "ruff (>=0.8.0) ; sys_platform != \"cygwin\""] -core = ["importlib_metadata (>=6) ; python_version < \"3.10\"", "jaraco.functools (>=4)", "jaraco.text (>=3.7)", "more_itertools", "more_itertools (>=8.8)", "packaging (>=24.2)", "platformdirs (>=4.2.2)", "tomli (>=2.0.1) ; python_version < \"3.11\"", "wheel (>=0.43.0)"] -cover = ["pytest-cov"] -doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "pyproject-hooks (!=1.1)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier", "towncrier (<24.7)"] -enabler = ["pytest-enabler (>=2.2)"] -test = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "ini2toml[lite] (>=0.14)", "jaraco.develop (>=7.21) ; python_version >= \"3.9\" and sys_platform != \"cygwin\"", "jaraco.envs (>=2.2)", "jaraco.path (>=3.7.2)", "jaraco.test (>=5.5)", "packaging (>=24.2)", "pip (>=19.1)", "pyproject-hooks (!=1.1)", "pytest (>=6,!=8.1.*)", "pytest-home (>=0.5)", "pytest-perf ; sys_platform != \"cygwin\"", "pytest-subprocess", "pytest-timeout", "pytest-xdist (>=3)", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel (>=0.44.0)"] -type = ["importlib_metadata (>=7.0.2) ; python_version < \"3.10\"", "jaraco.develop (>=7.21) ; sys_platform != \"cygwin\"", "mypy (==1.14.*)", "pytest-mypy"] - [[package]] name = "six" version = "1.16.0" @@ -1711,33 +1114,6 @@ files = [ {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, ] -[[package]] -name = "tomli-w" -version = "1.0.0" -description = "A lil' TOML writer" -optional = false -python-versions = ">=3.7" -groups = ["dev"] -files = [ - {file = "tomli_w-1.0.0-py3-none-any.whl", hash = "sha256:9f2a07e8be30a0729e533ec968016807069991ae2fd921a78d42f429ae5f4463"}, - {file = "tomli_w-1.0.0.tar.gz", hash = "sha256:f463434305e0336248cac9c2dc8076b707d8a12d019dd349f5c1e382dd1ae1b9"}, -] - -[[package]] -name = "typeapi" -version = "2.2.3" -description = "" -optional = false -python-versions = "<4.0,>=3.8" -groups = ["dev"] -files = [ - {file = "typeapi-2.2.3-py3-none-any.whl", hash = "sha256:038062b473dd9bc182966469d7a37d81ba7fa5bb0c01f30b0604b5667b13a47b"}, - {file = "typeapi-2.2.3.tar.gz", hash = "sha256:61cf8c852c05471522fcf55ec37d0c37f0de6943cc8e4d58529f796881e32c08"}, -] - -[package.dependencies] -typing-extensions = ">=3.0.0" - [[package]] name = "typing-extensions" version = "4.12.2" @@ -1750,72 +1126,6 @@ files = [ {file = "typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8"}, ] -[[package]] -name = "urllib3" -version = "2.6.3" -description = "HTTP library with thread-safe connection pooling, file post, and more." -optional = false -python-versions = ">=3.9" -groups = ["dev"] -files = [ - {file = "urllib3-2.6.3-py3-none-any.whl", hash = "sha256:bf272323e553dfb2e87d9bfd225ca7b0f467b919d7bbd355436d3fd37cb0acd4"}, - {file = "urllib3-2.6.3.tar.gz", hash = "sha256:1b62b6884944a57dbe321509ab94fd4d3b307075e0c2eae991ac71ee15ad38ed"}, -] - -[package.extras] -brotli = ["brotli (>=1.2.0) ; platform_python_implementation == \"CPython\"", "brotlicffi (>=1.2.0.0) ; platform_python_implementation != \"CPython\""] -h2 = ["h2 (>=4,<5)"] -socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"] -zstd = ["backports-zstd (>=1.0.0) ; python_version < \"3.14\""] - -[[package]] -name = "watchdog" -version = "4.0.2" -description = "Filesystem events monitoring" -optional = false -python-versions = ">=3.8" -groups = ["dev"] -files = [ - {file = "watchdog-4.0.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:ede7f010f2239b97cc79e6cb3c249e72962404ae3865860855d5cbe708b0fd22"}, - {file = "watchdog-4.0.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:a2cffa171445b0efa0726c561eca9a27d00a1f2b83846dbd5a4f639c4f8ca8e1"}, - {file = "watchdog-4.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c50f148b31b03fbadd6d0b5980e38b558046b127dc483e5e4505fcef250f9503"}, - {file = "watchdog-4.0.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:7c7d4bf585ad501c5f6c980e7be9c4f15604c7cc150e942d82083b31a7548930"}, - {file = "watchdog-4.0.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:914285126ad0b6eb2258bbbcb7b288d9dfd655ae88fa28945be05a7b475a800b"}, - {file = "watchdog-4.0.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:984306dc4720da5498b16fc037b36ac443816125a3705dfde4fd90652d8028ef"}, - {file = "watchdog-4.0.2-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:1cdcfd8142f604630deef34722d695fb455d04ab7cfe9963055df1fc69e6727a"}, - {file = "watchdog-4.0.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:d7ab624ff2f663f98cd03c8b7eedc09375a911794dfea6bf2a359fcc266bff29"}, - {file = "watchdog-4.0.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:132937547a716027bd5714383dfc40dc66c26769f1ce8a72a859d6a48f371f3a"}, - {file = "watchdog-4.0.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:cd67c7df93eb58f360c43802acc945fa8da70c675b6fa37a241e17ca698ca49b"}, - {file = "watchdog-4.0.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:bcfd02377be80ef3b6bc4ce481ef3959640458d6feaae0bd43dd90a43da90a7d"}, - {file = "watchdog-4.0.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:980b71510f59c884d684b3663d46e7a14b457c9611c481e5cef08f4dd022eed7"}, - {file = "watchdog-4.0.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:aa160781cafff2719b663c8a506156e9289d111d80f3387cf3af49cedee1f040"}, - {file = "watchdog-4.0.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:f6ee8dedd255087bc7fe82adf046f0b75479b989185fb0bdf9a98b612170eac7"}, - {file = "watchdog-4.0.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:0b4359067d30d5b864e09c8597b112fe0a0a59321a0f331498b013fb097406b4"}, - {file = "watchdog-4.0.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:770eef5372f146997638d737c9a3c597a3b41037cfbc5c41538fc27c09c3a3f9"}, - {file = "watchdog-4.0.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:eeea812f38536a0aa859972d50c76e37f4456474b02bd93674d1947cf1e39578"}, - {file = "watchdog-4.0.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:b2c45f6e1e57ebb4687690c05bc3a2c1fb6ab260550c4290b8abb1335e0fd08b"}, - {file = "watchdog-4.0.2-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:10b6683df70d340ac3279eff0b2766813f00f35a1d37515d2c99959ada8f05fa"}, - {file = "watchdog-4.0.2-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:f7c739888c20f99824f7aa9d31ac8a97353e22d0c0e54703a547a218f6637eb3"}, - {file = "watchdog-4.0.2-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:c100d09ac72a8a08ddbf0629ddfa0b8ee41740f9051429baa8e31bb903ad7508"}, - {file = "watchdog-4.0.2-pp38-pypy38_pp73-macosx_11_0_arm64.whl", hash = "sha256:f5315a8c8dd6dd9425b974515081fc0aadca1d1d61e078d2246509fd756141ee"}, - {file = "watchdog-4.0.2-pp39-pypy39_pp73-macosx_10_15_x86_64.whl", hash = "sha256:2d468028a77b42cc685ed694a7a550a8d1771bb05193ba7b24006b8241a571a1"}, - {file = "watchdog-4.0.2-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:f15edcae3830ff20e55d1f4e743e92970c847bcddc8b7509bcd172aa04de506e"}, - {file = "watchdog-4.0.2-py3-none-manylinux2014_aarch64.whl", hash = "sha256:936acba76d636f70db8f3c66e76aa6cb5136a936fc2a5088b9ce1c7a3508fc83"}, - {file = "watchdog-4.0.2-py3-none-manylinux2014_armv7l.whl", hash = "sha256:e252f8ca942a870f38cf785aef420285431311652d871409a64e2a0a52a2174c"}, - {file = "watchdog-4.0.2-py3-none-manylinux2014_i686.whl", hash = "sha256:0e83619a2d5d436a7e58a1aea957a3c1ccbf9782c43c0b4fed80580e5e4acd1a"}, - {file = "watchdog-4.0.2-py3-none-manylinux2014_ppc64.whl", hash = "sha256:88456d65f207b39f1981bf772e473799fcdc10801062c36fd5ad9f9d1d463a73"}, - {file = "watchdog-4.0.2-py3-none-manylinux2014_ppc64le.whl", hash = "sha256:32be97f3b75693a93c683787a87a0dc8db98bb84701539954eef991fb35f5fbc"}, - {file = "watchdog-4.0.2-py3-none-manylinux2014_s390x.whl", hash = "sha256:c82253cfc9be68e3e49282831afad2c1f6593af80c0daf1287f6a92657986757"}, - {file = "watchdog-4.0.2-py3-none-manylinux2014_x86_64.whl", hash = "sha256:c0b14488bd336c5b1845cee83d3e631a1f8b4e9c5091ec539406e4a324f882d8"}, - {file = "watchdog-4.0.2-py3-none-win32.whl", hash = "sha256:0d8a7e523ef03757a5aa29f591437d64d0d894635f8a50f370fe37f913ce4e19"}, - {file = "watchdog-4.0.2-py3-none-win_amd64.whl", hash = "sha256:c344453ef3bf875a535b0488e3ad28e341adbd5a9ffb0f7d62cefacc8824ef2b"}, - {file = "watchdog-4.0.2-py3-none-win_ia64.whl", hash = "sha256:baececaa8edff42cd16558a639a9b0ddf425f93d892e8392a56bf904f5eff22c"}, - {file = "watchdog-4.0.2.tar.gz", hash = "sha256:b4dfbb6c49221be4535623ea4474a4d6ee0a9cef4a80b20c28db4d858b64e270"}, -] - -[package.extras] -watchmedo = ["PyYAML (>=3.10)"] - [[package]] name = "wcmatch" version = "10.1" @@ -1831,97 +1141,6 @@ files = [ [package.dependencies] bracex = ">=2.1.1" -[[package]] -name = "wrapt" -version = "1.17.0" -description = "Module for decorators, wrappers and monkey patching." -optional = false -python-versions = ">=3.8" -groups = ["dev"] -files = [ - {file = "wrapt-1.17.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2a0c23b8319848426f305f9cb0c98a6e32ee68a36264f45948ccf8e7d2b941f8"}, - {file = "wrapt-1.17.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b1ca5f060e205f72bec57faae5bd817a1560fcfc4af03f414b08fa29106b7e2d"}, - {file = "wrapt-1.17.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e185ec6060e301a7e5f8461c86fb3640a7beb1a0f0208ffde7a65ec4074931df"}, - {file = "wrapt-1.17.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bb90765dd91aed05b53cd7a87bd7f5c188fcd95960914bae0d32c5e7f899719d"}, - {file = "wrapt-1.17.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:879591c2b5ab0a7184258274c42a126b74a2c3d5a329df16d69f9cee07bba6ea"}, - {file = "wrapt-1.17.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:fce6fee67c318fdfb7f285c29a82d84782ae2579c0e1b385b7f36c6e8074fffb"}, - {file = "wrapt-1.17.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:0698d3a86f68abc894d537887b9bbf84d29bcfbc759e23f4644be27acf6da301"}, - {file = "wrapt-1.17.0-cp310-cp310-win32.whl", hash = "sha256:69d093792dc34a9c4c8a70e4973a3361c7a7578e9cd86961b2bbf38ca71e4e22"}, - {file = "wrapt-1.17.0-cp310-cp310-win_amd64.whl", hash = "sha256:f28b29dc158ca5d6ac396c8e0a2ef45c4e97bb7e65522bfc04c989e6fe814575"}, - {file = "wrapt-1.17.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:74bf625b1b4caaa7bad51d9003f8b07a468a704e0644a700e936c357c17dd45a"}, - {file = "wrapt-1.17.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0f2a28eb35cf99d5f5bd12f5dd44a0f41d206db226535b37b0c60e9da162c3ed"}, - {file = "wrapt-1.17.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:81b1289e99cf4bad07c23393ab447e5e96db0ab50974a280f7954b071d41b489"}, - {file = "wrapt-1.17.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9f2939cd4a2a52ca32bc0b359015718472d7f6de870760342e7ba295be9ebaf9"}, - {file = "wrapt-1.17.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:6a9653131bda68a1f029c52157fd81e11f07d485df55410401f745007bd6d339"}, - {file = "wrapt-1.17.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:4e4b4385363de9052dac1a67bfb535c376f3d19c238b5f36bddc95efae15e12d"}, - {file = "wrapt-1.17.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:bdf62d25234290db1837875d4dceb2151e4ea7f9fff2ed41c0fde23ed542eb5b"}, - {file = "wrapt-1.17.0-cp311-cp311-win32.whl", hash = "sha256:5d8fd17635b262448ab8f99230fe4dac991af1dabdbb92f7a70a6afac8a7e346"}, - {file = "wrapt-1.17.0-cp311-cp311-win_amd64.whl", hash = "sha256:92a3d214d5e53cb1db8b015f30d544bc9d3f7179a05feb8f16df713cecc2620a"}, - {file = "wrapt-1.17.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:89fc28495896097622c3fc238915c79365dd0ede02f9a82ce436b13bd0ab7569"}, - {file = "wrapt-1.17.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:875d240fdbdbe9e11f9831901fb8719da0bd4e6131f83aa9f69b96d18fae7504"}, - {file = "wrapt-1.17.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e5ed16d95fd142e9c72b6c10b06514ad30e846a0d0917ab406186541fe68b451"}, - {file = "wrapt-1.17.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:18b956061b8db634120b58f668592a772e87e2e78bc1f6a906cfcaa0cc7991c1"}, - {file = "wrapt-1.17.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:daba396199399ccabafbfc509037ac635a6bc18510ad1add8fd16d4739cdd106"}, - {file = "wrapt-1.17.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:4d63f4d446e10ad19ed01188d6c1e1bb134cde8c18b0aa2acfd973d41fcc5ada"}, - {file = "wrapt-1.17.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:8a5e7cc39a45fc430af1aefc4d77ee6bad72c5bcdb1322cfde852c15192b8bd4"}, - {file = "wrapt-1.17.0-cp312-cp312-win32.whl", hash = "sha256:0a0a1a1ec28b641f2a3a2c35cbe86c00051c04fffcfcc577ffcdd707df3f8635"}, - {file = "wrapt-1.17.0-cp312-cp312-win_amd64.whl", hash = "sha256:3c34f6896a01b84bab196f7119770fd8466c8ae3dfa73c59c0bb281e7b588ce7"}, - {file = "wrapt-1.17.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:714c12485aa52efbc0fc0ade1e9ab3a70343db82627f90f2ecbc898fdf0bb181"}, - {file = "wrapt-1.17.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:da427d311782324a376cacb47c1a4adc43f99fd9d996ffc1b3e8529c4074d393"}, - {file = "wrapt-1.17.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ba1739fb38441a27a676f4de4123d3e858e494fac05868b7a281c0a383c098f4"}, - {file = "wrapt-1.17.0-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e711fc1acc7468463bc084d1b68561e40d1eaa135d8c509a65dd534403d83d7b"}, - {file = "wrapt-1.17.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:140ea00c87fafc42739bd74a94a5a9003f8e72c27c47cd4f61d8e05e6dec8721"}, - {file = "wrapt-1.17.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:73a96fd11d2b2e77d623a7f26e004cc31f131a365add1ce1ce9a19e55a1eef90"}, - {file = "wrapt-1.17.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:0b48554952f0f387984da81ccfa73b62e52817a4386d070c75e4db7d43a28c4a"}, - {file = "wrapt-1.17.0-cp313-cp313-win32.whl", hash = "sha256:498fec8da10e3e62edd1e7368f4b24aa362ac0ad931e678332d1b209aec93045"}, - {file = "wrapt-1.17.0-cp313-cp313-win_amd64.whl", hash = "sha256:fd136bb85f4568fffca995bd3c8d52080b1e5b225dbf1c2b17b66b4c5fa02838"}, - {file = "wrapt-1.17.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:17fcf043d0b4724858f25b8826c36e08f9fb2e475410bece0ec44a22d533da9b"}, - {file = "wrapt-1.17.0-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e4a557d97f12813dc5e18dad9fa765ae44ddd56a672bb5de4825527c847d6379"}, - {file = "wrapt-1.17.0-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0229b247b0fc7dee0d36176cbb79dbaf2a9eb7ecc50ec3121f40ef443155fb1d"}, - {file = "wrapt-1.17.0-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8425cfce27b8b20c9b89d77fb50e368d8306a90bf2b6eef2cdf5cd5083adf83f"}, - {file = "wrapt-1.17.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:9c900108df470060174108012de06d45f514aa4ec21a191e7ab42988ff42a86c"}, - {file = "wrapt-1.17.0-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:4e547b447073fc0dbfcbff15154c1be8823d10dab4ad401bdb1575e3fdedff1b"}, - {file = "wrapt-1.17.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:914f66f3b6fc7b915d46c1cc424bc2441841083de01b90f9e81109c9759e43ab"}, - {file = "wrapt-1.17.0-cp313-cp313t-win32.whl", hash = "sha256:a4192b45dff127c7d69b3bdfb4d3e47b64179a0b9900b6351859f3001397dabf"}, - {file = "wrapt-1.17.0-cp313-cp313t-win_amd64.whl", hash = "sha256:4f643df3d4419ea3f856c5c3f40fec1d65ea2e89ec812c83f7767c8730f9827a"}, - {file = "wrapt-1.17.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:69c40d4655e078ede067a7095544bcec5a963566e17503e75a3a3e0fe2803b13"}, - {file = "wrapt-1.17.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2f495b6754358979379f84534f8dd7a43ff8cff2558dcdea4a148a6e713a758f"}, - {file = "wrapt-1.17.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:baa7ef4e0886a6f482e00d1d5bcd37c201b383f1d314643dfb0367169f94f04c"}, - {file = "wrapt-1.17.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a8fc931382e56627ec4acb01e09ce66e5c03c384ca52606111cee50d931a342d"}, - {file = "wrapt-1.17.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:8f8909cdb9f1b237786c09a810e24ee5e15ef17019f7cecb207ce205b9b5fcce"}, - {file = "wrapt-1.17.0-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:ad47b095f0bdc5585bced35bd088cbfe4177236c7df9984b3cc46b391cc60627"}, - {file = "wrapt-1.17.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:948a9bd0fb2c5120457b07e59c8d7210cbc8703243225dbd78f4dfc13c8d2d1f"}, - {file = "wrapt-1.17.0-cp38-cp38-win32.whl", hash = "sha256:5ae271862b2142f4bc687bdbfcc942e2473a89999a54231aa1c2c676e28f29ea"}, - {file = "wrapt-1.17.0-cp38-cp38-win_amd64.whl", hash = "sha256:f335579a1b485c834849e9075191c9898e0731af45705c2ebf70e0cd5d58beed"}, - {file = "wrapt-1.17.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:d751300b94e35b6016d4b1e7d0e7bbc3b5e1751e2405ef908316c2a9024008a1"}, - {file = "wrapt-1.17.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7264cbb4a18dc4acfd73b63e4bcfec9c9802614572025bdd44d0721983fc1d9c"}, - {file = "wrapt-1.17.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:33539c6f5b96cf0b1105a0ff4cf5db9332e773bb521cc804a90e58dc49b10578"}, - {file = "wrapt-1.17.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c30970bdee1cad6a8da2044febd824ef6dc4cc0b19e39af3085c763fdec7de33"}, - {file = "wrapt-1.17.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:bc7f729a72b16ee21795a943f85c6244971724819819a41ddbaeb691b2dd85ad"}, - {file = "wrapt-1.17.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:6ff02a91c4fc9b6a94e1c9c20f62ea06a7e375f42fe57587f004d1078ac86ca9"}, - {file = "wrapt-1.17.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:2dfb7cff84e72e7bf975b06b4989477873dcf160b2fd89959c629535df53d4e0"}, - {file = "wrapt-1.17.0-cp39-cp39-win32.whl", hash = "sha256:2399408ac33ffd5b200480ee858baa58d77dd30e0dd0cab6a8a9547135f30a88"}, - {file = "wrapt-1.17.0-cp39-cp39-win_amd64.whl", hash = "sha256:4f763a29ee6a20c529496a20a7bcb16a73de27f5da6a843249c7047daf135977"}, - {file = "wrapt-1.17.0-py3-none-any.whl", hash = "sha256:d2c63b93548eda58abf5188e505ffed0229bf675f7c3090f8e36ad55b8cbc371"}, - {file = "wrapt-1.17.0.tar.gz", hash = "sha256:16187aa2317c731170a88ef35e8937ae0f533c402872c1ee5e6d079fcf320801"}, -] - -[[package]] -name = "yapf" -version = "0.43.0" -description = "A formatter for Python code" -optional = false -python-versions = ">=3.7" -groups = ["dev"] -files = [ - {file = "yapf-0.43.0-py3-none-any.whl", hash = "sha256:224faffbc39c428cb095818cf6ef5511fdab6f7430a10783fdfb292ccf2852ca"}, - {file = "yapf-0.43.0.tar.gz", hash = "sha256:00d3aa24bfedff9420b2e0d5d9f5ab6d9d4268e72afbf59bb3fa542781d5218e"}, -] - -[package.dependencies] -platformdirs = ">=3.5.1" -tomli = {version = ">=2.0.1", markers = "python_version < \"3.11\""} - [[package]] name = "zipp" version = "3.23.0" @@ -1946,4 +1165,4 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.1" python-versions = "^3.9" -content-hash = "f3c2463ae3e3af850183625fdf71af742aa448ecaf85261a3fce2b30cb879743" +content-hash = "326cd369ac576edc7c00c0d6c143ddbf23be0b91d406ac1ae3f198330a1fc5ac" diff --git a/python/pyproject.toml b/python/pyproject.toml index 6896147c..fb02b0b0 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -22,7 +22,6 @@ python-dotenv = "^1.0.0" pytest-dotenv = "^0.5.2" pytest-asyncio = "^0.24.0" pytest-xdist = "^3.6.1" -pydoc-markdown = "^4.8.2" matplotlib = "^3.8.0" ruff = "^0.11.12" @@ -35,4 +34,4 @@ build-backend = "poetry.core.masonry.api" "Bug Tracker" = "https://github.com/e2b-dev/code-interpreter/issues" [tool.ruff.lint] -ignore = ["F401", "F403"] \ No newline at end of file +ignore = ["F401", "F403"] diff --git a/python/scripts/generate_sdk_ref.sh b/python/scripts/generate_sdk_ref.sh deleted file mode 100755 index 0b13951a..00000000 --- a/python/scripts/generate_sdk_ref.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -# This script generates the python SDK reference markdown files -# Run it in the `python-sdk/` directory - -PKG_VERSION="v$(node -p "require('./package.json').version")" -ROUTES_DIR="../sdk-reference/code-interpreter-python-sdk/${PKG_VERSION}" -mkdir -p "${ROUTES_DIR}" - -package="e2b_code_interpreter" - -mkdir -p sdk_ref - -# generate raw SDK reference markdown file -poetry run pydoc-markdown -p "${package}" >sdk_ref/"${package}".mdx -# remove package path display -sed -i'' -e '/]*>.*<\/a>/d' "sdk_ref/${package}.mdx" -# remove empty hyperlinks -sed -i'' -e '/^# /d' "sdk_ref/${package}.mdx" -# remove " Objects" from lines starting with "##" -sed -i'' -e '/^## / s/ Objects$//' "sdk_ref/${package}.mdx" -# replace lines starting with "####" with "###" -sed -i'' -e 's/^####/###/' "sdk_ref/${package}.mdx" -# move to docs -mkdir -p "${ROUTES_DIR}/sandbox" -mv "sdk_ref/${package}.mdx" "${ROUTES_DIR}/sandbox/page.mdx" - -rm -rf sdk_ref diff --git a/sdk-reference/code-interpreter-js-sdk/v1.0.4/charts/page.mdx b/sdk-reference/code-interpreter-js-sdk/v1.0.4/charts/page.mdx deleted file mode 100644 index f3176d3b..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v1.0.4/charts/page.mdx +++ /dev/null @@ -1,240 +0,0 @@ -### ChartType - -Chart types - -#### Enumeration Members - -| Enumeration Member | Value | -| ------ | ------ | -| `BAR` | `"bar"` | -| `BOX_AND_WHISKER` | `"box_and_whisker"` | -| `LINE` | `"line"` | -| `PIE` | `"pie"` | -| `SCATTER` | `"scatter"` | -| `SUPERCHART` | `"superchart"` | -| `UNKNOWN` | `"unknown"` | - -*** - -### ScaleType - -Ax scale types - -#### Enumeration Members - -| Enumeration Member | Value | -| ------ | ------ | -| `ASINH` | `"asinh"` | -| `CATEGORICAL` | `"categorical"` | -| `DATETIME` | `"datetime"` | -| `FUNCTION` | `"function"` | -| `FUNCTIONLOG` | `"functionlog"` | -| `LINEAR` | `"linear"` | -| `LOG` | `"log"` | -| `LOGIT` | `"logit"` | -| `SYMLOG` | `"symlog"` | - -## Type Aliases - -### BarChart - -```ts -type BarChart: Chart2D & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `BarData`[] | -| `type` | `ChartType.BAR` | - -*** - -### BarData - -```ts -type BarData: object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `group` | `string` | -| `label` | `string` | -| `value` | `string` | - -*** - -### BoxAndWhiskerChart - -```ts -type BoxAndWhiskerChart: Chart2D & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `BoxAndWhiskerData`[] | -| `type` | `ChartType.BOX_AND_WHISKER` | - -*** - -### BoxAndWhiskerData - -```ts -type BoxAndWhiskerData: object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `first_quartile` | `number` | -| `label` | `string` | -| `max` | `number` | -| `median` | `number` | -| `min` | `number` | -| `outliers` | `number`[] | -| `third_quartile` | `number` | - -*** - -### Chart - -```ts -type Chart: object; -``` - -Represents a chart. - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `any`[] | -| `title` | `string` | -| `type` | `ChartType` | - -*** - -### ChartTypes - -```ts -type ChartTypes: - | LineChart - | ScatterChart - | BarChart - | PieChart - | BoxAndWhiskerChart - | SuperChart; -``` - -*** - -### LineChart - -```ts -type LineChart: PointChart & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `type` | `ChartType.LINE` | - -*** - -### PieChart - -```ts -type PieChart: Chart & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `PieData`[] | -| `type` | `ChartType.PIE` | - -*** - -### PieData - -```ts -type PieData: object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `angle` | `number` | -| `label` | `string` | -| `radius` | `number` | - -*** - -### PointData - -```ts -type PointData: object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `label` | `string` | -| `points` | [`number` \| `string`, `number` \| `string`][] | - -*** - -### ScatterChart - -```ts -type ScatterChart: PointChart & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `type` | `ChartType.SCATTER` | - -*** - -### SuperChart - -```ts -type SuperChart: Chart & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `Chart`[] | -| `type` | `ChartType.SUPERCHART` | - -## Functions - -### deserializeChart() - -```ts -function deserializeChart(data: any): Chart -``` - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `data` | `any` | - -#### Returns - -`Chart` diff --git a/sdk-reference/code-interpreter-js-sdk/v1.0.4/consts/page.mdx b/sdk-reference/code-interpreter-js-sdk/v1.0.4/consts/page.mdx deleted file mode 100644 index d1ee2e76..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v1.0.4/consts/page.mdx +++ /dev/null @@ -1,13 +0,0 @@ -### DEFAULT\_TIMEOUT\_MS - -```ts -const DEFAULT_TIMEOUT_MS: 60000 = 60_000; -``` - -*** - -### JUPYTER\_PORT - -```ts -const JUPYTER_PORT: 49999 = 49999; -``` diff --git a/sdk-reference/code-interpreter-js-sdk/v1.0.4/index/page.mdx b/sdk-reference/code-interpreter-js-sdk/v1.0.4/index/page.mdx deleted file mode 100644 index dc55fcc7..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v1.0.4/index/page.mdx +++ /dev/null @@ -1,103 +0,0 @@ -### BarChart - -Re-exports BarChart - -### BarData - -Re-exports BarData - -### BoxAndWhiskerChart - -Re-exports BoxAndWhiskerChart - -### BoxAndWhiskerData - -Re-exports BoxAndWhiskerData - -### Chart - -Re-exports Chart - -### ChartType - -Re-exports ChartType - -### ChartTypes - -Re-exports ChartTypes - -### Context - -Re-exports Context - -### CreateCodeContextOpts - -Re-exports CreateCodeContextOpts - -### default - -Renames and re-exports Sandbox - -### Execution - -Re-exports Execution - -### ExecutionError - -Re-exports ExecutionError - -### LineChart - -Re-exports LineChart - -### Logs - -Re-exports Logs - -### MIMEType - -Re-exports MIMEType - -### OutputMessage - -Re-exports OutputMessage - -### PieChart - -Re-exports PieChart - -### PieData - -Re-exports PieData - -### PointData - -Re-exports PointData - -### RawData - -Re-exports RawData - -### Result - -Re-exports Result - -### RunCodeOpts - -Re-exports RunCodeOpts - -### Sandbox - -Re-exports Sandbox - -### ScaleType - -Re-exports ScaleType - -### ScatterChart - -Re-exports ScatterChart - -### SuperChart - -Re-exports SuperChart diff --git a/sdk-reference/code-interpreter-js-sdk/v1.0.4/messaging/page.mdx b/sdk-reference/code-interpreter-js-sdk/v1.0.4/messaging/page.mdx deleted file mode 100644 index 4b3c4ed9..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v1.0.4/messaging/page.mdx +++ /dev/null @@ -1,326 +0,0 @@ -### Execution - -Represents the result of a cell execution. - -#### Constructors - -```ts -new Execution( - results: Result[], - logs: Logs, - error?: ExecutionError, - executionCount?: number): Execution -``` - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `results` | `Result`[] | `[]` | List of result of the cell (interactively interpreted last line), display calls (e.g. matplotlib plots). | -| `logs` | `Logs` | `...` | Logs printed to stdout and stderr during execution. | -| `error`? | `ExecutionError` | `undefined` | An Error object if an error occurred, null otherwise. | -| `executionCount`? | `number` | `undefined` | Execution count of the cell. | - -###### Returns - -`Execution` - -#### Properties - -| Property | Modifier | Type | Default value | Description | -| ------ | ------ | ------ | ------ | ------ | -| `error?` | `public` | `ExecutionError` | `undefined` | An Error object if an error occurred, null otherwise. | -| `executionCount?` | `public` | `number` | `undefined` | Execution count of the cell. | -| `logs` | `public` | `Logs` | `undefined` | Logs printed to stdout and stderr during execution. | -| `results` | `public` | `Result`[] | `[]` | List of result of the cell (interactively interpreted last line), display calls (e.g. matplotlib plots). | - -#### Accessors - -### text - -```ts -get text(): undefined | string -``` - -Returns the text representation of the main result of the cell. - -###### Returns - -`undefined` \| `string` - -#### Methods - -### toJSON() - -```ts -toJSON(): object -``` - -Returns the serializable representation of the execution result. - -###### Returns - -`object` - -| Name | Type | -| ------ | ------ | -| `error` | `undefined` \| `ExecutionError` | -| `logs` | `Logs` | -| `results` | `Result`[] | - -*** - -### ExecutionError - -Represents an error that occurred during the execution of a cell. -The error contains the name of the error, the value of the error, and the traceback. - -#### Constructors - -```ts -new ExecutionError( - name: string, - value: string, - traceback: string): ExecutionError -``` - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `name` | `string` | Name of the error. | -| `value` | `string` | Value of the error. | -| `traceback` | `string` | The raw traceback of the error. | - -###### Returns - -`ExecutionError` - -#### Properties - -| Property | Modifier | Type | Description | -| ------ | ------ | ------ | ------ | -| `name` | `public` | `string` | Name of the error. | -| `traceback` | `public` | `string` | The raw traceback of the error. | -| `value` | `public` | `string` | Value of the error. | - -*** - -### OutputMessage - -Represents an output message from the sandbox code execution. - -#### Constructors - -```ts -new OutputMessage( - line: string, - timestamp: number, - error: boolean): OutputMessage -``` - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `line` | `string` | The output line. | -| `timestamp` | `number` | Unix epoch in nanoseconds. | -| `error` | `boolean` | Whether the output is an error. | - -###### Returns - -`OutputMessage` - -#### Properties - -| Property | Modifier | Type | Description | -| ------ | ------ | ------ | ------ | -| `error` | `readonly` | `boolean` | Whether the output is an error. | -| `line` | `readonly` | `string` | The output line. | -| `timestamp` | `readonly` | `number` | Unix epoch in nanoseconds. | - -#### Methods - -### toString() - -```ts -toString(): string -``` - -###### Returns - -`string` - -*** - -### Result - -Represents the data to be displayed as a result of executing a cell in a Jupyter notebook. -The result is similar to the structure returned by ipython kernel: https://ipython.readthedocs.io/en/stable/development/execution.html#execution-semantics - -The result can contain multiple types of data, such as text, images, plots, etc. Each type of data is represented -as a string, and the result can contain multiple types of data. The display calls don't have to have text representation, -for the actual result the representation is always present for the result, the other representations are always optional. - -#### Constructors - -```ts -new Result(rawData: RawData, isMainResult: boolean): Result -``` - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `rawData` | `RawData` | -| `isMainResult` | `boolean` | - -###### Returns - -`Result` - -#### Properties - -| Property | Modifier | Type | Description | -| ------ | ------ | ------ | ------ | -| `chart?` | `readonly` | `ChartTypes` | Contains the chart data. | -| `data?` | `readonly` | `Record`\<`string`, `unknown`\> | Contains the data from DataFrame. | -| `extra?` | `readonly` | `any` | Extra data that can be included. Not part of the standard types. | -| `html?` | `readonly` | `string` | HTML representation of the data. | -| `isMainResult` | `readonly` | `boolean` | - | -| `javascript?` | `readonly` | `string` | JavaScript representation of the data. | -| `jpeg?` | `readonly` | `string` | JPEG representation of the data. | -| `json?` | `readonly` | `string` | JSON representation of the data. | -| `latex?` | `readonly` | `string` | LaTeX representation of the data. | -| `markdown?` | `readonly` | `string` | Markdown representation of the data. | -| `pdf?` | `readonly` | `string` | PDF representation of the data. | -| `png?` | `readonly` | `string` | PNG representation of the data. | -| `raw` | `readonly` | `RawData` | - | -| `svg?` | `readonly` | `string` | SVG representation of the data. | -| `text?` | `readonly` | `string` | Text representation of the result. | - -#### Methods - -### formats() - -```ts -formats(): string[] -``` - -Returns all the formats available for the result. - -###### Returns - -`string`[] - -Array of strings representing the formats available for the result. - -### toJSON() - -```ts -toJSON(): object -``` - -Returns the serializable representation of the result. - -###### Returns - -`object` - -| Name | Type | -| ------ | ------ | -| `extra`? | `any` | -| `html` | `undefined` \| `string` | -| `javascript` | `undefined` \| `string` | -| `jpeg` | `undefined` \| `string` | -| `json` | `undefined` \| `string` | -| `latex` | `undefined` \| `string` | -| `markdown` | `undefined` \| `string` | -| `pdf` | `undefined` \| `string` | -| `png` | `undefined` \| `string` | -| `svg` | `undefined` \| `string` | -| `text` | `undefined` \| `string` | - -## Type Aliases - -### Logs - -```ts -type Logs: object; -``` - -Data printed to stdout and stderr during execution, usually by print statements, logs, warnings, subprocesses, etc. - -#### Type declaration - -| Name | Type | Description | -| ------ | ------ | ------ | -| `stderr` | `string`[] | List of strings printed to stderr by prints, subprocesses, etc. | -| `stdout` | `string`[] | List of strings printed to stdout by prints, subprocesses, etc. | - -*** - -### MIMEType - -```ts -type MIMEType: string; -``` - -Represents a MIME type. - -*** - -### RawData - -```ts -type RawData: object & E2BData; -``` - -Dictionary that maps MIME types to their corresponding representations of the data. - -## Functions - -### extractError() - -```ts -function extractError(res: Response): Promise -``` - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `res` | `Response` | - -#### Returns - -`Promise`\<`undefined` \| `SandboxError`\> - -*** - -### parseOutput() - -```ts -function parseOutput( - execution: Execution, - line: string, - onStdout?: (output: OutputMessage) => any, - onStderr?: (output: OutputMessage) => any, - onResult?: (data: Result) => any, -onError?: (error: ExecutionError) => any): Promise -``` - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `execution` | `Execution` | -| `line` | `string` | -| `onStdout`? | (`output`: `OutputMessage`) => `any` | -| `onStderr`? | (`output`: `OutputMessage`) => `any` | -| `onResult`? | (`data`: `Result`) => `any` | -| `onError`? | (`error`: `ExecutionError`) => `any` | - -#### Returns - -`Promise`\<`void`\> diff --git a/sdk-reference/code-interpreter-js-sdk/v1.0.4/sandbox/page.mdx b/sdk-reference/code-interpreter-js-sdk/v1.0.4/sandbox/page.mdx deleted file mode 100644 index 96eafec5..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v1.0.4/sandbox/page.mdx +++ /dev/null @@ -1,312 +0,0 @@ -### Sandbox - -E2B cloud sandbox is a secure and isolated cloud environment. - -The sandbox allows you to: -- Access Linux OS -- Create, list, and delete files and directories -- Run commands -- Run isolated code -- Access the internet - -Check docs here. - -Use Sandbox.create to create a new sandbox. - -#### Example - -```ts -import { Sandbox } from '@e2b/code-interpreter' - -const sandbox = await Sandbox.create() -``` - -#### Methods - -### createCodeContext() - -```ts -createCodeContext(opts?: CreateCodeContextOpts): Promise -``` - -Creates a new context to run code in. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `opts`? | `CreateCodeContextOpts` | options for creating the context. | - -###### Returns - -`Promise`\<`Context`\> - -context object. - -### runCode() - -###### runCode(code, opts) - -```ts -runCode(code: string, opts?: RunCodeOpts & object): Promise -``` - -Run the code as Python. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `code` | `string` | code to execute. | -| `opts`? | `RunCodeOpts` & `object` | options for executing the code. | - -###### Returns - -`Promise`\<`Execution`\> - -`Execution` result object. - -###### runCode(code, opts) - -```ts -runCode(code: string, opts?: RunCodeOpts & object): Promise -``` - -Run the code for the specified language. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. -If no language is specified, Python is used. - -You can reference previously defined variables, imports, and functions in the code. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `code` | `string` | code to execute. | -| `opts`? | `RunCodeOpts` & `object` | options for executing the code. | - -###### Returns - -`Promise`\<`Execution`\> - -`Execution` result object. - -###### runCode(code, opts) - -```ts -runCode(code: string, opts?: RunCodeOpts & object): Promise -``` - -Runs the code in the specified context, if not specified, the default context is used. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `code` | `string` | code to execute. | -| `opts`? | `RunCodeOpts` & `object` | options for executing the code | - -###### Returns - -`Promise`\<`Execution`\> - -`Execution` result object - -## Interfaces - -### CreateCodeContextOpts - -Options for creating a code context. - -#### Properties - -### cwd? - -```ts -optional cwd: string; -``` - -Working directory for the context. - -###### Default - -```ts -/home/user -``` - -### language? - -```ts -optional language: string; -``` - -Language for the context. - -###### Default - -```ts -python -``` - -### requestTimeoutMs? - -```ts -optional requestTimeoutMs: number; -``` - -Timeout for the request in **milliseconds**. - -###### Default - -```ts -30_000 // 30 seconds -``` - -*** - -### RunCodeOpts - -Options for running code. - -#### Properties - -### envs? - -```ts -optional envs: Record; -``` - -Custom environment variables for code execution. - -###### Default - -```ts -{} -``` - -### onError()? - -```ts -optional onError: (error: ExecutionError) => any; -``` - -Callback for handling the `ExecutionError` object. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `error` | `ExecutionError` | - -###### Returns - -`any` - -### onResult()? - -```ts -optional onResult: (data: Result) => any; -``` - -Callback for handling the final execution result. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `data` | `Result` | - -###### Returns - -`any` - -### onStderr()? - -```ts -optional onStderr: (output: OutputMessage) => any; -``` - -Callback for handling stderr messages. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `output` | `OutputMessage` | - -###### Returns - -`any` - -### onStdout()? - -```ts -optional onStdout: (output: OutputMessage) => any; -``` - -Callback for handling stdout messages. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `output` | `OutputMessage` | - -###### Returns - -`any` - -### requestTimeoutMs? - -```ts -optional requestTimeoutMs: number; -``` - -Timeout for the request in **milliseconds**. - -###### Default - -```ts -30_000 // 30 seconds -``` - -### timeoutMs? - -```ts -optional timeoutMs: number; -``` - -Timeout for the code execution in **milliseconds**. - -###### Default - -```ts -60_000 // 60 seconds -``` - -## Type Aliases - -### Context - -```ts -type Context: object; -``` - -Represents a context for code execution. - -#### Type declaration - -| Name | Type | Description | -| ------ | ------ | ------ | -| `cwd` | `string` | The working directory of the context. | -| `id` | `string` | The ID of the context. | -| `language` | `string` | The language of the context. | diff --git a/sdk-reference/code-interpreter-js-sdk/v1.1.0/charts/page.mdx b/sdk-reference/code-interpreter-js-sdk/v1.1.0/charts/page.mdx deleted file mode 100644 index f3176d3b..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v1.1.0/charts/page.mdx +++ /dev/null @@ -1,240 +0,0 @@ -### ChartType - -Chart types - -#### Enumeration Members - -| Enumeration Member | Value | -| ------ | ------ | -| `BAR` | `"bar"` | -| `BOX_AND_WHISKER` | `"box_and_whisker"` | -| `LINE` | `"line"` | -| `PIE` | `"pie"` | -| `SCATTER` | `"scatter"` | -| `SUPERCHART` | `"superchart"` | -| `UNKNOWN` | `"unknown"` | - -*** - -### ScaleType - -Ax scale types - -#### Enumeration Members - -| Enumeration Member | Value | -| ------ | ------ | -| `ASINH` | `"asinh"` | -| `CATEGORICAL` | `"categorical"` | -| `DATETIME` | `"datetime"` | -| `FUNCTION` | `"function"` | -| `FUNCTIONLOG` | `"functionlog"` | -| `LINEAR` | `"linear"` | -| `LOG` | `"log"` | -| `LOGIT` | `"logit"` | -| `SYMLOG` | `"symlog"` | - -## Type Aliases - -### BarChart - -```ts -type BarChart: Chart2D & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `BarData`[] | -| `type` | `ChartType.BAR` | - -*** - -### BarData - -```ts -type BarData: object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `group` | `string` | -| `label` | `string` | -| `value` | `string` | - -*** - -### BoxAndWhiskerChart - -```ts -type BoxAndWhiskerChart: Chart2D & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `BoxAndWhiskerData`[] | -| `type` | `ChartType.BOX_AND_WHISKER` | - -*** - -### BoxAndWhiskerData - -```ts -type BoxAndWhiskerData: object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `first_quartile` | `number` | -| `label` | `string` | -| `max` | `number` | -| `median` | `number` | -| `min` | `number` | -| `outliers` | `number`[] | -| `third_quartile` | `number` | - -*** - -### Chart - -```ts -type Chart: object; -``` - -Represents a chart. - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `any`[] | -| `title` | `string` | -| `type` | `ChartType` | - -*** - -### ChartTypes - -```ts -type ChartTypes: - | LineChart - | ScatterChart - | BarChart - | PieChart - | BoxAndWhiskerChart - | SuperChart; -``` - -*** - -### LineChart - -```ts -type LineChart: PointChart & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `type` | `ChartType.LINE` | - -*** - -### PieChart - -```ts -type PieChart: Chart & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `PieData`[] | -| `type` | `ChartType.PIE` | - -*** - -### PieData - -```ts -type PieData: object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `angle` | `number` | -| `label` | `string` | -| `radius` | `number` | - -*** - -### PointData - -```ts -type PointData: object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `label` | `string` | -| `points` | [`number` \| `string`, `number` \| `string`][] | - -*** - -### ScatterChart - -```ts -type ScatterChart: PointChart & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `type` | `ChartType.SCATTER` | - -*** - -### SuperChart - -```ts -type SuperChart: Chart & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `Chart`[] | -| `type` | `ChartType.SUPERCHART` | - -## Functions - -### deserializeChart() - -```ts -function deserializeChart(data: any): Chart -``` - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `data` | `any` | - -#### Returns - -`Chart` diff --git a/sdk-reference/code-interpreter-js-sdk/v1.1.0/consts/page.mdx b/sdk-reference/code-interpreter-js-sdk/v1.1.0/consts/page.mdx deleted file mode 100644 index d1ee2e76..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v1.1.0/consts/page.mdx +++ /dev/null @@ -1,13 +0,0 @@ -### DEFAULT\_TIMEOUT\_MS - -```ts -const DEFAULT_TIMEOUT_MS: 60000 = 60_000; -``` - -*** - -### JUPYTER\_PORT - -```ts -const JUPYTER_PORT: 49999 = 49999; -``` diff --git a/sdk-reference/code-interpreter-js-sdk/v1.1.0/index/page.mdx b/sdk-reference/code-interpreter-js-sdk/v1.1.0/index/page.mdx deleted file mode 100644 index dc55fcc7..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v1.1.0/index/page.mdx +++ /dev/null @@ -1,103 +0,0 @@ -### BarChart - -Re-exports BarChart - -### BarData - -Re-exports BarData - -### BoxAndWhiskerChart - -Re-exports BoxAndWhiskerChart - -### BoxAndWhiskerData - -Re-exports BoxAndWhiskerData - -### Chart - -Re-exports Chart - -### ChartType - -Re-exports ChartType - -### ChartTypes - -Re-exports ChartTypes - -### Context - -Re-exports Context - -### CreateCodeContextOpts - -Re-exports CreateCodeContextOpts - -### default - -Renames and re-exports Sandbox - -### Execution - -Re-exports Execution - -### ExecutionError - -Re-exports ExecutionError - -### LineChart - -Re-exports LineChart - -### Logs - -Re-exports Logs - -### MIMEType - -Re-exports MIMEType - -### OutputMessage - -Re-exports OutputMessage - -### PieChart - -Re-exports PieChart - -### PieData - -Re-exports PieData - -### PointData - -Re-exports PointData - -### RawData - -Re-exports RawData - -### Result - -Re-exports Result - -### RunCodeOpts - -Re-exports RunCodeOpts - -### Sandbox - -Re-exports Sandbox - -### ScaleType - -Re-exports ScaleType - -### ScatterChart - -Re-exports ScatterChart - -### SuperChart - -Re-exports SuperChart diff --git a/sdk-reference/code-interpreter-js-sdk/v1.1.0/messaging/page.mdx b/sdk-reference/code-interpreter-js-sdk/v1.1.0/messaging/page.mdx deleted file mode 100644 index 4b3c4ed9..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v1.1.0/messaging/page.mdx +++ /dev/null @@ -1,326 +0,0 @@ -### Execution - -Represents the result of a cell execution. - -#### Constructors - -```ts -new Execution( - results: Result[], - logs: Logs, - error?: ExecutionError, - executionCount?: number): Execution -``` - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `results` | `Result`[] | `[]` | List of result of the cell (interactively interpreted last line), display calls (e.g. matplotlib plots). | -| `logs` | `Logs` | `...` | Logs printed to stdout and stderr during execution. | -| `error`? | `ExecutionError` | `undefined` | An Error object if an error occurred, null otherwise. | -| `executionCount`? | `number` | `undefined` | Execution count of the cell. | - -###### Returns - -`Execution` - -#### Properties - -| Property | Modifier | Type | Default value | Description | -| ------ | ------ | ------ | ------ | ------ | -| `error?` | `public` | `ExecutionError` | `undefined` | An Error object if an error occurred, null otherwise. | -| `executionCount?` | `public` | `number` | `undefined` | Execution count of the cell. | -| `logs` | `public` | `Logs` | `undefined` | Logs printed to stdout and stderr during execution. | -| `results` | `public` | `Result`[] | `[]` | List of result of the cell (interactively interpreted last line), display calls (e.g. matplotlib plots). | - -#### Accessors - -### text - -```ts -get text(): undefined | string -``` - -Returns the text representation of the main result of the cell. - -###### Returns - -`undefined` \| `string` - -#### Methods - -### toJSON() - -```ts -toJSON(): object -``` - -Returns the serializable representation of the execution result. - -###### Returns - -`object` - -| Name | Type | -| ------ | ------ | -| `error` | `undefined` \| `ExecutionError` | -| `logs` | `Logs` | -| `results` | `Result`[] | - -*** - -### ExecutionError - -Represents an error that occurred during the execution of a cell. -The error contains the name of the error, the value of the error, and the traceback. - -#### Constructors - -```ts -new ExecutionError( - name: string, - value: string, - traceback: string): ExecutionError -``` - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `name` | `string` | Name of the error. | -| `value` | `string` | Value of the error. | -| `traceback` | `string` | The raw traceback of the error. | - -###### Returns - -`ExecutionError` - -#### Properties - -| Property | Modifier | Type | Description | -| ------ | ------ | ------ | ------ | -| `name` | `public` | `string` | Name of the error. | -| `traceback` | `public` | `string` | The raw traceback of the error. | -| `value` | `public` | `string` | Value of the error. | - -*** - -### OutputMessage - -Represents an output message from the sandbox code execution. - -#### Constructors - -```ts -new OutputMessage( - line: string, - timestamp: number, - error: boolean): OutputMessage -``` - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `line` | `string` | The output line. | -| `timestamp` | `number` | Unix epoch in nanoseconds. | -| `error` | `boolean` | Whether the output is an error. | - -###### Returns - -`OutputMessage` - -#### Properties - -| Property | Modifier | Type | Description | -| ------ | ------ | ------ | ------ | -| `error` | `readonly` | `boolean` | Whether the output is an error. | -| `line` | `readonly` | `string` | The output line. | -| `timestamp` | `readonly` | `number` | Unix epoch in nanoseconds. | - -#### Methods - -### toString() - -```ts -toString(): string -``` - -###### Returns - -`string` - -*** - -### Result - -Represents the data to be displayed as a result of executing a cell in a Jupyter notebook. -The result is similar to the structure returned by ipython kernel: https://ipython.readthedocs.io/en/stable/development/execution.html#execution-semantics - -The result can contain multiple types of data, such as text, images, plots, etc. Each type of data is represented -as a string, and the result can contain multiple types of data. The display calls don't have to have text representation, -for the actual result the representation is always present for the result, the other representations are always optional. - -#### Constructors - -```ts -new Result(rawData: RawData, isMainResult: boolean): Result -``` - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `rawData` | `RawData` | -| `isMainResult` | `boolean` | - -###### Returns - -`Result` - -#### Properties - -| Property | Modifier | Type | Description | -| ------ | ------ | ------ | ------ | -| `chart?` | `readonly` | `ChartTypes` | Contains the chart data. | -| `data?` | `readonly` | `Record`\<`string`, `unknown`\> | Contains the data from DataFrame. | -| `extra?` | `readonly` | `any` | Extra data that can be included. Not part of the standard types. | -| `html?` | `readonly` | `string` | HTML representation of the data. | -| `isMainResult` | `readonly` | `boolean` | - | -| `javascript?` | `readonly` | `string` | JavaScript representation of the data. | -| `jpeg?` | `readonly` | `string` | JPEG representation of the data. | -| `json?` | `readonly` | `string` | JSON representation of the data. | -| `latex?` | `readonly` | `string` | LaTeX representation of the data. | -| `markdown?` | `readonly` | `string` | Markdown representation of the data. | -| `pdf?` | `readonly` | `string` | PDF representation of the data. | -| `png?` | `readonly` | `string` | PNG representation of the data. | -| `raw` | `readonly` | `RawData` | - | -| `svg?` | `readonly` | `string` | SVG representation of the data. | -| `text?` | `readonly` | `string` | Text representation of the result. | - -#### Methods - -### formats() - -```ts -formats(): string[] -``` - -Returns all the formats available for the result. - -###### Returns - -`string`[] - -Array of strings representing the formats available for the result. - -### toJSON() - -```ts -toJSON(): object -``` - -Returns the serializable representation of the result. - -###### Returns - -`object` - -| Name | Type | -| ------ | ------ | -| `extra`? | `any` | -| `html` | `undefined` \| `string` | -| `javascript` | `undefined` \| `string` | -| `jpeg` | `undefined` \| `string` | -| `json` | `undefined` \| `string` | -| `latex` | `undefined` \| `string` | -| `markdown` | `undefined` \| `string` | -| `pdf` | `undefined` \| `string` | -| `png` | `undefined` \| `string` | -| `svg` | `undefined` \| `string` | -| `text` | `undefined` \| `string` | - -## Type Aliases - -### Logs - -```ts -type Logs: object; -``` - -Data printed to stdout and stderr during execution, usually by print statements, logs, warnings, subprocesses, etc. - -#### Type declaration - -| Name | Type | Description | -| ------ | ------ | ------ | -| `stderr` | `string`[] | List of strings printed to stderr by prints, subprocesses, etc. | -| `stdout` | `string`[] | List of strings printed to stdout by prints, subprocesses, etc. | - -*** - -### MIMEType - -```ts -type MIMEType: string; -``` - -Represents a MIME type. - -*** - -### RawData - -```ts -type RawData: object & E2BData; -``` - -Dictionary that maps MIME types to their corresponding representations of the data. - -## Functions - -### extractError() - -```ts -function extractError(res: Response): Promise -``` - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `res` | `Response` | - -#### Returns - -`Promise`\<`undefined` \| `SandboxError`\> - -*** - -### parseOutput() - -```ts -function parseOutput( - execution: Execution, - line: string, - onStdout?: (output: OutputMessage) => any, - onStderr?: (output: OutputMessage) => any, - onResult?: (data: Result) => any, -onError?: (error: ExecutionError) => any): Promise -``` - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `execution` | `Execution` | -| `line` | `string` | -| `onStdout`? | (`output`: `OutputMessage`) => `any` | -| `onStderr`? | (`output`: `OutputMessage`) => `any` | -| `onResult`? | (`data`: `Result`) => `any` | -| `onError`? | (`error`: `ExecutionError`) => `any` | - -#### Returns - -`Promise`\<`void`\> diff --git a/sdk-reference/code-interpreter-js-sdk/v1.1.0/sandbox/page.mdx b/sdk-reference/code-interpreter-js-sdk/v1.1.0/sandbox/page.mdx deleted file mode 100644 index 96eafec5..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v1.1.0/sandbox/page.mdx +++ /dev/null @@ -1,312 +0,0 @@ -### Sandbox - -E2B cloud sandbox is a secure and isolated cloud environment. - -The sandbox allows you to: -- Access Linux OS -- Create, list, and delete files and directories -- Run commands -- Run isolated code -- Access the internet - -Check docs here. - -Use Sandbox.create to create a new sandbox. - -#### Example - -```ts -import { Sandbox } from '@e2b/code-interpreter' - -const sandbox = await Sandbox.create() -``` - -#### Methods - -### createCodeContext() - -```ts -createCodeContext(opts?: CreateCodeContextOpts): Promise -``` - -Creates a new context to run code in. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `opts`? | `CreateCodeContextOpts` | options for creating the context. | - -###### Returns - -`Promise`\<`Context`\> - -context object. - -### runCode() - -###### runCode(code, opts) - -```ts -runCode(code: string, opts?: RunCodeOpts & object): Promise -``` - -Run the code as Python. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `code` | `string` | code to execute. | -| `opts`? | `RunCodeOpts` & `object` | options for executing the code. | - -###### Returns - -`Promise`\<`Execution`\> - -`Execution` result object. - -###### runCode(code, opts) - -```ts -runCode(code: string, opts?: RunCodeOpts & object): Promise -``` - -Run the code for the specified language. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. -If no language is specified, Python is used. - -You can reference previously defined variables, imports, and functions in the code. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `code` | `string` | code to execute. | -| `opts`? | `RunCodeOpts` & `object` | options for executing the code. | - -###### Returns - -`Promise`\<`Execution`\> - -`Execution` result object. - -###### runCode(code, opts) - -```ts -runCode(code: string, opts?: RunCodeOpts & object): Promise -``` - -Runs the code in the specified context, if not specified, the default context is used. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `code` | `string` | code to execute. | -| `opts`? | `RunCodeOpts` & `object` | options for executing the code | - -###### Returns - -`Promise`\<`Execution`\> - -`Execution` result object - -## Interfaces - -### CreateCodeContextOpts - -Options for creating a code context. - -#### Properties - -### cwd? - -```ts -optional cwd: string; -``` - -Working directory for the context. - -###### Default - -```ts -/home/user -``` - -### language? - -```ts -optional language: string; -``` - -Language for the context. - -###### Default - -```ts -python -``` - -### requestTimeoutMs? - -```ts -optional requestTimeoutMs: number; -``` - -Timeout for the request in **milliseconds**. - -###### Default - -```ts -30_000 // 30 seconds -``` - -*** - -### RunCodeOpts - -Options for running code. - -#### Properties - -### envs? - -```ts -optional envs: Record; -``` - -Custom environment variables for code execution. - -###### Default - -```ts -{} -``` - -### onError()? - -```ts -optional onError: (error: ExecutionError) => any; -``` - -Callback for handling the `ExecutionError` object. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `error` | `ExecutionError` | - -###### Returns - -`any` - -### onResult()? - -```ts -optional onResult: (data: Result) => any; -``` - -Callback for handling the final execution result. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `data` | `Result` | - -###### Returns - -`any` - -### onStderr()? - -```ts -optional onStderr: (output: OutputMessage) => any; -``` - -Callback for handling stderr messages. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `output` | `OutputMessage` | - -###### Returns - -`any` - -### onStdout()? - -```ts -optional onStdout: (output: OutputMessage) => any; -``` - -Callback for handling stdout messages. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `output` | `OutputMessage` | - -###### Returns - -`any` - -### requestTimeoutMs? - -```ts -optional requestTimeoutMs: number; -``` - -Timeout for the request in **milliseconds**. - -###### Default - -```ts -30_000 // 30 seconds -``` - -### timeoutMs? - -```ts -optional timeoutMs: number; -``` - -Timeout for the code execution in **milliseconds**. - -###### Default - -```ts -60_000 // 60 seconds -``` - -## Type Aliases - -### Context - -```ts -type Context: object; -``` - -Represents a context for code execution. - -#### Type declaration - -| Name | Type | Description | -| ------ | ------ | ------ | -| `cwd` | `string` | The working directory of the context. | -| `id` | `string` | The ID of the context. | -| `language` | `string` | The language of the context. | diff --git a/sdk-reference/code-interpreter-js-sdk/v1.1.1/charts/page.mdx b/sdk-reference/code-interpreter-js-sdk/v1.1.1/charts/page.mdx deleted file mode 100644 index f3176d3b..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v1.1.1/charts/page.mdx +++ /dev/null @@ -1,240 +0,0 @@ -### ChartType - -Chart types - -#### Enumeration Members - -| Enumeration Member | Value | -| ------ | ------ | -| `BAR` | `"bar"` | -| `BOX_AND_WHISKER` | `"box_and_whisker"` | -| `LINE` | `"line"` | -| `PIE` | `"pie"` | -| `SCATTER` | `"scatter"` | -| `SUPERCHART` | `"superchart"` | -| `UNKNOWN` | `"unknown"` | - -*** - -### ScaleType - -Ax scale types - -#### Enumeration Members - -| Enumeration Member | Value | -| ------ | ------ | -| `ASINH` | `"asinh"` | -| `CATEGORICAL` | `"categorical"` | -| `DATETIME` | `"datetime"` | -| `FUNCTION` | `"function"` | -| `FUNCTIONLOG` | `"functionlog"` | -| `LINEAR` | `"linear"` | -| `LOG` | `"log"` | -| `LOGIT` | `"logit"` | -| `SYMLOG` | `"symlog"` | - -## Type Aliases - -### BarChart - -```ts -type BarChart: Chart2D & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `BarData`[] | -| `type` | `ChartType.BAR` | - -*** - -### BarData - -```ts -type BarData: object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `group` | `string` | -| `label` | `string` | -| `value` | `string` | - -*** - -### BoxAndWhiskerChart - -```ts -type BoxAndWhiskerChart: Chart2D & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `BoxAndWhiskerData`[] | -| `type` | `ChartType.BOX_AND_WHISKER` | - -*** - -### BoxAndWhiskerData - -```ts -type BoxAndWhiskerData: object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `first_quartile` | `number` | -| `label` | `string` | -| `max` | `number` | -| `median` | `number` | -| `min` | `number` | -| `outliers` | `number`[] | -| `third_quartile` | `number` | - -*** - -### Chart - -```ts -type Chart: object; -``` - -Represents a chart. - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `any`[] | -| `title` | `string` | -| `type` | `ChartType` | - -*** - -### ChartTypes - -```ts -type ChartTypes: - | LineChart - | ScatterChart - | BarChart - | PieChart - | BoxAndWhiskerChart - | SuperChart; -``` - -*** - -### LineChart - -```ts -type LineChart: PointChart & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `type` | `ChartType.LINE` | - -*** - -### PieChart - -```ts -type PieChart: Chart & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `PieData`[] | -| `type` | `ChartType.PIE` | - -*** - -### PieData - -```ts -type PieData: object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `angle` | `number` | -| `label` | `string` | -| `radius` | `number` | - -*** - -### PointData - -```ts -type PointData: object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `label` | `string` | -| `points` | [`number` \| `string`, `number` \| `string`][] | - -*** - -### ScatterChart - -```ts -type ScatterChart: PointChart & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `type` | `ChartType.SCATTER` | - -*** - -### SuperChart - -```ts -type SuperChart: Chart & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `Chart`[] | -| `type` | `ChartType.SUPERCHART` | - -## Functions - -### deserializeChart() - -```ts -function deserializeChart(data: any): Chart -``` - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `data` | `any` | - -#### Returns - -`Chart` diff --git a/sdk-reference/code-interpreter-js-sdk/v1.1.1/consts/page.mdx b/sdk-reference/code-interpreter-js-sdk/v1.1.1/consts/page.mdx deleted file mode 100644 index d1ee2e76..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v1.1.1/consts/page.mdx +++ /dev/null @@ -1,13 +0,0 @@ -### DEFAULT\_TIMEOUT\_MS - -```ts -const DEFAULT_TIMEOUT_MS: 60000 = 60_000; -``` - -*** - -### JUPYTER\_PORT - -```ts -const JUPYTER_PORT: 49999 = 49999; -``` diff --git a/sdk-reference/code-interpreter-js-sdk/v1.1.1/index/page.mdx b/sdk-reference/code-interpreter-js-sdk/v1.1.1/index/page.mdx deleted file mode 100644 index dc55fcc7..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v1.1.1/index/page.mdx +++ /dev/null @@ -1,103 +0,0 @@ -### BarChart - -Re-exports BarChart - -### BarData - -Re-exports BarData - -### BoxAndWhiskerChart - -Re-exports BoxAndWhiskerChart - -### BoxAndWhiskerData - -Re-exports BoxAndWhiskerData - -### Chart - -Re-exports Chart - -### ChartType - -Re-exports ChartType - -### ChartTypes - -Re-exports ChartTypes - -### Context - -Re-exports Context - -### CreateCodeContextOpts - -Re-exports CreateCodeContextOpts - -### default - -Renames and re-exports Sandbox - -### Execution - -Re-exports Execution - -### ExecutionError - -Re-exports ExecutionError - -### LineChart - -Re-exports LineChart - -### Logs - -Re-exports Logs - -### MIMEType - -Re-exports MIMEType - -### OutputMessage - -Re-exports OutputMessage - -### PieChart - -Re-exports PieChart - -### PieData - -Re-exports PieData - -### PointData - -Re-exports PointData - -### RawData - -Re-exports RawData - -### Result - -Re-exports Result - -### RunCodeOpts - -Re-exports RunCodeOpts - -### Sandbox - -Re-exports Sandbox - -### ScaleType - -Re-exports ScaleType - -### ScatterChart - -Re-exports ScatterChart - -### SuperChart - -Re-exports SuperChart diff --git a/sdk-reference/code-interpreter-js-sdk/v1.1.1/messaging/page.mdx b/sdk-reference/code-interpreter-js-sdk/v1.1.1/messaging/page.mdx deleted file mode 100644 index 4b3c4ed9..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v1.1.1/messaging/page.mdx +++ /dev/null @@ -1,326 +0,0 @@ -### Execution - -Represents the result of a cell execution. - -#### Constructors - -```ts -new Execution( - results: Result[], - logs: Logs, - error?: ExecutionError, - executionCount?: number): Execution -``` - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `results` | `Result`[] | `[]` | List of result of the cell (interactively interpreted last line), display calls (e.g. matplotlib plots). | -| `logs` | `Logs` | `...` | Logs printed to stdout and stderr during execution. | -| `error`? | `ExecutionError` | `undefined` | An Error object if an error occurred, null otherwise. | -| `executionCount`? | `number` | `undefined` | Execution count of the cell. | - -###### Returns - -`Execution` - -#### Properties - -| Property | Modifier | Type | Default value | Description | -| ------ | ------ | ------ | ------ | ------ | -| `error?` | `public` | `ExecutionError` | `undefined` | An Error object if an error occurred, null otherwise. | -| `executionCount?` | `public` | `number` | `undefined` | Execution count of the cell. | -| `logs` | `public` | `Logs` | `undefined` | Logs printed to stdout and stderr during execution. | -| `results` | `public` | `Result`[] | `[]` | List of result of the cell (interactively interpreted last line), display calls (e.g. matplotlib plots). | - -#### Accessors - -### text - -```ts -get text(): undefined | string -``` - -Returns the text representation of the main result of the cell. - -###### Returns - -`undefined` \| `string` - -#### Methods - -### toJSON() - -```ts -toJSON(): object -``` - -Returns the serializable representation of the execution result. - -###### Returns - -`object` - -| Name | Type | -| ------ | ------ | -| `error` | `undefined` \| `ExecutionError` | -| `logs` | `Logs` | -| `results` | `Result`[] | - -*** - -### ExecutionError - -Represents an error that occurred during the execution of a cell. -The error contains the name of the error, the value of the error, and the traceback. - -#### Constructors - -```ts -new ExecutionError( - name: string, - value: string, - traceback: string): ExecutionError -``` - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `name` | `string` | Name of the error. | -| `value` | `string` | Value of the error. | -| `traceback` | `string` | The raw traceback of the error. | - -###### Returns - -`ExecutionError` - -#### Properties - -| Property | Modifier | Type | Description | -| ------ | ------ | ------ | ------ | -| `name` | `public` | `string` | Name of the error. | -| `traceback` | `public` | `string` | The raw traceback of the error. | -| `value` | `public` | `string` | Value of the error. | - -*** - -### OutputMessage - -Represents an output message from the sandbox code execution. - -#### Constructors - -```ts -new OutputMessage( - line: string, - timestamp: number, - error: boolean): OutputMessage -``` - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `line` | `string` | The output line. | -| `timestamp` | `number` | Unix epoch in nanoseconds. | -| `error` | `boolean` | Whether the output is an error. | - -###### Returns - -`OutputMessage` - -#### Properties - -| Property | Modifier | Type | Description | -| ------ | ------ | ------ | ------ | -| `error` | `readonly` | `boolean` | Whether the output is an error. | -| `line` | `readonly` | `string` | The output line. | -| `timestamp` | `readonly` | `number` | Unix epoch in nanoseconds. | - -#### Methods - -### toString() - -```ts -toString(): string -``` - -###### Returns - -`string` - -*** - -### Result - -Represents the data to be displayed as a result of executing a cell in a Jupyter notebook. -The result is similar to the structure returned by ipython kernel: https://ipython.readthedocs.io/en/stable/development/execution.html#execution-semantics - -The result can contain multiple types of data, such as text, images, plots, etc. Each type of data is represented -as a string, and the result can contain multiple types of data. The display calls don't have to have text representation, -for the actual result the representation is always present for the result, the other representations are always optional. - -#### Constructors - -```ts -new Result(rawData: RawData, isMainResult: boolean): Result -``` - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `rawData` | `RawData` | -| `isMainResult` | `boolean` | - -###### Returns - -`Result` - -#### Properties - -| Property | Modifier | Type | Description | -| ------ | ------ | ------ | ------ | -| `chart?` | `readonly` | `ChartTypes` | Contains the chart data. | -| `data?` | `readonly` | `Record`\<`string`, `unknown`\> | Contains the data from DataFrame. | -| `extra?` | `readonly` | `any` | Extra data that can be included. Not part of the standard types. | -| `html?` | `readonly` | `string` | HTML representation of the data. | -| `isMainResult` | `readonly` | `boolean` | - | -| `javascript?` | `readonly` | `string` | JavaScript representation of the data. | -| `jpeg?` | `readonly` | `string` | JPEG representation of the data. | -| `json?` | `readonly` | `string` | JSON representation of the data. | -| `latex?` | `readonly` | `string` | LaTeX representation of the data. | -| `markdown?` | `readonly` | `string` | Markdown representation of the data. | -| `pdf?` | `readonly` | `string` | PDF representation of the data. | -| `png?` | `readonly` | `string` | PNG representation of the data. | -| `raw` | `readonly` | `RawData` | - | -| `svg?` | `readonly` | `string` | SVG representation of the data. | -| `text?` | `readonly` | `string` | Text representation of the result. | - -#### Methods - -### formats() - -```ts -formats(): string[] -``` - -Returns all the formats available for the result. - -###### Returns - -`string`[] - -Array of strings representing the formats available for the result. - -### toJSON() - -```ts -toJSON(): object -``` - -Returns the serializable representation of the result. - -###### Returns - -`object` - -| Name | Type | -| ------ | ------ | -| `extra`? | `any` | -| `html` | `undefined` \| `string` | -| `javascript` | `undefined` \| `string` | -| `jpeg` | `undefined` \| `string` | -| `json` | `undefined` \| `string` | -| `latex` | `undefined` \| `string` | -| `markdown` | `undefined` \| `string` | -| `pdf` | `undefined` \| `string` | -| `png` | `undefined` \| `string` | -| `svg` | `undefined` \| `string` | -| `text` | `undefined` \| `string` | - -## Type Aliases - -### Logs - -```ts -type Logs: object; -``` - -Data printed to stdout and stderr during execution, usually by print statements, logs, warnings, subprocesses, etc. - -#### Type declaration - -| Name | Type | Description | -| ------ | ------ | ------ | -| `stderr` | `string`[] | List of strings printed to stderr by prints, subprocesses, etc. | -| `stdout` | `string`[] | List of strings printed to stdout by prints, subprocesses, etc. | - -*** - -### MIMEType - -```ts -type MIMEType: string; -``` - -Represents a MIME type. - -*** - -### RawData - -```ts -type RawData: object & E2BData; -``` - -Dictionary that maps MIME types to their corresponding representations of the data. - -## Functions - -### extractError() - -```ts -function extractError(res: Response): Promise -``` - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `res` | `Response` | - -#### Returns - -`Promise`\<`undefined` \| `SandboxError`\> - -*** - -### parseOutput() - -```ts -function parseOutput( - execution: Execution, - line: string, - onStdout?: (output: OutputMessage) => any, - onStderr?: (output: OutputMessage) => any, - onResult?: (data: Result) => any, -onError?: (error: ExecutionError) => any): Promise -``` - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `execution` | `Execution` | -| `line` | `string` | -| `onStdout`? | (`output`: `OutputMessage`) => `any` | -| `onStderr`? | (`output`: `OutputMessage`) => `any` | -| `onResult`? | (`data`: `Result`) => `any` | -| `onError`? | (`error`: `ExecutionError`) => `any` | - -#### Returns - -`Promise`\<`void`\> diff --git a/sdk-reference/code-interpreter-js-sdk/v1.1.1/sandbox/page.mdx b/sdk-reference/code-interpreter-js-sdk/v1.1.1/sandbox/page.mdx deleted file mode 100644 index 96eafec5..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v1.1.1/sandbox/page.mdx +++ /dev/null @@ -1,312 +0,0 @@ -### Sandbox - -E2B cloud sandbox is a secure and isolated cloud environment. - -The sandbox allows you to: -- Access Linux OS -- Create, list, and delete files and directories -- Run commands -- Run isolated code -- Access the internet - -Check docs here. - -Use Sandbox.create to create a new sandbox. - -#### Example - -```ts -import { Sandbox } from '@e2b/code-interpreter' - -const sandbox = await Sandbox.create() -``` - -#### Methods - -### createCodeContext() - -```ts -createCodeContext(opts?: CreateCodeContextOpts): Promise -``` - -Creates a new context to run code in. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `opts`? | `CreateCodeContextOpts` | options for creating the context. | - -###### Returns - -`Promise`\<`Context`\> - -context object. - -### runCode() - -###### runCode(code, opts) - -```ts -runCode(code: string, opts?: RunCodeOpts & object): Promise -``` - -Run the code as Python. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `code` | `string` | code to execute. | -| `opts`? | `RunCodeOpts` & `object` | options for executing the code. | - -###### Returns - -`Promise`\<`Execution`\> - -`Execution` result object. - -###### runCode(code, opts) - -```ts -runCode(code: string, opts?: RunCodeOpts & object): Promise -``` - -Run the code for the specified language. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. -If no language is specified, Python is used. - -You can reference previously defined variables, imports, and functions in the code. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `code` | `string` | code to execute. | -| `opts`? | `RunCodeOpts` & `object` | options for executing the code. | - -###### Returns - -`Promise`\<`Execution`\> - -`Execution` result object. - -###### runCode(code, opts) - -```ts -runCode(code: string, opts?: RunCodeOpts & object): Promise -``` - -Runs the code in the specified context, if not specified, the default context is used. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `code` | `string` | code to execute. | -| `opts`? | `RunCodeOpts` & `object` | options for executing the code | - -###### Returns - -`Promise`\<`Execution`\> - -`Execution` result object - -## Interfaces - -### CreateCodeContextOpts - -Options for creating a code context. - -#### Properties - -### cwd? - -```ts -optional cwd: string; -``` - -Working directory for the context. - -###### Default - -```ts -/home/user -``` - -### language? - -```ts -optional language: string; -``` - -Language for the context. - -###### Default - -```ts -python -``` - -### requestTimeoutMs? - -```ts -optional requestTimeoutMs: number; -``` - -Timeout for the request in **milliseconds**. - -###### Default - -```ts -30_000 // 30 seconds -``` - -*** - -### RunCodeOpts - -Options for running code. - -#### Properties - -### envs? - -```ts -optional envs: Record; -``` - -Custom environment variables for code execution. - -###### Default - -```ts -{} -``` - -### onError()? - -```ts -optional onError: (error: ExecutionError) => any; -``` - -Callback for handling the `ExecutionError` object. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `error` | `ExecutionError` | - -###### Returns - -`any` - -### onResult()? - -```ts -optional onResult: (data: Result) => any; -``` - -Callback for handling the final execution result. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `data` | `Result` | - -###### Returns - -`any` - -### onStderr()? - -```ts -optional onStderr: (output: OutputMessage) => any; -``` - -Callback for handling stderr messages. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `output` | `OutputMessage` | - -###### Returns - -`any` - -### onStdout()? - -```ts -optional onStdout: (output: OutputMessage) => any; -``` - -Callback for handling stdout messages. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `output` | `OutputMessage` | - -###### Returns - -`any` - -### requestTimeoutMs? - -```ts -optional requestTimeoutMs: number; -``` - -Timeout for the request in **milliseconds**. - -###### Default - -```ts -30_000 // 30 seconds -``` - -### timeoutMs? - -```ts -optional timeoutMs: number; -``` - -Timeout for the code execution in **milliseconds**. - -###### Default - -```ts -60_000 // 60 seconds -``` - -## Type Aliases - -### Context - -```ts -type Context: object; -``` - -Represents a context for code execution. - -#### Type declaration - -| Name | Type | Description | -| ------ | ------ | ------ | -| `cwd` | `string` | The working directory of the context. | -| `id` | `string` | The ID of the context. | -| `language` | `string` | The language of the context. | diff --git a/sdk-reference/code-interpreter-js-sdk/v1.2.0/charts/page.mdx b/sdk-reference/code-interpreter-js-sdk/v1.2.0/charts/page.mdx deleted file mode 100644 index f3176d3b..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v1.2.0/charts/page.mdx +++ /dev/null @@ -1,240 +0,0 @@ -### ChartType - -Chart types - -#### Enumeration Members - -| Enumeration Member | Value | -| ------ | ------ | -| `BAR` | `"bar"` | -| `BOX_AND_WHISKER` | `"box_and_whisker"` | -| `LINE` | `"line"` | -| `PIE` | `"pie"` | -| `SCATTER` | `"scatter"` | -| `SUPERCHART` | `"superchart"` | -| `UNKNOWN` | `"unknown"` | - -*** - -### ScaleType - -Ax scale types - -#### Enumeration Members - -| Enumeration Member | Value | -| ------ | ------ | -| `ASINH` | `"asinh"` | -| `CATEGORICAL` | `"categorical"` | -| `DATETIME` | `"datetime"` | -| `FUNCTION` | `"function"` | -| `FUNCTIONLOG` | `"functionlog"` | -| `LINEAR` | `"linear"` | -| `LOG` | `"log"` | -| `LOGIT` | `"logit"` | -| `SYMLOG` | `"symlog"` | - -## Type Aliases - -### BarChart - -```ts -type BarChart: Chart2D & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `BarData`[] | -| `type` | `ChartType.BAR` | - -*** - -### BarData - -```ts -type BarData: object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `group` | `string` | -| `label` | `string` | -| `value` | `string` | - -*** - -### BoxAndWhiskerChart - -```ts -type BoxAndWhiskerChart: Chart2D & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `BoxAndWhiskerData`[] | -| `type` | `ChartType.BOX_AND_WHISKER` | - -*** - -### BoxAndWhiskerData - -```ts -type BoxAndWhiskerData: object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `first_quartile` | `number` | -| `label` | `string` | -| `max` | `number` | -| `median` | `number` | -| `min` | `number` | -| `outliers` | `number`[] | -| `third_quartile` | `number` | - -*** - -### Chart - -```ts -type Chart: object; -``` - -Represents a chart. - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `any`[] | -| `title` | `string` | -| `type` | `ChartType` | - -*** - -### ChartTypes - -```ts -type ChartTypes: - | LineChart - | ScatterChart - | BarChart - | PieChart - | BoxAndWhiskerChart - | SuperChart; -``` - -*** - -### LineChart - -```ts -type LineChart: PointChart & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `type` | `ChartType.LINE` | - -*** - -### PieChart - -```ts -type PieChart: Chart & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `PieData`[] | -| `type` | `ChartType.PIE` | - -*** - -### PieData - -```ts -type PieData: object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `angle` | `number` | -| `label` | `string` | -| `radius` | `number` | - -*** - -### PointData - -```ts -type PointData: object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `label` | `string` | -| `points` | [`number` \| `string`, `number` \| `string`][] | - -*** - -### ScatterChart - -```ts -type ScatterChart: PointChart & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `type` | `ChartType.SCATTER` | - -*** - -### SuperChart - -```ts -type SuperChart: Chart & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `Chart`[] | -| `type` | `ChartType.SUPERCHART` | - -## Functions - -### deserializeChart() - -```ts -function deserializeChart(data: any): Chart -``` - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `data` | `any` | - -#### Returns - -`Chart` diff --git a/sdk-reference/code-interpreter-js-sdk/v1.2.0/consts/page.mdx b/sdk-reference/code-interpreter-js-sdk/v1.2.0/consts/page.mdx deleted file mode 100644 index d1ee2e76..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v1.2.0/consts/page.mdx +++ /dev/null @@ -1,13 +0,0 @@ -### DEFAULT\_TIMEOUT\_MS - -```ts -const DEFAULT_TIMEOUT_MS: 60000 = 60_000; -``` - -*** - -### JUPYTER\_PORT - -```ts -const JUPYTER_PORT: 49999 = 49999; -``` diff --git a/sdk-reference/code-interpreter-js-sdk/v1.2.0/index/page.mdx b/sdk-reference/code-interpreter-js-sdk/v1.2.0/index/page.mdx deleted file mode 100644 index dc55fcc7..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v1.2.0/index/page.mdx +++ /dev/null @@ -1,103 +0,0 @@ -### BarChart - -Re-exports BarChart - -### BarData - -Re-exports BarData - -### BoxAndWhiskerChart - -Re-exports BoxAndWhiskerChart - -### BoxAndWhiskerData - -Re-exports BoxAndWhiskerData - -### Chart - -Re-exports Chart - -### ChartType - -Re-exports ChartType - -### ChartTypes - -Re-exports ChartTypes - -### Context - -Re-exports Context - -### CreateCodeContextOpts - -Re-exports CreateCodeContextOpts - -### default - -Renames and re-exports Sandbox - -### Execution - -Re-exports Execution - -### ExecutionError - -Re-exports ExecutionError - -### LineChart - -Re-exports LineChart - -### Logs - -Re-exports Logs - -### MIMEType - -Re-exports MIMEType - -### OutputMessage - -Re-exports OutputMessage - -### PieChart - -Re-exports PieChart - -### PieData - -Re-exports PieData - -### PointData - -Re-exports PointData - -### RawData - -Re-exports RawData - -### Result - -Re-exports Result - -### RunCodeOpts - -Re-exports RunCodeOpts - -### Sandbox - -Re-exports Sandbox - -### ScaleType - -Re-exports ScaleType - -### ScatterChart - -Re-exports ScatterChart - -### SuperChart - -Re-exports SuperChart diff --git a/sdk-reference/code-interpreter-js-sdk/v1.2.0/messaging/page.mdx b/sdk-reference/code-interpreter-js-sdk/v1.2.0/messaging/page.mdx deleted file mode 100644 index 4b3c4ed9..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v1.2.0/messaging/page.mdx +++ /dev/null @@ -1,326 +0,0 @@ -### Execution - -Represents the result of a cell execution. - -#### Constructors - -```ts -new Execution( - results: Result[], - logs: Logs, - error?: ExecutionError, - executionCount?: number): Execution -``` - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `results` | `Result`[] | `[]` | List of result of the cell (interactively interpreted last line), display calls (e.g. matplotlib plots). | -| `logs` | `Logs` | `...` | Logs printed to stdout and stderr during execution. | -| `error`? | `ExecutionError` | `undefined` | An Error object if an error occurred, null otherwise. | -| `executionCount`? | `number` | `undefined` | Execution count of the cell. | - -###### Returns - -`Execution` - -#### Properties - -| Property | Modifier | Type | Default value | Description | -| ------ | ------ | ------ | ------ | ------ | -| `error?` | `public` | `ExecutionError` | `undefined` | An Error object if an error occurred, null otherwise. | -| `executionCount?` | `public` | `number` | `undefined` | Execution count of the cell. | -| `logs` | `public` | `Logs` | `undefined` | Logs printed to stdout and stderr during execution. | -| `results` | `public` | `Result`[] | `[]` | List of result of the cell (interactively interpreted last line), display calls (e.g. matplotlib plots). | - -#### Accessors - -### text - -```ts -get text(): undefined | string -``` - -Returns the text representation of the main result of the cell. - -###### Returns - -`undefined` \| `string` - -#### Methods - -### toJSON() - -```ts -toJSON(): object -``` - -Returns the serializable representation of the execution result. - -###### Returns - -`object` - -| Name | Type | -| ------ | ------ | -| `error` | `undefined` \| `ExecutionError` | -| `logs` | `Logs` | -| `results` | `Result`[] | - -*** - -### ExecutionError - -Represents an error that occurred during the execution of a cell. -The error contains the name of the error, the value of the error, and the traceback. - -#### Constructors - -```ts -new ExecutionError( - name: string, - value: string, - traceback: string): ExecutionError -``` - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `name` | `string` | Name of the error. | -| `value` | `string` | Value of the error. | -| `traceback` | `string` | The raw traceback of the error. | - -###### Returns - -`ExecutionError` - -#### Properties - -| Property | Modifier | Type | Description | -| ------ | ------ | ------ | ------ | -| `name` | `public` | `string` | Name of the error. | -| `traceback` | `public` | `string` | The raw traceback of the error. | -| `value` | `public` | `string` | Value of the error. | - -*** - -### OutputMessage - -Represents an output message from the sandbox code execution. - -#### Constructors - -```ts -new OutputMessage( - line: string, - timestamp: number, - error: boolean): OutputMessage -``` - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `line` | `string` | The output line. | -| `timestamp` | `number` | Unix epoch in nanoseconds. | -| `error` | `boolean` | Whether the output is an error. | - -###### Returns - -`OutputMessage` - -#### Properties - -| Property | Modifier | Type | Description | -| ------ | ------ | ------ | ------ | -| `error` | `readonly` | `boolean` | Whether the output is an error. | -| `line` | `readonly` | `string` | The output line. | -| `timestamp` | `readonly` | `number` | Unix epoch in nanoseconds. | - -#### Methods - -### toString() - -```ts -toString(): string -``` - -###### Returns - -`string` - -*** - -### Result - -Represents the data to be displayed as a result of executing a cell in a Jupyter notebook. -The result is similar to the structure returned by ipython kernel: https://ipython.readthedocs.io/en/stable/development/execution.html#execution-semantics - -The result can contain multiple types of data, such as text, images, plots, etc. Each type of data is represented -as a string, and the result can contain multiple types of data. The display calls don't have to have text representation, -for the actual result the representation is always present for the result, the other representations are always optional. - -#### Constructors - -```ts -new Result(rawData: RawData, isMainResult: boolean): Result -``` - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `rawData` | `RawData` | -| `isMainResult` | `boolean` | - -###### Returns - -`Result` - -#### Properties - -| Property | Modifier | Type | Description | -| ------ | ------ | ------ | ------ | -| `chart?` | `readonly` | `ChartTypes` | Contains the chart data. | -| `data?` | `readonly` | `Record`\<`string`, `unknown`\> | Contains the data from DataFrame. | -| `extra?` | `readonly` | `any` | Extra data that can be included. Not part of the standard types. | -| `html?` | `readonly` | `string` | HTML representation of the data. | -| `isMainResult` | `readonly` | `boolean` | - | -| `javascript?` | `readonly` | `string` | JavaScript representation of the data. | -| `jpeg?` | `readonly` | `string` | JPEG representation of the data. | -| `json?` | `readonly` | `string` | JSON representation of the data. | -| `latex?` | `readonly` | `string` | LaTeX representation of the data. | -| `markdown?` | `readonly` | `string` | Markdown representation of the data. | -| `pdf?` | `readonly` | `string` | PDF representation of the data. | -| `png?` | `readonly` | `string` | PNG representation of the data. | -| `raw` | `readonly` | `RawData` | - | -| `svg?` | `readonly` | `string` | SVG representation of the data. | -| `text?` | `readonly` | `string` | Text representation of the result. | - -#### Methods - -### formats() - -```ts -formats(): string[] -``` - -Returns all the formats available for the result. - -###### Returns - -`string`[] - -Array of strings representing the formats available for the result. - -### toJSON() - -```ts -toJSON(): object -``` - -Returns the serializable representation of the result. - -###### Returns - -`object` - -| Name | Type | -| ------ | ------ | -| `extra`? | `any` | -| `html` | `undefined` \| `string` | -| `javascript` | `undefined` \| `string` | -| `jpeg` | `undefined` \| `string` | -| `json` | `undefined` \| `string` | -| `latex` | `undefined` \| `string` | -| `markdown` | `undefined` \| `string` | -| `pdf` | `undefined` \| `string` | -| `png` | `undefined` \| `string` | -| `svg` | `undefined` \| `string` | -| `text` | `undefined` \| `string` | - -## Type Aliases - -### Logs - -```ts -type Logs: object; -``` - -Data printed to stdout and stderr during execution, usually by print statements, logs, warnings, subprocesses, etc. - -#### Type declaration - -| Name | Type | Description | -| ------ | ------ | ------ | -| `stderr` | `string`[] | List of strings printed to stderr by prints, subprocesses, etc. | -| `stdout` | `string`[] | List of strings printed to stdout by prints, subprocesses, etc. | - -*** - -### MIMEType - -```ts -type MIMEType: string; -``` - -Represents a MIME type. - -*** - -### RawData - -```ts -type RawData: object & E2BData; -``` - -Dictionary that maps MIME types to their corresponding representations of the data. - -## Functions - -### extractError() - -```ts -function extractError(res: Response): Promise -``` - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `res` | `Response` | - -#### Returns - -`Promise`\<`undefined` \| `SandboxError`\> - -*** - -### parseOutput() - -```ts -function parseOutput( - execution: Execution, - line: string, - onStdout?: (output: OutputMessage) => any, - onStderr?: (output: OutputMessage) => any, - onResult?: (data: Result) => any, -onError?: (error: ExecutionError) => any): Promise -``` - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `execution` | `Execution` | -| `line` | `string` | -| `onStdout`? | (`output`: `OutputMessage`) => `any` | -| `onStderr`? | (`output`: `OutputMessage`) => `any` | -| `onResult`? | (`data`: `Result`) => `any` | -| `onError`? | (`error`: `ExecutionError`) => `any` | - -#### Returns - -`Promise`\<`void`\> diff --git a/sdk-reference/code-interpreter-js-sdk/v1.2.0/sandbox/page.mdx b/sdk-reference/code-interpreter-js-sdk/v1.2.0/sandbox/page.mdx deleted file mode 100644 index 96eafec5..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v1.2.0/sandbox/page.mdx +++ /dev/null @@ -1,312 +0,0 @@ -### Sandbox - -E2B cloud sandbox is a secure and isolated cloud environment. - -The sandbox allows you to: -- Access Linux OS -- Create, list, and delete files and directories -- Run commands -- Run isolated code -- Access the internet - -Check docs here. - -Use Sandbox.create to create a new sandbox. - -#### Example - -```ts -import { Sandbox } from '@e2b/code-interpreter' - -const sandbox = await Sandbox.create() -``` - -#### Methods - -### createCodeContext() - -```ts -createCodeContext(opts?: CreateCodeContextOpts): Promise -``` - -Creates a new context to run code in. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `opts`? | `CreateCodeContextOpts` | options for creating the context. | - -###### Returns - -`Promise`\<`Context`\> - -context object. - -### runCode() - -###### runCode(code, opts) - -```ts -runCode(code: string, opts?: RunCodeOpts & object): Promise -``` - -Run the code as Python. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `code` | `string` | code to execute. | -| `opts`? | `RunCodeOpts` & `object` | options for executing the code. | - -###### Returns - -`Promise`\<`Execution`\> - -`Execution` result object. - -###### runCode(code, opts) - -```ts -runCode(code: string, opts?: RunCodeOpts & object): Promise -``` - -Run the code for the specified language. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. -If no language is specified, Python is used. - -You can reference previously defined variables, imports, and functions in the code. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `code` | `string` | code to execute. | -| `opts`? | `RunCodeOpts` & `object` | options for executing the code. | - -###### Returns - -`Promise`\<`Execution`\> - -`Execution` result object. - -###### runCode(code, opts) - -```ts -runCode(code: string, opts?: RunCodeOpts & object): Promise -``` - -Runs the code in the specified context, if not specified, the default context is used. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `code` | `string` | code to execute. | -| `opts`? | `RunCodeOpts` & `object` | options for executing the code | - -###### Returns - -`Promise`\<`Execution`\> - -`Execution` result object - -## Interfaces - -### CreateCodeContextOpts - -Options for creating a code context. - -#### Properties - -### cwd? - -```ts -optional cwd: string; -``` - -Working directory for the context. - -###### Default - -```ts -/home/user -``` - -### language? - -```ts -optional language: string; -``` - -Language for the context. - -###### Default - -```ts -python -``` - -### requestTimeoutMs? - -```ts -optional requestTimeoutMs: number; -``` - -Timeout for the request in **milliseconds**. - -###### Default - -```ts -30_000 // 30 seconds -``` - -*** - -### RunCodeOpts - -Options for running code. - -#### Properties - -### envs? - -```ts -optional envs: Record; -``` - -Custom environment variables for code execution. - -###### Default - -```ts -{} -``` - -### onError()? - -```ts -optional onError: (error: ExecutionError) => any; -``` - -Callback for handling the `ExecutionError` object. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `error` | `ExecutionError` | - -###### Returns - -`any` - -### onResult()? - -```ts -optional onResult: (data: Result) => any; -``` - -Callback for handling the final execution result. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `data` | `Result` | - -###### Returns - -`any` - -### onStderr()? - -```ts -optional onStderr: (output: OutputMessage) => any; -``` - -Callback for handling stderr messages. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `output` | `OutputMessage` | - -###### Returns - -`any` - -### onStdout()? - -```ts -optional onStdout: (output: OutputMessage) => any; -``` - -Callback for handling stdout messages. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `output` | `OutputMessage` | - -###### Returns - -`any` - -### requestTimeoutMs? - -```ts -optional requestTimeoutMs: number; -``` - -Timeout for the request in **milliseconds**. - -###### Default - -```ts -30_000 // 30 seconds -``` - -### timeoutMs? - -```ts -optional timeoutMs: number; -``` - -Timeout for the code execution in **milliseconds**. - -###### Default - -```ts -60_000 // 60 seconds -``` - -## Type Aliases - -### Context - -```ts -type Context: object; -``` - -Represents a context for code execution. - -#### Type declaration - -| Name | Type | Description | -| ------ | ------ | ------ | -| `cwd` | `string` | The working directory of the context. | -| `id` | `string` | The ID of the context. | -| `language` | `string` | The language of the context. | diff --git a/sdk-reference/code-interpreter-js-sdk/v1.5.0/charts/page.mdx b/sdk-reference/code-interpreter-js-sdk/v1.5.0/charts/page.mdx deleted file mode 100644 index f3176d3b..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v1.5.0/charts/page.mdx +++ /dev/null @@ -1,240 +0,0 @@ -### ChartType - -Chart types - -#### Enumeration Members - -| Enumeration Member | Value | -| ------ | ------ | -| `BAR` | `"bar"` | -| `BOX_AND_WHISKER` | `"box_and_whisker"` | -| `LINE` | `"line"` | -| `PIE` | `"pie"` | -| `SCATTER` | `"scatter"` | -| `SUPERCHART` | `"superchart"` | -| `UNKNOWN` | `"unknown"` | - -*** - -### ScaleType - -Ax scale types - -#### Enumeration Members - -| Enumeration Member | Value | -| ------ | ------ | -| `ASINH` | `"asinh"` | -| `CATEGORICAL` | `"categorical"` | -| `DATETIME` | `"datetime"` | -| `FUNCTION` | `"function"` | -| `FUNCTIONLOG` | `"functionlog"` | -| `LINEAR` | `"linear"` | -| `LOG` | `"log"` | -| `LOGIT` | `"logit"` | -| `SYMLOG` | `"symlog"` | - -## Type Aliases - -### BarChart - -```ts -type BarChart: Chart2D & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `BarData`[] | -| `type` | `ChartType.BAR` | - -*** - -### BarData - -```ts -type BarData: object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `group` | `string` | -| `label` | `string` | -| `value` | `string` | - -*** - -### BoxAndWhiskerChart - -```ts -type BoxAndWhiskerChart: Chart2D & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `BoxAndWhiskerData`[] | -| `type` | `ChartType.BOX_AND_WHISKER` | - -*** - -### BoxAndWhiskerData - -```ts -type BoxAndWhiskerData: object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `first_quartile` | `number` | -| `label` | `string` | -| `max` | `number` | -| `median` | `number` | -| `min` | `number` | -| `outliers` | `number`[] | -| `third_quartile` | `number` | - -*** - -### Chart - -```ts -type Chart: object; -``` - -Represents a chart. - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `any`[] | -| `title` | `string` | -| `type` | `ChartType` | - -*** - -### ChartTypes - -```ts -type ChartTypes: - | LineChart - | ScatterChart - | BarChart - | PieChart - | BoxAndWhiskerChart - | SuperChart; -``` - -*** - -### LineChart - -```ts -type LineChart: PointChart & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `type` | `ChartType.LINE` | - -*** - -### PieChart - -```ts -type PieChart: Chart & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `PieData`[] | -| `type` | `ChartType.PIE` | - -*** - -### PieData - -```ts -type PieData: object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `angle` | `number` | -| `label` | `string` | -| `radius` | `number` | - -*** - -### PointData - -```ts -type PointData: object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `label` | `string` | -| `points` | [`number` \| `string`, `number` \| `string`][] | - -*** - -### ScatterChart - -```ts -type ScatterChart: PointChart & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `type` | `ChartType.SCATTER` | - -*** - -### SuperChart - -```ts -type SuperChart: Chart & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `Chart`[] | -| `type` | `ChartType.SUPERCHART` | - -## Functions - -### deserializeChart() - -```ts -function deserializeChart(data: any): Chart -``` - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `data` | `any` | - -#### Returns - -`Chart` diff --git a/sdk-reference/code-interpreter-js-sdk/v1.5.0/consts/page.mdx b/sdk-reference/code-interpreter-js-sdk/v1.5.0/consts/page.mdx deleted file mode 100644 index d1ee2e76..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v1.5.0/consts/page.mdx +++ /dev/null @@ -1,13 +0,0 @@ -### DEFAULT\_TIMEOUT\_MS - -```ts -const DEFAULT_TIMEOUT_MS: 60000 = 60_000; -``` - -*** - -### JUPYTER\_PORT - -```ts -const JUPYTER_PORT: 49999 = 49999; -``` diff --git a/sdk-reference/code-interpreter-js-sdk/v1.5.0/index/page.mdx b/sdk-reference/code-interpreter-js-sdk/v1.5.0/index/page.mdx deleted file mode 100644 index dc55fcc7..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v1.5.0/index/page.mdx +++ /dev/null @@ -1,103 +0,0 @@ -### BarChart - -Re-exports BarChart - -### BarData - -Re-exports BarData - -### BoxAndWhiskerChart - -Re-exports BoxAndWhiskerChart - -### BoxAndWhiskerData - -Re-exports BoxAndWhiskerData - -### Chart - -Re-exports Chart - -### ChartType - -Re-exports ChartType - -### ChartTypes - -Re-exports ChartTypes - -### Context - -Re-exports Context - -### CreateCodeContextOpts - -Re-exports CreateCodeContextOpts - -### default - -Renames and re-exports Sandbox - -### Execution - -Re-exports Execution - -### ExecutionError - -Re-exports ExecutionError - -### LineChart - -Re-exports LineChart - -### Logs - -Re-exports Logs - -### MIMEType - -Re-exports MIMEType - -### OutputMessage - -Re-exports OutputMessage - -### PieChart - -Re-exports PieChart - -### PieData - -Re-exports PieData - -### PointData - -Re-exports PointData - -### RawData - -Re-exports RawData - -### Result - -Re-exports Result - -### RunCodeOpts - -Re-exports RunCodeOpts - -### Sandbox - -Re-exports Sandbox - -### ScaleType - -Re-exports ScaleType - -### ScatterChart - -Re-exports ScatterChart - -### SuperChart - -Re-exports SuperChart diff --git a/sdk-reference/code-interpreter-js-sdk/v1.5.0/messaging/page.mdx b/sdk-reference/code-interpreter-js-sdk/v1.5.0/messaging/page.mdx deleted file mode 100644 index 4b3c4ed9..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v1.5.0/messaging/page.mdx +++ /dev/null @@ -1,326 +0,0 @@ -### Execution - -Represents the result of a cell execution. - -#### Constructors - -```ts -new Execution( - results: Result[], - logs: Logs, - error?: ExecutionError, - executionCount?: number): Execution -``` - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `results` | `Result`[] | `[]` | List of result of the cell (interactively interpreted last line), display calls (e.g. matplotlib plots). | -| `logs` | `Logs` | `...` | Logs printed to stdout and stderr during execution. | -| `error`? | `ExecutionError` | `undefined` | An Error object if an error occurred, null otherwise. | -| `executionCount`? | `number` | `undefined` | Execution count of the cell. | - -###### Returns - -`Execution` - -#### Properties - -| Property | Modifier | Type | Default value | Description | -| ------ | ------ | ------ | ------ | ------ | -| `error?` | `public` | `ExecutionError` | `undefined` | An Error object if an error occurred, null otherwise. | -| `executionCount?` | `public` | `number` | `undefined` | Execution count of the cell. | -| `logs` | `public` | `Logs` | `undefined` | Logs printed to stdout and stderr during execution. | -| `results` | `public` | `Result`[] | `[]` | List of result of the cell (interactively interpreted last line), display calls (e.g. matplotlib plots). | - -#### Accessors - -### text - -```ts -get text(): undefined | string -``` - -Returns the text representation of the main result of the cell. - -###### Returns - -`undefined` \| `string` - -#### Methods - -### toJSON() - -```ts -toJSON(): object -``` - -Returns the serializable representation of the execution result. - -###### Returns - -`object` - -| Name | Type | -| ------ | ------ | -| `error` | `undefined` \| `ExecutionError` | -| `logs` | `Logs` | -| `results` | `Result`[] | - -*** - -### ExecutionError - -Represents an error that occurred during the execution of a cell. -The error contains the name of the error, the value of the error, and the traceback. - -#### Constructors - -```ts -new ExecutionError( - name: string, - value: string, - traceback: string): ExecutionError -``` - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `name` | `string` | Name of the error. | -| `value` | `string` | Value of the error. | -| `traceback` | `string` | The raw traceback of the error. | - -###### Returns - -`ExecutionError` - -#### Properties - -| Property | Modifier | Type | Description | -| ------ | ------ | ------ | ------ | -| `name` | `public` | `string` | Name of the error. | -| `traceback` | `public` | `string` | The raw traceback of the error. | -| `value` | `public` | `string` | Value of the error. | - -*** - -### OutputMessage - -Represents an output message from the sandbox code execution. - -#### Constructors - -```ts -new OutputMessage( - line: string, - timestamp: number, - error: boolean): OutputMessage -``` - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `line` | `string` | The output line. | -| `timestamp` | `number` | Unix epoch in nanoseconds. | -| `error` | `boolean` | Whether the output is an error. | - -###### Returns - -`OutputMessage` - -#### Properties - -| Property | Modifier | Type | Description | -| ------ | ------ | ------ | ------ | -| `error` | `readonly` | `boolean` | Whether the output is an error. | -| `line` | `readonly` | `string` | The output line. | -| `timestamp` | `readonly` | `number` | Unix epoch in nanoseconds. | - -#### Methods - -### toString() - -```ts -toString(): string -``` - -###### Returns - -`string` - -*** - -### Result - -Represents the data to be displayed as a result of executing a cell in a Jupyter notebook. -The result is similar to the structure returned by ipython kernel: https://ipython.readthedocs.io/en/stable/development/execution.html#execution-semantics - -The result can contain multiple types of data, such as text, images, plots, etc. Each type of data is represented -as a string, and the result can contain multiple types of data. The display calls don't have to have text representation, -for the actual result the representation is always present for the result, the other representations are always optional. - -#### Constructors - -```ts -new Result(rawData: RawData, isMainResult: boolean): Result -``` - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `rawData` | `RawData` | -| `isMainResult` | `boolean` | - -###### Returns - -`Result` - -#### Properties - -| Property | Modifier | Type | Description | -| ------ | ------ | ------ | ------ | -| `chart?` | `readonly` | `ChartTypes` | Contains the chart data. | -| `data?` | `readonly` | `Record`\<`string`, `unknown`\> | Contains the data from DataFrame. | -| `extra?` | `readonly` | `any` | Extra data that can be included. Not part of the standard types. | -| `html?` | `readonly` | `string` | HTML representation of the data. | -| `isMainResult` | `readonly` | `boolean` | - | -| `javascript?` | `readonly` | `string` | JavaScript representation of the data. | -| `jpeg?` | `readonly` | `string` | JPEG representation of the data. | -| `json?` | `readonly` | `string` | JSON representation of the data. | -| `latex?` | `readonly` | `string` | LaTeX representation of the data. | -| `markdown?` | `readonly` | `string` | Markdown representation of the data. | -| `pdf?` | `readonly` | `string` | PDF representation of the data. | -| `png?` | `readonly` | `string` | PNG representation of the data. | -| `raw` | `readonly` | `RawData` | - | -| `svg?` | `readonly` | `string` | SVG representation of the data. | -| `text?` | `readonly` | `string` | Text representation of the result. | - -#### Methods - -### formats() - -```ts -formats(): string[] -``` - -Returns all the formats available for the result. - -###### Returns - -`string`[] - -Array of strings representing the formats available for the result. - -### toJSON() - -```ts -toJSON(): object -``` - -Returns the serializable representation of the result. - -###### Returns - -`object` - -| Name | Type | -| ------ | ------ | -| `extra`? | `any` | -| `html` | `undefined` \| `string` | -| `javascript` | `undefined` \| `string` | -| `jpeg` | `undefined` \| `string` | -| `json` | `undefined` \| `string` | -| `latex` | `undefined` \| `string` | -| `markdown` | `undefined` \| `string` | -| `pdf` | `undefined` \| `string` | -| `png` | `undefined` \| `string` | -| `svg` | `undefined` \| `string` | -| `text` | `undefined` \| `string` | - -## Type Aliases - -### Logs - -```ts -type Logs: object; -``` - -Data printed to stdout and stderr during execution, usually by print statements, logs, warnings, subprocesses, etc. - -#### Type declaration - -| Name | Type | Description | -| ------ | ------ | ------ | -| `stderr` | `string`[] | List of strings printed to stderr by prints, subprocesses, etc. | -| `stdout` | `string`[] | List of strings printed to stdout by prints, subprocesses, etc. | - -*** - -### MIMEType - -```ts -type MIMEType: string; -``` - -Represents a MIME type. - -*** - -### RawData - -```ts -type RawData: object & E2BData; -``` - -Dictionary that maps MIME types to their corresponding representations of the data. - -## Functions - -### extractError() - -```ts -function extractError(res: Response): Promise -``` - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `res` | `Response` | - -#### Returns - -`Promise`\<`undefined` \| `SandboxError`\> - -*** - -### parseOutput() - -```ts -function parseOutput( - execution: Execution, - line: string, - onStdout?: (output: OutputMessage) => any, - onStderr?: (output: OutputMessage) => any, - onResult?: (data: Result) => any, -onError?: (error: ExecutionError) => any): Promise -``` - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `execution` | `Execution` | -| `line` | `string` | -| `onStdout`? | (`output`: `OutputMessage`) => `any` | -| `onStderr`? | (`output`: `OutputMessage`) => `any` | -| `onResult`? | (`data`: `Result`) => `any` | -| `onError`? | (`error`: `ExecutionError`) => `any` | - -#### Returns - -`Promise`\<`void`\> diff --git a/sdk-reference/code-interpreter-js-sdk/v1.5.0/sandbox/page.mdx b/sdk-reference/code-interpreter-js-sdk/v1.5.0/sandbox/page.mdx deleted file mode 100644 index 96eafec5..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v1.5.0/sandbox/page.mdx +++ /dev/null @@ -1,312 +0,0 @@ -### Sandbox - -E2B cloud sandbox is a secure and isolated cloud environment. - -The sandbox allows you to: -- Access Linux OS -- Create, list, and delete files and directories -- Run commands -- Run isolated code -- Access the internet - -Check docs here. - -Use Sandbox.create to create a new sandbox. - -#### Example - -```ts -import { Sandbox } from '@e2b/code-interpreter' - -const sandbox = await Sandbox.create() -``` - -#### Methods - -### createCodeContext() - -```ts -createCodeContext(opts?: CreateCodeContextOpts): Promise -``` - -Creates a new context to run code in. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `opts`? | `CreateCodeContextOpts` | options for creating the context. | - -###### Returns - -`Promise`\<`Context`\> - -context object. - -### runCode() - -###### runCode(code, opts) - -```ts -runCode(code: string, opts?: RunCodeOpts & object): Promise -``` - -Run the code as Python. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `code` | `string` | code to execute. | -| `opts`? | `RunCodeOpts` & `object` | options for executing the code. | - -###### Returns - -`Promise`\<`Execution`\> - -`Execution` result object. - -###### runCode(code, opts) - -```ts -runCode(code: string, opts?: RunCodeOpts & object): Promise -``` - -Run the code for the specified language. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. -If no language is specified, Python is used. - -You can reference previously defined variables, imports, and functions in the code. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `code` | `string` | code to execute. | -| `opts`? | `RunCodeOpts` & `object` | options for executing the code. | - -###### Returns - -`Promise`\<`Execution`\> - -`Execution` result object. - -###### runCode(code, opts) - -```ts -runCode(code: string, opts?: RunCodeOpts & object): Promise -``` - -Runs the code in the specified context, if not specified, the default context is used. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `code` | `string` | code to execute. | -| `opts`? | `RunCodeOpts` & `object` | options for executing the code | - -###### Returns - -`Promise`\<`Execution`\> - -`Execution` result object - -## Interfaces - -### CreateCodeContextOpts - -Options for creating a code context. - -#### Properties - -### cwd? - -```ts -optional cwd: string; -``` - -Working directory for the context. - -###### Default - -```ts -/home/user -``` - -### language? - -```ts -optional language: string; -``` - -Language for the context. - -###### Default - -```ts -python -``` - -### requestTimeoutMs? - -```ts -optional requestTimeoutMs: number; -``` - -Timeout for the request in **milliseconds**. - -###### Default - -```ts -30_000 // 30 seconds -``` - -*** - -### RunCodeOpts - -Options for running code. - -#### Properties - -### envs? - -```ts -optional envs: Record; -``` - -Custom environment variables for code execution. - -###### Default - -```ts -{} -``` - -### onError()? - -```ts -optional onError: (error: ExecutionError) => any; -``` - -Callback for handling the `ExecutionError` object. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `error` | `ExecutionError` | - -###### Returns - -`any` - -### onResult()? - -```ts -optional onResult: (data: Result) => any; -``` - -Callback for handling the final execution result. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `data` | `Result` | - -###### Returns - -`any` - -### onStderr()? - -```ts -optional onStderr: (output: OutputMessage) => any; -``` - -Callback for handling stderr messages. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `output` | `OutputMessage` | - -###### Returns - -`any` - -### onStdout()? - -```ts -optional onStdout: (output: OutputMessage) => any; -``` - -Callback for handling stdout messages. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `output` | `OutputMessage` | - -###### Returns - -`any` - -### requestTimeoutMs? - -```ts -optional requestTimeoutMs: number; -``` - -Timeout for the request in **milliseconds**. - -###### Default - -```ts -30_000 // 30 seconds -``` - -### timeoutMs? - -```ts -optional timeoutMs: number; -``` - -Timeout for the code execution in **milliseconds**. - -###### Default - -```ts -60_000 // 60 seconds -``` - -## Type Aliases - -### Context - -```ts -type Context: object; -``` - -Represents a context for code execution. - -#### Type declaration - -| Name | Type | Description | -| ------ | ------ | ------ | -| `cwd` | `string` | The working directory of the context. | -| `id` | `string` | The ID of the context. | -| `language` | `string` | The language of the context. | diff --git a/sdk-reference/code-interpreter-js-sdk/v1.5.1/charts/page.mdx b/sdk-reference/code-interpreter-js-sdk/v1.5.1/charts/page.mdx deleted file mode 100644 index f3176d3b..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v1.5.1/charts/page.mdx +++ /dev/null @@ -1,240 +0,0 @@ -### ChartType - -Chart types - -#### Enumeration Members - -| Enumeration Member | Value | -| ------ | ------ | -| `BAR` | `"bar"` | -| `BOX_AND_WHISKER` | `"box_and_whisker"` | -| `LINE` | `"line"` | -| `PIE` | `"pie"` | -| `SCATTER` | `"scatter"` | -| `SUPERCHART` | `"superchart"` | -| `UNKNOWN` | `"unknown"` | - -*** - -### ScaleType - -Ax scale types - -#### Enumeration Members - -| Enumeration Member | Value | -| ------ | ------ | -| `ASINH` | `"asinh"` | -| `CATEGORICAL` | `"categorical"` | -| `DATETIME` | `"datetime"` | -| `FUNCTION` | `"function"` | -| `FUNCTIONLOG` | `"functionlog"` | -| `LINEAR` | `"linear"` | -| `LOG` | `"log"` | -| `LOGIT` | `"logit"` | -| `SYMLOG` | `"symlog"` | - -## Type Aliases - -### BarChart - -```ts -type BarChart: Chart2D & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `BarData`[] | -| `type` | `ChartType.BAR` | - -*** - -### BarData - -```ts -type BarData: object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `group` | `string` | -| `label` | `string` | -| `value` | `string` | - -*** - -### BoxAndWhiskerChart - -```ts -type BoxAndWhiskerChart: Chart2D & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `BoxAndWhiskerData`[] | -| `type` | `ChartType.BOX_AND_WHISKER` | - -*** - -### BoxAndWhiskerData - -```ts -type BoxAndWhiskerData: object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `first_quartile` | `number` | -| `label` | `string` | -| `max` | `number` | -| `median` | `number` | -| `min` | `number` | -| `outliers` | `number`[] | -| `third_quartile` | `number` | - -*** - -### Chart - -```ts -type Chart: object; -``` - -Represents a chart. - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `any`[] | -| `title` | `string` | -| `type` | `ChartType` | - -*** - -### ChartTypes - -```ts -type ChartTypes: - | LineChart - | ScatterChart - | BarChart - | PieChart - | BoxAndWhiskerChart - | SuperChart; -``` - -*** - -### LineChart - -```ts -type LineChart: PointChart & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `type` | `ChartType.LINE` | - -*** - -### PieChart - -```ts -type PieChart: Chart & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `PieData`[] | -| `type` | `ChartType.PIE` | - -*** - -### PieData - -```ts -type PieData: object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `angle` | `number` | -| `label` | `string` | -| `radius` | `number` | - -*** - -### PointData - -```ts -type PointData: object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `label` | `string` | -| `points` | [`number` \| `string`, `number` \| `string`][] | - -*** - -### ScatterChart - -```ts -type ScatterChart: PointChart & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `type` | `ChartType.SCATTER` | - -*** - -### SuperChart - -```ts -type SuperChart: Chart & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `Chart`[] | -| `type` | `ChartType.SUPERCHART` | - -## Functions - -### deserializeChart() - -```ts -function deserializeChart(data: any): Chart -``` - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `data` | `any` | - -#### Returns - -`Chart` diff --git a/sdk-reference/code-interpreter-js-sdk/v1.5.1/consts/page.mdx b/sdk-reference/code-interpreter-js-sdk/v1.5.1/consts/page.mdx deleted file mode 100644 index d1ee2e76..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v1.5.1/consts/page.mdx +++ /dev/null @@ -1,13 +0,0 @@ -### DEFAULT\_TIMEOUT\_MS - -```ts -const DEFAULT_TIMEOUT_MS: 60000 = 60_000; -``` - -*** - -### JUPYTER\_PORT - -```ts -const JUPYTER_PORT: 49999 = 49999; -``` diff --git a/sdk-reference/code-interpreter-js-sdk/v1.5.1/index/page.mdx b/sdk-reference/code-interpreter-js-sdk/v1.5.1/index/page.mdx deleted file mode 100644 index dc55fcc7..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v1.5.1/index/page.mdx +++ /dev/null @@ -1,103 +0,0 @@ -### BarChart - -Re-exports BarChart - -### BarData - -Re-exports BarData - -### BoxAndWhiskerChart - -Re-exports BoxAndWhiskerChart - -### BoxAndWhiskerData - -Re-exports BoxAndWhiskerData - -### Chart - -Re-exports Chart - -### ChartType - -Re-exports ChartType - -### ChartTypes - -Re-exports ChartTypes - -### Context - -Re-exports Context - -### CreateCodeContextOpts - -Re-exports CreateCodeContextOpts - -### default - -Renames and re-exports Sandbox - -### Execution - -Re-exports Execution - -### ExecutionError - -Re-exports ExecutionError - -### LineChart - -Re-exports LineChart - -### Logs - -Re-exports Logs - -### MIMEType - -Re-exports MIMEType - -### OutputMessage - -Re-exports OutputMessage - -### PieChart - -Re-exports PieChart - -### PieData - -Re-exports PieData - -### PointData - -Re-exports PointData - -### RawData - -Re-exports RawData - -### Result - -Re-exports Result - -### RunCodeOpts - -Re-exports RunCodeOpts - -### Sandbox - -Re-exports Sandbox - -### ScaleType - -Re-exports ScaleType - -### ScatterChart - -Re-exports ScatterChart - -### SuperChart - -Re-exports SuperChart diff --git a/sdk-reference/code-interpreter-js-sdk/v1.5.1/messaging/page.mdx b/sdk-reference/code-interpreter-js-sdk/v1.5.1/messaging/page.mdx deleted file mode 100644 index 4b3c4ed9..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v1.5.1/messaging/page.mdx +++ /dev/null @@ -1,326 +0,0 @@ -### Execution - -Represents the result of a cell execution. - -#### Constructors - -```ts -new Execution( - results: Result[], - logs: Logs, - error?: ExecutionError, - executionCount?: number): Execution -``` - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `results` | `Result`[] | `[]` | List of result of the cell (interactively interpreted last line), display calls (e.g. matplotlib plots). | -| `logs` | `Logs` | `...` | Logs printed to stdout and stderr during execution. | -| `error`? | `ExecutionError` | `undefined` | An Error object if an error occurred, null otherwise. | -| `executionCount`? | `number` | `undefined` | Execution count of the cell. | - -###### Returns - -`Execution` - -#### Properties - -| Property | Modifier | Type | Default value | Description | -| ------ | ------ | ------ | ------ | ------ | -| `error?` | `public` | `ExecutionError` | `undefined` | An Error object if an error occurred, null otherwise. | -| `executionCount?` | `public` | `number` | `undefined` | Execution count of the cell. | -| `logs` | `public` | `Logs` | `undefined` | Logs printed to stdout and stderr during execution. | -| `results` | `public` | `Result`[] | `[]` | List of result of the cell (interactively interpreted last line), display calls (e.g. matplotlib plots). | - -#### Accessors - -### text - -```ts -get text(): undefined | string -``` - -Returns the text representation of the main result of the cell. - -###### Returns - -`undefined` \| `string` - -#### Methods - -### toJSON() - -```ts -toJSON(): object -``` - -Returns the serializable representation of the execution result. - -###### Returns - -`object` - -| Name | Type | -| ------ | ------ | -| `error` | `undefined` \| `ExecutionError` | -| `logs` | `Logs` | -| `results` | `Result`[] | - -*** - -### ExecutionError - -Represents an error that occurred during the execution of a cell. -The error contains the name of the error, the value of the error, and the traceback. - -#### Constructors - -```ts -new ExecutionError( - name: string, - value: string, - traceback: string): ExecutionError -``` - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `name` | `string` | Name of the error. | -| `value` | `string` | Value of the error. | -| `traceback` | `string` | The raw traceback of the error. | - -###### Returns - -`ExecutionError` - -#### Properties - -| Property | Modifier | Type | Description | -| ------ | ------ | ------ | ------ | -| `name` | `public` | `string` | Name of the error. | -| `traceback` | `public` | `string` | The raw traceback of the error. | -| `value` | `public` | `string` | Value of the error. | - -*** - -### OutputMessage - -Represents an output message from the sandbox code execution. - -#### Constructors - -```ts -new OutputMessage( - line: string, - timestamp: number, - error: boolean): OutputMessage -``` - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `line` | `string` | The output line. | -| `timestamp` | `number` | Unix epoch in nanoseconds. | -| `error` | `boolean` | Whether the output is an error. | - -###### Returns - -`OutputMessage` - -#### Properties - -| Property | Modifier | Type | Description | -| ------ | ------ | ------ | ------ | -| `error` | `readonly` | `boolean` | Whether the output is an error. | -| `line` | `readonly` | `string` | The output line. | -| `timestamp` | `readonly` | `number` | Unix epoch in nanoseconds. | - -#### Methods - -### toString() - -```ts -toString(): string -``` - -###### Returns - -`string` - -*** - -### Result - -Represents the data to be displayed as a result of executing a cell in a Jupyter notebook. -The result is similar to the structure returned by ipython kernel: https://ipython.readthedocs.io/en/stable/development/execution.html#execution-semantics - -The result can contain multiple types of data, such as text, images, plots, etc. Each type of data is represented -as a string, and the result can contain multiple types of data. The display calls don't have to have text representation, -for the actual result the representation is always present for the result, the other representations are always optional. - -#### Constructors - -```ts -new Result(rawData: RawData, isMainResult: boolean): Result -``` - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `rawData` | `RawData` | -| `isMainResult` | `boolean` | - -###### Returns - -`Result` - -#### Properties - -| Property | Modifier | Type | Description | -| ------ | ------ | ------ | ------ | -| `chart?` | `readonly` | `ChartTypes` | Contains the chart data. | -| `data?` | `readonly` | `Record`\<`string`, `unknown`\> | Contains the data from DataFrame. | -| `extra?` | `readonly` | `any` | Extra data that can be included. Not part of the standard types. | -| `html?` | `readonly` | `string` | HTML representation of the data. | -| `isMainResult` | `readonly` | `boolean` | - | -| `javascript?` | `readonly` | `string` | JavaScript representation of the data. | -| `jpeg?` | `readonly` | `string` | JPEG representation of the data. | -| `json?` | `readonly` | `string` | JSON representation of the data. | -| `latex?` | `readonly` | `string` | LaTeX representation of the data. | -| `markdown?` | `readonly` | `string` | Markdown representation of the data. | -| `pdf?` | `readonly` | `string` | PDF representation of the data. | -| `png?` | `readonly` | `string` | PNG representation of the data. | -| `raw` | `readonly` | `RawData` | - | -| `svg?` | `readonly` | `string` | SVG representation of the data. | -| `text?` | `readonly` | `string` | Text representation of the result. | - -#### Methods - -### formats() - -```ts -formats(): string[] -``` - -Returns all the formats available for the result. - -###### Returns - -`string`[] - -Array of strings representing the formats available for the result. - -### toJSON() - -```ts -toJSON(): object -``` - -Returns the serializable representation of the result. - -###### Returns - -`object` - -| Name | Type | -| ------ | ------ | -| `extra`? | `any` | -| `html` | `undefined` \| `string` | -| `javascript` | `undefined` \| `string` | -| `jpeg` | `undefined` \| `string` | -| `json` | `undefined` \| `string` | -| `latex` | `undefined` \| `string` | -| `markdown` | `undefined` \| `string` | -| `pdf` | `undefined` \| `string` | -| `png` | `undefined` \| `string` | -| `svg` | `undefined` \| `string` | -| `text` | `undefined` \| `string` | - -## Type Aliases - -### Logs - -```ts -type Logs: object; -``` - -Data printed to stdout and stderr during execution, usually by print statements, logs, warnings, subprocesses, etc. - -#### Type declaration - -| Name | Type | Description | -| ------ | ------ | ------ | -| `stderr` | `string`[] | List of strings printed to stderr by prints, subprocesses, etc. | -| `stdout` | `string`[] | List of strings printed to stdout by prints, subprocesses, etc. | - -*** - -### MIMEType - -```ts -type MIMEType: string; -``` - -Represents a MIME type. - -*** - -### RawData - -```ts -type RawData: object & E2BData; -``` - -Dictionary that maps MIME types to their corresponding representations of the data. - -## Functions - -### extractError() - -```ts -function extractError(res: Response): Promise -``` - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `res` | `Response` | - -#### Returns - -`Promise`\<`undefined` \| `SandboxError`\> - -*** - -### parseOutput() - -```ts -function parseOutput( - execution: Execution, - line: string, - onStdout?: (output: OutputMessage) => any, - onStderr?: (output: OutputMessage) => any, - onResult?: (data: Result) => any, -onError?: (error: ExecutionError) => any): Promise -``` - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `execution` | `Execution` | -| `line` | `string` | -| `onStdout`? | (`output`: `OutputMessage`) => `any` | -| `onStderr`? | (`output`: `OutputMessage`) => `any` | -| `onResult`? | (`data`: `Result`) => `any` | -| `onError`? | (`error`: `ExecutionError`) => `any` | - -#### Returns - -`Promise`\<`void`\> diff --git a/sdk-reference/code-interpreter-js-sdk/v1.5.1/sandbox/page.mdx b/sdk-reference/code-interpreter-js-sdk/v1.5.1/sandbox/page.mdx deleted file mode 100644 index 96eafec5..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v1.5.1/sandbox/page.mdx +++ /dev/null @@ -1,312 +0,0 @@ -### Sandbox - -E2B cloud sandbox is a secure and isolated cloud environment. - -The sandbox allows you to: -- Access Linux OS -- Create, list, and delete files and directories -- Run commands -- Run isolated code -- Access the internet - -Check docs here. - -Use Sandbox.create to create a new sandbox. - -#### Example - -```ts -import { Sandbox } from '@e2b/code-interpreter' - -const sandbox = await Sandbox.create() -``` - -#### Methods - -### createCodeContext() - -```ts -createCodeContext(opts?: CreateCodeContextOpts): Promise -``` - -Creates a new context to run code in. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `opts`? | `CreateCodeContextOpts` | options for creating the context. | - -###### Returns - -`Promise`\<`Context`\> - -context object. - -### runCode() - -###### runCode(code, opts) - -```ts -runCode(code: string, opts?: RunCodeOpts & object): Promise -``` - -Run the code as Python. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `code` | `string` | code to execute. | -| `opts`? | `RunCodeOpts` & `object` | options for executing the code. | - -###### Returns - -`Promise`\<`Execution`\> - -`Execution` result object. - -###### runCode(code, opts) - -```ts -runCode(code: string, opts?: RunCodeOpts & object): Promise -``` - -Run the code for the specified language. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. -If no language is specified, Python is used. - -You can reference previously defined variables, imports, and functions in the code. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `code` | `string` | code to execute. | -| `opts`? | `RunCodeOpts` & `object` | options for executing the code. | - -###### Returns - -`Promise`\<`Execution`\> - -`Execution` result object. - -###### runCode(code, opts) - -```ts -runCode(code: string, opts?: RunCodeOpts & object): Promise -``` - -Runs the code in the specified context, if not specified, the default context is used. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `code` | `string` | code to execute. | -| `opts`? | `RunCodeOpts` & `object` | options for executing the code | - -###### Returns - -`Promise`\<`Execution`\> - -`Execution` result object - -## Interfaces - -### CreateCodeContextOpts - -Options for creating a code context. - -#### Properties - -### cwd? - -```ts -optional cwd: string; -``` - -Working directory for the context. - -###### Default - -```ts -/home/user -``` - -### language? - -```ts -optional language: string; -``` - -Language for the context. - -###### Default - -```ts -python -``` - -### requestTimeoutMs? - -```ts -optional requestTimeoutMs: number; -``` - -Timeout for the request in **milliseconds**. - -###### Default - -```ts -30_000 // 30 seconds -``` - -*** - -### RunCodeOpts - -Options for running code. - -#### Properties - -### envs? - -```ts -optional envs: Record; -``` - -Custom environment variables for code execution. - -###### Default - -```ts -{} -``` - -### onError()? - -```ts -optional onError: (error: ExecutionError) => any; -``` - -Callback for handling the `ExecutionError` object. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `error` | `ExecutionError` | - -###### Returns - -`any` - -### onResult()? - -```ts -optional onResult: (data: Result) => any; -``` - -Callback for handling the final execution result. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `data` | `Result` | - -###### Returns - -`any` - -### onStderr()? - -```ts -optional onStderr: (output: OutputMessage) => any; -``` - -Callback for handling stderr messages. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `output` | `OutputMessage` | - -###### Returns - -`any` - -### onStdout()? - -```ts -optional onStdout: (output: OutputMessage) => any; -``` - -Callback for handling stdout messages. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `output` | `OutputMessage` | - -###### Returns - -`any` - -### requestTimeoutMs? - -```ts -optional requestTimeoutMs: number; -``` - -Timeout for the request in **milliseconds**. - -###### Default - -```ts -30_000 // 30 seconds -``` - -### timeoutMs? - -```ts -optional timeoutMs: number; -``` - -Timeout for the code execution in **milliseconds**. - -###### Default - -```ts -60_000 // 60 seconds -``` - -## Type Aliases - -### Context - -```ts -type Context: object; -``` - -Represents a context for code execution. - -#### Type declaration - -| Name | Type | Description | -| ------ | ------ | ------ | -| `cwd` | `string` | The working directory of the context. | -| `id` | `string` | The ID of the context. | -| `language` | `string` | The language of the context. | diff --git a/sdk-reference/code-interpreter-js-sdk/v2.0.0/charts/page.mdx b/sdk-reference/code-interpreter-js-sdk/v2.0.0/charts/page.mdx deleted file mode 100644 index f3176d3b..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v2.0.0/charts/page.mdx +++ /dev/null @@ -1,240 +0,0 @@ -### ChartType - -Chart types - -#### Enumeration Members - -| Enumeration Member | Value | -| ------ | ------ | -| `BAR` | `"bar"` | -| `BOX_AND_WHISKER` | `"box_and_whisker"` | -| `LINE` | `"line"` | -| `PIE` | `"pie"` | -| `SCATTER` | `"scatter"` | -| `SUPERCHART` | `"superchart"` | -| `UNKNOWN` | `"unknown"` | - -*** - -### ScaleType - -Ax scale types - -#### Enumeration Members - -| Enumeration Member | Value | -| ------ | ------ | -| `ASINH` | `"asinh"` | -| `CATEGORICAL` | `"categorical"` | -| `DATETIME` | `"datetime"` | -| `FUNCTION` | `"function"` | -| `FUNCTIONLOG` | `"functionlog"` | -| `LINEAR` | `"linear"` | -| `LOG` | `"log"` | -| `LOGIT` | `"logit"` | -| `SYMLOG` | `"symlog"` | - -## Type Aliases - -### BarChart - -```ts -type BarChart: Chart2D & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `BarData`[] | -| `type` | `ChartType.BAR` | - -*** - -### BarData - -```ts -type BarData: object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `group` | `string` | -| `label` | `string` | -| `value` | `string` | - -*** - -### BoxAndWhiskerChart - -```ts -type BoxAndWhiskerChart: Chart2D & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `BoxAndWhiskerData`[] | -| `type` | `ChartType.BOX_AND_WHISKER` | - -*** - -### BoxAndWhiskerData - -```ts -type BoxAndWhiskerData: object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `first_quartile` | `number` | -| `label` | `string` | -| `max` | `number` | -| `median` | `number` | -| `min` | `number` | -| `outliers` | `number`[] | -| `third_quartile` | `number` | - -*** - -### Chart - -```ts -type Chart: object; -``` - -Represents a chart. - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `any`[] | -| `title` | `string` | -| `type` | `ChartType` | - -*** - -### ChartTypes - -```ts -type ChartTypes: - | LineChart - | ScatterChart - | BarChart - | PieChart - | BoxAndWhiskerChart - | SuperChart; -``` - -*** - -### LineChart - -```ts -type LineChart: PointChart & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `type` | `ChartType.LINE` | - -*** - -### PieChart - -```ts -type PieChart: Chart & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `PieData`[] | -| `type` | `ChartType.PIE` | - -*** - -### PieData - -```ts -type PieData: object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `angle` | `number` | -| `label` | `string` | -| `radius` | `number` | - -*** - -### PointData - -```ts -type PointData: object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `label` | `string` | -| `points` | [`number` \| `string`, `number` \| `string`][] | - -*** - -### ScatterChart - -```ts -type ScatterChart: PointChart & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `type` | `ChartType.SCATTER` | - -*** - -### SuperChart - -```ts -type SuperChart: Chart & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `Chart`[] | -| `type` | `ChartType.SUPERCHART` | - -## Functions - -### deserializeChart() - -```ts -function deserializeChart(data: any): Chart -``` - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `data` | `any` | - -#### Returns - -`Chart` diff --git a/sdk-reference/code-interpreter-js-sdk/v2.0.0/consts/page.mdx b/sdk-reference/code-interpreter-js-sdk/v2.0.0/consts/page.mdx deleted file mode 100644 index d1ee2e76..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v2.0.0/consts/page.mdx +++ /dev/null @@ -1,13 +0,0 @@ -### DEFAULT\_TIMEOUT\_MS - -```ts -const DEFAULT_TIMEOUT_MS: 60000 = 60_000; -``` - -*** - -### JUPYTER\_PORT - -```ts -const JUPYTER_PORT: 49999 = 49999; -``` diff --git a/sdk-reference/code-interpreter-js-sdk/v2.0.0/index/page.mdx b/sdk-reference/code-interpreter-js-sdk/v2.0.0/index/page.mdx deleted file mode 100644 index dc55fcc7..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v2.0.0/index/page.mdx +++ /dev/null @@ -1,103 +0,0 @@ -### BarChart - -Re-exports BarChart - -### BarData - -Re-exports BarData - -### BoxAndWhiskerChart - -Re-exports BoxAndWhiskerChart - -### BoxAndWhiskerData - -Re-exports BoxAndWhiskerData - -### Chart - -Re-exports Chart - -### ChartType - -Re-exports ChartType - -### ChartTypes - -Re-exports ChartTypes - -### Context - -Re-exports Context - -### CreateCodeContextOpts - -Re-exports CreateCodeContextOpts - -### default - -Renames and re-exports Sandbox - -### Execution - -Re-exports Execution - -### ExecutionError - -Re-exports ExecutionError - -### LineChart - -Re-exports LineChart - -### Logs - -Re-exports Logs - -### MIMEType - -Re-exports MIMEType - -### OutputMessage - -Re-exports OutputMessage - -### PieChart - -Re-exports PieChart - -### PieData - -Re-exports PieData - -### PointData - -Re-exports PointData - -### RawData - -Re-exports RawData - -### Result - -Re-exports Result - -### RunCodeOpts - -Re-exports RunCodeOpts - -### Sandbox - -Re-exports Sandbox - -### ScaleType - -Re-exports ScaleType - -### ScatterChart - -Re-exports ScatterChart - -### SuperChart - -Re-exports SuperChart diff --git a/sdk-reference/code-interpreter-js-sdk/v2.0.0/messaging/page.mdx b/sdk-reference/code-interpreter-js-sdk/v2.0.0/messaging/page.mdx deleted file mode 100644 index 4b3c4ed9..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v2.0.0/messaging/page.mdx +++ /dev/null @@ -1,326 +0,0 @@ -### Execution - -Represents the result of a cell execution. - -#### Constructors - -```ts -new Execution( - results: Result[], - logs: Logs, - error?: ExecutionError, - executionCount?: number): Execution -``` - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `results` | `Result`[] | `[]` | List of result of the cell (interactively interpreted last line), display calls (e.g. matplotlib plots). | -| `logs` | `Logs` | `...` | Logs printed to stdout and stderr during execution. | -| `error`? | `ExecutionError` | `undefined` | An Error object if an error occurred, null otherwise. | -| `executionCount`? | `number` | `undefined` | Execution count of the cell. | - -###### Returns - -`Execution` - -#### Properties - -| Property | Modifier | Type | Default value | Description | -| ------ | ------ | ------ | ------ | ------ | -| `error?` | `public` | `ExecutionError` | `undefined` | An Error object if an error occurred, null otherwise. | -| `executionCount?` | `public` | `number` | `undefined` | Execution count of the cell. | -| `logs` | `public` | `Logs` | `undefined` | Logs printed to stdout and stderr during execution. | -| `results` | `public` | `Result`[] | `[]` | List of result of the cell (interactively interpreted last line), display calls (e.g. matplotlib plots). | - -#### Accessors - -### text - -```ts -get text(): undefined | string -``` - -Returns the text representation of the main result of the cell. - -###### Returns - -`undefined` \| `string` - -#### Methods - -### toJSON() - -```ts -toJSON(): object -``` - -Returns the serializable representation of the execution result. - -###### Returns - -`object` - -| Name | Type | -| ------ | ------ | -| `error` | `undefined` \| `ExecutionError` | -| `logs` | `Logs` | -| `results` | `Result`[] | - -*** - -### ExecutionError - -Represents an error that occurred during the execution of a cell. -The error contains the name of the error, the value of the error, and the traceback. - -#### Constructors - -```ts -new ExecutionError( - name: string, - value: string, - traceback: string): ExecutionError -``` - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `name` | `string` | Name of the error. | -| `value` | `string` | Value of the error. | -| `traceback` | `string` | The raw traceback of the error. | - -###### Returns - -`ExecutionError` - -#### Properties - -| Property | Modifier | Type | Description | -| ------ | ------ | ------ | ------ | -| `name` | `public` | `string` | Name of the error. | -| `traceback` | `public` | `string` | The raw traceback of the error. | -| `value` | `public` | `string` | Value of the error. | - -*** - -### OutputMessage - -Represents an output message from the sandbox code execution. - -#### Constructors - -```ts -new OutputMessage( - line: string, - timestamp: number, - error: boolean): OutputMessage -``` - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `line` | `string` | The output line. | -| `timestamp` | `number` | Unix epoch in nanoseconds. | -| `error` | `boolean` | Whether the output is an error. | - -###### Returns - -`OutputMessage` - -#### Properties - -| Property | Modifier | Type | Description | -| ------ | ------ | ------ | ------ | -| `error` | `readonly` | `boolean` | Whether the output is an error. | -| `line` | `readonly` | `string` | The output line. | -| `timestamp` | `readonly` | `number` | Unix epoch in nanoseconds. | - -#### Methods - -### toString() - -```ts -toString(): string -``` - -###### Returns - -`string` - -*** - -### Result - -Represents the data to be displayed as a result of executing a cell in a Jupyter notebook. -The result is similar to the structure returned by ipython kernel: https://ipython.readthedocs.io/en/stable/development/execution.html#execution-semantics - -The result can contain multiple types of data, such as text, images, plots, etc. Each type of data is represented -as a string, and the result can contain multiple types of data. The display calls don't have to have text representation, -for the actual result the representation is always present for the result, the other representations are always optional. - -#### Constructors - -```ts -new Result(rawData: RawData, isMainResult: boolean): Result -``` - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `rawData` | `RawData` | -| `isMainResult` | `boolean` | - -###### Returns - -`Result` - -#### Properties - -| Property | Modifier | Type | Description | -| ------ | ------ | ------ | ------ | -| `chart?` | `readonly` | `ChartTypes` | Contains the chart data. | -| `data?` | `readonly` | `Record`\<`string`, `unknown`\> | Contains the data from DataFrame. | -| `extra?` | `readonly` | `any` | Extra data that can be included. Not part of the standard types. | -| `html?` | `readonly` | `string` | HTML representation of the data. | -| `isMainResult` | `readonly` | `boolean` | - | -| `javascript?` | `readonly` | `string` | JavaScript representation of the data. | -| `jpeg?` | `readonly` | `string` | JPEG representation of the data. | -| `json?` | `readonly` | `string` | JSON representation of the data. | -| `latex?` | `readonly` | `string` | LaTeX representation of the data. | -| `markdown?` | `readonly` | `string` | Markdown representation of the data. | -| `pdf?` | `readonly` | `string` | PDF representation of the data. | -| `png?` | `readonly` | `string` | PNG representation of the data. | -| `raw` | `readonly` | `RawData` | - | -| `svg?` | `readonly` | `string` | SVG representation of the data. | -| `text?` | `readonly` | `string` | Text representation of the result. | - -#### Methods - -### formats() - -```ts -formats(): string[] -``` - -Returns all the formats available for the result. - -###### Returns - -`string`[] - -Array of strings representing the formats available for the result. - -### toJSON() - -```ts -toJSON(): object -``` - -Returns the serializable representation of the result. - -###### Returns - -`object` - -| Name | Type | -| ------ | ------ | -| `extra`? | `any` | -| `html` | `undefined` \| `string` | -| `javascript` | `undefined` \| `string` | -| `jpeg` | `undefined` \| `string` | -| `json` | `undefined` \| `string` | -| `latex` | `undefined` \| `string` | -| `markdown` | `undefined` \| `string` | -| `pdf` | `undefined` \| `string` | -| `png` | `undefined` \| `string` | -| `svg` | `undefined` \| `string` | -| `text` | `undefined` \| `string` | - -## Type Aliases - -### Logs - -```ts -type Logs: object; -``` - -Data printed to stdout and stderr during execution, usually by print statements, logs, warnings, subprocesses, etc. - -#### Type declaration - -| Name | Type | Description | -| ------ | ------ | ------ | -| `stderr` | `string`[] | List of strings printed to stderr by prints, subprocesses, etc. | -| `stdout` | `string`[] | List of strings printed to stdout by prints, subprocesses, etc. | - -*** - -### MIMEType - -```ts -type MIMEType: string; -``` - -Represents a MIME type. - -*** - -### RawData - -```ts -type RawData: object & E2BData; -``` - -Dictionary that maps MIME types to their corresponding representations of the data. - -## Functions - -### extractError() - -```ts -function extractError(res: Response): Promise -``` - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `res` | `Response` | - -#### Returns - -`Promise`\<`undefined` \| `SandboxError`\> - -*** - -### parseOutput() - -```ts -function parseOutput( - execution: Execution, - line: string, - onStdout?: (output: OutputMessage) => any, - onStderr?: (output: OutputMessage) => any, - onResult?: (data: Result) => any, -onError?: (error: ExecutionError) => any): Promise -``` - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `execution` | `Execution` | -| `line` | `string` | -| `onStdout`? | (`output`: `OutputMessage`) => `any` | -| `onStderr`? | (`output`: `OutputMessage`) => `any` | -| `onResult`? | (`data`: `Result`) => `any` | -| `onError`? | (`error`: `ExecutionError`) => `any` | - -#### Returns - -`Promise`\<`void`\> diff --git a/sdk-reference/code-interpreter-js-sdk/v2.0.0/sandbox/page.mdx b/sdk-reference/code-interpreter-js-sdk/v2.0.0/sandbox/page.mdx deleted file mode 100644 index 96eafec5..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v2.0.0/sandbox/page.mdx +++ /dev/null @@ -1,312 +0,0 @@ -### Sandbox - -E2B cloud sandbox is a secure and isolated cloud environment. - -The sandbox allows you to: -- Access Linux OS -- Create, list, and delete files and directories -- Run commands -- Run isolated code -- Access the internet - -Check docs here. - -Use Sandbox.create to create a new sandbox. - -#### Example - -```ts -import { Sandbox } from '@e2b/code-interpreter' - -const sandbox = await Sandbox.create() -``` - -#### Methods - -### createCodeContext() - -```ts -createCodeContext(opts?: CreateCodeContextOpts): Promise -``` - -Creates a new context to run code in. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `opts`? | `CreateCodeContextOpts` | options for creating the context. | - -###### Returns - -`Promise`\<`Context`\> - -context object. - -### runCode() - -###### runCode(code, opts) - -```ts -runCode(code: string, opts?: RunCodeOpts & object): Promise -``` - -Run the code as Python. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `code` | `string` | code to execute. | -| `opts`? | `RunCodeOpts` & `object` | options for executing the code. | - -###### Returns - -`Promise`\<`Execution`\> - -`Execution` result object. - -###### runCode(code, opts) - -```ts -runCode(code: string, opts?: RunCodeOpts & object): Promise -``` - -Run the code for the specified language. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. -If no language is specified, Python is used. - -You can reference previously defined variables, imports, and functions in the code. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `code` | `string` | code to execute. | -| `opts`? | `RunCodeOpts` & `object` | options for executing the code. | - -###### Returns - -`Promise`\<`Execution`\> - -`Execution` result object. - -###### runCode(code, opts) - -```ts -runCode(code: string, opts?: RunCodeOpts & object): Promise -``` - -Runs the code in the specified context, if not specified, the default context is used. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `code` | `string` | code to execute. | -| `opts`? | `RunCodeOpts` & `object` | options for executing the code | - -###### Returns - -`Promise`\<`Execution`\> - -`Execution` result object - -## Interfaces - -### CreateCodeContextOpts - -Options for creating a code context. - -#### Properties - -### cwd? - -```ts -optional cwd: string; -``` - -Working directory for the context. - -###### Default - -```ts -/home/user -``` - -### language? - -```ts -optional language: string; -``` - -Language for the context. - -###### Default - -```ts -python -``` - -### requestTimeoutMs? - -```ts -optional requestTimeoutMs: number; -``` - -Timeout for the request in **milliseconds**. - -###### Default - -```ts -30_000 // 30 seconds -``` - -*** - -### RunCodeOpts - -Options for running code. - -#### Properties - -### envs? - -```ts -optional envs: Record; -``` - -Custom environment variables for code execution. - -###### Default - -```ts -{} -``` - -### onError()? - -```ts -optional onError: (error: ExecutionError) => any; -``` - -Callback for handling the `ExecutionError` object. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `error` | `ExecutionError` | - -###### Returns - -`any` - -### onResult()? - -```ts -optional onResult: (data: Result) => any; -``` - -Callback for handling the final execution result. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `data` | `Result` | - -###### Returns - -`any` - -### onStderr()? - -```ts -optional onStderr: (output: OutputMessage) => any; -``` - -Callback for handling stderr messages. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `output` | `OutputMessage` | - -###### Returns - -`any` - -### onStdout()? - -```ts -optional onStdout: (output: OutputMessage) => any; -``` - -Callback for handling stdout messages. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `output` | `OutputMessage` | - -###### Returns - -`any` - -### requestTimeoutMs? - -```ts -optional requestTimeoutMs: number; -``` - -Timeout for the request in **milliseconds**. - -###### Default - -```ts -30_000 // 30 seconds -``` - -### timeoutMs? - -```ts -optional timeoutMs: number; -``` - -Timeout for the code execution in **milliseconds**. - -###### Default - -```ts -60_000 // 60 seconds -``` - -## Type Aliases - -### Context - -```ts -type Context: object; -``` - -Represents a context for code execution. - -#### Type declaration - -| Name | Type | Description | -| ------ | ------ | ------ | -| `cwd` | `string` | The working directory of the context. | -| `id` | `string` | The ID of the context. | -| `language` | `string` | The language of the context. | diff --git a/sdk-reference/code-interpreter-js-sdk/v2.0.1/charts/page.mdx b/sdk-reference/code-interpreter-js-sdk/v2.0.1/charts/page.mdx deleted file mode 100644 index f3176d3b..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v2.0.1/charts/page.mdx +++ /dev/null @@ -1,240 +0,0 @@ -### ChartType - -Chart types - -#### Enumeration Members - -| Enumeration Member | Value | -| ------ | ------ | -| `BAR` | `"bar"` | -| `BOX_AND_WHISKER` | `"box_and_whisker"` | -| `LINE` | `"line"` | -| `PIE` | `"pie"` | -| `SCATTER` | `"scatter"` | -| `SUPERCHART` | `"superchart"` | -| `UNKNOWN` | `"unknown"` | - -*** - -### ScaleType - -Ax scale types - -#### Enumeration Members - -| Enumeration Member | Value | -| ------ | ------ | -| `ASINH` | `"asinh"` | -| `CATEGORICAL` | `"categorical"` | -| `DATETIME` | `"datetime"` | -| `FUNCTION` | `"function"` | -| `FUNCTIONLOG` | `"functionlog"` | -| `LINEAR` | `"linear"` | -| `LOG` | `"log"` | -| `LOGIT` | `"logit"` | -| `SYMLOG` | `"symlog"` | - -## Type Aliases - -### BarChart - -```ts -type BarChart: Chart2D & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `BarData`[] | -| `type` | `ChartType.BAR` | - -*** - -### BarData - -```ts -type BarData: object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `group` | `string` | -| `label` | `string` | -| `value` | `string` | - -*** - -### BoxAndWhiskerChart - -```ts -type BoxAndWhiskerChart: Chart2D & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `BoxAndWhiskerData`[] | -| `type` | `ChartType.BOX_AND_WHISKER` | - -*** - -### BoxAndWhiskerData - -```ts -type BoxAndWhiskerData: object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `first_quartile` | `number` | -| `label` | `string` | -| `max` | `number` | -| `median` | `number` | -| `min` | `number` | -| `outliers` | `number`[] | -| `third_quartile` | `number` | - -*** - -### Chart - -```ts -type Chart: object; -``` - -Represents a chart. - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `any`[] | -| `title` | `string` | -| `type` | `ChartType` | - -*** - -### ChartTypes - -```ts -type ChartTypes: - | LineChart - | ScatterChart - | BarChart - | PieChart - | BoxAndWhiskerChart - | SuperChart; -``` - -*** - -### LineChart - -```ts -type LineChart: PointChart & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `type` | `ChartType.LINE` | - -*** - -### PieChart - -```ts -type PieChart: Chart & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `PieData`[] | -| `type` | `ChartType.PIE` | - -*** - -### PieData - -```ts -type PieData: object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `angle` | `number` | -| `label` | `string` | -| `radius` | `number` | - -*** - -### PointData - -```ts -type PointData: object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `label` | `string` | -| `points` | [`number` \| `string`, `number` \| `string`][] | - -*** - -### ScatterChart - -```ts -type ScatterChart: PointChart & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `type` | `ChartType.SCATTER` | - -*** - -### SuperChart - -```ts -type SuperChart: Chart & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `Chart`[] | -| `type` | `ChartType.SUPERCHART` | - -## Functions - -### deserializeChart() - -```ts -function deserializeChart(data: any): Chart -``` - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `data` | `any` | - -#### Returns - -`Chart` diff --git a/sdk-reference/code-interpreter-js-sdk/v2.0.1/consts/page.mdx b/sdk-reference/code-interpreter-js-sdk/v2.0.1/consts/page.mdx deleted file mode 100644 index d1ee2e76..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v2.0.1/consts/page.mdx +++ /dev/null @@ -1,13 +0,0 @@ -### DEFAULT\_TIMEOUT\_MS - -```ts -const DEFAULT_TIMEOUT_MS: 60000 = 60_000; -``` - -*** - -### JUPYTER\_PORT - -```ts -const JUPYTER_PORT: 49999 = 49999; -``` diff --git a/sdk-reference/code-interpreter-js-sdk/v2.0.1/index/page.mdx b/sdk-reference/code-interpreter-js-sdk/v2.0.1/index/page.mdx deleted file mode 100644 index dc55fcc7..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v2.0.1/index/page.mdx +++ /dev/null @@ -1,103 +0,0 @@ -### BarChart - -Re-exports BarChart - -### BarData - -Re-exports BarData - -### BoxAndWhiskerChart - -Re-exports BoxAndWhiskerChart - -### BoxAndWhiskerData - -Re-exports BoxAndWhiskerData - -### Chart - -Re-exports Chart - -### ChartType - -Re-exports ChartType - -### ChartTypes - -Re-exports ChartTypes - -### Context - -Re-exports Context - -### CreateCodeContextOpts - -Re-exports CreateCodeContextOpts - -### default - -Renames and re-exports Sandbox - -### Execution - -Re-exports Execution - -### ExecutionError - -Re-exports ExecutionError - -### LineChart - -Re-exports LineChart - -### Logs - -Re-exports Logs - -### MIMEType - -Re-exports MIMEType - -### OutputMessage - -Re-exports OutputMessage - -### PieChart - -Re-exports PieChart - -### PieData - -Re-exports PieData - -### PointData - -Re-exports PointData - -### RawData - -Re-exports RawData - -### Result - -Re-exports Result - -### RunCodeOpts - -Re-exports RunCodeOpts - -### Sandbox - -Re-exports Sandbox - -### ScaleType - -Re-exports ScaleType - -### ScatterChart - -Re-exports ScatterChart - -### SuperChart - -Re-exports SuperChart diff --git a/sdk-reference/code-interpreter-js-sdk/v2.0.1/messaging/page.mdx b/sdk-reference/code-interpreter-js-sdk/v2.0.1/messaging/page.mdx deleted file mode 100644 index 4b3c4ed9..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v2.0.1/messaging/page.mdx +++ /dev/null @@ -1,326 +0,0 @@ -### Execution - -Represents the result of a cell execution. - -#### Constructors - -```ts -new Execution( - results: Result[], - logs: Logs, - error?: ExecutionError, - executionCount?: number): Execution -``` - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `results` | `Result`[] | `[]` | List of result of the cell (interactively interpreted last line), display calls (e.g. matplotlib plots). | -| `logs` | `Logs` | `...` | Logs printed to stdout and stderr during execution. | -| `error`? | `ExecutionError` | `undefined` | An Error object if an error occurred, null otherwise. | -| `executionCount`? | `number` | `undefined` | Execution count of the cell. | - -###### Returns - -`Execution` - -#### Properties - -| Property | Modifier | Type | Default value | Description | -| ------ | ------ | ------ | ------ | ------ | -| `error?` | `public` | `ExecutionError` | `undefined` | An Error object if an error occurred, null otherwise. | -| `executionCount?` | `public` | `number` | `undefined` | Execution count of the cell. | -| `logs` | `public` | `Logs` | `undefined` | Logs printed to stdout and stderr during execution. | -| `results` | `public` | `Result`[] | `[]` | List of result of the cell (interactively interpreted last line), display calls (e.g. matplotlib plots). | - -#### Accessors - -### text - -```ts -get text(): undefined | string -``` - -Returns the text representation of the main result of the cell. - -###### Returns - -`undefined` \| `string` - -#### Methods - -### toJSON() - -```ts -toJSON(): object -``` - -Returns the serializable representation of the execution result. - -###### Returns - -`object` - -| Name | Type | -| ------ | ------ | -| `error` | `undefined` \| `ExecutionError` | -| `logs` | `Logs` | -| `results` | `Result`[] | - -*** - -### ExecutionError - -Represents an error that occurred during the execution of a cell. -The error contains the name of the error, the value of the error, and the traceback. - -#### Constructors - -```ts -new ExecutionError( - name: string, - value: string, - traceback: string): ExecutionError -``` - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `name` | `string` | Name of the error. | -| `value` | `string` | Value of the error. | -| `traceback` | `string` | The raw traceback of the error. | - -###### Returns - -`ExecutionError` - -#### Properties - -| Property | Modifier | Type | Description | -| ------ | ------ | ------ | ------ | -| `name` | `public` | `string` | Name of the error. | -| `traceback` | `public` | `string` | The raw traceback of the error. | -| `value` | `public` | `string` | Value of the error. | - -*** - -### OutputMessage - -Represents an output message from the sandbox code execution. - -#### Constructors - -```ts -new OutputMessage( - line: string, - timestamp: number, - error: boolean): OutputMessage -``` - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `line` | `string` | The output line. | -| `timestamp` | `number` | Unix epoch in nanoseconds. | -| `error` | `boolean` | Whether the output is an error. | - -###### Returns - -`OutputMessage` - -#### Properties - -| Property | Modifier | Type | Description | -| ------ | ------ | ------ | ------ | -| `error` | `readonly` | `boolean` | Whether the output is an error. | -| `line` | `readonly` | `string` | The output line. | -| `timestamp` | `readonly` | `number` | Unix epoch in nanoseconds. | - -#### Methods - -### toString() - -```ts -toString(): string -``` - -###### Returns - -`string` - -*** - -### Result - -Represents the data to be displayed as a result of executing a cell in a Jupyter notebook. -The result is similar to the structure returned by ipython kernel: https://ipython.readthedocs.io/en/stable/development/execution.html#execution-semantics - -The result can contain multiple types of data, such as text, images, plots, etc. Each type of data is represented -as a string, and the result can contain multiple types of data. The display calls don't have to have text representation, -for the actual result the representation is always present for the result, the other representations are always optional. - -#### Constructors - -```ts -new Result(rawData: RawData, isMainResult: boolean): Result -``` - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `rawData` | `RawData` | -| `isMainResult` | `boolean` | - -###### Returns - -`Result` - -#### Properties - -| Property | Modifier | Type | Description | -| ------ | ------ | ------ | ------ | -| `chart?` | `readonly` | `ChartTypes` | Contains the chart data. | -| `data?` | `readonly` | `Record`\<`string`, `unknown`\> | Contains the data from DataFrame. | -| `extra?` | `readonly` | `any` | Extra data that can be included. Not part of the standard types. | -| `html?` | `readonly` | `string` | HTML representation of the data. | -| `isMainResult` | `readonly` | `boolean` | - | -| `javascript?` | `readonly` | `string` | JavaScript representation of the data. | -| `jpeg?` | `readonly` | `string` | JPEG representation of the data. | -| `json?` | `readonly` | `string` | JSON representation of the data. | -| `latex?` | `readonly` | `string` | LaTeX representation of the data. | -| `markdown?` | `readonly` | `string` | Markdown representation of the data. | -| `pdf?` | `readonly` | `string` | PDF representation of the data. | -| `png?` | `readonly` | `string` | PNG representation of the data. | -| `raw` | `readonly` | `RawData` | - | -| `svg?` | `readonly` | `string` | SVG representation of the data. | -| `text?` | `readonly` | `string` | Text representation of the result. | - -#### Methods - -### formats() - -```ts -formats(): string[] -``` - -Returns all the formats available for the result. - -###### Returns - -`string`[] - -Array of strings representing the formats available for the result. - -### toJSON() - -```ts -toJSON(): object -``` - -Returns the serializable representation of the result. - -###### Returns - -`object` - -| Name | Type | -| ------ | ------ | -| `extra`? | `any` | -| `html` | `undefined` \| `string` | -| `javascript` | `undefined` \| `string` | -| `jpeg` | `undefined` \| `string` | -| `json` | `undefined` \| `string` | -| `latex` | `undefined` \| `string` | -| `markdown` | `undefined` \| `string` | -| `pdf` | `undefined` \| `string` | -| `png` | `undefined` \| `string` | -| `svg` | `undefined` \| `string` | -| `text` | `undefined` \| `string` | - -## Type Aliases - -### Logs - -```ts -type Logs: object; -``` - -Data printed to stdout and stderr during execution, usually by print statements, logs, warnings, subprocesses, etc. - -#### Type declaration - -| Name | Type | Description | -| ------ | ------ | ------ | -| `stderr` | `string`[] | List of strings printed to stderr by prints, subprocesses, etc. | -| `stdout` | `string`[] | List of strings printed to stdout by prints, subprocesses, etc. | - -*** - -### MIMEType - -```ts -type MIMEType: string; -``` - -Represents a MIME type. - -*** - -### RawData - -```ts -type RawData: object & E2BData; -``` - -Dictionary that maps MIME types to their corresponding representations of the data. - -## Functions - -### extractError() - -```ts -function extractError(res: Response): Promise -``` - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `res` | `Response` | - -#### Returns - -`Promise`\<`undefined` \| `SandboxError`\> - -*** - -### parseOutput() - -```ts -function parseOutput( - execution: Execution, - line: string, - onStdout?: (output: OutputMessage) => any, - onStderr?: (output: OutputMessage) => any, - onResult?: (data: Result) => any, -onError?: (error: ExecutionError) => any): Promise -``` - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `execution` | `Execution` | -| `line` | `string` | -| `onStdout`? | (`output`: `OutputMessage`) => `any` | -| `onStderr`? | (`output`: `OutputMessage`) => `any` | -| `onResult`? | (`data`: `Result`) => `any` | -| `onError`? | (`error`: `ExecutionError`) => `any` | - -#### Returns - -`Promise`\<`void`\> diff --git a/sdk-reference/code-interpreter-js-sdk/v2.0.1/sandbox/page.mdx b/sdk-reference/code-interpreter-js-sdk/v2.0.1/sandbox/page.mdx deleted file mode 100644 index 96eafec5..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v2.0.1/sandbox/page.mdx +++ /dev/null @@ -1,312 +0,0 @@ -### Sandbox - -E2B cloud sandbox is a secure and isolated cloud environment. - -The sandbox allows you to: -- Access Linux OS -- Create, list, and delete files and directories -- Run commands -- Run isolated code -- Access the internet - -Check docs here. - -Use Sandbox.create to create a new sandbox. - -#### Example - -```ts -import { Sandbox } from '@e2b/code-interpreter' - -const sandbox = await Sandbox.create() -``` - -#### Methods - -### createCodeContext() - -```ts -createCodeContext(opts?: CreateCodeContextOpts): Promise -``` - -Creates a new context to run code in. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `opts`? | `CreateCodeContextOpts` | options for creating the context. | - -###### Returns - -`Promise`\<`Context`\> - -context object. - -### runCode() - -###### runCode(code, opts) - -```ts -runCode(code: string, opts?: RunCodeOpts & object): Promise -``` - -Run the code as Python. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `code` | `string` | code to execute. | -| `opts`? | `RunCodeOpts` & `object` | options for executing the code. | - -###### Returns - -`Promise`\<`Execution`\> - -`Execution` result object. - -###### runCode(code, opts) - -```ts -runCode(code: string, opts?: RunCodeOpts & object): Promise -``` - -Run the code for the specified language. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. -If no language is specified, Python is used. - -You can reference previously defined variables, imports, and functions in the code. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `code` | `string` | code to execute. | -| `opts`? | `RunCodeOpts` & `object` | options for executing the code. | - -###### Returns - -`Promise`\<`Execution`\> - -`Execution` result object. - -###### runCode(code, opts) - -```ts -runCode(code: string, opts?: RunCodeOpts & object): Promise -``` - -Runs the code in the specified context, if not specified, the default context is used. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `code` | `string` | code to execute. | -| `opts`? | `RunCodeOpts` & `object` | options for executing the code | - -###### Returns - -`Promise`\<`Execution`\> - -`Execution` result object - -## Interfaces - -### CreateCodeContextOpts - -Options for creating a code context. - -#### Properties - -### cwd? - -```ts -optional cwd: string; -``` - -Working directory for the context. - -###### Default - -```ts -/home/user -``` - -### language? - -```ts -optional language: string; -``` - -Language for the context. - -###### Default - -```ts -python -``` - -### requestTimeoutMs? - -```ts -optional requestTimeoutMs: number; -``` - -Timeout for the request in **milliseconds**. - -###### Default - -```ts -30_000 // 30 seconds -``` - -*** - -### RunCodeOpts - -Options for running code. - -#### Properties - -### envs? - -```ts -optional envs: Record; -``` - -Custom environment variables for code execution. - -###### Default - -```ts -{} -``` - -### onError()? - -```ts -optional onError: (error: ExecutionError) => any; -``` - -Callback for handling the `ExecutionError` object. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `error` | `ExecutionError` | - -###### Returns - -`any` - -### onResult()? - -```ts -optional onResult: (data: Result) => any; -``` - -Callback for handling the final execution result. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `data` | `Result` | - -###### Returns - -`any` - -### onStderr()? - -```ts -optional onStderr: (output: OutputMessage) => any; -``` - -Callback for handling stderr messages. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `output` | `OutputMessage` | - -###### Returns - -`any` - -### onStdout()? - -```ts -optional onStdout: (output: OutputMessage) => any; -``` - -Callback for handling stdout messages. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `output` | `OutputMessage` | - -###### Returns - -`any` - -### requestTimeoutMs? - -```ts -optional requestTimeoutMs: number; -``` - -Timeout for the request in **milliseconds**. - -###### Default - -```ts -30_000 // 30 seconds -``` - -### timeoutMs? - -```ts -optional timeoutMs: number; -``` - -Timeout for the code execution in **milliseconds**. - -###### Default - -```ts -60_000 // 60 seconds -``` - -## Type Aliases - -### Context - -```ts -type Context: object; -``` - -Represents a context for code execution. - -#### Type declaration - -| Name | Type | Description | -| ------ | ------ | ------ | -| `cwd` | `string` | The working directory of the context. | -| `id` | `string` | The ID of the context. | -| `language` | `string` | The language of the context. | diff --git a/sdk-reference/code-interpreter-js-sdk/v2.1.0/charts/page.mdx b/sdk-reference/code-interpreter-js-sdk/v2.1.0/charts/page.mdx deleted file mode 100644 index f3176d3b..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v2.1.0/charts/page.mdx +++ /dev/null @@ -1,240 +0,0 @@ -### ChartType - -Chart types - -#### Enumeration Members - -| Enumeration Member | Value | -| ------ | ------ | -| `BAR` | `"bar"` | -| `BOX_AND_WHISKER` | `"box_and_whisker"` | -| `LINE` | `"line"` | -| `PIE` | `"pie"` | -| `SCATTER` | `"scatter"` | -| `SUPERCHART` | `"superchart"` | -| `UNKNOWN` | `"unknown"` | - -*** - -### ScaleType - -Ax scale types - -#### Enumeration Members - -| Enumeration Member | Value | -| ------ | ------ | -| `ASINH` | `"asinh"` | -| `CATEGORICAL` | `"categorical"` | -| `DATETIME` | `"datetime"` | -| `FUNCTION` | `"function"` | -| `FUNCTIONLOG` | `"functionlog"` | -| `LINEAR` | `"linear"` | -| `LOG` | `"log"` | -| `LOGIT` | `"logit"` | -| `SYMLOG` | `"symlog"` | - -## Type Aliases - -### BarChart - -```ts -type BarChart: Chart2D & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `BarData`[] | -| `type` | `ChartType.BAR` | - -*** - -### BarData - -```ts -type BarData: object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `group` | `string` | -| `label` | `string` | -| `value` | `string` | - -*** - -### BoxAndWhiskerChart - -```ts -type BoxAndWhiskerChart: Chart2D & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `BoxAndWhiskerData`[] | -| `type` | `ChartType.BOX_AND_WHISKER` | - -*** - -### BoxAndWhiskerData - -```ts -type BoxAndWhiskerData: object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `first_quartile` | `number` | -| `label` | `string` | -| `max` | `number` | -| `median` | `number` | -| `min` | `number` | -| `outliers` | `number`[] | -| `third_quartile` | `number` | - -*** - -### Chart - -```ts -type Chart: object; -``` - -Represents a chart. - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `any`[] | -| `title` | `string` | -| `type` | `ChartType` | - -*** - -### ChartTypes - -```ts -type ChartTypes: - | LineChart - | ScatterChart - | BarChart - | PieChart - | BoxAndWhiskerChart - | SuperChart; -``` - -*** - -### LineChart - -```ts -type LineChart: PointChart & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `type` | `ChartType.LINE` | - -*** - -### PieChart - -```ts -type PieChart: Chart & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `PieData`[] | -| `type` | `ChartType.PIE` | - -*** - -### PieData - -```ts -type PieData: object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `angle` | `number` | -| `label` | `string` | -| `radius` | `number` | - -*** - -### PointData - -```ts -type PointData: object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `label` | `string` | -| `points` | [`number` \| `string`, `number` \| `string`][] | - -*** - -### ScatterChart - -```ts -type ScatterChart: PointChart & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `type` | `ChartType.SCATTER` | - -*** - -### SuperChart - -```ts -type SuperChart: Chart & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `Chart`[] | -| `type` | `ChartType.SUPERCHART` | - -## Functions - -### deserializeChart() - -```ts -function deserializeChart(data: any): Chart -``` - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `data` | `any` | - -#### Returns - -`Chart` diff --git a/sdk-reference/code-interpreter-js-sdk/v2.1.0/consts/page.mdx b/sdk-reference/code-interpreter-js-sdk/v2.1.0/consts/page.mdx deleted file mode 100644 index d1ee2e76..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v2.1.0/consts/page.mdx +++ /dev/null @@ -1,13 +0,0 @@ -### DEFAULT\_TIMEOUT\_MS - -```ts -const DEFAULT_TIMEOUT_MS: 60000 = 60_000; -``` - -*** - -### JUPYTER\_PORT - -```ts -const JUPYTER_PORT: 49999 = 49999; -``` diff --git a/sdk-reference/code-interpreter-js-sdk/v2.1.0/index/page.mdx b/sdk-reference/code-interpreter-js-sdk/v2.1.0/index/page.mdx deleted file mode 100644 index dc55fcc7..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v2.1.0/index/page.mdx +++ /dev/null @@ -1,103 +0,0 @@ -### BarChart - -Re-exports BarChart - -### BarData - -Re-exports BarData - -### BoxAndWhiskerChart - -Re-exports BoxAndWhiskerChart - -### BoxAndWhiskerData - -Re-exports BoxAndWhiskerData - -### Chart - -Re-exports Chart - -### ChartType - -Re-exports ChartType - -### ChartTypes - -Re-exports ChartTypes - -### Context - -Re-exports Context - -### CreateCodeContextOpts - -Re-exports CreateCodeContextOpts - -### default - -Renames and re-exports Sandbox - -### Execution - -Re-exports Execution - -### ExecutionError - -Re-exports ExecutionError - -### LineChart - -Re-exports LineChart - -### Logs - -Re-exports Logs - -### MIMEType - -Re-exports MIMEType - -### OutputMessage - -Re-exports OutputMessage - -### PieChart - -Re-exports PieChart - -### PieData - -Re-exports PieData - -### PointData - -Re-exports PointData - -### RawData - -Re-exports RawData - -### Result - -Re-exports Result - -### RunCodeOpts - -Re-exports RunCodeOpts - -### Sandbox - -Re-exports Sandbox - -### ScaleType - -Re-exports ScaleType - -### ScatterChart - -Re-exports ScatterChart - -### SuperChart - -Re-exports SuperChart diff --git a/sdk-reference/code-interpreter-js-sdk/v2.1.0/messaging/page.mdx b/sdk-reference/code-interpreter-js-sdk/v2.1.0/messaging/page.mdx deleted file mode 100644 index 4b3c4ed9..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v2.1.0/messaging/page.mdx +++ /dev/null @@ -1,326 +0,0 @@ -### Execution - -Represents the result of a cell execution. - -#### Constructors - -```ts -new Execution( - results: Result[], - logs: Logs, - error?: ExecutionError, - executionCount?: number): Execution -``` - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `results` | `Result`[] | `[]` | List of result of the cell (interactively interpreted last line), display calls (e.g. matplotlib plots). | -| `logs` | `Logs` | `...` | Logs printed to stdout and stderr during execution. | -| `error`? | `ExecutionError` | `undefined` | An Error object if an error occurred, null otherwise. | -| `executionCount`? | `number` | `undefined` | Execution count of the cell. | - -###### Returns - -`Execution` - -#### Properties - -| Property | Modifier | Type | Default value | Description | -| ------ | ------ | ------ | ------ | ------ | -| `error?` | `public` | `ExecutionError` | `undefined` | An Error object if an error occurred, null otherwise. | -| `executionCount?` | `public` | `number` | `undefined` | Execution count of the cell. | -| `logs` | `public` | `Logs` | `undefined` | Logs printed to stdout and stderr during execution. | -| `results` | `public` | `Result`[] | `[]` | List of result of the cell (interactively interpreted last line), display calls (e.g. matplotlib plots). | - -#### Accessors - -### text - -```ts -get text(): undefined | string -``` - -Returns the text representation of the main result of the cell. - -###### Returns - -`undefined` \| `string` - -#### Methods - -### toJSON() - -```ts -toJSON(): object -``` - -Returns the serializable representation of the execution result. - -###### Returns - -`object` - -| Name | Type | -| ------ | ------ | -| `error` | `undefined` \| `ExecutionError` | -| `logs` | `Logs` | -| `results` | `Result`[] | - -*** - -### ExecutionError - -Represents an error that occurred during the execution of a cell. -The error contains the name of the error, the value of the error, and the traceback. - -#### Constructors - -```ts -new ExecutionError( - name: string, - value: string, - traceback: string): ExecutionError -``` - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `name` | `string` | Name of the error. | -| `value` | `string` | Value of the error. | -| `traceback` | `string` | The raw traceback of the error. | - -###### Returns - -`ExecutionError` - -#### Properties - -| Property | Modifier | Type | Description | -| ------ | ------ | ------ | ------ | -| `name` | `public` | `string` | Name of the error. | -| `traceback` | `public` | `string` | The raw traceback of the error. | -| `value` | `public` | `string` | Value of the error. | - -*** - -### OutputMessage - -Represents an output message from the sandbox code execution. - -#### Constructors - -```ts -new OutputMessage( - line: string, - timestamp: number, - error: boolean): OutputMessage -``` - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `line` | `string` | The output line. | -| `timestamp` | `number` | Unix epoch in nanoseconds. | -| `error` | `boolean` | Whether the output is an error. | - -###### Returns - -`OutputMessage` - -#### Properties - -| Property | Modifier | Type | Description | -| ------ | ------ | ------ | ------ | -| `error` | `readonly` | `boolean` | Whether the output is an error. | -| `line` | `readonly` | `string` | The output line. | -| `timestamp` | `readonly` | `number` | Unix epoch in nanoseconds. | - -#### Methods - -### toString() - -```ts -toString(): string -``` - -###### Returns - -`string` - -*** - -### Result - -Represents the data to be displayed as a result of executing a cell in a Jupyter notebook. -The result is similar to the structure returned by ipython kernel: https://ipython.readthedocs.io/en/stable/development/execution.html#execution-semantics - -The result can contain multiple types of data, such as text, images, plots, etc. Each type of data is represented -as a string, and the result can contain multiple types of data. The display calls don't have to have text representation, -for the actual result the representation is always present for the result, the other representations are always optional. - -#### Constructors - -```ts -new Result(rawData: RawData, isMainResult: boolean): Result -``` - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `rawData` | `RawData` | -| `isMainResult` | `boolean` | - -###### Returns - -`Result` - -#### Properties - -| Property | Modifier | Type | Description | -| ------ | ------ | ------ | ------ | -| `chart?` | `readonly` | `ChartTypes` | Contains the chart data. | -| `data?` | `readonly` | `Record`\<`string`, `unknown`\> | Contains the data from DataFrame. | -| `extra?` | `readonly` | `any` | Extra data that can be included. Not part of the standard types. | -| `html?` | `readonly` | `string` | HTML representation of the data. | -| `isMainResult` | `readonly` | `boolean` | - | -| `javascript?` | `readonly` | `string` | JavaScript representation of the data. | -| `jpeg?` | `readonly` | `string` | JPEG representation of the data. | -| `json?` | `readonly` | `string` | JSON representation of the data. | -| `latex?` | `readonly` | `string` | LaTeX representation of the data. | -| `markdown?` | `readonly` | `string` | Markdown representation of the data. | -| `pdf?` | `readonly` | `string` | PDF representation of the data. | -| `png?` | `readonly` | `string` | PNG representation of the data. | -| `raw` | `readonly` | `RawData` | - | -| `svg?` | `readonly` | `string` | SVG representation of the data. | -| `text?` | `readonly` | `string` | Text representation of the result. | - -#### Methods - -### formats() - -```ts -formats(): string[] -``` - -Returns all the formats available for the result. - -###### Returns - -`string`[] - -Array of strings representing the formats available for the result. - -### toJSON() - -```ts -toJSON(): object -``` - -Returns the serializable representation of the result. - -###### Returns - -`object` - -| Name | Type | -| ------ | ------ | -| `extra`? | `any` | -| `html` | `undefined` \| `string` | -| `javascript` | `undefined` \| `string` | -| `jpeg` | `undefined` \| `string` | -| `json` | `undefined` \| `string` | -| `latex` | `undefined` \| `string` | -| `markdown` | `undefined` \| `string` | -| `pdf` | `undefined` \| `string` | -| `png` | `undefined` \| `string` | -| `svg` | `undefined` \| `string` | -| `text` | `undefined` \| `string` | - -## Type Aliases - -### Logs - -```ts -type Logs: object; -``` - -Data printed to stdout and stderr during execution, usually by print statements, logs, warnings, subprocesses, etc. - -#### Type declaration - -| Name | Type | Description | -| ------ | ------ | ------ | -| `stderr` | `string`[] | List of strings printed to stderr by prints, subprocesses, etc. | -| `stdout` | `string`[] | List of strings printed to stdout by prints, subprocesses, etc. | - -*** - -### MIMEType - -```ts -type MIMEType: string; -``` - -Represents a MIME type. - -*** - -### RawData - -```ts -type RawData: object & E2BData; -``` - -Dictionary that maps MIME types to their corresponding representations of the data. - -## Functions - -### extractError() - -```ts -function extractError(res: Response): Promise -``` - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `res` | `Response` | - -#### Returns - -`Promise`\<`undefined` \| `SandboxError`\> - -*** - -### parseOutput() - -```ts -function parseOutput( - execution: Execution, - line: string, - onStdout?: (output: OutputMessage) => any, - onStderr?: (output: OutputMessage) => any, - onResult?: (data: Result) => any, -onError?: (error: ExecutionError) => any): Promise -``` - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `execution` | `Execution` | -| `line` | `string` | -| `onStdout`? | (`output`: `OutputMessage`) => `any` | -| `onStderr`? | (`output`: `OutputMessage`) => `any` | -| `onResult`? | (`data`: `Result`) => `any` | -| `onError`? | (`error`: `ExecutionError`) => `any` | - -#### Returns - -`Promise`\<`void`\> diff --git a/sdk-reference/code-interpreter-js-sdk/v2.1.0/sandbox/page.mdx b/sdk-reference/code-interpreter-js-sdk/v2.1.0/sandbox/page.mdx deleted file mode 100644 index 96eafec5..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v2.1.0/sandbox/page.mdx +++ /dev/null @@ -1,312 +0,0 @@ -### Sandbox - -E2B cloud sandbox is a secure and isolated cloud environment. - -The sandbox allows you to: -- Access Linux OS -- Create, list, and delete files and directories -- Run commands -- Run isolated code -- Access the internet - -Check docs here. - -Use Sandbox.create to create a new sandbox. - -#### Example - -```ts -import { Sandbox } from '@e2b/code-interpreter' - -const sandbox = await Sandbox.create() -``` - -#### Methods - -### createCodeContext() - -```ts -createCodeContext(opts?: CreateCodeContextOpts): Promise -``` - -Creates a new context to run code in. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `opts`? | `CreateCodeContextOpts` | options for creating the context. | - -###### Returns - -`Promise`\<`Context`\> - -context object. - -### runCode() - -###### runCode(code, opts) - -```ts -runCode(code: string, opts?: RunCodeOpts & object): Promise -``` - -Run the code as Python. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `code` | `string` | code to execute. | -| `opts`? | `RunCodeOpts` & `object` | options for executing the code. | - -###### Returns - -`Promise`\<`Execution`\> - -`Execution` result object. - -###### runCode(code, opts) - -```ts -runCode(code: string, opts?: RunCodeOpts & object): Promise -``` - -Run the code for the specified language. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. -If no language is specified, Python is used. - -You can reference previously defined variables, imports, and functions in the code. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `code` | `string` | code to execute. | -| `opts`? | `RunCodeOpts` & `object` | options for executing the code. | - -###### Returns - -`Promise`\<`Execution`\> - -`Execution` result object. - -###### runCode(code, opts) - -```ts -runCode(code: string, opts?: RunCodeOpts & object): Promise -``` - -Runs the code in the specified context, if not specified, the default context is used. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `code` | `string` | code to execute. | -| `opts`? | `RunCodeOpts` & `object` | options for executing the code | - -###### Returns - -`Promise`\<`Execution`\> - -`Execution` result object - -## Interfaces - -### CreateCodeContextOpts - -Options for creating a code context. - -#### Properties - -### cwd? - -```ts -optional cwd: string; -``` - -Working directory for the context. - -###### Default - -```ts -/home/user -``` - -### language? - -```ts -optional language: string; -``` - -Language for the context. - -###### Default - -```ts -python -``` - -### requestTimeoutMs? - -```ts -optional requestTimeoutMs: number; -``` - -Timeout for the request in **milliseconds**. - -###### Default - -```ts -30_000 // 30 seconds -``` - -*** - -### RunCodeOpts - -Options for running code. - -#### Properties - -### envs? - -```ts -optional envs: Record; -``` - -Custom environment variables for code execution. - -###### Default - -```ts -{} -``` - -### onError()? - -```ts -optional onError: (error: ExecutionError) => any; -``` - -Callback for handling the `ExecutionError` object. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `error` | `ExecutionError` | - -###### Returns - -`any` - -### onResult()? - -```ts -optional onResult: (data: Result) => any; -``` - -Callback for handling the final execution result. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `data` | `Result` | - -###### Returns - -`any` - -### onStderr()? - -```ts -optional onStderr: (output: OutputMessage) => any; -``` - -Callback for handling stderr messages. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `output` | `OutputMessage` | - -###### Returns - -`any` - -### onStdout()? - -```ts -optional onStdout: (output: OutputMessage) => any; -``` - -Callback for handling stdout messages. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `output` | `OutputMessage` | - -###### Returns - -`any` - -### requestTimeoutMs? - -```ts -optional requestTimeoutMs: number; -``` - -Timeout for the request in **milliseconds**. - -###### Default - -```ts -30_000 // 30 seconds -``` - -### timeoutMs? - -```ts -optional timeoutMs: number; -``` - -Timeout for the code execution in **milliseconds**. - -###### Default - -```ts -60_000 // 60 seconds -``` - -## Type Aliases - -### Context - -```ts -type Context: object; -``` - -Represents a context for code execution. - -#### Type declaration - -| Name | Type | Description | -| ------ | ------ | ------ | -| `cwd` | `string` | The working directory of the context. | -| `id` | `string` | The ID of the context. | -| `language` | `string` | The language of the context. | diff --git a/sdk-reference/code-interpreter-js-sdk/v2.2.0/charts/page.mdx b/sdk-reference/code-interpreter-js-sdk/v2.2.0/charts/page.mdx deleted file mode 100644 index f3176d3b..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v2.2.0/charts/page.mdx +++ /dev/null @@ -1,240 +0,0 @@ -### ChartType - -Chart types - -#### Enumeration Members - -| Enumeration Member | Value | -| ------ | ------ | -| `BAR` | `"bar"` | -| `BOX_AND_WHISKER` | `"box_and_whisker"` | -| `LINE` | `"line"` | -| `PIE` | `"pie"` | -| `SCATTER` | `"scatter"` | -| `SUPERCHART` | `"superchart"` | -| `UNKNOWN` | `"unknown"` | - -*** - -### ScaleType - -Ax scale types - -#### Enumeration Members - -| Enumeration Member | Value | -| ------ | ------ | -| `ASINH` | `"asinh"` | -| `CATEGORICAL` | `"categorical"` | -| `DATETIME` | `"datetime"` | -| `FUNCTION` | `"function"` | -| `FUNCTIONLOG` | `"functionlog"` | -| `LINEAR` | `"linear"` | -| `LOG` | `"log"` | -| `LOGIT` | `"logit"` | -| `SYMLOG` | `"symlog"` | - -## Type Aliases - -### BarChart - -```ts -type BarChart: Chart2D & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `BarData`[] | -| `type` | `ChartType.BAR` | - -*** - -### BarData - -```ts -type BarData: object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `group` | `string` | -| `label` | `string` | -| `value` | `string` | - -*** - -### BoxAndWhiskerChart - -```ts -type BoxAndWhiskerChart: Chart2D & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `BoxAndWhiskerData`[] | -| `type` | `ChartType.BOX_AND_WHISKER` | - -*** - -### BoxAndWhiskerData - -```ts -type BoxAndWhiskerData: object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `first_quartile` | `number` | -| `label` | `string` | -| `max` | `number` | -| `median` | `number` | -| `min` | `number` | -| `outliers` | `number`[] | -| `third_quartile` | `number` | - -*** - -### Chart - -```ts -type Chart: object; -``` - -Represents a chart. - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `any`[] | -| `title` | `string` | -| `type` | `ChartType` | - -*** - -### ChartTypes - -```ts -type ChartTypes: - | LineChart - | ScatterChart - | BarChart - | PieChart - | BoxAndWhiskerChart - | SuperChart; -``` - -*** - -### LineChart - -```ts -type LineChart: PointChart & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `type` | `ChartType.LINE` | - -*** - -### PieChart - -```ts -type PieChart: Chart & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `PieData`[] | -| `type` | `ChartType.PIE` | - -*** - -### PieData - -```ts -type PieData: object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `angle` | `number` | -| `label` | `string` | -| `radius` | `number` | - -*** - -### PointData - -```ts -type PointData: object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `label` | `string` | -| `points` | [`number` \| `string`, `number` \| `string`][] | - -*** - -### ScatterChart - -```ts -type ScatterChart: PointChart & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `type` | `ChartType.SCATTER` | - -*** - -### SuperChart - -```ts -type SuperChart: Chart & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `Chart`[] | -| `type` | `ChartType.SUPERCHART` | - -## Functions - -### deserializeChart() - -```ts -function deserializeChart(data: any): Chart -``` - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `data` | `any` | - -#### Returns - -`Chart` diff --git a/sdk-reference/code-interpreter-js-sdk/v2.2.0/consts/page.mdx b/sdk-reference/code-interpreter-js-sdk/v2.2.0/consts/page.mdx deleted file mode 100644 index d1ee2e76..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v2.2.0/consts/page.mdx +++ /dev/null @@ -1,13 +0,0 @@ -### DEFAULT\_TIMEOUT\_MS - -```ts -const DEFAULT_TIMEOUT_MS: 60000 = 60_000; -``` - -*** - -### JUPYTER\_PORT - -```ts -const JUPYTER_PORT: 49999 = 49999; -``` diff --git a/sdk-reference/code-interpreter-js-sdk/v2.2.0/index/page.mdx b/sdk-reference/code-interpreter-js-sdk/v2.2.0/index/page.mdx deleted file mode 100644 index dc55fcc7..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v2.2.0/index/page.mdx +++ /dev/null @@ -1,103 +0,0 @@ -### BarChart - -Re-exports BarChart - -### BarData - -Re-exports BarData - -### BoxAndWhiskerChart - -Re-exports BoxAndWhiskerChart - -### BoxAndWhiskerData - -Re-exports BoxAndWhiskerData - -### Chart - -Re-exports Chart - -### ChartType - -Re-exports ChartType - -### ChartTypes - -Re-exports ChartTypes - -### Context - -Re-exports Context - -### CreateCodeContextOpts - -Re-exports CreateCodeContextOpts - -### default - -Renames and re-exports Sandbox - -### Execution - -Re-exports Execution - -### ExecutionError - -Re-exports ExecutionError - -### LineChart - -Re-exports LineChart - -### Logs - -Re-exports Logs - -### MIMEType - -Re-exports MIMEType - -### OutputMessage - -Re-exports OutputMessage - -### PieChart - -Re-exports PieChart - -### PieData - -Re-exports PieData - -### PointData - -Re-exports PointData - -### RawData - -Re-exports RawData - -### Result - -Re-exports Result - -### RunCodeOpts - -Re-exports RunCodeOpts - -### Sandbox - -Re-exports Sandbox - -### ScaleType - -Re-exports ScaleType - -### ScatterChart - -Re-exports ScatterChart - -### SuperChart - -Re-exports SuperChart diff --git a/sdk-reference/code-interpreter-js-sdk/v2.2.0/messaging/page.mdx b/sdk-reference/code-interpreter-js-sdk/v2.2.0/messaging/page.mdx deleted file mode 100644 index 4b3c4ed9..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v2.2.0/messaging/page.mdx +++ /dev/null @@ -1,326 +0,0 @@ -### Execution - -Represents the result of a cell execution. - -#### Constructors - -```ts -new Execution( - results: Result[], - logs: Logs, - error?: ExecutionError, - executionCount?: number): Execution -``` - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `results` | `Result`[] | `[]` | List of result of the cell (interactively interpreted last line), display calls (e.g. matplotlib plots). | -| `logs` | `Logs` | `...` | Logs printed to stdout and stderr during execution. | -| `error`? | `ExecutionError` | `undefined` | An Error object if an error occurred, null otherwise. | -| `executionCount`? | `number` | `undefined` | Execution count of the cell. | - -###### Returns - -`Execution` - -#### Properties - -| Property | Modifier | Type | Default value | Description | -| ------ | ------ | ------ | ------ | ------ | -| `error?` | `public` | `ExecutionError` | `undefined` | An Error object if an error occurred, null otherwise. | -| `executionCount?` | `public` | `number` | `undefined` | Execution count of the cell. | -| `logs` | `public` | `Logs` | `undefined` | Logs printed to stdout and stderr during execution. | -| `results` | `public` | `Result`[] | `[]` | List of result of the cell (interactively interpreted last line), display calls (e.g. matplotlib plots). | - -#### Accessors - -### text - -```ts -get text(): undefined | string -``` - -Returns the text representation of the main result of the cell. - -###### Returns - -`undefined` \| `string` - -#### Methods - -### toJSON() - -```ts -toJSON(): object -``` - -Returns the serializable representation of the execution result. - -###### Returns - -`object` - -| Name | Type | -| ------ | ------ | -| `error` | `undefined` \| `ExecutionError` | -| `logs` | `Logs` | -| `results` | `Result`[] | - -*** - -### ExecutionError - -Represents an error that occurred during the execution of a cell. -The error contains the name of the error, the value of the error, and the traceback. - -#### Constructors - -```ts -new ExecutionError( - name: string, - value: string, - traceback: string): ExecutionError -``` - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `name` | `string` | Name of the error. | -| `value` | `string` | Value of the error. | -| `traceback` | `string` | The raw traceback of the error. | - -###### Returns - -`ExecutionError` - -#### Properties - -| Property | Modifier | Type | Description | -| ------ | ------ | ------ | ------ | -| `name` | `public` | `string` | Name of the error. | -| `traceback` | `public` | `string` | The raw traceback of the error. | -| `value` | `public` | `string` | Value of the error. | - -*** - -### OutputMessage - -Represents an output message from the sandbox code execution. - -#### Constructors - -```ts -new OutputMessage( - line: string, - timestamp: number, - error: boolean): OutputMessage -``` - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `line` | `string` | The output line. | -| `timestamp` | `number` | Unix epoch in nanoseconds. | -| `error` | `boolean` | Whether the output is an error. | - -###### Returns - -`OutputMessage` - -#### Properties - -| Property | Modifier | Type | Description | -| ------ | ------ | ------ | ------ | -| `error` | `readonly` | `boolean` | Whether the output is an error. | -| `line` | `readonly` | `string` | The output line. | -| `timestamp` | `readonly` | `number` | Unix epoch in nanoseconds. | - -#### Methods - -### toString() - -```ts -toString(): string -``` - -###### Returns - -`string` - -*** - -### Result - -Represents the data to be displayed as a result of executing a cell in a Jupyter notebook. -The result is similar to the structure returned by ipython kernel: https://ipython.readthedocs.io/en/stable/development/execution.html#execution-semantics - -The result can contain multiple types of data, such as text, images, plots, etc. Each type of data is represented -as a string, and the result can contain multiple types of data. The display calls don't have to have text representation, -for the actual result the representation is always present for the result, the other representations are always optional. - -#### Constructors - -```ts -new Result(rawData: RawData, isMainResult: boolean): Result -``` - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `rawData` | `RawData` | -| `isMainResult` | `boolean` | - -###### Returns - -`Result` - -#### Properties - -| Property | Modifier | Type | Description | -| ------ | ------ | ------ | ------ | -| `chart?` | `readonly` | `ChartTypes` | Contains the chart data. | -| `data?` | `readonly` | `Record`\<`string`, `unknown`\> | Contains the data from DataFrame. | -| `extra?` | `readonly` | `any` | Extra data that can be included. Not part of the standard types. | -| `html?` | `readonly` | `string` | HTML representation of the data. | -| `isMainResult` | `readonly` | `boolean` | - | -| `javascript?` | `readonly` | `string` | JavaScript representation of the data. | -| `jpeg?` | `readonly` | `string` | JPEG representation of the data. | -| `json?` | `readonly` | `string` | JSON representation of the data. | -| `latex?` | `readonly` | `string` | LaTeX representation of the data. | -| `markdown?` | `readonly` | `string` | Markdown representation of the data. | -| `pdf?` | `readonly` | `string` | PDF representation of the data. | -| `png?` | `readonly` | `string` | PNG representation of the data. | -| `raw` | `readonly` | `RawData` | - | -| `svg?` | `readonly` | `string` | SVG representation of the data. | -| `text?` | `readonly` | `string` | Text representation of the result. | - -#### Methods - -### formats() - -```ts -formats(): string[] -``` - -Returns all the formats available for the result. - -###### Returns - -`string`[] - -Array of strings representing the formats available for the result. - -### toJSON() - -```ts -toJSON(): object -``` - -Returns the serializable representation of the result. - -###### Returns - -`object` - -| Name | Type | -| ------ | ------ | -| `extra`? | `any` | -| `html` | `undefined` \| `string` | -| `javascript` | `undefined` \| `string` | -| `jpeg` | `undefined` \| `string` | -| `json` | `undefined` \| `string` | -| `latex` | `undefined` \| `string` | -| `markdown` | `undefined` \| `string` | -| `pdf` | `undefined` \| `string` | -| `png` | `undefined` \| `string` | -| `svg` | `undefined` \| `string` | -| `text` | `undefined` \| `string` | - -## Type Aliases - -### Logs - -```ts -type Logs: object; -``` - -Data printed to stdout and stderr during execution, usually by print statements, logs, warnings, subprocesses, etc. - -#### Type declaration - -| Name | Type | Description | -| ------ | ------ | ------ | -| `stderr` | `string`[] | List of strings printed to stderr by prints, subprocesses, etc. | -| `stdout` | `string`[] | List of strings printed to stdout by prints, subprocesses, etc. | - -*** - -### MIMEType - -```ts -type MIMEType: string; -``` - -Represents a MIME type. - -*** - -### RawData - -```ts -type RawData: object & E2BData; -``` - -Dictionary that maps MIME types to their corresponding representations of the data. - -## Functions - -### extractError() - -```ts -function extractError(res: Response): Promise -``` - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `res` | `Response` | - -#### Returns - -`Promise`\<`undefined` \| `SandboxError`\> - -*** - -### parseOutput() - -```ts -function parseOutput( - execution: Execution, - line: string, - onStdout?: (output: OutputMessage) => any, - onStderr?: (output: OutputMessage) => any, - onResult?: (data: Result) => any, -onError?: (error: ExecutionError) => any): Promise -``` - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `execution` | `Execution` | -| `line` | `string` | -| `onStdout`? | (`output`: `OutputMessage`) => `any` | -| `onStderr`? | (`output`: `OutputMessage`) => `any` | -| `onResult`? | (`data`: `Result`) => `any` | -| `onError`? | (`error`: `ExecutionError`) => `any` | - -#### Returns - -`Promise`\<`void`\> diff --git a/sdk-reference/code-interpreter-js-sdk/v2.2.0/sandbox/page.mdx b/sdk-reference/code-interpreter-js-sdk/v2.2.0/sandbox/page.mdx deleted file mode 100644 index 96eafec5..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v2.2.0/sandbox/page.mdx +++ /dev/null @@ -1,312 +0,0 @@ -### Sandbox - -E2B cloud sandbox is a secure and isolated cloud environment. - -The sandbox allows you to: -- Access Linux OS -- Create, list, and delete files and directories -- Run commands -- Run isolated code -- Access the internet - -Check docs here. - -Use Sandbox.create to create a new sandbox. - -#### Example - -```ts -import { Sandbox } from '@e2b/code-interpreter' - -const sandbox = await Sandbox.create() -``` - -#### Methods - -### createCodeContext() - -```ts -createCodeContext(opts?: CreateCodeContextOpts): Promise -``` - -Creates a new context to run code in. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `opts`? | `CreateCodeContextOpts` | options for creating the context. | - -###### Returns - -`Promise`\<`Context`\> - -context object. - -### runCode() - -###### runCode(code, opts) - -```ts -runCode(code: string, opts?: RunCodeOpts & object): Promise -``` - -Run the code as Python. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `code` | `string` | code to execute. | -| `opts`? | `RunCodeOpts` & `object` | options for executing the code. | - -###### Returns - -`Promise`\<`Execution`\> - -`Execution` result object. - -###### runCode(code, opts) - -```ts -runCode(code: string, opts?: RunCodeOpts & object): Promise -``` - -Run the code for the specified language. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. -If no language is specified, Python is used. - -You can reference previously defined variables, imports, and functions in the code. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `code` | `string` | code to execute. | -| `opts`? | `RunCodeOpts` & `object` | options for executing the code. | - -###### Returns - -`Promise`\<`Execution`\> - -`Execution` result object. - -###### runCode(code, opts) - -```ts -runCode(code: string, opts?: RunCodeOpts & object): Promise -``` - -Runs the code in the specified context, if not specified, the default context is used. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `code` | `string` | code to execute. | -| `opts`? | `RunCodeOpts` & `object` | options for executing the code | - -###### Returns - -`Promise`\<`Execution`\> - -`Execution` result object - -## Interfaces - -### CreateCodeContextOpts - -Options for creating a code context. - -#### Properties - -### cwd? - -```ts -optional cwd: string; -``` - -Working directory for the context. - -###### Default - -```ts -/home/user -``` - -### language? - -```ts -optional language: string; -``` - -Language for the context. - -###### Default - -```ts -python -``` - -### requestTimeoutMs? - -```ts -optional requestTimeoutMs: number; -``` - -Timeout for the request in **milliseconds**. - -###### Default - -```ts -30_000 // 30 seconds -``` - -*** - -### RunCodeOpts - -Options for running code. - -#### Properties - -### envs? - -```ts -optional envs: Record; -``` - -Custom environment variables for code execution. - -###### Default - -```ts -{} -``` - -### onError()? - -```ts -optional onError: (error: ExecutionError) => any; -``` - -Callback for handling the `ExecutionError` object. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `error` | `ExecutionError` | - -###### Returns - -`any` - -### onResult()? - -```ts -optional onResult: (data: Result) => any; -``` - -Callback for handling the final execution result. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `data` | `Result` | - -###### Returns - -`any` - -### onStderr()? - -```ts -optional onStderr: (output: OutputMessage) => any; -``` - -Callback for handling stderr messages. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `output` | `OutputMessage` | - -###### Returns - -`any` - -### onStdout()? - -```ts -optional onStdout: (output: OutputMessage) => any; -``` - -Callback for handling stdout messages. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `output` | `OutputMessage` | - -###### Returns - -`any` - -### requestTimeoutMs? - -```ts -optional requestTimeoutMs: number; -``` - -Timeout for the request in **milliseconds**. - -###### Default - -```ts -30_000 // 30 seconds -``` - -### timeoutMs? - -```ts -optional timeoutMs: number; -``` - -Timeout for the code execution in **milliseconds**. - -###### Default - -```ts -60_000 // 60 seconds -``` - -## Type Aliases - -### Context - -```ts -type Context: object; -``` - -Represents a context for code execution. - -#### Type declaration - -| Name | Type | Description | -| ------ | ------ | ------ | -| `cwd` | `string` | The working directory of the context. | -| `id` | `string` | The ID of the context. | -| `language` | `string` | The language of the context. | diff --git a/sdk-reference/code-interpreter-js-sdk/v2.3.0/charts/page.mdx b/sdk-reference/code-interpreter-js-sdk/v2.3.0/charts/page.mdx deleted file mode 100644 index f3176d3b..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v2.3.0/charts/page.mdx +++ /dev/null @@ -1,240 +0,0 @@ -### ChartType - -Chart types - -#### Enumeration Members - -| Enumeration Member | Value | -| ------ | ------ | -| `BAR` | `"bar"` | -| `BOX_AND_WHISKER` | `"box_and_whisker"` | -| `LINE` | `"line"` | -| `PIE` | `"pie"` | -| `SCATTER` | `"scatter"` | -| `SUPERCHART` | `"superchart"` | -| `UNKNOWN` | `"unknown"` | - -*** - -### ScaleType - -Ax scale types - -#### Enumeration Members - -| Enumeration Member | Value | -| ------ | ------ | -| `ASINH` | `"asinh"` | -| `CATEGORICAL` | `"categorical"` | -| `DATETIME` | `"datetime"` | -| `FUNCTION` | `"function"` | -| `FUNCTIONLOG` | `"functionlog"` | -| `LINEAR` | `"linear"` | -| `LOG` | `"log"` | -| `LOGIT` | `"logit"` | -| `SYMLOG` | `"symlog"` | - -## Type Aliases - -### BarChart - -```ts -type BarChart: Chart2D & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `BarData`[] | -| `type` | `ChartType.BAR` | - -*** - -### BarData - -```ts -type BarData: object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `group` | `string` | -| `label` | `string` | -| `value` | `string` | - -*** - -### BoxAndWhiskerChart - -```ts -type BoxAndWhiskerChart: Chart2D & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `BoxAndWhiskerData`[] | -| `type` | `ChartType.BOX_AND_WHISKER` | - -*** - -### BoxAndWhiskerData - -```ts -type BoxAndWhiskerData: object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `first_quartile` | `number` | -| `label` | `string` | -| `max` | `number` | -| `median` | `number` | -| `min` | `number` | -| `outliers` | `number`[] | -| `third_quartile` | `number` | - -*** - -### Chart - -```ts -type Chart: object; -``` - -Represents a chart. - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `any`[] | -| `title` | `string` | -| `type` | `ChartType` | - -*** - -### ChartTypes - -```ts -type ChartTypes: - | LineChart - | ScatterChart - | BarChart - | PieChart - | BoxAndWhiskerChart - | SuperChart; -``` - -*** - -### LineChart - -```ts -type LineChart: PointChart & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `type` | `ChartType.LINE` | - -*** - -### PieChart - -```ts -type PieChart: Chart & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `PieData`[] | -| `type` | `ChartType.PIE` | - -*** - -### PieData - -```ts -type PieData: object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `angle` | `number` | -| `label` | `string` | -| `radius` | `number` | - -*** - -### PointData - -```ts -type PointData: object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `label` | `string` | -| `points` | [`number` \| `string`, `number` \| `string`][] | - -*** - -### ScatterChart - -```ts -type ScatterChart: PointChart & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `type` | `ChartType.SCATTER` | - -*** - -### SuperChart - -```ts -type SuperChart: Chart & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `Chart`[] | -| `type` | `ChartType.SUPERCHART` | - -## Functions - -### deserializeChart() - -```ts -function deserializeChart(data: any): Chart -``` - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `data` | `any` | - -#### Returns - -`Chart` diff --git a/sdk-reference/code-interpreter-js-sdk/v2.3.0/consts/page.mdx b/sdk-reference/code-interpreter-js-sdk/v2.3.0/consts/page.mdx deleted file mode 100644 index d1ee2e76..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v2.3.0/consts/page.mdx +++ /dev/null @@ -1,13 +0,0 @@ -### DEFAULT\_TIMEOUT\_MS - -```ts -const DEFAULT_TIMEOUT_MS: 60000 = 60_000; -``` - -*** - -### JUPYTER\_PORT - -```ts -const JUPYTER_PORT: 49999 = 49999; -``` diff --git a/sdk-reference/code-interpreter-js-sdk/v2.3.0/index/page.mdx b/sdk-reference/code-interpreter-js-sdk/v2.3.0/index/page.mdx deleted file mode 100644 index dc55fcc7..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v2.3.0/index/page.mdx +++ /dev/null @@ -1,103 +0,0 @@ -### BarChart - -Re-exports BarChart - -### BarData - -Re-exports BarData - -### BoxAndWhiskerChart - -Re-exports BoxAndWhiskerChart - -### BoxAndWhiskerData - -Re-exports BoxAndWhiskerData - -### Chart - -Re-exports Chart - -### ChartType - -Re-exports ChartType - -### ChartTypes - -Re-exports ChartTypes - -### Context - -Re-exports Context - -### CreateCodeContextOpts - -Re-exports CreateCodeContextOpts - -### default - -Renames and re-exports Sandbox - -### Execution - -Re-exports Execution - -### ExecutionError - -Re-exports ExecutionError - -### LineChart - -Re-exports LineChart - -### Logs - -Re-exports Logs - -### MIMEType - -Re-exports MIMEType - -### OutputMessage - -Re-exports OutputMessage - -### PieChart - -Re-exports PieChart - -### PieData - -Re-exports PieData - -### PointData - -Re-exports PointData - -### RawData - -Re-exports RawData - -### Result - -Re-exports Result - -### RunCodeOpts - -Re-exports RunCodeOpts - -### Sandbox - -Re-exports Sandbox - -### ScaleType - -Re-exports ScaleType - -### ScatterChart - -Re-exports ScatterChart - -### SuperChart - -Re-exports SuperChart diff --git a/sdk-reference/code-interpreter-js-sdk/v2.3.0/messaging/page.mdx b/sdk-reference/code-interpreter-js-sdk/v2.3.0/messaging/page.mdx deleted file mode 100644 index 4b3c4ed9..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v2.3.0/messaging/page.mdx +++ /dev/null @@ -1,326 +0,0 @@ -### Execution - -Represents the result of a cell execution. - -#### Constructors - -```ts -new Execution( - results: Result[], - logs: Logs, - error?: ExecutionError, - executionCount?: number): Execution -``` - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `results` | `Result`[] | `[]` | List of result of the cell (interactively interpreted last line), display calls (e.g. matplotlib plots). | -| `logs` | `Logs` | `...` | Logs printed to stdout and stderr during execution. | -| `error`? | `ExecutionError` | `undefined` | An Error object if an error occurred, null otherwise. | -| `executionCount`? | `number` | `undefined` | Execution count of the cell. | - -###### Returns - -`Execution` - -#### Properties - -| Property | Modifier | Type | Default value | Description | -| ------ | ------ | ------ | ------ | ------ | -| `error?` | `public` | `ExecutionError` | `undefined` | An Error object if an error occurred, null otherwise. | -| `executionCount?` | `public` | `number` | `undefined` | Execution count of the cell. | -| `logs` | `public` | `Logs` | `undefined` | Logs printed to stdout and stderr during execution. | -| `results` | `public` | `Result`[] | `[]` | List of result of the cell (interactively interpreted last line), display calls (e.g. matplotlib plots). | - -#### Accessors - -### text - -```ts -get text(): undefined | string -``` - -Returns the text representation of the main result of the cell. - -###### Returns - -`undefined` \| `string` - -#### Methods - -### toJSON() - -```ts -toJSON(): object -``` - -Returns the serializable representation of the execution result. - -###### Returns - -`object` - -| Name | Type | -| ------ | ------ | -| `error` | `undefined` \| `ExecutionError` | -| `logs` | `Logs` | -| `results` | `Result`[] | - -*** - -### ExecutionError - -Represents an error that occurred during the execution of a cell. -The error contains the name of the error, the value of the error, and the traceback. - -#### Constructors - -```ts -new ExecutionError( - name: string, - value: string, - traceback: string): ExecutionError -``` - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `name` | `string` | Name of the error. | -| `value` | `string` | Value of the error. | -| `traceback` | `string` | The raw traceback of the error. | - -###### Returns - -`ExecutionError` - -#### Properties - -| Property | Modifier | Type | Description | -| ------ | ------ | ------ | ------ | -| `name` | `public` | `string` | Name of the error. | -| `traceback` | `public` | `string` | The raw traceback of the error. | -| `value` | `public` | `string` | Value of the error. | - -*** - -### OutputMessage - -Represents an output message from the sandbox code execution. - -#### Constructors - -```ts -new OutputMessage( - line: string, - timestamp: number, - error: boolean): OutputMessage -``` - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `line` | `string` | The output line. | -| `timestamp` | `number` | Unix epoch in nanoseconds. | -| `error` | `boolean` | Whether the output is an error. | - -###### Returns - -`OutputMessage` - -#### Properties - -| Property | Modifier | Type | Description | -| ------ | ------ | ------ | ------ | -| `error` | `readonly` | `boolean` | Whether the output is an error. | -| `line` | `readonly` | `string` | The output line. | -| `timestamp` | `readonly` | `number` | Unix epoch in nanoseconds. | - -#### Methods - -### toString() - -```ts -toString(): string -``` - -###### Returns - -`string` - -*** - -### Result - -Represents the data to be displayed as a result of executing a cell in a Jupyter notebook. -The result is similar to the structure returned by ipython kernel: https://ipython.readthedocs.io/en/stable/development/execution.html#execution-semantics - -The result can contain multiple types of data, such as text, images, plots, etc. Each type of data is represented -as a string, and the result can contain multiple types of data. The display calls don't have to have text representation, -for the actual result the representation is always present for the result, the other representations are always optional. - -#### Constructors - -```ts -new Result(rawData: RawData, isMainResult: boolean): Result -``` - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `rawData` | `RawData` | -| `isMainResult` | `boolean` | - -###### Returns - -`Result` - -#### Properties - -| Property | Modifier | Type | Description | -| ------ | ------ | ------ | ------ | -| `chart?` | `readonly` | `ChartTypes` | Contains the chart data. | -| `data?` | `readonly` | `Record`\<`string`, `unknown`\> | Contains the data from DataFrame. | -| `extra?` | `readonly` | `any` | Extra data that can be included. Not part of the standard types. | -| `html?` | `readonly` | `string` | HTML representation of the data. | -| `isMainResult` | `readonly` | `boolean` | - | -| `javascript?` | `readonly` | `string` | JavaScript representation of the data. | -| `jpeg?` | `readonly` | `string` | JPEG representation of the data. | -| `json?` | `readonly` | `string` | JSON representation of the data. | -| `latex?` | `readonly` | `string` | LaTeX representation of the data. | -| `markdown?` | `readonly` | `string` | Markdown representation of the data. | -| `pdf?` | `readonly` | `string` | PDF representation of the data. | -| `png?` | `readonly` | `string` | PNG representation of the data. | -| `raw` | `readonly` | `RawData` | - | -| `svg?` | `readonly` | `string` | SVG representation of the data. | -| `text?` | `readonly` | `string` | Text representation of the result. | - -#### Methods - -### formats() - -```ts -formats(): string[] -``` - -Returns all the formats available for the result. - -###### Returns - -`string`[] - -Array of strings representing the formats available for the result. - -### toJSON() - -```ts -toJSON(): object -``` - -Returns the serializable representation of the result. - -###### Returns - -`object` - -| Name | Type | -| ------ | ------ | -| `extra`? | `any` | -| `html` | `undefined` \| `string` | -| `javascript` | `undefined` \| `string` | -| `jpeg` | `undefined` \| `string` | -| `json` | `undefined` \| `string` | -| `latex` | `undefined` \| `string` | -| `markdown` | `undefined` \| `string` | -| `pdf` | `undefined` \| `string` | -| `png` | `undefined` \| `string` | -| `svg` | `undefined` \| `string` | -| `text` | `undefined` \| `string` | - -## Type Aliases - -### Logs - -```ts -type Logs: object; -``` - -Data printed to stdout and stderr during execution, usually by print statements, logs, warnings, subprocesses, etc. - -#### Type declaration - -| Name | Type | Description | -| ------ | ------ | ------ | -| `stderr` | `string`[] | List of strings printed to stderr by prints, subprocesses, etc. | -| `stdout` | `string`[] | List of strings printed to stdout by prints, subprocesses, etc. | - -*** - -### MIMEType - -```ts -type MIMEType: string; -``` - -Represents a MIME type. - -*** - -### RawData - -```ts -type RawData: object & E2BData; -``` - -Dictionary that maps MIME types to their corresponding representations of the data. - -## Functions - -### extractError() - -```ts -function extractError(res: Response): Promise -``` - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `res` | `Response` | - -#### Returns - -`Promise`\<`undefined` \| `SandboxError`\> - -*** - -### parseOutput() - -```ts -function parseOutput( - execution: Execution, - line: string, - onStdout?: (output: OutputMessage) => any, - onStderr?: (output: OutputMessage) => any, - onResult?: (data: Result) => any, -onError?: (error: ExecutionError) => any): Promise -``` - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `execution` | `Execution` | -| `line` | `string` | -| `onStdout`? | (`output`: `OutputMessage`) => `any` | -| `onStderr`? | (`output`: `OutputMessage`) => `any` | -| `onResult`? | (`data`: `Result`) => `any` | -| `onError`? | (`error`: `ExecutionError`) => `any` | - -#### Returns - -`Promise`\<`void`\> diff --git a/sdk-reference/code-interpreter-js-sdk/v2.3.0/sandbox/page.mdx b/sdk-reference/code-interpreter-js-sdk/v2.3.0/sandbox/page.mdx deleted file mode 100644 index 93c26893..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v2.3.0/sandbox/page.mdx +++ /dev/null @@ -1,366 +0,0 @@ -### Sandbox - -E2B cloud sandbox is a secure and isolated cloud environment. - -The sandbox allows you to: -- Access Linux OS -- Create, list, and delete files and directories -- Run commands -- Run isolated code -- Access the internet - -Check docs here. - -Use Sandbox.create to create a new sandbox. - -#### Example - -```ts -import { Sandbox } from '@e2b/code-interpreter' - -const sandbox = await Sandbox.create() -``` - -#### Methods - -### createCodeContext() - -```ts -createCodeContext(opts?: CreateCodeContextOpts): Promise -``` - -Creates a new context to run code in. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `opts`? | `CreateCodeContextOpts` | options for creating the context. | - -###### Returns - -`Promise`\<`Context`\> - -context object. - -### listCodeContexts() - -```ts -listCodeContexts(): Promise -``` - -List all contexts. - -###### Returns - -`Promise`\<`Context`[]\> - -list of contexts. - -### removeCodeContext() - -```ts -removeCodeContext(context: string | Context): Promise -``` - -Removes a context. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `context` | `string` \| `Context` | context to remove. | - -###### Returns - -`Promise`\<`void`\> - -void. - -### restartCodeContext() - -```ts -restartCodeContext(context: string | Context): Promise -``` - -Restart a context. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `context` | `string` \| `Context` | context to restart. | - -###### Returns - -`Promise`\<`void`\> - -void. - -### runCode() - -###### runCode(code, opts) - -```ts -runCode(code: string, opts?: RunCodeOpts & object): Promise -``` - -Run the code as Python. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `code` | `string` | code to execute. | -| `opts`? | `RunCodeOpts` & `object` | options for executing the code. | - -###### Returns - -`Promise`\<`Execution`\> - -`Execution` result object. - -###### runCode(code, opts) - -```ts -runCode(code: string, opts?: RunCodeOpts & object): Promise -``` - -Run the code for the specified language. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. -If no language is specified, Python is used. - -You can reference previously defined variables, imports, and functions in the code. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `code` | `string` | code to execute. | -| `opts`? | `RunCodeOpts` & `object` | options for executing the code. | - -###### Returns - -`Promise`\<`Execution`\> - -`Execution` result object. - -###### runCode(code, opts) - -```ts -runCode(code: string, opts?: RunCodeOpts & object): Promise -``` - -Runs the code in the specified context, if not specified, the default context is used. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `code` | `string` | code to execute. | -| `opts`? | `RunCodeOpts` & `object` | options for executing the code | - -###### Returns - -`Promise`\<`Execution`\> - -`Execution` result object - -## Interfaces - -### CreateCodeContextOpts - -Options for creating a code context. - -#### Properties - -### cwd? - -```ts -optional cwd: string; -``` - -Working directory for the context. - -###### Default - -```ts -/home/user -``` - -### language? - -```ts -optional language: string; -``` - -Language for the context. - -###### Default - -```ts -python -``` - -### requestTimeoutMs? - -```ts -optional requestTimeoutMs: number; -``` - -Timeout for the request in **milliseconds**. - -###### Default - -```ts -30_000 // 30 seconds -``` - -*** - -### RunCodeOpts - -Options for running code. - -#### Properties - -### envs? - -```ts -optional envs: Record; -``` - -Custom environment variables for code execution. - -###### Default - -```ts -{} -``` - -### onError()? - -```ts -optional onError: (error: ExecutionError) => any; -``` - -Callback for handling the `ExecutionError` object. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `error` | `ExecutionError` | - -###### Returns - -`any` - -### onResult()? - -```ts -optional onResult: (data: Result) => any; -``` - -Callback for handling the final execution result. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `data` | `Result` | - -###### Returns - -`any` - -### onStderr()? - -```ts -optional onStderr: (output: OutputMessage) => any; -``` - -Callback for handling stderr messages. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `output` | `OutputMessage` | - -###### Returns - -`any` - -### onStdout()? - -```ts -optional onStdout: (output: OutputMessage) => any; -``` - -Callback for handling stdout messages. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `output` | `OutputMessage` | - -###### Returns - -`any` - -### requestTimeoutMs? - -```ts -optional requestTimeoutMs: number; -``` - -Timeout for the request in **milliseconds**. - -###### Default - -```ts -30_000 // 30 seconds -``` - -### timeoutMs? - -```ts -optional timeoutMs: number; -``` - -Timeout for the code execution in **milliseconds**. - -###### Default - -```ts -60_000 // 60 seconds -``` - -## Type Aliases - -### Context - -```ts -type Context: object; -``` - -Represents a context for code execution. - -#### Type declaration - -| Name | Type | Description | -| ------ | ------ | ------ | -| `cwd` | `string` | The working directory of the context. | -| `id` | `string` | The ID of the context. | -| `language` | `string` | The language of the context. | diff --git a/sdk-reference/code-interpreter-js-sdk/v2.3.1/charts/page.mdx b/sdk-reference/code-interpreter-js-sdk/v2.3.1/charts/page.mdx deleted file mode 100644 index f3176d3b..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v2.3.1/charts/page.mdx +++ /dev/null @@ -1,240 +0,0 @@ -### ChartType - -Chart types - -#### Enumeration Members - -| Enumeration Member | Value | -| ------ | ------ | -| `BAR` | `"bar"` | -| `BOX_AND_WHISKER` | `"box_and_whisker"` | -| `LINE` | `"line"` | -| `PIE` | `"pie"` | -| `SCATTER` | `"scatter"` | -| `SUPERCHART` | `"superchart"` | -| `UNKNOWN` | `"unknown"` | - -*** - -### ScaleType - -Ax scale types - -#### Enumeration Members - -| Enumeration Member | Value | -| ------ | ------ | -| `ASINH` | `"asinh"` | -| `CATEGORICAL` | `"categorical"` | -| `DATETIME` | `"datetime"` | -| `FUNCTION` | `"function"` | -| `FUNCTIONLOG` | `"functionlog"` | -| `LINEAR` | `"linear"` | -| `LOG` | `"log"` | -| `LOGIT` | `"logit"` | -| `SYMLOG` | `"symlog"` | - -## Type Aliases - -### BarChart - -```ts -type BarChart: Chart2D & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `BarData`[] | -| `type` | `ChartType.BAR` | - -*** - -### BarData - -```ts -type BarData: object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `group` | `string` | -| `label` | `string` | -| `value` | `string` | - -*** - -### BoxAndWhiskerChart - -```ts -type BoxAndWhiskerChart: Chart2D & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `BoxAndWhiskerData`[] | -| `type` | `ChartType.BOX_AND_WHISKER` | - -*** - -### BoxAndWhiskerData - -```ts -type BoxAndWhiskerData: object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `first_quartile` | `number` | -| `label` | `string` | -| `max` | `number` | -| `median` | `number` | -| `min` | `number` | -| `outliers` | `number`[] | -| `third_quartile` | `number` | - -*** - -### Chart - -```ts -type Chart: object; -``` - -Represents a chart. - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `any`[] | -| `title` | `string` | -| `type` | `ChartType` | - -*** - -### ChartTypes - -```ts -type ChartTypes: - | LineChart - | ScatterChart - | BarChart - | PieChart - | BoxAndWhiskerChart - | SuperChart; -``` - -*** - -### LineChart - -```ts -type LineChart: PointChart & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `type` | `ChartType.LINE` | - -*** - -### PieChart - -```ts -type PieChart: Chart & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `PieData`[] | -| `type` | `ChartType.PIE` | - -*** - -### PieData - -```ts -type PieData: object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `angle` | `number` | -| `label` | `string` | -| `radius` | `number` | - -*** - -### PointData - -```ts -type PointData: object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `label` | `string` | -| `points` | [`number` \| `string`, `number` \| `string`][] | - -*** - -### ScatterChart - -```ts -type ScatterChart: PointChart & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `type` | `ChartType.SCATTER` | - -*** - -### SuperChart - -```ts -type SuperChart: Chart & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `Chart`[] | -| `type` | `ChartType.SUPERCHART` | - -## Functions - -### deserializeChart() - -```ts -function deserializeChart(data: any): Chart -``` - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `data` | `any` | - -#### Returns - -`Chart` diff --git a/sdk-reference/code-interpreter-js-sdk/v2.3.1/consts/page.mdx b/sdk-reference/code-interpreter-js-sdk/v2.3.1/consts/page.mdx deleted file mode 100644 index d1ee2e76..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v2.3.1/consts/page.mdx +++ /dev/null @@ -1,13 +0,0 @@ -### DEFAULT\_TIMEOUT\_MS - -```ts -const DEFAULT_TIMEOUT_MS: 60000 = 60_000; -``` - -*** - -### JUPYTER\_PORT - -```ts -const JUPYTER_PORT: 49999 = 49999; -``` diff --git a/sdk-reference/code-interpreter-js-sdk/v2.3.1/index/page.mdx b/sdk-reference/code-interpreter-js-sdk/v2.3.1/index/page.mdx deleted file mode 100644 index dc55fcc7..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v2.3.1/index/page.mdx +++ /dev/null @@ -1,103 +0,0 @@ -### BarChart - -Re-exports BarChart - -### BarData - -Re-exports BarData - -### BoxAndWhiskerChart - -Re-exports BoxAndWhiskerChart - -### BoxAndWhiskerData - -Re-exports BoxAndWhiskerData - -### Chart - -Re-exports Chart - -### ChartType - -Re-exports ChartType - -### ChartTypes - -Re-exports ChartTypes - -### Context - -Re-exports Context - -### CreateCodeContextOpts - -Re-exports CreateCodeContextOpts - -### default - -Renames and re-exports Sandbox - -### Execution - -Re-exports Execution - -### ExecutionError - -Re-exports ExecutionError - -### LineChart - -Re-exports LineChart - -### Logs - -Re-exports Logs - -### MIMEType - -Re-exports MIMEType - -### OutputMessage - -Re-exports OutputMessage - -### PieChart - -Re-exports PieChart - -### PieData - -Re-exports PieData - -### PointData - -Re-exports PointData - -### RawData - -Re-exports RawData - -### Result - -Re-exports Result - -### RunCodeOpts - -Re-exports RunCodeOpts - -### Sandbox - -Re-exports Sandbox - -### ScaleType - -Re-exports ScaleType - -### ScatterChart - -Re-exports ScatterChart - -### SuperChart - -Re-exports SuperChart diff --git a/sdk-reference/code-interpreter-js-sdk/v2.3.1/messaging/page.mdx b/sdk-reference/code-interpreter-js-sdk/v2.3.1/messaging/page.mdx deleted file mode 100644 index 4b3c4ed9..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v2.3.1/messaging/page.mdx +++ /dev/null @@ -1,326 +0,0 @@ -### Execution - -Represents the result of a cell execution. - -#### Constructors - -```ts -new Execution( - results: Result[], - logs: Logs, - error?: ExecutionError, - executionCount?: number): Execution -``` - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `results` | `Result`[] | `[]` | List of result of the cell (interactively interpreted last line), display calls (e.g. matplotlib plots). | -| `logs` | `Logs` | `...` | Logs printed to stdout and stderr during execution. | -| `error`? | `ExecutionError` | `undefined` | An Error object if an error occurred, null otherwise. | -| `executionCount`? | `number` | `undefined` | Execution count of the cell. | - -###### Returns - -`Execution` - -#### Properties - -| Property | Modifier | Type | Default value | Description | -| ------ | ------ | ------ | ------ | ------ | -| `error?` | `public` | `ExecutionError` | `undefined` | An Error object if an error occurred, null otherwise. | -| `executionCount?` | `public` | `number` | `undefined` | Execution count of the cell. | -| `logs` | `public` | `Logs` | `undefined` | Logs printed to stdout and stderr during execution. | -| `results` | `public` | `Result`[] | `[]` | List of result of the cell (interactively interpreted last line), display calls (e.g. matplotlib plots). | - -#### Accessors - -### text - -```ts -get text(): undefined | string -``` - -Returns the text representation of the main result of the cell. - -###### Returns - -`undefined` \| `string` - -#### Methods - -### toJSON() - -```ts -toJSON(): object -``` - -Returns the serializable representation of the execution result. - -###### Returns - -`object` - -| Name | Type | -| ------ | ------ | -| `error` | `undefined` \| `ExecutionError` | -| `logs` | `Logs` | -| `results` | `Result`[] | - -*** - -### ExecutionError - -Represents an error that occurred during the execution of a cell. -The error contains the name of the error, the value of the error, and the traceback. - -#### Constructors - -```ts -new ExecutionError( - name: string, - value: string, - traceback: string): ExecutionError -``` - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `name` | `string` | Name of the error. | -| `value` | `string` | Value of the error. | -| `traceback` | `string` | The raw traceback of the error. | - -###### Returns - -`ExecutionError` - -#### Properties - -| Property | Modifier | Type | Description | -| ------ | ------ | ------ | ------ | -| `name` | `public` | `string` | Name of the error. | -| `traceback` | `public` | `string` | The raw traceback of the error. | -| `value` | `public` | `string` | Value of the error. | - -*** - -### OutputMessage - -Represents an output message from the sandbox code execution. - -#### Constructors - -```ts -new OutputMessage( - line: string, - timestamp: number, - error: boolean): OutputMessage -``` - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `line` | `string` | The output line. | -| `timestamp` | `number` | Unix epoch in nanoseconds. | -| `error` | `boolean` | Whether the output is an error. | - -###### Returns - -`OutputMessage` - -#### Properties - -| Property | Modifier | Type | Description | -| ------ | ------ | ------ | ------ | -| `error` | `readonly` | `boolean` | Whether the output is an error. | -| `line` | `readonly` | `string` | The output line. | -| `timestamp` | `readonly` | `number` | Unix epoch in nanoseconds. | - -#### Methods - -### toString() - -```ts -toString(): string -``` - -###### Returns - -`string` - -*** - -### Result - -Represents the data to be displayed as a result of executing a cell in a Jupyter notebook. -The result is similar to the structure returned by ipython kernel: https://ipython.readthedocs.io/en/stable/development/execution.html#execution-semantics - -The result can contain multiple types of data, such as text, images, plots, etc. Each type of data is represented -as a string, and the result can contain multiple types of data. The display calls don't have to have text representation, -for the actual result the representation is always present for the result, the other representations are always optional. - -#### Constructors - -```ts -new Result(rawData: RawData, isMainResult: boolean): Result -``` - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `rawData` | `RawData` | -| `isMainResult` | `boolean` | - -###### Returns - -`Result` - -#### Properties - -| Property | Modifier | Type | Description | -| ------ | ------ | ------ | ------ | -| `chart?` | `readonly` | `ChartTypes` | Contains the chart data. | -| `data?` | `readonly` | `Record`\<`string`, `unknown`\> | Contains the data from DataFrame. | -| `extra?` | `readonly` | `any` | Extra data that can be included. Not part of the standard types. | -| `html?` | `readonly` | `string` | HTML representation of the data. | -| `isMainResult` | `readonly` | `boolean` | - | -| `javascript?` | `readonly` | `string` | JavaScript representation of the data. | -| `jpeg?` | `readonly` | `string` | JPEG representation of the data. | -| `json?` | `readonly` | `string` | JSON representation of the data. | -| `latex?` | `readonly` | `string` | LaTeX representation of the data. | -| `markdown?` | `readonly` | `string` | Markdown representation of the data. | -| `pdf?` | `readonly` | `string` | PDF representation of the data. | -| `png?` | `readonly` | `string` | PNG representation of the data. | -| `raw` | `readonly` | `RawData` | - | -| `svg?` | `readonly` | `string` | SVG representation of the data. | -| `text?` | `readonly` | `string` | Text representation of the result. | - -#### Methods - -### formats() - -```ts -formats(): string[] -``` - -Returns all the formats available for the result. - -###### Returns - -`string`[] - -Array of strings representing the formats available for the result. - -### toJSON() - -```ts -toJSON(): object -``` - -Returns the serializable representation of the result. - -###### Returns - -`object` - -| Name | Type | -| ------ | ------ | -| `extra`? | `any` | -| `html` | `undefined` \| `string` | -| `javascript` | `undefined` \| `string` | -| `jpeg` | `undefined` \| `string` | -| `json` | `undefined` \| `string` | -| `latex` | `undefined` \| `string` | -| `markdown` | `undefined` \| `string` | -| `pdf` | `undefined` \| `string` | -| `png` | `undefined` \| `string` | -| `svg` | `undefined` \| `string` | -| `text` | `undefined` \| `string` | - -## Type Aliases - -### Logs - -```ts -type Logs: object; -``` - -Data printed to stdout and stderr during execution, usually by print statements, logs, warnings, subprocesses, etc. - -#### Type declaration - -| Name | Type | Description | -| ------ | ------ | ------ | -| `stderr` | `string`[] | List of strings printed to stderr by prints, subprocesses, etc. | -| `stdout` | `string`[] | List of strings printed to stdout by prints, subprocesses, etc. | - -*** - -### MIMEType - -```ts -type MIMEType: string; -``` - -Represents a MIME type. - -*** - -### RawData - -```ts -type RawData: object & E2BData; -``` - -Dictionary that maps MIME types to their corresponding representations of the data. - -## Functions - -### extractError() - -```ts -function extractError(res: Response): Promise -``` - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `res` | `Response` | - -#### Returns - -`Promise`\<`undefined` \| `SandboxError`\> - -*** - -### parseOutput() - -```ts -function parseOutput( - execution: Execution, - line: string, - onStdout?: (output: OutputMessage) => any, - onStderr?: (output: OutputMessage) => any, - onResult?: (data: Result) => any, -onError?: (error: ExecutionError) => any): Promise -``` - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `execution` | `Execution` | -| `line` | `string` | -| `onStdout`? | (`output`: `OutputMessage`) => `any` | -| `onStderr`? | (`output`: `OutputMessage`) => `any` | -| `onResult`? | (`data`: `Result`) => `any` | -| `onError`? | (`error`: `ExecutionError`) => `any` | - -#### Returns - -`Promise`\<`void`\> diff --git a/sdk-reference/code-interpreter-js-sdk/v2.3.1/sandbox/page.mdx b/sdk-reference/code-interpreter-js-sdk/v2.3.1/sandbox/page.mdx deleted file mode 100644 index 93c26893..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v2.3.1/sandbox/page.mdx +++ /dev/null @@ -1,366 +0,0 @@ -### Sandbox - -E2B cloud sandbox is a secure and isolated cloud environment. - -The sandbox allows you to: -- Access Linux OS -- Create, list, and delete files and directories -- Run commands -- Run isolated code -- Access the internet - -Check docs here. - -Use Sandbox.create to create a new sandbox. - -#### Example - -```ts -import { Sandbox } from '@e2b/code-interpreter' - -const sandbox = await Sandbox.create() -``` - -#### Methods - -### createCodeContext() - -```ts -createCodeContext(opts?: CreateCodeContextOpts): Promise -``` - -Creates a new context to run code in. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `opts`? | `CreateCodeContextOpts` | options for creating the context. | - -###### Returns - -`Promise`\<`Context`\> - -context object. - -### listCodeContexts() - -```ts -listCodeContexts(): Promise -``` - -List all contexts. - -###### Returns - -`Promise`\<`Context`[]\> - -list of contexts. - -### removeCodeContext() - -```ts -removeCodeContext(context: string | Context): Promise -``` - -Removes a context. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `context` | `string` \| `Context` | context to remove. | - -###### Returns - -`Promise`\<`void`\> - -void. - -### restartCodeContext() - -```ts -restartCodeContext(context: string | Context): Promise -``` - -Restart a context. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `context` | `string` \| `Context` | context to restart. | - -###### Returns - -`Promise`\<`void`\> - -void. - -### runCode() - -###### runCode(code, opts) - -```ts -runCode(code: string, opts?: RunCodeOpts & object): Promise -``` - -Run the code as Python. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `code` | `string` | code to execute. | -| `opts`? | `RunCodeOpts` & `object` | options for executing the code. | - -###### Returns - -`Promise`\<`Execution`\> - -`Execution` result object. - -###### runCode(code, opts) - -```ts -runCode(code: string, opts?: RunCodeOpts & object): Promise -``` - -Run the code for the specified language. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. -If no language is specified, Python is used. - -You can reference previously defined variables, imports, and functions in the code. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `code` | `string` | code to execute. | -| `opts`? | `RunCodeOpts` & `object` | options for executing the code. | - -###### Returns - -`Promise`\<`Execution`\> - -`Execution` result object. - -###### runCode(code, opts) - -```ts -runCode(code: string, opts?: RunCodeOpts & object): Promise -``` - -Runs the code in the specified context, if not specified, the default context is used. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `code` | `string` | code to execute. | -| `opts`? | `RunCodeOpts` & `object` | options for executing the code | - -###### Returns - -`Promise`\<`Execution`\> - -`Execution` result object - -## Interfaces - -### CreateCodeContextOpts - -Options for creating a code context. - -#### Properties - -### cwd? - -```ts -optional cwd: string; -``` - -Working directory for the context. - -###### Default - -```ts -/home/user -``` - -### language? - -```ts -optional language: string; -``` - -Language for the context. - -###### Default - -```ts -python -``` - -### requestTimeoutMs? - -```ts -optional requestTimeoutMs: number; -``` - -Timeout for the request in **milliseconds**. - -###### Default - -```ts -30_000 // 30 seconds -``` - -*** - -### RunCodeOpts - -Options for running code. - -#### Properties - -### envs? - -```ts -optional envs: Record; -``` - -Custom environment variables for code execution. - -###### Default - -```ts -{} -``` - -### onError()? - -```ts -optional onError: (error: ExecutionError) => any; -``` - -Callback for handling the `ExecutionError` object. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `error` | `ExecutionError` | - -###### Returns - -`any` - -### onResult()? - -```ts -optional onResult: (data: Result) => any; -``` - -Callback for handling the final execution result. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `data` | `Result` | - -###### Returns - -`any` - -### onStderr()? - -```ts -optional onStderr: (output: OutputMessage) => any; -``` - -Callback for handling stderr messages. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `output` | `OutputMessage` | - -###### Returns - -`any` - -### onStdout()? - -```ts -optional onStdout: (output: OutputMessage) => any; -``` - -Callback for handling stdout messages. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `output` | `OutputMessage` | - -###### Returns - -`any` - -### requestTimeoutMs? - -```ts -optional requestTimeoutMs: number; -``` - -Timeout for the request in **milliseconds**. - -###### Default - -```ts -30_000 // 30 seconds -``` - -### timeoutMs? - -```ts -optional timeoutMs: number; -``` - -Timeout for the code execution in **milliseconds**. - -###### Default - -```ts -60_000 // 60 seconds -``` - -## Type Aliases - -### Context - -```ts -type Context: object; -``` - -Represents a context for code execution. - -#### Type declaration - -| Name | Type | Description | -| ------ | ------ | ------ | -| `cwd` | `string` | The working directory of the context. | -| `id` | `string` | The ID of the context. | -| `language` | `string` | The language of the context. | diff --git a/sdk-reference/code-interpreter-js-sdk/v2.3.2/charts/page.mdx b/sdk-reference/code-interpreter-js-sdk/v2.3.2/charts/page.mdx deleted file mode 100644 index f3176d3b..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v2.3.2/charts/page.mdx +++ /dev/null @@ -1,240 +0,0 @@ -### ChartType - -Chart types - -#### Enumeration Members - -| Enumeration Member | Value | -| ------ | ------ | -| `BAR` | `"bar"` | -| `BOX_AND_WHISKER` | `"box_and_whisker"` | -| `LINE` | `"line"` | -| `PIE` | `"pie"` | -| `SCATTER` | `"scatter"` | -| `SUPERCHART` | `"superchart"` | -| `UNKNOWN` | `"unknown"` | - -*** - -### ScaleType - -Ax scale types - -#### Enumeration Members - -| Enumeration Member | Value | -| ------ | ------ | -| `ASINH` | `"asinh"` | -| `CATEGORICAL` | `"categorical"` | -| `DATETIME` | `"datetime"` | -| `FUNCTION` | `"function"` | -| `FUNCTIONLOG` | `"functionlog"` | -| `LINEAR` | `"linear"` | -| `LOG` | `"log"` | -| `LOGIT` | `"logit"` | -| `SYMLOG` | `"symlog"` | - -## Type Aliases - -### BarChart - -```ts -type BarChart: Chart2D & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `BarData`[] | -| `type` | `ChartType.BAR` | - -*** - -### BarData - -```ts -type BarData: object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `group` | `string` | -| `label` | `string` | -| `value` | `string` | - -*** - -### BoxAndWhiskerChart - -```ts -type BoxAndWhiskerChart: Chart2D & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `BoxAndWhiskerData`[] | -| `type` | `ChartType.BOX_AND_WHISKER` | - -*** - -### BoxAndWhiskerData - -```ts -type BoxAndWhiskerData: object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `first_quartile` | `number` | -| `label` | `string` | -| `max` | `number` | -| `median` | `number` | -| `min` | `number` | -| `outliers` | `number`[] | -| `third_quartile` | `number` | - -*** - -### Chart - -```ts -type Chart: object; -``` - -Represents a chart. - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `any`[] | -| `title` | `string` | -| `type` | `ChartType` | - -*** - -### ChartTypes - -```ts -type ChartTypes: - | LineChart - | ScatterChart - | BarChart - | PieChart - | BoxAndWhiskerChart - | SuperChart; -``` - -*** - -### LineChart - -```ts -type LineChart: PointChart & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `type` | `ChartType.LINE` | - -*** - -### PieChart - -```ts -type PieChart: Chart & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `PieData`[] | -| `type` | `ChartType.PIE` | - -*** - -### PieData - -```ts -type PieData: object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `angle` | `number` | -| `label` | `string` | -| `radius` | `number` | - -*** - -### PointData - -```ts -type PointData: object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `label` | `string` | -| `points` | [`number` \| `string`, `number` \| `string`][] | - -*** - -### ScatterChart - -```ts -type ScatterChart: PointChart & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `type` | `ChartType.SCATTER` | - -*** - -### SuperChart - -```ts -type SuperChart: Chart & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `Chart`[] | -| `type` | `ChartType.SUPERCHART` | - -## Functions - -### deserializeChart() - -```ts -function deserializeChart(data: any): Chart -``` - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `data` | `any` | - -#### Returns - -`Chart` diff --git a/sdk-reference/code-interpreter-js-sdk/v2.3.2/consts/page.mdx b/sdk-reference/code-interpreter-js-sdk/v2.3.2/consts/page.mdx deleted file mode 100644 index d1ee2e76..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v2.3.2/consts/page.mdx +++ /dev/null @@ -1,13 +0,0 @@ -### DEFAULT\_TIMEOUT\_MS - -```ts -const DEFAULT_TIMEOUT_MS: 60000 = 60_000; -``` - -*** - -### JUPYTER\_PORT - -```ts -const JUPYTER_PORT: 49999 = 49999; -``` diff --git a/sdk-reference/code-interpreter-js-sdk/v2.3.2/index/page.mdx b/sdk-reference/code-interpreter-js-sdk/v2.3.2/index/page.mdx deleted file mode 100644 index dc55fcc7..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v2.3.2/index/page.mdx +++ /dev/null @@ -1,103 +0,0 @@ -### BarChart - -Re-exports BarChart - -### BarData - -Re-exports BarData - -### BoxAndWhiskerChart - -Re-exports BoxAndWhiskerChart - -### BoxAndWhiskerData - -Re-exports BoxAndWhiskerData - -### Chart - -Re-exports Chart - -### ChartType - -Re-exports ChartType - -### ChartTypes - -Re-exports ChartTypes - -### Context - -Re-exports Context - -### CreateCodeContextOpts - -Re-exports CreateCodeContextOpts - -### default - -Renames and re-exports Sandbox - -### Execution - -Re-exports Execution - -### ExecutionError - -Re-exports ExecutionError - -### LineChart - -Re-exports LineChart - -### Logs - -Re-exports Logs - -### MIMEType - -Re-exports MIMEType - -### OutputMessage - -Re-exports OutputMessage - -### PieChart - -Re-exports PieChart - -### PieData - -Re-exports PieData - -### PointData - -Re-exports PointData - -### RawData - -Re-exports RawData - -### Result - -Re-exports Result - -### RunCodeOpts - -Re-exports RunCodeOpts - -### Sandbox - -Re-exports Sandbox - -### ScaleType - -Re-exports ScaleType - -### ScatterChart - -Re-exports ScatterChart - -### SuperChart - -Re-exports SuperChart diff --git a/sdk-reference/code-interpreter-js-sdk/v2.3.2/messaging/page.mdx b/sdk-reference/code-interpreter-js-sdk/v2.3.2/messaging/page.mdx deleted file mode 100644 index 4b3c4ed9..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v2.3.2/messaging/page.mdx +++ /dev/null @@ -1,326 +0,0 @@ -### Execution - -Represents the result of a cell execution. - -#### Constructors - -```ts -new Execution( - results: Result[], - logs: Logs, - error?: ExecutionError, - executionCount?: number): Execution -``` - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `results` | `Result`[] | `[]` | List of result of the cell (interactively interpreted last line), display calls (e.g. matplotlib plots). | -| `logs` | `Logs` | `...` | Logs printed to stdout and stderr during execution. | -| `error`? | `ExecutionError` | `undefined` | An Error object if an error occurred, null otherwise. | -| `executionCount`? | `number` | `undefined` | Execution count of the cell. | - -###### Returns - -`Execution` - -#### Properties - -| Property | Modifier | Type | Default value | Description | -| ------ | ------ | ------ | ------ | ------ | -| `error?` | `public` | `ExecutionError` | `undefined` | An Error object if an error occurred, null otherwise. | -| `executionCount?` | `public` | `number` | `undefined` | Execution count of the cell. | -| `logs` | `public` | `Logs` | `undefined` | Logs printed to stdout and stderr during execution. | -| `results` | `public` | `Result`[] | `[]` | List of result of the cell (interactively interpreted last line), display calls (e.g. matplotlib plots). | - -#### Accessors - -### text - -```ts -get text(): undefined | string -``` - -Returns the text representation of the main result of the cell. - -###### Returns - -`undefined` \| `string` - -#### Methods - -### toJSON() - -```ts -toJSON(): object -``` - -Returns the serializable representation of the execution result. - -###### Returns - -`object` - -| Name | Type | -| ------ | ------ | -| `error` | `undefined` \| `ExecutionError` | -| `logs` | `Logs` | -| `results` | `Result`[] | - -*** - -### ExecutionError - -Represents an error that occurred during the execution of a cell. -The error contains the name of the error, the value of the error, and the traceback. - -#### Constructors - -```ts -new ExecutionError( - name: string, - value: string, - traceback: string): ExecutionError -``` - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `name` | `string` | Name of the error. | -| `value` | `string` | Value of the error. | -| `traceback` | `string` | The raw traceback of the error. | - -###### Returns - -`ExecutionError` - -#### Properties - -| Property | Modifier | Type | Description | -| ------ | ------ | ------ | ------ | -| `name` | `public` | `string` | Name of the error. | -| `traceback` | `public` | `string` | The raw traceback of the error. | -| `value` | `public` | `string` | Value of the error. | - -*** - -### OutputMessage - -Represents an output message from the sandbox code execution. - -#### Constructors - -```ts -new OutputMessage( - line: string, - timestamp: number, - error: boolean): OutputMessage -``` - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `line` | `string` | The output line. | -| `timestamp` | `number` | Unix epoch in nanoseconds. | -| `error` | `boolean` | Whether the output is an error. | - -###### Returns - -`OutputMessage` - -#### Properties - -| Property | Modifier | Type | Description | -| ------ | ------ | ------ | ------ | -| `error` | `readonly` | `boolean` | Whether the output is an error. | -| `line` | `readonly` | `string` | The output line. | -| `timestamp` | `readonly` | `number` | Unix epoch in nanoseconds. | - -#### Methods - -### toString() - -```ts -toString(): string -``` - -###### Returns - -`string` - -*** - -### Result - -Represents the data to be displayed as a result of executing a cell in a Jupyter notebook. -The result is similar to the structure returned by ipython kernel: https://ipython.readthedocs.io/en/stable/development/execution.html#execution-semantics - -The result can contain multiple types of data, such as text, images, plots, etc. Each type of data is represented -as a string, and the result can contain multiple types of data. The display calls don't have to have text representation, -for the actual result the representation is always present for the result, the other representations are always optional. - -#### Constructors - -```ts -new Result(rawData: RawData, isMainResult: boolean): Result -``` - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `rawData` | `RawData` | -| `isMainResult` | `boolean` | - -###### Returns - -`Result` - -#### Properties - -| Property | Modifier | Type | Description | -| ------ | ------ | ------ | ------ | -| `chart?` | `readonly` | `ChartTypes` | Contains the chart data. | -| `data?` | `readonly` | `Record`\<`string`, `unknown`\> | Contains the data from DataFrame. | -| `extra?` | `readonly` | `any` | Extra data that can be included. Not part of the standard types. | -| `html?` | `readonly` | `string` | HTML representation of the data. | -| `isMainResult` | `readonly` | `boolean` | - | -| `javascript?` | `readonly` | `string` | JavaScript representation of the data. | -| `jpeg?` | `readonly` | `string` | JPEG representation of the data. | -| `json?` | `readonly` | `string` | JSON representation of the data. | -| `latex?` | `readonly` | `string` | LaTeX representation of the data. | -| `markdown?` | `readonly` | `string` | Markdown representation of the data. | -| `pdf?` | `readonly` | `string` | PDF representation of the data. | -| `png?` | `readonly` | `string` | PNG representation of the data. | -| `raw` | `readonly` | `RawData` | - | -| `svg?` | `readonly` | `string` | SVG representation of the data. | -| `text?` | `readonly` | `string` | Text representation of the result. | - -#### Methods - -### formats() - -```ts -formats(): string[] -``` - -Returns all the formats available for the result. - -###### Returns - -`string`[] - -Array of strings representing the formats available for the result. - -### toJSON() - -```ts -toJSON(): object -``` - -Returns the serializable representation of the result. - -###### Returns - -`object` - -| Name | Type | -| ------ | ------ | -| `extra`? | `any` | -| `html` | `undefined` \| `string` | -| `javascript` | `undefined` \| `string` | -| `jpeg` | `undefined` \| `string` | -| `json` | `undefined` \| `string` | -| `latex` | `undefined` \| `string` | -| `markdown` | `undefined` \| `string` | -| `pdf` | `undefined` \| `string` | -| `png` | `undefined` \| `string` | -| `svg` | `undefined` \| `string` | -| `text` | `undefined` \| `string` | - -## Type Aliases - -### Logs - -```ts -type Logs: object; -``` - -Data printed to stdout and stderr during execution, usually by print statements, logs, warnings, subprocesses, etc. - -#### Type declaration - -| Name | Type | Description | -| ------ | ------ | ------ | -| `stderr` | `string`[] | List of strings printed to stderr by prints, subprocesses, etc. | -| `stdout` | `string`[] | List of strings printed to stdout by prints, subprocesses, etc. | - -*** - -### MIMEType - -```ts -type MIMEType: string; -``` - -Represents a MIME type. - -*** - -### RawData - -```ts -type RawData: object & E2BData; -``` - -Dictionary that maps MIME types to their corresponding representations of the data. - -## Functions - -### extractError() - -```ts -function extractError(res: Response): Promise -``` - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `res` | `Response` | - -#### Returns - -`Promise`\<`undefined` \| `SandboxError`\> - -*** - -### parseOutput() - -```ts -function parseOutput( - execution: Execution, - line: string, - onStdout?: (output: OutputMessage) => any, - onStderr?: (output: OutputMessage) => any, - onResult?: (data: Result) => any, -onError?: (error: ExecutionError) => any): Promise -``` - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `execution` | `Execution` | -| `line` | `string` | -| `onStdout`? | (`output`: `OutputMessage`) => `any` | -| `onStderr`? | (`output`: `OutputMessage`) => `any` | -| `onResult`? | (`data`: `Result`) => `any` | -| `onError`? | (`error`: `ExecutionError`) => `any` | - -#### Returns - -`Promise`\<`void`\> diff --git a/sdk-reference/code-interpreter-js-sdk/v2.3.2/sandbox/page.mdx b/sdk-reference/code-interpreter-js-sdk/v2.3.2/sandbox/page.mdx deleted file mode 100644 index 93c26893..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v2.3.2/sandbox/page.mdx +++ /dev/null @@ -1,366 +0,0 @@ -### Sandbox - -E2B cloud sandbox is a secure and isolated cloud environment. - -The sandbox allows you to: -- Access Linux OS -- Create, list, and delete files and directories -- Run commands -- Run isolated code -- Access the internet - -Check docs here. - -Use Sandbox.create to create a new sandbox. - -#### Example - -```ts -import { Sandbox } from '@e2b/code-interpreter' - -const sandbox = await Sandbox.create() -``` - -#### Methods - -### createCodeContext() - -```ts -createCodeContext(opts?: CreateCodeContextOpts): Promise -``` - -Creates a new context to run code in. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `opts`? | `CreateCodeContextOpts` | options for creating the context. | - -###### Returns - -`Promise`\<`Context`\> - -context object. - -### listCodeContexts() - -```ts -listCodeContexts(): Promise -``` - -List all contexts. - -###### Returns - -`Promise`\<`Context`[]\> - -list of contexts. - -### removeCodeContext() - -```ts -removeCodeContext(context: string | Context): Promise -``` - -Removes a context. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `context` | `string` \| `Context` | context to remove. | - -###### Returns - -`Promise`\<`void`\> - -void. - -### restartCodeContext() - -```ts -restartCodeContext(context: string | Context): Promise -``` - -Restart a context. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `context` | `string` \| `Context` | context to restart. | - -###### Returns - -`Promise`\<`void`\> - -void. - -### runCode() - -###### runCode(code, opts) - -```ts -runCode(code: string, opts?: RunCodeOpts & object): Promise -``` - -Run the code as Python. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `code` | `string` | code to execute. | -| `opts`? | `RunCodeOpts` & `object` | options for executing the code. | - -###### Returns - -`Promise`\<`Execution`\> - -`Execution` result object. - -###### runCode(code, opts) - -```ts -runCode(code: string, opts?: RunCodeOpts & object): Promise -``` - -Run the code for the specified language. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. -If no language is specified, Python is used. - -You can reference previously defined variables, imports, and functions in the code. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `code` | `string` | code to execute. | -| `opts`? | `RunCodeOpts` & `object` | options for executing the code. | - -###### Returns - -`Promise`\<`Execution`\> - -`Execution` result object. - -###### runCode(code, opts) - -```ts -runCode(code: string, opts?: RunCodeOpts & object): Promise -``` - -Runs the code in the specified context, if not specified, the default context is used. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `code` | `string` | code to execute. | -| `opts`? | `RunCodeOpts` & `object` | options for executing the code | - -###### Returns - -`Promise`\<`Execution`\> - -`Execution` result object - -## Interfaces - -### CreateCodeContextOpts - -Options for creating a code context. - -#### Properties - -### cwd? - -```ts -optional cwd: string; -``` - -Working directory for the context. - -###### Default - -```ts -/home/user -``` - -### language? - -```ts -optional language: string; -``` - -Language for the context. - -###### Default - -```ts -python -``` - -### requestTimeoutMs? - -```ts -optional requestTimeoutMs: number; -``` - -Timeout for the request in **milliseconds**. - -###### Default - -```ts -30_000 // 30 seconds -``` - -*** - -### RunCodeOpts - -Options for running code. - -#### Properties - -### envs? - -```ts -optional envs: Record; -``` - -Custom environment variables for code execution. - -###### Default - -```ts -{} -``` - -### onError()? - -```ts -optional onError: (error: ExecutionError) => any; -``` - -Callback for handling the `ExecutionError` object. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `error` | `ExecutionError` | - -###### Returns - -`any` - -### onResult()? - -```ts -optional onResult: (data: Result) => any; -``` - -Callback for handling the final execution result. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `data` | `Result` | - -###### Returns - -`any` - -### onStderr()? - -```ts -optional onStderr: (output: OutputMessage) => any; -``` - -Callback for handling stderr messages. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `output` | `OutputMessage` | - -###### Returns - -`any` - -### onStdout()? - -```ts -optional onStdout: (output: OutputMessage) => any; -``` - -Callback for handling stdout messages. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `output` | `OutputMessage` | - -###### Returns - -`any` - -### requestTimeoutMs? - -```ts -optional requestTimeoutMs: number; -``` - -Timeout for the request in **milliseconds**. - -###### Default - -```ts -30_000 // 30 seconds -``` - -### timeoutMs? - -```ts -optional timeoutMs: number; -``` - -Timeout for the code execution in **milliseconds**. - -###### Default - -```ts -60_000 // 60 seconds -``` - -## Type Aliases - -### Context - -```ts -type Context: object; -``` - -Represents a context for code execution. - -#### Type declaration - -| Name | Type | Description | -| ------ | ------ | ------ | -| `cwd` | `string` | The working directory of the context. | -| `id` | `string` | The ID of the context. | -| `language` | `string` | The language of the context. | diff --git a/sdk-reference/code-interpreter-js-sdk/v2.3.3/charts/page.mdx b/sdk-reference/code-interpreter-js-sdk/v2.3.3/charts/page.mdx deleted file mode 100644 index f3176d3b..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v2.3.3/charts/page.mdx +++ /dev/null @@ -1,240 +0,0 @@ -### ChartType - -Chart types - -#### Enumeration Members - -| Enumeration Member | Value | -| ------ | ------ | -| `BAR` | `"bar"` | -| `BOX_AND_WHISKER` | `"box_and_whisker"` | -| `LINE` | `"line"` | -| `PIE` | `"pie"` | -| `SCATTER` | `"scatter"` | -| `SUPERCHART` | `"superchart"` | -| `UNKNOWN` | `"unknown"` | - -*** - -### ScaleType - -Ax scale types - -#### Enumeration Members - -| Enumeration Member | Value | -| ------ | ------ | -| `ASINH` | `"asinh"` | -| `CATEGORICAL` | `"categorical"` | -| `DATETIME` | `"datetime"` | -| `FUNCTION` | `"function"` | -| `FUNCTIONLOG` | `"functionlog"` | -| `LINEAR` | `"linear"` | -| `LOG` | `"log"` | -| `LOGIT` | `"logit"` | -| `SYMLOG` | `"symlog"` | - -## Type Aliases - -### BarChart - -```ts -type BarChart: Chart2D & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `BarData`[] | -| `type` | `ChartType.BAR` | - -*** - -### BarData - -```ts -type BarData: object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `group` | `string` | -| `label` | `string` | -| `value` | `string` | - -*** - -### BoxAndWhiskerChart - -```ts -type BoxAndWhiskerChart: Chart2D & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `BoxAndWhiskerData`[] | -| `type` | `ChartType.BOX_AND_WHISKER` | - -*** - -### BoxAndWhiskerData - -```ts -type BoxAndWhiskerData: object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `first_quartile` | `number` | -| `label` | `string` | -| `max` | `number` | -| `median` | `number` | -| `min` | `number` | -| `outliers` | `number`[] | -| `third_quartile` | `number` | - -*** - -### Chart - -```ts -type Chart: object; -``` - -Represents a chart. - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `any`[] | -| `title` | `string` | -| `type` | `ChartType` | - -*** - -### ChartTypes - -```ts -type ChartTypes: - | LineChart - | ScatterChart - | BarChart - | PieChart - | BoxAndWhiskerChart - | SuperChart; -``` - -*** - -### LineChart - -```ts -type LineChart: PointChart & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `type` | `ChartType.LINE` | - -*** - -### PieChart - -```ts -type PieChart: Chart & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `PieData`[] | -| `type` | `ChartType.PIE` | - -*** - -### PieData - -```ts -type PieData: object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `angle` | `number` | -| `label` | `string` | -| `radius` | `number` | - -*** - -### PointData - -```ts -type PointData: object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `label` | `string` | -| `points` | [`number` \| `string`, `number` \| `string`][] | - -*** - -### ScatterChart - -```ts -type ScatterChart: PointChart & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `type` | `ChartType.SCATTER` | - -*** - -### SuperChart - -```ts -type SuperChart: Chart & object; -``` - -#### Type declaration - -| Name | Type | -| ------ | ------ | -| `elements` | `Chart`[] | -| `type` | `ChartType.SUPERCHART` | - -## Functions - -### deserializeChart() - -```ts -function deserializeChart(data: any): Chart -``` - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `data` | `any` | - -#### Returns - -`Chart` diff --git a/sdk-reference/code-interpreter-js-sdk/v2.3.3/consts/page.mdx b/sdk-reference/code-interpreter-js-sdk/v2.3.3/consts/page.mdx deleted file mode 100644 index d1ee2e76..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v2.3.3/consts/page.mdx +++ /dev/null @@ -1,13 +0,0 @@ -### DEFAULT\_TIMEOUT\_MS - -```ts -const DEFAULT_TIMEOUT_MS: 60000 = 60_000; -``` - -*** - -### JUPYTER\_PORT - -```ts -const JUPYTER_PORT: 49999 = 49999; -``` diff --git a/sdk-reference/code-interpreter-js-sdk/v2.3.3/index/page.mdx b/sdk-reference/code-interpreter-js-sdk/v2.3.3/index/page.mdx deleted file mode 100644 index dc55fcc7..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v2.3.3/index/page.mdx +++ /dev/null @@ -1,103 +0,0 @@ -### BarChart - -Re-exports BarChart - -### BarData - -Re-exports BarData - -### BoxAndWhiskerChart - -Re-exports BoxAndWhiskerChart - -### BoxAndWhiskerData - -Re-exports BoxAndWhiskerData - -### Chart - -Re-exports Chart - -### ChartType - -Re-exports ChartType - -### ChartTypes - -Re-exports ChartTypes - -### Context - -Re-exports Context - -### CreateCodeContextOpts - -Re-exports CreateCodeContextOpts - -### default - -Renames and re-exports Sandbox - -### Execution - -Re-exports Execution - -### ExecutionError - -Re-exports ExecutionError - -### LineChart - -Re-exports LineChart - -### Logs - -Re-exports Logs - -### MIMEType - -Re-exports MIMEType - -### OutputMessage - -Re-exports OutputMessage - -### PieChart - -Re-exports PieChart - -### PieData - -Re-exports PieData - -### PointData - -Re-exports PointData - -### RawData - -Re-exports RawData - -### Result - -Re-exports Result - -### RunCodeOpts - -Re-exports RunCodeOpts - -### Sandbox - -Re-exports Sandbox - -### ScaleType - -Re-exports ScaleType - -### ScatterChart - -Re-exports ScatterChart - -### SuperChart - -Re-exports SuperChart diff --git a/sdk-reference/code-interpreter-js-sdk/v2.3.3/messaging/page.mdx b/sdk-reference/code-interpreter-js-sdk/v2.3.3/messaging/page.mdx deleted file mode 100644 index 4b3c4ed9..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v2.3.3/messaging/page.mdx +++ /dev/null @@ -1,326 +0,0 @@ -### Execution - -Represents the result of a cell execution. - -#### Constructors - -```ts -new Execution( - results: Result[], - logs: Logs, - error?: ExecutionError, - executionCount?: number): Execution -``` - -###### Parameters - -| Parameter | Type | Default value | Description | -| ------ | ------ | ------ | ------ | -| `results` | `Result`[] | `[]` | List of result of the cell (interactively interpreted last line), display calls (e.g. matplotlib plots). | -| `logs` | `Logs` | `...` | Logs printed to stdout and stderr during execution. | -| `error`? | `ExecutionError` | `undefined` | An Error object if an error occurred, null otherwise. | -| `executionCount`? | `number` | `undefined` | Execution count of the cell. | - -###### Returns - -`Execution` - -#### Properties - -| Property | Modifier | Type | Default value | Description | -| ------ | ------ | ------ | ------ | ------ | -| `error?` | `public` | `ExecutionError` | `undefined` | An Error object if an error occurred, null otherwise. | -| `executionCount?` | `public` | `number` | `undefined` | Execution count of the cell. | -| `logs` | `public` | `Logs` | `undefined` | Logs printed to stdout and stderr during execution. | -| `results` | `public` | `Result`[] | `[]` | List of result of the cell (interactively interpreted last line), display calls (e.g. matplotlib plots). | - -#### Accessors - -### text - -```ts -get text(): undefined | string -``` - -Returns the text representation of the main result of the cell. - -###### Returns - -`undefined` \| `string` - -#### Methods - -### toJSON() - -```ts -toJSON(): object -``` - -Returns the serializable representation of the execution result. - -###### Returns - -`object` - -| Name | Type | -| ------ | ------ | -| `error` | `undefined` \| `ExecutionError` | -| `logs` | `Logs` | -| `results` | `Result`[] | - -*** - -### ExecutionError - -Represents an error that occurred during the execution of a cell. -The error contains the name of the error, the value of the error, and the traceback. - -#### Constructors - -```ts -new ExecutionError( - name: string, - value: string, - traceback: string): ExecutionError -``` - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `name` | `string` | Name of the error. | -| `value` | `string` | Value of the error. | -| `traceback` | `string` | The raw traceback of the error. | - -###### Returns - -`ExecutionError` - -#### Properties - -| Property | Modifier | Type | Description | -| ------ | ------ | ------ | ------ | -| `name` | `public` | `string` | Name of the error. | -| `traceback` | `public` | `string` | The raw traceback of the error. | -| `value` | `public` | `string` | Value of the error. | - -*** - -### OutputMessage - -Represents an output message from the sandbox code execution. - -#### Constructors - -```ts -new OutputMessage( - line: string, - timestamp: number, - error: boolean): OutputMessage -``` - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `line` | `string` | The output line. | -| `timestamp` | `number` | Unix epoch in nanoseconds. | -| `error` | `boolean` | Whether the output is an error. | - -###### Returns - -`OutputMessage` - -#### Properties - -| Property | Modifier | Type | Description | -| ------ | ------ | ------ | ------ | -| `error` | `readonly` | `boolean` | Whether the output is an error. | -| `line` | `readonly` | `string` | The output line. | -| `timestamp` | `readonly` | `number` | Unix epoch in nanoseconds. | - -#### Methods - -### toString() - -```ts -toString(): string -``` - -###### Returns - -`string` - -*** - -### Result - -Represents the data to be displayed as a result of executing a cell in a Jupyter notebook. -The result is similar to the structure returned by ipython kernel: https://ipython.readthedocs.io/en/stable/development/execution.html#execution-semantics - -The result can contain multiple types of data, such as text, images, plots, etc. Each type of data is represented -as a string, and the result can contain multiple types of data. The display calls don't have to have text representation, -for the actual result the representation is always present for the result, the other representations are always optional. - -#### Constructors - -```ts -new Result(rawData: RawData, isMainResult: boolean): Result -``` - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `rawData` | `RawData` | -| `isMainResult` | `boolean` | - -###### Returns - -`Result` - -#### Properties - -| Property | Modifier | Type | Description | -| ------ | ------ | ------ | ------ | -| `chart?` | `readonly` | `ChartTypes` | Contains the chart data. | -| `data?` | `readonly` | `Record`\<`string`, `unknown`\> | Contains the data from DataFrame. | -| `extra?` | `readonly` | `any` | Extra data that can be included. Not part of the standard types. | -| `html?` | `readonly` | `string` | HTML representation of the data. | -| `isMainResult` | `readonly` | `boolean` | - | -| `javascript?` | `readonly` | `string` | JavaScript representation of the data. | -| `jpeg?` | `readonly` | `string` | JPEG representation of the data. | -| `json?` | `readonly` | `string` | JSON representation of the data. | -| `latex?` | `readonly` | `string` | LaTeX representation of the data. | -| `markdown?` | `readonly` | `string` | Markdown representation of the data. | -| `pdf?` | `readonly` | `string` | PDF representation of the data. | -| `png?` | `readonly` | `string` | PNG representation of the data. | -| `raw` | `readonly` | `RawData` | - | -| `svg?` | `readonly` | `string` | SVG representation of the data. | -| `text?` | `readonly` | `string` | Text representation of the result. | - -#### Methods - -### formats() - -```ts -formats(): string[] -``` - -Returns all the formats available for the result. - -###### Returns - -`string`[] - -Array of strings representing the formats available for the result. - -### toJSON() - -```ts -toJSON(): object -``` - -Returns the serializable representation of the result. - -###### Returns - -`object` - -| Name | Type | -| ------ | ------ | -| `extra`? | `any` | -| `html` | `undefined` \| `string` | -| `javascript` | `undefined` \| `string` | -| `jpeg` | `undefined` \| `string` | -| `json` | `undefined` \| `string` | -| `latex` | `undefined` \| `string` | -| `markdown` | `undefined` \| `string` | -| `pdf` | `undefined` \| `string` | -| `png` | `undefined` \| `string` | -| `svg` | `undefined` \| `string` | -| `text` | `undefined` \| `string` | - -## Type Aliases - -### Logs - -```ts -type Logs: object; -``` - -Data printed to stdout and stderr during execution, usually by print statements, logs, warnings, subprocesses, etc. - -#### Type declaration - -| Name | Type | Description | -| ------ | ------ | ------ | -| `stderr` | `string`[] | List of strings printed to stderr by prints, subprocesses, etc. | -| `stdout` | `string`[] | List of strings printed to stdout by prints, subprocesses, etc. | - -*** - -### MIMEType - -```ts -type MIMEType: string; -``` - -Represents a MIME type. - -*** - -### RawData - -```ts -type RawData: object & E2BData; -``` - -Dictionary that maps MIME types to their corresponding representations of the data. - -## Functions - -### extractError() - -```ts -function extractError(res: Response): Promise -``` - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `res` | `Response` | - -#### Returns - -`Promise`\<`undefined` \| `SandboxError`\> - -*** - -### parseOutput() - -```ts -function parseOutput( - execution: Execution, - line: string, - onStdout?: (output: OutputMessage) => any, - onStderr?: (output: OutputMessage) => any, - onResult?: (data: Result) => any, -onError?: (error: ExecutionError) => any): Promise -``` - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `execution` | `Execution` | -| `line` | `string` | -| `onStdout`? | (`output`: `OutputMessage`) => `any` | -| `onStderr`? | (`output`: `OutputMessage`) => `any` | -| `onResult`? | (`data`: `Result`) => `any` | -| `onError`? | (`error`: `ExecutionError`) => `any` | - -#### Returns - -`Promise`\<`void`\> diff --git a/sdk-reference/code-interpreter-js-sdk/v2.3.3/sandbox/page.mdx b/sdk-reference/code-interpreter-js-sdk/v2.3.3/sandbox/page.mdx deleted file mode 100644 index 93c26893..00000000 --- a/sdk-reference/code-interpreter-js-sdk/v2.3.3/sandbox/page.mdx +++ /dev/null @@ -1,366 +0,0 @@ -### Sandbox - -E2B cloud sandbox is a secure and isolated cloud environment. - -The sandbox allows you to: -- Access Linux OS -- Create, list, and delete files and directories -- Run commands -- Run isolated code -- Access the internet - -Check docs here. - -Use Sandbox.create to create a new sandbox. - -#### Example - -```ts -import { Sandbox } from '@e2b/code-interpreter' - -const sandbox = await Sandbox.create() -``` - -#### Methods - -### createCodeContext() - -```ts -createCodeContext(opts?: CreateCodeContextOpts): Promise -``` - -Creates a new context to run code in. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `opts`? | `CreateCodeContextOpts` | options for creating the context. | - -###### Returns - -`Promise`\<`Context`\> - -context object. - -### listCodeContexts() - -```ts -listCodeContexts(): Promise -``` - -List all contexts. - -###### Returns - -`Promise`\<`Context`[]\> - -list of contexts. - -### removeCodeContext() - -```ts -removeCodeContext(context: string | Context): Promise -``` - -Removes a context. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `context` | `string` \| `Context` | context to remove. | - -###### Returns - -`Promise`\<`void`\> - -void. - -### restartCodeContext() - -```ts -restartCodeContext(context: string | Context): Promise -``` - -Restart a context. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `context` | `string` \| `Context` | context to restart. | - -###### Returns - -`Promise`\<`void`\> - -void. - -### runCode() - -###### runCode(code, opts) - -```ts -runCode(code: string, opts?: RunCodeOpts & object): Promise -``` - -Run the code as Python. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `code` | `string` | code to execute. | -| `opts`? | `RunCodeOpts` & `object` | options for executing the code. | - -###### Returns - -`Promise`\<`Execution`\> - -`Execution` result object. - -###### runCode(code, opts) - -```ts -runCode(code: string, opts?: RunCodeOpts & object): Promise -``` - -Run the code for the specified language. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. -If no language is specified, Python is used. - -You can reference previously defined variables, imports, and functions in the code. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `code` | `string` | code to execute. | -| `opts`? | `RunCodeOpts` & `object` | options for executing the code. | - -###### Returns - -`Promise`\<`Execution`\> - -`Execution` result object. - -###### runCode(code, opts) - -```ts -runCode(code: string, opts?: RunCodeOpts & object): Promise -``` - -Runs the code in the specified context, if not specified, the default context is used. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `code` | `string` | code to execute. | -| `opts`? | `RunCodeOpts` & `object` | options for executing the code | - -###### Returns - -`Promise`\<`Execution`\> - -`Execution` result object - -## Interfaces - -### CreateCodeContextOpts - -Options for creating a code context. - -#### Properties - -### cwd? - -```ts -optional cwd: string; -``` - -Working directory for the context. - -###### Default - -```ts -/home/user -``` - -### language? - -```ts -optional language: string; -``` - -Language for the context. - -###### Default - -```ts -python -``` - -### requestTimeoutMs? - -```ts -optional requestTimeoutMs: number; -``` - -Timeout for the request in **milliseconds**. - -###### Default - -```ts -30_000 // 30 seconds -``` - -*** - -### RunCodeOpts - -Options for running code. - -#### Properties - -### envs? - -```ts -optional envs: Record; -``` - -Custom environment variables for code execution. - -###### Default - -```ts -{} -``` - -### onError()? - -```ts -optional onError: (error: ExecutionError) => any; -``` - -Callback for handling the `ExecutionError` object. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `error` | `ExecutionError` | - -###### Returns - -`any` - -### onResult()? - -```ts -optional onResult: (data: Result) => any; -``` - -Callback for handling the final execution result. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `data` | `Result` | - -###### Returns - -`any` - -### onStderr()? - -```ts -optional onStderr: (output: OutputMessage) => any; -``` - -Callback for handling stderr messages. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `output` | `OutputMessage` | - -###### Returns - -`any` - -### onStdout()? - -```ts -optional onStdout: (output: OutputMessage) => any; -``` - -Callback for handling stdout messages. - -###### Parameters - -| Parameter | Type | -| ------ | ------ | -| `output` | `OutputMessage` | - -###### Returns - -`any` - -### requestTimeoutMs? - -```ts -optional requestTimeoutMs: number; -``` - -Timeout for the request in **milliseconds**. - -###### Default - -```ts -30_000 // 30 seconds -``` - -### timeoutMs? - -```ts -optional timeoutMs: number; -``` - -Timeout for the code execution in **milliseconds**. - -###### Default - -```ts -60_000 // 60 seconds -``` - -## Type Aliases - -### Context - -```ts -type Context: object; -``` - -Represents a context for code execution. - -#### Type declaration - -| Name | Type | Description | -| ------ | ------ | ------ | -| `cwd` | `string` | The working directory of the context. | -| `id` | `string` | The ID of the context. | -| `language` | `string` | The language of the context. | diff --git a/sdk-reference/code-interpreter-python-sdk/v1.0.1/sandbox/page.mdx b/sdk-reference/code-interpreter-python-sdk/v1.0.1/sandbox/page.mdx deleted file mode 100644 index 325b8e18..00000000 --- a/sdk-reference/code-interpreter-python-sdk/v1.0.1/sandbox/page.mdx +++ /dev/null @@ -1,722 +0,0 @@ - - - - - -## AsyncSandbox - -```python -class AsyncSandbox(BaseAsyncSandbox) -``` - -E2B cloud sandbox is a secure and isolated cloud environment. - -The sandbox allows you to: -- Access Linux OS -- Create, list, and delete files and directories -- Run commands -- Run isolated code -- Access the internet - -Check docs [here](https://e2b.dev/docs). - -Use the `AsyncSandbox.create()` to create a new sandbox. - -**Example**: - -```python -from e2b_code_interpreter import AsyncSandbox -sandbox = await AsyncSandbox.create() -``` - - -### run\_code - -```python -@overload -async def run_code(code: str, - language: Union[Literal["python"], None] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code as Python. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -async def run_code(code: str, - language: Optional[str] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code for the specified language. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. -If no language is specified, Python is used. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -async def run_code(code: str, - context: Optional[Context] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code in the specified context, if not specified, the default context is used. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `context`: Concrete context to run the code in. If not specified, the default context for the language is used. It's mutually exclusive with the language. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### create\_code\_context - -```python -async def create_code_context( - cwd: Optional[str] = None, - language: Optional[str] = None, - request_timeout: Optional[float] = None) -> Context -``` - -Creates a new context to run code in. - -**Arguments**: - -- `cwd`: Set the current working directory for the context, defaults to `/home/user` -- `language`: Language of the context. If not specified, defaults to Python -- `request_timeout`: Timeout for the request in **milliseconds** - -**Returns**: - -Context object - - - - -## OutputMessage - -```python -@dataclass -class OutputMessage() -``` - -Represents an output message from the sandbox code execution. - - -### line - -The output line. - - -### timestamp - -Unix epoch in nanoseconds - - -### error - -Whether the output is an error. - - -## ExecutionError - -```python -@dataclass -class ExecutionError() -``` - -Represents an error that occurred during the execution of a cell. -The error contains the name of the error, the value of the error, and the traceback. - - -### name - -Name of the error. - - -### value - -Value of the error. - - -### traceback - -The raw traceback of the error. - - -### to\_json - -```python -def to_json() -> str -``` - -Returns the JSON representation of the Error object. - - -## MIMEType - -```python -class MIMEType(str) -``` - -Represents a MIME type. - - -## Result - -```python -@dataclass -class Result() -``` - -Represents the data to be displayed as a result of executing a cell in a Jupyter notebook. -The result is similar to the structure returned by ipython kernel: https://ipython.readthedocs.io/en/stable/development/execution.html#execution-semantics - -The result can contain multiple types of data, such as text, images, plots, etc. Each type of data is represented -as a string, and the result can contain multiple types of data. The display calls don't have to have text representation, -for the actual result the representation is always present for the result, the other representations are always optional. - - -### is\_main\_result - -Whether this data is the result of the cell. Data can be produced by display calls of which can be multiple in a cell. - - -### extra - -Extra data that can be included. Not part of the standard types. - - -### formats - -```python -def formats() -> Iterable[str] -``` - -Returns all available formats of the result. - -**Returns**: - -All available formats of the result in MIME types. - - -### \_\_str\_\_ - -```python -def __str__() -> Optional[str] -``` - -Returns the text representation of the data. - -**Returns**: - -The text representation of the data. - - -### \_repr\_html\_ - -```python -def _repr_html_() -> Optional[str] -``` - -Returns the HTML representation of the data. - -**Returns**: - -The HTML representation of the data. - - -### \_repr\_markdown\_ - -```python -def _repr_markdown_() -> Optional[str] -``` - -Returns the Markdown representation of the data. - -**Returns**: - -The Markdown representation of the data. - - -### \_repr\_svg\_ - -```python -def _repr_svg_() -> Optional[str] -``` - -Returns the SVG representation of the data. - -**Returns**: - -The SVG representation of the data. - - -### \_repr\_png\_ - -```python -def _repr_png_() -> Optional[str] -``` - -Returns the base64 representation of the PNG data. - -**Returns**: - -The base64 representation of the PNG data. - - -### \_repr\_jpeg\_ - -```python -def _repr_jpeg_() -> Optional[str] -``` - -Returns the base64 representation of the JPEG data. - -**Returns**: - -The base64 representation of the JPEG data. - - -### \_repr\_pdf\_ - -```python -def _repr_pdf_() -> Optional[str] -``` - -Returns the PDF representation of the data. - -**Returns**: - -The PDF representation of the data. - - -### \_repr\_latex\_ - -```python -def _repr_latex_() -> Optional[str] -``` - -Returns the LaTeX representation of the data. - -**Returns**: - -The LaTeX representation of the data. - - -### \_repr\_json\_ - -```python -def _repr_json_() -> Optional[dict] -``` - -Returns the JSON representation of the data. - -**Returns**: - -The JSON representation of the data. - - -### \_repr\_javascript\_ - -```python -def _repr_javascript_() -> Optional[str] -``` - -Returns the JavaScript representation of the data. - -**Returns**: - -The JavaScript representation of the data. - - -## Logs - -```python -@dataclass(repr=False) -class Logs() -``` - -Data printed to stdout and stderr during execution, usually by print statements, logs, warnings, subprocesses, etc. - - -### stdout - -List of strings printed to stdout by prints, subprocesses, etc. - - -### stderr - -List of strings printed to stderr by prints, subprocesses, etc. - - -### to\_json - -```python -def to_json() -> str -``` - -Returns the JSON representation of the Logs object. - - -### serialize\_results - -```python -def serialize_results(results: List[Result]) -> List[Dict[str, str]] -``` - -Serializes the results to JSON. - - -## Execution - -```python -@dataclass(repr=False) -class Execution() -``` - -Represents the result of a cell execution. - - -### results - -List of the result of the cell (interactively interpreted last line), display calls (e.g. matplotlib plots). - - -### logs - -Logs printed to stdout and stderr during execution. - - -### error - -Error object if an error occurred, None otherwise. - - -### execution\_count - -Execution count of the cell. - - -### text - -```python -@property -def text() -> Optional[str] -``` - -Returns the text representation of the result. - -**Returns**: - -The text representation of the result. - - -### to\_json - -```python -def to_json() -> str -``` - -Returns the JSON representation of the Execution object. - - -## Context - -```python -@dataclass -class Context() -``` - -Represents a context for code execution. - - -### id - -The ID of the context. - - -### language - -The language of the context. - - -### cwd - -The working directory of the context. - - - - -## ChartType - -```python -class ChartType(str, enum.Enum) -``` - -Chart types - - -## ScaleType - -```python -class ScaleType(str, enum.Enum) -``` - -Ax scale types - - -## Chart - -```python -class Chart() -``` - -Extracted data from a chart. It's useful for building an interactive charts or custom visualizations. - - - - -## Sandbox - -```python -class Sandbox(BaseSandbox) -``` - -E2B cloud sandbox is a secure and isolated cloud environment. - -The sandbox allows you to: -- Access Linux OS -- Create, list, and delete files and directories -- Run commands -- Run isolated code -- Access the internet - -Check docs [here](https://e2b.dev/docs). - -Use the `Sandbox()` to create a new sandbox. - -**Example**: - -```python -from e2b_code_interpreter import Sandbox - -sandbox = Sandbox() -``` - - -### run\_code - -```python -@overload -def run_code(code: str, - language: Union[Literal["python"], None] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code as Python. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -def run_code(code: str, - language: Optional[str] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code for the specified language. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. -If no language is specified, Python is used. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -def run_code(code: str, - context: Optional[Context] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code in the specified context, if not specified, the default context is used. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `context`: Concrete context to run the code in. If not specified, the default context for the language is used. It's mutually exclusive with the language. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### create\_code\_context - -```python -def create_code_context(cwd: Optional[str] = None, - language: Optional[str] = None, - request_timeout: Optional[float] = None) -> Context -``` - -Creates a new context to run code in. - -**Arguments**: - -- `cwd`: Set the current working directory for the context, defaults to `/home/user` -- `language`: Language of the context. If not specified, defaults to Python -- `request_timeout`: Timeout for the request in **milliseconds** - -**Returns**: - -Context object - - - - - diff --git a/sdk-reference/code-interpreter-python-sdk/v1.0.2/sandbox/page.mdx b/sdk-reference/code-interpreter-python-sdk/v1.0.2/sandbox/page.mdx deleted file mode 100644 index 724afcfc..00000000 --- a/sdk-reference/code-interpreter-python-sdk/v1.0.2/sandbox/page.mdx +++ /dev/null @@ -1,722 +0,0 @@ - - - - - -## ChartType - -```python -class ChartType(str, enum.Enum) -``` - -Chart types - - -## ScaleType - -```python -class ScaleType(str, enum.Enum) -``` - -Ax scale types - - -## Chart - -```python -class Chart() -``` - -Extracted data from a chart. It's useful for building an interactive charts or custom visualizations. - - - - -## AsyncSandbox - -```python -class AsyncSandbox(BaseAsyncSandbox) -``` - -E2B cloud sandbox is a secure and isolated cloud environment. - -The sandbox allows you to: -- Access Linux OS -- Create, list, and delete files and directories -- Run commands -- Run isolated code -- Access the internet - -Check docs [here](https://e2b.dev/docs). - -Use the `AsyncSandbox.create()` to create a new sandbox. - -**Example**: - -```python -from e2b_code_interpreter import AsyncSandbox -sandbox = await AsyncSandbox.create() -``` - - -### run\_code - -```python -@overload -async def run_code(code: str, - language: Union[Literal["python"], None] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code as Python. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -async def run_code(code: str, - language: Optional[str] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code for the specified language. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. -If no language is specified, Python is used. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -async def run_code(code: str, - context: Optional[Context] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code in the specified context, if not specified, the default context is used. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `context`: Concrete context to run the code in. If not specified, the default context for the language is used. It's mutually exclusive with the language. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### create\_code\_context - -```python -async def create_code_context( - cwd: Optional[str] = None, - language: Optional[str] = None, - request_timeout: Optional[float] = None) -> Context -``` - -Creates a new context to run code in. - -**Arguments**: - -- `cwd`: Set the current working directory for the context, defaults to `/home/user` -- `language`: Language of the context. If not specified, defaults to Python -- `request_timeout`: Timeout for the request in **milliseconds** - -**Returns**: - -Context object - - - - - - - - -## Sandbox - -```python -class Sandbox(BaseSandbox) -``` - -E2B cloud sandbox is a secure and isolated cloud environment. - -The sandbox allows you to: -- Access Linux OS -- Create, list, and delete files and directories -- Run commands -- Run isolated code -- Access the internet - -Check docs [here](https://e2b.dev/docs). - -Use the `Sandbox()` to create a new sandbox. - -**Example**: - -```python -from e2b_code_interpreter import Sandbox - -sandbox = Sandbox() -``` - - -### run\_code - -```python -@overload -def run_code(code: str, - language: Union[Literal["python"], None] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code as Python. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -def run_code(code: str, - language: Optional[str] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code for the specified language. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. -If no language is specified, Python is used. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -def run_code(code: str, - context: Optional[Context] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code in the specified context, if not specified, the default context is used. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `context`: Concrete context to run the code in. If not specified, the default context for the language is used. It's mutually exclusive with the language. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### create\_code\_context - -```python -def create_code_context(cwd: Optional[str] = None, - language: Optional[str] = None, - request_timeout: Optional[float] = None) -> Context -``` - -Creates a new context to run code in. - -**Arguments**: - -- `cwd`: Set the current working directory for the context, defaults to `/home/user` -- `language`: Language of the context. If not specified, defaults to Python -- `request_timeout`: Timeout for the request in **milliseconds** - -**Returns**: - -Context object - - - - -## OutputMessage - -```python -@dataclass -class OutputMessage() -``` - -Represents an output message from the sandbox code execution. - - -### line - -The output line. - - -### timestamp - -Unix epoch in nanoseconds - - -### error - -Whether the output is an error. - - -## ExecutionError - -```python -@dataclass -class ExecutionError() -``` - -Represents an error that occurred during the execution of a cell. -The error contains the name of the error, the value of the error, and the traceback. - - -### name - -Name of the error. - - -### value - -Value of the error. - - -### traceback - -The raw traceback of the error. - - -### to\_json - -```python -def to_json() -> str -``` - -Returns the JSON representation of the Error object. - - -## MIMEType - -```python -class MIMEType(str) -``` - -Represents a MIME type. - - -## Result - -```python -@dataclass -class Result() -``` - -Represents the data to be displayed as a result of executing a cell in a Jupyter notebook. -The result is similar to the structure returned by ipython kernel: https://ipython.readthedocs.io/en/stable/development/execution.html#execution-semantics - -The result can contain multiple types of data, such as text, images, plots, etc. Each type of data is represented -as a string, and the result can contain multiple types of data. The display calls don't have to have text representation, -for the actual result the representation is always present for the result, the other representations are always optional. - - -### is\_main\_result - -Whether this data is the result of the cell. Data can be produced by display calls of which can be multiple in a cell. - - -### extra - -Extra data that can be included. Not part of the standard types. - - -### formats - -```python -def formats() -> Iterable[str] -``` - -Returns all available formats of the result. - -**Returns**: - -All available formats of the result in MIME types. - - -### \_\_str\_\_ - -```python -def __str__() -> Optional[str] -``` - -Returns the text representation of the data. - -**Returns**: - -The text representation of the data. - - -### \_repr\_html\_ - -```python -def _repr_html_() -> Optional[str] -``` - -Returns the HTML representation of the data. - -**Returns**: - -The HTML representation of the data. - - -### \_repr\_markdown\_ - -```python -def _repr_markdown_() -> Optional[str] -``` - -Returns the Markdown representation of the data. - -**Returns**: - -The Markdown representation of the data. - - -### \_repr\_svg\_ - -```python -def _repr_svg_() -> Optional[str] -``` - -Returns the SVG representation of the data. - -**Returns**: - -The SVG representation of the data. - - -### \_repr\_png\_ - -```python -def _repr_png_() -> Optional[str] -``` - -Returns the base64 representation of the PNG data. - -**Returns**: - -The base64 representation of the PNG data. - - -### \_repr\_jpeg\_ - -```python -def _repr_jpeg_() -> Optional[str] -``` - -Returns the base64 representation of the JPEG data. - -**Returns**: - -The base64 representation of the JPEG data. - - -### \_repr\_pdf\_ - -```python -def _repr_pdf_() -> Optional[str] -``` - -Returns the PDF representation of the data. - -**Returns**: - -The PDF representation of the data. - - -### \_repr\_latex\_ - -```python -def _repr_latex_() -> Optional[str] -``` - -Returns the LaTeX representation of the data. - -**Returns**: - -The LaTeX representation of the data. - - -### \_repr\_json\_ - -```python -def _repr_json_() -> Optional[dict] -``` - -Returns the JSON representation of the data. - -**Returns**: - -The JSON representation of the data. - - -### \_repr\_javascript\_ - -```python -def _repr_javascript_() -> Optional[str] -``` - -Returns the JavaScript representation of the data. - -**Returns**: - -The JavaScript representation of the data. - - -## Logs - -```python -@dataclass(repr=False) -class Logs() -``` - -Data printed to stdout and stderr during execution, usually by print statements, logs, warnings, subprocesses, etc. - - -### stdout - -List of strings printed to stdout by prints, subprocesses, etc. - - -### stderr - -List of strings printed to stderr by prints, subprocesses, etc. - - -### to\_json - -```python -def to_json() -> str -``` - -Returns the JSON representation of the Logs object. - - -### serialize\_results - -```python -def serialize_results(results: List[Result]) -> List[Dict[str, str]] -``` - -Serializes the results to JSON. - - -## Execution - -```python -@dataclass(repr=False) -class Execution() -``` - -Represents the result of a cell execution. - - -### results - -List of the result of the cell (interactively interpreted last line), display calls (e.g. matplotlib plots). - - -### logs - -Logs printed to stdout and stderr during execution. - - -### error - -Error object if an error occurred, None otherwise. - - -### execution\_count - -Execution count of the cell. - - -### text - -```python -@property -def text() -> Optional[str] -``` - -Returns the text representation of the result. - -**Returns**: - -The text representation of the result. - - -### to\_json - -```python -def to_json() -> str -``` - -Returns the JSON representation of the Execution object. - - -## Context - -```python -@dataclass -class Context() -``` - -Represents a context for code execution. - - -### id - -The ID of the context. - - -### language - -The language of the context. - - -### cwd - -The working directory of the context. - diff --git a/sdk-reference/code-interpreter-python-sdk/v1.0.3/sandbox/page.mdx b/sdk-reference/code-interpreter-python-sdk/v1.0.3/sandbox/page.mdx deleted file mode 100644 index b7323614..00000000 --- a/sdk-reference/code-interpreter-python-sdk/v1.0.3/sandbox/page.mdx +++ /dev/null @@ -1,722 +0,0 @@ - - - - - - - -## AsyncSandbox - -```python -class AsyncSandbox(BaseAsyncSandbox) -``` - -E2B cloud sandbox is a secure and isolated cloud environment. - -The sandbox allows you to: -- Access Linux OS -- Create, list, and delete files and directories -- Run commands -- Run isolated code -- Access the internet - -Check docs [here](https://e2b.dev/docs). - -Use the `AsyncSandbox.create()` to create a new sandbox. - -**Example**: - -```python -from e2b_code_interpreter import AsyncSandbox -sandbox = await AsyncSandbox.create() -``` - - -### run\_code - -```python -@overload -async def run_code(code: str, - language: Union[Literal["python"], None] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code as Python. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -async def run_code(code: str, - language: Optional[str] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code for the specified language. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. -If no language is specified, Python is used. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -async def run_code(code: str, - context: Optional[Context] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code in the specified context, if not specified, the default context is used. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `context`: Concrete context to run the code in. If not specified, the default context for the language is used. It's mutually exclusive with the language. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### create\_code\_context - -```python -async def create_code_context( - cwd: Optional[str] = None, - language: Optional[str] = None, - request_timeout: Optional[float] = None) -> Context -``` - -Creates a new context to run code in. - -**Arguments**: - -- `cwd`: Set the current working directory for the context, defaults to `/home/user` -- `language`: Language of the context. If not specified, defaults to Python -- `request_timeout`: Timeout for the request in **milliseconds** - -**Returns**: - -Context object - - - - -## Sandbox - -```python -class Sandbox(BaseSandbox) -``` - -E2B cloud sandbox is a secure and isolated cloud environment. - -The sandbox allows you to: -- Access Linux OS -- Create, list, and delete files and directories -- Run commands -- Run isolated code -- Access the internet - -Check docs [here](https://e2b.dev/docs). - -Use the `Sandbox()` to create a new sandbox. - -**Example**: - -```python -from e2b_code_interpreter import Sandbox - -sandbox = Sandbox() -``` - - -### run\_code - -```python -@overload -def run_code(code: str, - language: Union[Literal["python"], None] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code as Python. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -def run_code(code: str, - language: Optional[str] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code for the specified language. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. -If no language is specified, Python is used. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -def run_code(code: str, - context: Optional[Context] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code in the specified context, if not specified, the default context is used. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `context`: Concrete context to run the code in. If not specified, the default context for the language is used. It's mutually exclusive with the language. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### create\_code\_context - -```python -def create_code_context(cwd: Optional[str] = None, - language: Optional[str] = None, - request_timeout: Optional[float] = None) -> Context -``` - -Creates a new context to run code in. - -**Arguments**: - -- `cwd`: Set the current working directory for the context, defaults to `/home/user` -- `language`: Language of the context. If not specified, defaults to Python -- `request_timeout`: Timeout for the request in **milliseconds** - -**Returns**: - -Context object - - - - - - -## ChartType - -```python -class ChartType(str, enum.Enum) -``` - -Chart types - - -## ScaleType - -```python -class ScaleType(str, enum.Enum) -``` - -Ax scale types - - -## Chart - -```python -class Chart() -``` - -Extracted data from a chart. It's useful for building an interactive charts or custom visualizations. - - - - -## OutputMessage - -```python -@dataclass -class OutputMessage() -``` - -Represents an output message from the sandbox code execution. - - -### line - -The output line. - - -### timestamp - -Unix epoch in nanoseconds - - -### error - -Whether the output is an error. - - -## ExecutionError - -```python -@dataclass -class ExecutionError() -``` - -Represents an error that occurred during the execution of a cell. -The error contains the name of the error, the value of the error, and the traceback. - - -### name - -Name of the error. - - -### value - -Value of the error. - - -### traceback - -The raw traceback of the error. - - -### to\_json - -```python -def to_json() -> str -``` - -Returns the JSON representation of the Error object. - - -## MIMEType - -```python -class MIMEType(str) -``` - -Represents a MIME type. - - -## Result - -```python -@dataclass -class Result() -``` - -Represents the data to be displayed as a result of executing a cell in a Jupyter notebook. -The result is similar to the structure returned by ipython kernel: https://ipython.readthedocs.io/en/stable/development/execution.html#execution-semantics - -The result can contain multiple types of data, such as text, images, plots, etc. Each type of data is represented -as a string, and the result can contain multiple types of data. The display calls don't have to have text representation, -for the actual result the representation is always present for the result, the other representations are always optional. - - -### is\_main\_result - -Whether this data is the result of the cell. Data can be produced by display calls of which can be multiple in a cell. - - -### extra - -Extra data that can be included. Not part of the standard types. - - -### formats - -```python -def formats() -> Iterable[str] -``` - -Returns all available formats of the result. - -**Returns**: - -All available formats of the result in MIME types. - - -### \_\_str\_\_ - -```python -def __str__() -> Optional[str] -``` - -Returns the text representation of the data. - -**Returns**: - -The text representation of the data. - - -### \_repr\_html\_ - -```python -def _repr_html_() -> Optional[str] -``` - -Returns the HTML representation of the data. - -**Returns**: - -The HTML representation of the data. - - -### \_repr\_markdown\_ - -```python -def _repr_markdown_() -> Optional[str] -``` - -Returns the Markdown representation of the data. - -**Returns**: - -The Markdown representation of the data. - - -### \_repr\_svg\_ - -```python -def _repr_svg_() -> Optional[str] -``` - -Returns the SVG representation of the data. - -**Returns**: - -The SVG representation of the data. - - -### \_repr\_png\_ - -```python -def _repr_png_() -> Optional[str] -``` - -Returns the base64 representation of the PNG data. - -**Returns**: - -The base64 representation of the PNG data. - - -### \_repr\_jpeg\_ - -```python -def _repr_jpeg_() -> Optional[str] -``` - -Returns the base64 representation of the JPEG data. - -**Returns**: - -The base64 representation of the JPEG data. - - -### \_repr\_pdf\_ - -```python -def _repr_pdf_() -> Optional[str] -``` - -Returns the PDF representation of the data. - -**Returns**: - -The PDF representation of the data. - - -### \_repr\_latex\_ - -```python -def _repr_latex_() -> Optional[str] -``` - -Returns the LaTeX representation of the data. - -**Returns**: - -The LaTeX representation of the data. - - -### \_repr\_json\_ - -```python -def _repr_json_() -> Optional[dict] -``` - -Returns the JSON representation of the data. - -**Returns**: - -The JSON representation of the data. - - -### \_repr\_javascript\_ - -```python -def _repr_javascript_() -> Optional[str] -``` - -Returns the JavaScript representation of the data. - -**Returns**: - -The JavaScript representation of the data. - - -## Logs - -```python -@dataclass(repr=False) -class Logs() -``` - -Data printed to stdout and stderr during execution, usually by print statements, logs, warnings, subprocesses, etc. - - -### stdout - -List of strings printed to stdout by prints, subprocesses, etc. - - -### stderr - -List of strings printed to stderr by prints, subprocesses, etc. - - -### to\_json - -```python -def to_json() -> str -``` - -Returns the JSON representation of the Logs object. - - -### serialize\_results - -```python -def serialize_results(results: List[Result]) -> List[Dict[str, str]] -``` - -Serializes the results to JSON. - - -## Execution - -```python -@dataclass(repr=False) -class Execution() -``` - -Represents the result of a cell execution. - - -### results - -List of the result of the cell (interactively interpreted last line), display calls (e.g. matplotlib plots). - - -### logs - -Logs printed to stdout and stderr during execution. - - -### error - -Error object if an error occurred, None otherwise. - - -### execution\_count - -Execution count of the cell. - - -### text - -```python -@property -def text() -> Optional[str] -``` - -Returns the text representation of the result. - -**Returns**: - -The text representation of the result. - - -### to\_json - -```python -def to_json() -> str -``` - -Returns the JSON representation of the Execution object. - - -## Context - -```python -@dataclass -class Context() -``` - -Represents a context for code execution. - - -### id - -The ID of the context. - - -### language - -The language of the context. - - -### cwd - -The working directory of the context. - diff --git a/sdk-reference/code-interpreter-python-sdk/v1.0.4/sandbox/page.mdx b/sdk-reference/code-interpreter-python-sdk/v1.0.4/sandbox/page.mdx deleted file mode 100644 index 325b8e18..00000000 --- a/sdk-reference/code-interpreter-python-sdk/v1.0.4/sandbox/page.mdx +++ /dev/null @@ -1,722 +0,0 @@ - - - - - -## AsyncSandbox - -```python -class AsyncSandbox(BaseAsyncSandbox) -``` - -E2B cloud sandbox is a secure and isolated cloud environment. - -The sandbox allows you to: -- Access Linux OS -- Create, list, and delete files and directories -- Run commands -- Run isolated code -- Access the internet - -Check docs [here](https://e2b.dev/docs). - -Use the `AsyncSandbox.create()` to create a new sandbox. - -**Example**: - -```python -from e2b_code_interpreter import AsyncSandbox -sandbox = await AsyncSandbox.create() -``` - - -### run\_code - -```python -@overload -async def run_code(code: str, - language: Union[Literal["python"], None] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code as Python. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -async def run_code(code: str, - language: Optional[str] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code for the specified language. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. -If no language is specified, Python is used. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -async def run_code(code: str, - context: Optional[Context] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code in the specified context, if not specified, the default context is used. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `context`: Concrete context to run the code in. If not specified, the default context for the language is used. It's mutually exclusive with the language. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### create\_code\_context - -```python -async def create_code_context( - cwd: Optional[str] = None, - language: Optional[str] = None, - request_timeout: Optional[float] = None) -> Context -``` - -Creates a new context to run code in. - -**Arguments**: - -- `cwd`: Set the current working directory for the context, defaults to `/home/user` -- `language`: Language of the context. If not specified, defaults to Python -- `request_timeout`: Timeout for the request in **milliseconds** - -**Returns**: - -Context object - - - - -## OutputMessage - -```python -@dataclass -class OutputMessage() -``` - -Represents an output message from the sandbox code execution. - - -### line - -The output line. - - -### timestamp - -Unix epoch in nanoseconds - - -### error - -Whether the output is an error. - - -## ExecutionError - -```python -@dataclass -class ExecutionError() -``` - -Represents an error that occurred during the execution of a cell. -The error contains the name of the error, the value of the error, and the traceback. - - -### name - -Name of the error. - - -### value - -Value of the error. - - -### traceback - -The raw traceback of the error. - - -### to\_json - -```python -def to_json() -> str -``` - -Returns the JSON representation of the Error object. - - -## MIMEType - -```python -class MIMEType(str) -``` - -Represents a MIME type. - - -## Result - -```python -@dataclass -class Result() -``` - -Represents the data to be displayed as a result of executing a cell in a Jupyter notebook. -The result is similar to the structure returned by ipython kernel: https://ipython.readthedocs.io/en/stable/development/execution.html#execution-semantics - -The result can contain multiple types of data, such as text, images, plots, etc. Each type of data is represented -as a string, and the result can contain multiple types of data. The display calls don't have to have text representation, -for the actual result the representation is always present for the result, the other representations are always optional. - - -### is\_main\_result - -Whether this data is the result of the cell. Data can be produced by display calls of which can be multiple in a cell. - - -### extra - -Extra data that can be included. Not part of the standard types. - - -### formats - -```python -def formats() -> Iterable[str] -``` - -Returns all available formats of the result. - -**Returns**: - -All available formats of the result in MIME types. - - -### \_\_str\_\_ - -```python -def __str__() -> Optional[str] -``` - -Returns the text representation of the data. - -**Returns**: - -The text representation of the data. - - -### \_repr\_html\_ - -```python -def _repr_html_() -> Optional[str] -``` - -Returns the HTML representation of the data. - -**Returns**: - -The HTML representation of the data. - - -### \_repr\_markdown\_ - -```python -def _repr_markdown_() -> Optional[str] -``` - -Returns the Markdown representation of the data. - -**Returns**: - -The Markdown representation of the data. - - -### \_repr\_svg\_ - -```python -def _repr_svg_() -> Optional[str] -``` - -Returns the SVG representation of the data. - -**Returns**: - -The SVG representation of the data. - - -### \_repr\_png\_ - -```python -def _repr_png_() -> Optional[str] -``` - -Returns the base64 representation of the PNG data. - -**Returns**: - -The base64 representation of the PNG data. - - -### \_repr\_jpeg\_ - -```python -def _repr_jpeg_() -> Optional[str] -``` - -Returns the base64 representation of the JPEG data. - -**Returns**: - -The base64 representation of the JPEG data. - - -### \_repr\_pdf\_ - -```python -def _repr_pdf_() -> Optional[str] -``` - -Returns the PDF representation of the data. - -**Returns**: - -The PDF representation of the data. - - -### \_repr\_latex\_ - -```python -def _repr_latex_() -> Optional[str] -``` - -Returns the LaTeX representation of the data. - -**Returns**: - -The LaTeX representation of the data. - - -### \_repr\_json\_ - -```python -def _repr_json_() -> Optional[dict] -``` - -Returns the JSON representation of the data. - -**Returns**: - -The JSON representation of the data. - - -### \_repr\_javascript\_ - -```python -def _repr_javascript_() -> Optional[str] -``` - -Returns the JavaScript representation of the data. - -**Returns**: - -The JavaScript representation of the data. - - -## Logs - -```python -@dataclass(repr=False) -class Logs() -``` - -Data printed to stdout and stderr during execution, usually by print statements, logs, warnings, subprocesses, etc. - - -### stdout - -List of strings printed to stdout by prints, subprocesses, etc. - - -### stderr - -List of strings printed to stderr by prints, subprocesses, etc. - - -### to\_json - -```python -def to_json() -> str -``` - -Returns the JSON representation of the Logs object. - - -### serialize\_results - -```python -def serialize_results(results: List[Result]) -> List[Dict[str, str]] -``` - -Serializes the results to JSON. - - -## Execution - -```python -@dataclass(repr=False) -class Execution() -``` - -Represents the result of a cell execution. - - -### results - -List of the result of the cell (interactively interpreted last line), display calls (e.g. matplotlib plots). - - -### logs - -Logs printed to stdout and stderr during execution. - - -### error - -Error object if an error occurred, None otherwise. - - -### execution\_count - -Execution count of the cell. - - -### text - -```python -@property -def text() -> Optional[str] -``` - -Returns the text representation of the result. - -**Returns**: - -The text representation of the result. - - -### to\_json - -```python -def to_json() -> str -``` - -Returns the JSON representation of the Execution object. - - -## Context - -```python -@dataclass -class Context() -``` - -Represents a context for code execution. - - -### id - -The ID of the context. - - -### language - -The language of the context. - - -### cwd - -The working directory of the context. - - - - -## ChartType - -```python -class ChartType(str, enum.Enum) -``` - -Chart types - - -## ScaleType - -```python -class ScaleType(str, enum.Enum) -``` - -Ax scale types - - -## Chart - -```python -class Chart() -``` - -Extracted data from a chart. It's useful for building an interactive charts or custom visualizations. - - - - -## Sandbox - -```python -class Sandbox(BaseSandbox) -``` - -E2B cloud sandbox is a secure and isolated cloud environment. - -The sandbox allows you to: -- Access Linux OS -- Create, list, and delete files and directories -- Run commands -- Run isolated code -- Access the internet - -Check docs [here](https://e2b.dev/docs). - -Use the `Sandbox()` to create a new sandbox. - -**Example**: - -```python -from e2b_code_interpreter import Sandbox - -sandbox = Sandbox() -``` - - -### run\_code - -```python -@overload -def run_code(code: str, - language: Union[Literal["python"], None] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code as Python. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -def run_code(code: str, - language: Optional[str] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code for the specified language. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. -If no language is specified, Python is used. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -def run_code(code: str, - context: Optional[Context] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code in the specified context, if not specified, the default context is used. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `context`: Concrete context to run the code in. If not specified, the default context for the language is used. It's mutually exclusive with the language. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### create\_code\_context - -```python -def create_code_context(cwd: Optional[str] = None, - language: Optional[str] = None, - request_timeout: Optional[float] = None) -> Context -``` - -Creates a new context to run code in. - -**Arguments**: - -- `cwd`: Set the current working directory for the context, defaults to `/home/user` -- `language`: Language of the context. If not specified, defaults to Python -- `request_timeout`: Timeout for the request in **milliseconds** - -**Returns**: - -Context object - - - - - diff --git a/sdk-reference/code-interpreter-python-sdk/v1.0.5/sandbox/page.mdx b/sdk-reference/code-interpreter-python-sdk/v1.0.5/sandbox/page.mdx deleted file mode 100644 index b59dc8e0..00000000 --- a/sdk-reference/code-interpreter-python-sdk/v1.0.5/sandbox/page.mdx +++ /dev/null @@ -1,722 +0,0 @@ - - - - - -## OutputMessage - -```python -@dataclass -class OutputMessage() -``` - -Represents an output message from the sandbox code execution. - - -### line - -The output line. - - -### timestamp - -Unix epoch in nanoseconds - - -### error - -Whether the output is an error. - - -## ExecutionError - -```python -@dataclass -class ExecutionError() -``` - -Represents an error that occurred during the execution of a cell. -The error contains the name of the error, the value of the error, and the traceback. - - -### name - -Name of the error. - - -### value - -Value of the error. - - -### traceback - -The raw traceback of the error. - - -### to\_json - -```python -def to_json() -> str -``` - -Returns the JSON representation of the Error object. - - -## MIMEType - -```python -class MIMEType(str) -``` - -Represents a MIME type. - - -## Result - -```python -@dataclass -class Result() -``` - -Represents the data to be displayed as a result of executing a cell in a Jupyter notebook. -The result is similar to the structure returned by ipython kernel: https://ipython.readthedocs.io/en/stable/development/execution.html#execution-semantics - -The result can contain multiple types of data, such as text, images, plots, etc. Each type of data is represented -as a string, and the result can contain multiple types of data. The display calls don't have to have text representation, -for the actual result the representation is always present for the result, the other representations are always optional. - - -### is\_main\_result - -Whether this data is the result of the cell. Data can be produced by display calls of which can be multiple in a cell. - - -### extra - -Extra data that can be included. Not part of the standard types. - - -### formats - -```python -def formats() -> Iterable[str] -``` - -Returns all available formats of the result. - -**Returns**: - -All available formats of the result in MIME types. - - -### \_\_str\_\_ - -```python -def __str__() -> Optional[str] -``` - -Returns the text representation of the data. - -**Returns**: - -The text representation of the data. - - -### \_repr\_html\_ - -```python -def _repr_html_() -> Optional[str] -``` - -Returns the HTML representation of the data. - -**Returns**: - -The HTML representation of the data. - - -### \_repr\_markdown\_ - -```python -def _repr_markdown_() -> Optional[str] -``` - -Returns the Markdown representation of the data. - -**Returns**: - -The Markdown representation of the data. - - -### \_repr\_svg\_ - -```python -def _repr_svg_() -> Optional[str] -``` - -Returns the SVG representation of the data. - -**Returns**: - -The SVG representation of the data. - - -### \_repr\_png\_ - -```python -def _repr_png_() -> Optional[str] -``` - -Returns the base64 representation of the PNG data. - -**Returns**: - -The base64 representation of the PNG data. - - -### \_repr\_jpeg\_ - -```python -def _repr_jpeg_() -> Optional[str] -``` - -Returns the base64 representation of the JPEG data. - -**Returns**: - -The base64 representation of the JPEG data. - - -### \_repr\_pdf\_ - -```python -def _repr_pdf_() -> Optional[str] -``` - -Returns the PDF representation of the data. - -**Returns**: - -The PDF representation of the data. - - -### \_repr\_latex\_ - -```python -def _repr_latex_() -> Optional[str] -``` - -Returns the LaTeX representation of the data. - -**Returns**: - -The LaTeX representation of the data. - - -### \_repr\_json\_ - -```python -def _repr_json_() -> Optional[dict] -``` - -Returns the JSON representation of the data. - -**Returns**: - -The JSON representation of the data. - - -### \_repr\_javascript\_ - -```python -def _repr_javascript_() -> Optional[str] -``` - -Returns the JavaScript representation of the data. - -**Returns**: - -The JavaScript representation of the data. - - -## Logs - -```python -@dataclass(repr=False) -class Logs() -``` - -Data printed to stdout and stderr during execution, usually by print statements, logs, warnings, subprocesses, etc. - - -### stdout - -List of strings printed to stdout by prints, subprocesses, etc. - - -### stderr - -List of strings printed to stderr by prints, subprocesses, etc. - - -### to\_json - -```python -def to_json() -> str -``` - -Returns the JSON representation of the Logs object. - - -### serialize\_results - -```python -def serialize_results(results: List[Result]) -> List[Dict[str, str]] -``` - -Serializes the results to JSON. - - -## Execution - -```python -@dataclass(repr=False) -class Execution() -``` - -Represents the result of a cell execution. - - -### results - -List of the result of the cell (interactively interpreted last line), display calls (e.g. matplotlib plots). - - -### logs - -Logs printed to stdout and stderr during execution. - - -### error - -Error object if an error occurred, None otherwise. - - -### execution\_count - -Execution count of the cell. - - -### text - -```python -@property -def text() -> Optional[str] -``` - -Returns the text representation of the result. - -**Returns**: - -The text representation of the result. - - -### to\_json - -```python -def to_json() -> str -``` - -Returns the JSON representation of the Execution object. - - -## Context - -```python -@dataclass -class Context() -``` - -Represents a context for code execution. - - -### id - -The ID of the context. - - -### language - -The language of the context. - - -### cwd - -The working directory of the context. - - - - -## ChartType - -```python -class ChartType(str, enum.Enum) -``` - -Chart types - - -## ScaleType - -```python -class ScaleType(str, enum.Enum) -``` - -Ax scale types - - -## Chart - -```python -class Chart() -``` - -Extracted data from a chart. It's useful for building an interactive charts or custom visualizations. - - - - -## Sandbox - -```python -class Sandbox(BaseSandbox) -``` - -E2B cloud sandbox is a secure and isolated cloud environment. - -The sandbox allows you to: -- Access Linux OS -- Create, list, and delete files and directories -- Run commands -- Run isolated code -- Access the internet - -Check docs [here](https://e2b.dev/docs). - -Use the `Sandbox()` to create a new sandbox. - -**Example**: - -```python -from e2b_code_interpreter import Sandbox - -sandbox = Sandbox() -``` - - -### run\_code - -```python -@overload -def run_code(code: str, - language: Union[Literal["python"], None] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code as Python. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -def run_code(code: str, - language: Optional[str] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code for the specified language. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. -If no language is specified, Python is used. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -def run_code(code: str, - context: Optional[Context] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code in the specified context, if not specified, the default context is used. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `context`: Concrete context to run the code in. If not specified, the default context for the language is used. It's mutually exclusive with the language. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### create\_code\_context - -```python -def create_code_context(cwd: Optional[str] = None, - language: Optional[str] = None, - request_timeout: Optional[float] = None) -> Context -``` - -Creates a new context to run code in. - -**Arguments**: - -- `cwd`: Set the current working directory for the context, defaults to `/home/user` -- `language`: Language of the context. If not specified, defaults to Python -- `request_timeout`: Timeout for the request in **milliseconds** - -**Returns**: - -Context object - - - - - - -## AsyncSandbox - -```python -class AsyncSandbox(BaseAsyncSandbox) -``` - -E2B cloud sandbox is a secure and isolated cloud environment. - -The sandbox allows you to: -- Access Linux OS -- Create, list, and delete files and directories -- Run commands -- Run isolated code -- Access the internet - -Check docs [here](https://e2b.dev/docs). - -Use the `AsyncSandbox.create()` to create a new sandbox. - -**Example**: - -```python -from e2b_code_interpreter import AsyncSandbox -sandbox = await AsyncSandbox.create() -``` - - -### run\_code - -```python -@overload -async def run_code(code: str, - language: Union[Literal["python"], None] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code as Python. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -async def run_code(code: str, - language: Optional[str] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code for the specified language. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. -If no language is specified, Python is used. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -async def run_code(code: str, - context: Optional[Context] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code in the specified context, if not specified, the default context is used. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `context`: Concrete context to run the code in. If not specified, the default context for the language is used. It's mutually exclusive with the language. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### create\_code\_context - -```python -async def create_code_context( - cwd: Optional[str] = None, - language: Optional[str] = None, - request_timeout: Optional[float] = None) -> Context -``` - -Creates a new context to run code in. - -**Arguments**: - -- `cwd`: Set the current working directory for the context, defaults to `/home/user` -- `language`: Language of the context. If not specified, defaults to Python -- `request_timeout`: Timeout for the request in **milliseconds** - -**Returns**: - -Context object - - - diff --git a/sdk-reference/code-interpreter-python-sdk/v1.1.0/sandbox/page.mdx b/sdk-reference/code-interpreter-python-sdk/v1.1.0/sandbox/page.mdx deleted file mode 100644 index 86e0dfaf..00000000 --- a/sdk-reference/code-interpreter-python-sdk/v1.1.0/sandbox/page.mdx +++ /dev/null @@ -1,722 +0,0 @@ - - - - - -## ChartType - -```python -class ChartType(str, enum.Enum) -``` - -Chart types - - -## ScaleType - -```python -class ScaleType(str, enum.Enum) -``` - -Ax scale types - - -## Chart - -```python -class Chart() -``` - -Extracted data from a chart. It's useful for building an interactive charts or custom visualizations. - - - - - - -## OutputMessage - -```python -@dataclass -class OutputMessage() -``` - -Represents an output message from the sandbox code execution. - - -### line - -The output line. - - -### timestamp - -Unix epoch in nanoseconds - - -### error - -Whether the output is an error. - - -## ExecutionError - -```python -@dataclass -class ExecutionError() -``` - -Represents an error that occurred during the execution of a cell. -The error contains the name of the error, the value of the error, and the traceback. - - -### name - -Name of the error. - - -### value - -Value of the error. - - -### traceback - -The raw traceback of the error. - - -### to\_json - -```python -def to_json() -> str -``` - -Returns the JSON representation of the Error object. - - -## MIMEType - -```python -class MIMEType(str) -``` - -Represents a MIME type. - - -## Result - -```python -@dataclass -class Result() -``` - -Represents the data to be displayed as a result of executing a cell in a Jupyter notebook. -The result is similar to the structure returned by ipython kernel: https://ipython.readthedocs.io/en/stable/development/execution.html#execution-semantics - -The result can contain multiple types of data, such as text, images, plots, etc. Each type of data is represented -as a string, and the result can contain multiple types of data. The display calls don't have to have text representation, -for the actual result the representation is always present for the result, the other representations are always optional. - - -### is\_main\_result - -Whether this data is the result of the cell. Data can be produced by display calls of which can be multiple in a cell. - - -### extra - -Extra data that can be included. Not part of the standard types. - - -### formats - -```python -def formats() -> Iterable[str] -``` - -Returns all available formats of the result. - -**Returns**: - -All available formats of the result in MIME types. - - -### \_\_str\_\_ - -```python -def __str__() -> Optional[str] -``` - -Returns the text representation of the data. - -**Returns**: - -The text representation of the data. - - -### \_repr\_html\_ - -```python -def _repr_html_() -> Optional[str] -``` - -Returns the HTML representation of the data. - -**Returns**: - -The HTML representation of the data. - - -### \_repr\_markdown\_ - -```python -def _repr_markdown_() -> Optional[str] -``` - -Returns the Markdown representation of the data. - -**Returns**: - -The Markdown representation of the data. - - -### \_repr\_svg\_ - -```python -def _repr_svg_() -> Optional[str] -``` - -Returns the SVG representation of the data. - -**Returns**: - -The SVG representation of the data. - - -### \_repr\_png\_ - -```python -def _repr_png_() -> Optional[str] -``` - -Returns the base64 representation of the PNG data. - -**Returns**: - -The base64 representation of the PNG data. - - -### \_repr\_jpeg\_ - -```python -def _repr_jpeg_() -> Optional[str] -``` - -Returns the base64 representation of the JPEG data. - -**Returns**: - -The base64 representation of the JPEG data. - - -### \_repr\_pdf\_ - -```python -def _repr_pdf_() -> Optional[str] -``` - -Returns the PDF representation of the data. - -**Returns**: - -The PDF representation of the data. - - -### \_repr\_latex\_ - -```python -def _repr_latex_() -> Optional[str] -``` - -Returns the LaTeX representation of the data. - -**Returns**: - -The LaTeX representation of the data. - - -### \_repr\_json\_ - -```python -def _repr_json_() -> Optional[dict] -``` - -Returns the JSON representation of the data. - -**Returns**: - -The JSON representation of the data. - - -### \_repr\_javascript\_ - -```python -def _repr_javascript_() -> Optional[str] -``` - -Returns the JavaScript representation of the data. - -**Returns**: - -The JavaScript representation of the data. - - -## Logs - -```python -@dataclass(repr=False) -class Logs() -``` - -Data printed to stdout and stderr during execution, usually by print statements, logs, warnings, subprocesses, etc. - - -### stdout - -List of strings printed to stdout by prints, subprocesses, etc. - - -### stderr - -List of strings printed to stderr by prints, subprocesses, etc. - - -### to\_json - -```python -def to_json() -> str -``` - -Returns the JSON representation of the Logs object. - - -### serialize\_results - -```python -def serialize_results(results: List[Result]) -> List[Dict[str, str]] -``` - -Serializes the results to JSON. - - -## Execution - -```python -@dataclass(repr=False) -class Execution() -``` - -Represents the result of a cell execution. - - -### results - -List of the result of the cell (interactively interpreted last line), display calls (e.g. matplotlib plots). - - -### logs - -Logs printed to stdout and stderr during execution. - - -### error - -Error object if an error occurred, None otherwise. - - -### execution\_count - -Execution count of the cell. - - -### text - -```python -@property -def text() -> Optional[str] -``` - -Returns the text representation of the result. - -**Returns**: - -The text representation of the result. - - -### to\_json - -```python -def to_json() -> str -``` - -Returns the JSON representation of the Execution object. - - -## Context - -```python -@dataclass -class Context() -``` - -Represents a context for code execution. - - -### id - -The ID of the context. - - -### language - -The language of the context. - - -### cwd - -The working directory of the context. - - - - - - -## AsyncSandbox - -```python -class AsyncSandbox(BaseAsyncSandbox) -``` - -E2B cloud sandbox is a secure and isolated cloud environment. - -The sandbox allows you to: -- Access Linux OS -- Create, list, and delete files and directories -- Run commands -- Run isolated code -- Access the internet - -Check docs [here](https://e2b.dev/docs). - -Use the `AsyncSandbox.create()` to create a new sandbox. - -**Example**: - -```python -from e2b_code_interpreter import AsyncSandbox -sandbox = await AsyncSandbox.create() -``` - - -### run\_code - -```python -@overload -async def run_code(code: str, - language: Union[Literal["python"], None] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code as Python. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -async def run_code(code: str, - language: Optional[str] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code for the specified language. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. -If no language is specified, Python is used. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -async def run_code(code: str, - context: Optional[Context] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code in the specified context, if not specified, the default context is used. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `context`: Concrete context to run the code in. If not specified, the default context for the language is used. It's mutually exclusive with the language. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### create\_code\_context - -```python -async def create_code_context( - cwd: Optional[str] = None, - language: Optional[str] = None, - request_timeout: Optional[float] = None) -> Context -``` - -Creates a new context to run code in. - -**Arguments**: - -- `cwd`: Set the current working directory for the context, defaults to `/home/user` -- `language`: Language of the context. If not specified, defaults to Python -- `request_timeout`: Timeout for the request in **milliseconds** - -**Returns**: - -Context object - - - - -## Sandbox - -```python -class Sandbox(BaseSandbox) -``` - -E2B cloud sandbox is a secure and isolated cloud environment. - -The sandbox allows you to: -- Access Linux OS -- Create, list, and delete files and directories -- Run commands -- Run isolated code -- Access the internet - -Check docs [here](https://e2b.dev/docs). - -Use the `Sandbox()` to create a new sandbox. - -**Example**: - -```python -from e2b_code_interpreter import Sandbox - -sandbox = Sandbox() -``` - - -### run\_code - -```python -@overload -def run_code(code: str, - language: Union[Literal["python"], None] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code as Python. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -def run_code(code: str, - language: Optional[str] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code for the specified language. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. -If no language is specified, Python is used. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -def run_code(code: str, - context: Optional[Context] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code in the specified context, if not specified, the default context is used. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `context`: Concrete context to run the code in. If not specified, the default context for the language is used. It's mutually exclusive with the language. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### create\_code\_context - -```python -def create_code_context(cwd: Optional[str] = None, - language: Optional[str] = None, - request_timeout: Optional[float] = None) -> Context -``` - -Creates a new context to run code in. - -**Arguments**: - -- `cwd`: Set the current working directory for the context, defaults to `/home/user` -- `language`: Language of the context. If not specified, defaults to Python -- `request_timeout`: Timeout for the request in **milliseconds** - -**Returns**: - -Context object - diff --git a/sdk-reference/code-interpreter-python-sdk/v1.1.1/sandbox/page.mdx b/sdk-reference/code-interpreter-python-sdk/v1.1.1/sandbox/page.mdx deleted file mode 100644 index 86e0dfaf..00000000 --- a/sdk-reference/code-interpreter-python-sdk/v1.1.1/sandbox/page.mdx +++ /dev/null @@ -1,722 +0,0 @@ - - - - - -## ChartType - -```python -class ChartType(str, enum.Enum) -``` - -Chart types - - -## ScaleType - -```python -class ScaleType(str, enum.Enum) -``` - -Ax scale types - - -## Chart - -```python -class Chart() -``` - -Extracted data from a chart. It's useful for building an interactive charts or custom visualizations. - - - - - - -## OutputMessage - -```python -@dataclass -class OutputMessage() -``` - -Represents an output message from the sandbox code execution. - - -### line - -The output line. - - -### timestamp - -Unix epoch in nanoseconds - - -### error - -Whether the output is an error. - - -## ExecutionError - -```python -@dataclass -class ExecutionError() -``` - -Represents an error that occurred during the execution of a cell. -The error contains the name of the error, the value of the error, and the traceback. - - -### name - -Name of the error. - - -### value - -Value of the error. - - -### traceback - -The raw traceback of the error. - - -### to\_json - -```python -def to_json() -> str -``` - -Returns the JSON representation of the Error object. - - -## MIMEType - -```python -class MIMEType(str) -``` - -Represents a MIME type. - - -## Result - -```python -@dataclass -class Result() -``` - -Represents the data to be displayed as a result of executing a cell in a Jupyter notebook. -The result is similar to the structure returned by ipython kernel: https://ipython.readthedocs.io/en/stable/development/execution.html#execution-semantics - -The result can contain multiple types of data, such as text, images, plots, etc. Each type of data is represented -as a string, and the result can contain multiple types of data. The display calls don't have to have text representation, -for the actual result the representation is always present for the result, the other representations are always optional. - - -### is\_main\_result - -Whether this data is the result of the cell. Data can be produced by display calls of which can be multiple in a cell. - - -### extra - -Extra data that can be included. Not part of the standard types. - - -### formats - -```python -def formats() -> Iterable[str] -``` - -Returns all available formats of the result. - -**Returns**: - -All available formats of the result in MIME types. - - -### \_\_str\_\_ - -```python -def __str__() -> Optional[str] -``` - -Returns the text representation of the data. - -**Returns**: - -The text representation of the data. - - -### \_repr\_html\_ - -```python -def _repr_html_() -> Optional[str] -``` - -Returns the HTML representation of the data. - -**Returns**: - -The HTML representation of the data. - - -### \_repr\_markdown\_ - -```python -def _repr_markdown_() -> Optional[str] -``` - -Returns the Markdown representation of the data. - -**Returns**: - -The Markdown representation of the data. - - -### \_repr\_svg\_ - -```python -def _repr_svg_() -> Optional[str] -``` - -Returns the SVG representation of the data. - -**Returns**: - -The SVG representation of the data. - - -### \_repr\_png\_ - -```python -def _repr_png_() -> Optional[str] -``` - -Returns the base64 representation of the PNG data. - -**Returns**: - -The base64 representation of the PNG data. - - -### \_repr\_jpeg\_ - -```python -def _repr_jpeg_() -> Optional[str] -``` - -Returns the base64 representation of the JPEG data. - -**Returns**: - -The base64 representation of the JPEG data. - - -### \_repr\_pdf\_ - -```python -def _repr_pdf_() -> Optional[str] -``` - -Returns the PDF representation of the data. - -**Returns**: - -The PDF representation of the data. - - -### \_repr\_latex\_ - -```python -def _repr_latex_() -> Optional[str] -``` - -Returns the LaTeX representation of the data. - -**Returns**: - -The LaTeX representation of the data. - - -### \_repr\_json\_ - -```python -def _repr_json_() -> Optional[dict] -``` - -Returns the JSON representation of the data. - -**Returns**: - -The JSON representation of the data. - - -### \_repr\_javascript\_ - -```python -def _repr_javascript_() -> Optional[str] -``` - -Returns the JavaScript representation of the data. - -**Returns**: - -The JavaScript representation of the data. - - -## Logs - -```python -@dataclass(repr=False) -class Logs() -``` - -Data printed to stdout and stderr during execution, usually by print statements, logs, warnings, subprocesses, etc. - - -### stdout - -List of strings printed to stdout by prints, subprocesses, etc. - - -### stderr - -List of strings printed to stderr by prints, subprocesses, etc. - - -### to\_json - -```python -def to_json() -> str -``` - -Returns the JSON representation of the Logs object. - - -### serialize\_results - -```python -def serialize_results(results: List[Result]) -> List[Dict[str, str]] -``` - -Serializes the results to JSON. - - -## Execution - -```python -@dataclass(repr=False) -class Execution() -``` - -Represents the result of a cell execution. - - -### results - -List of the result of the cell (interactively interpreted last line), display calls (e.g. matplotlib plots). - - -### logs - -Logs printed to stdout and stderr during execution. - - -### error - -Error object if an error occurred, None otherwise. - - -### execution\_count - -Execution count of the cell. - - -### text - -```python -@property -def text() -> Optional[str] -``` - -Returns the text representation of the result. - -**Returns**: - -The text representation of the result. - - -### to\_json - -```python -def to_json() -> str -``` - -Returns the JSON representation of the Execution object. - - -## Context - -```python -@dataclass -class Context() -``` - -Represents a context for code execution. - - -### id - -The ID of the context. - - -### language - -The language of the context. - - -### cwd - -The working directory of the context. - - - - - - -## AsyncSandbox - -```python -class AsyncSandbox(BaseAsyncSandbox) -``` - -E2B cloud sandbox is a secure and isolated cloud environment. - -The sandbox allows you to: -- Access Linux OS -- Create, list, and delete files and directories -- Run commands -- Run isolated code -- Access the internet - -Check docs [here](https://e2b.dev/docs). - -Use the `AsyncSandbox.create()` to create a new sandbox. - -**Example**: - -```python -from e2b_code_interpreter import AsyncSandbox -sandbox = await AsyncSandbox.create() -``` - - -### run\_code - -```python -@overload -async def run_code(code: str, - language: Union[Literal["python"], None] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code as Python. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -async def run_code(code: str, - language: Optional[str] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code for the specified language. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. -If no language is specified, Python is used. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -async def run_code(code: str, - context: Optional[Context] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code in the specified context, if not specified, the default context is used. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `context`: Concrete context to run the code in. If not specified, the default context for the language is used. It's mutually exclusive with the language. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### create\_code\_context - -```python -async def create_code_context( - cwd: Optional[str] = None, - language: Optional[str] = None, - request_timeout: Optional[float] = None) -> Context -``` - -Creates a new context to run code in. - -**Arguments**: - -- `cwd`: Set the current working directory for the context, defaults to `/home/user` -- `language`: Language of the context. If not specified, defaults to Python -- `request_timeout`: Timeout for the request in **milliseconds** - -**Returns**: - -Context object - - - - -## Sandbox - -```python -class Sandbox(BaseSandbox) -``` - -E2B cloud sandbox is a secure and isolated cloud environment. - -The sandbox allows you to: -- Access Linux OS -- Create, list, and delete files and directories -- Run commands -- Run isolated code -- Access the internet - -Check docs [here](https://e2b.dev/docs). - -Use the `Sandbox()` to create a new sandbox. - -**Example**: - -```python -from e2b_code_interpreter import Sandbox - -sandbox = Sandbox() -``` - - -### run\_code - -```python -@overload -def run_code(code: str, - language: Union[Literal["python"], None] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code as Python. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -def run_code(code: str, - language: Optional[str] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code for the specified language. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. -If no language is specified, Python is used. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -def run_code(code: str, - context: Optional[Context] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code in the specified context, if not specified, the default context is used. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `context`: Concrete context to run the code in. If not specified, the default context for the language is used. It's mutually exclusive with the language. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### create\_code\_context - -```python -def create_code_context(cwd: Optional[str] = None, - language: Optional[str] = None, - request_timeout: Optional[float] = None) -> Context -``` - -Creates a new context to run code in. - -**Arguments**: - -- `cwd`: Set the current working directory for the context, defaults to `/home/user` -- `language`: Language of the context. If not specified, defaults to Python -- `request_timeout`: Timeout for the request in **milliseconds** - -**Returns**: - -Context object - diff --git a/sdk-reference/code-interpreter-python-sdk/v1.2.0/sandbox/page.mdx b/sdk-reference/code-interpreter-python-sdk/v1.2.0/sandbox/page.mdx deleted file mode 100644 index 86e0dfaf..00000000 --- a/sdk-reference/code-interpreter-python-sdk/v1.2.0/sandbox/page.mdx +++ /dev/null @@ -1,722 +0,0 @@ - - - - - -## ChartType - -```python -class ChartType(str, enum.Enum) -``` - -Chart types - - -## ScaleType - -```python -class ScaleType(str, enum.Enum) -``` - -Ax scale types - - -## Chart - -```python -class Chart() -``` - -Extracted data from a chart. It's useful for building an interactive charts or custom visualizations. - - - - - - -## OutputMessage - -```python -@dataclass -class OutputMessage() -``` - -Represents an output message from the sandbox code execution. - - -### line - -The output line. - - -### timestamp - -Unix epoch in nanoseconds - - -### error - -Whether the output is an error. - - -## ExecutionError - -```python -@dataclass -class ExecutionError() -``` - -Represents an error that occurred during the execution of a cell. -The error contains the name of the error, the value of the error, and the traceback. - - -### name - -Name of the error. - - -### value - -Value of the error. - - -### traceback - -The raw traceback of the error. - - -### to\_json - -```python -def to_json() -> str -``` - -Returns the JSON representation of the Error object. - - -## MIMEType - -```python -class MIMEType(str) -``` - -Represents a MIME type. - - -## Result - -```python -@dataclass -class Result() -``` - -Represents the data to be displayed as a result of executing a cell in a Jupyter notebook. -The result is similar to the structure returned by ipython kernel: https://ipython.readthedocs.io/en/stable/development/execution.html#execution-semantics - -The result can contain multiple types of data, such as text, images, plots, etc. Each type of data is represented -as a string, and the result can contain multiple types of data. The display calls don't have to have text representation, -for the actual result the representation is always present for the result, the other representations are always optional. - - -### is\_main\_result - -Whether this data is the result of the cell. Data can be produced by display calls of which can be multiple in a cell. - - -### extra - -Extra data that can be included. Not part of the standard types. - - -### formats - -```python -def formats() -> Iterable[str] -``` - -Returns all available formats of the result. - -**Returns**: - -All available formats of the result in MIME types. - - -### \_\_str\_\_ - -```python -def __str__() -> Optional[str] -``` - -Returns the text representation of the data. - -**Returns**: - -The text representation of the data. - - -### \_repr\_html\_ - -```python -def _repr_html_() -> Optional[str] -``` - -Returns the HTML representation of the data. - -**Returns**: - -The HTML representation of the data. - - -### \_repr\_markdown\_ - -```python -def _repr_markdown_() -> Optional[str] -``` - -Returns the Markdown representation of the data. - -**Returns**: - -The Markdown representation of the data. - - -### \_repr\_svg\_ - -```python -def _repr_svg_() -> Optional[str] -``` - -Returns the SVG representation of the data. - -**Returns**: - -The SVG representation of the data. - - -### \_repr\_png\_ - -```python -def _repr_png_() -> Optional[str] -``` - -Returns the base64 representation of the PNG data. - -**Returns**: - -The base64 representation of the PNG data. - - -### \_repr\_jpeg\_ - -```python -def _repr_jpeg_() -> Optional[str] -``` - -Returns the base64 representation of the JPEG data. - -**Returns**: - -The base64 representation of the JPEG data. - - -### \_repr\_pdf\_ - -```python -def _repr_pdf_() -> Optional[str] -``` - -Returns the PDF representation of the data. - -**Returns**: - -The PDF representation of the data. - - -### \_repr\_latex\_ - -```python -def _repr_latex_() -> Optional[str] -``` - -Returns the LaTeX representation of the data. - -**Returns**: - -The LaTeX representation of the data. - - -### \_repr\_json\_ - -```python -def _repr_json_() -> Optional[dict] -``` - -Returns the JSON representation of the data. - -**Returns**: - -The JSON representation of the data. - - -### \_repr\_javascript\_ - -```python -def _repr_javascript_() -> Optional[str] -``` - -Returns the JavaScript representation of the data. - -**Returns**: - -The JavaScript representation of the data. - - -## Logs - -```python -@dataclass(repr=False) -class Logs() -``` - -Data printed to stdout and stderr during execution, usually by print statements, logs, warnings, subprocesses, etc. - - -### stdout - -List of strings printed to stdout by prints, subprocesses, etc. - - -### stderr - -List of strings printed to stderr by prints, subprocesses, etc. - - -### to\_json - -```python -def to_json() -> str -``` - -Returns the JSON representation of the Logs object. - - -### serialize\_results - -```python -def serialize_results(results: List[Result]) -> List[Dict[str, str]] -``` - -Serializes the results to JSON. - - -## Execution - -```python -@dataclass(repr=False) -class Execution() -``` - -Represents the result of a cell execution. - - -### results - -List of the result of the cell (interactively interpreted last line), display calls (e.g. matplotlib plots). - - -### logs - -Logs printed to stdout and stderr during execution. - - -### error - -Error object if an error occurred, None otherwise. - - -### execution\_count - -Execution count of the cell. - - -### text - -```python -@property -def text() -> Optional[str] -``` - -Returns the text representation of the result. - -**Returns**: - -The text representation of the result. - - -### to\_json - -```python -def to_json() -> str -``` - -Returns the JSON representation of the Execution object. - - -## Context - -```python -@dataclass -class Context() -``` - -Represents a context for code execution. - - -### id - -The ID of the context. - - -### language - -The language of the context. - - -### cwd - -The working directory of the context. - - - - - - -## AsyncSandbox - -```python -class AsyncSandbox(BaseAsyncSandbox) -``` - -E2B cloud sandbox is a secure and isolated cloud environment. - -The sandbox allows you to: -- Access Linux OS -- Create, list, and delete files and directories -- Run commands -- Run isolated code -- Access the internet - -Check docs [here](https://e2b.dev/docs). - -Use the `AsyncSandbox.create()` to create a new sandbox. - -**Example**: - -```python -from e2b_code_interpreter import AsyncSandbox -sandbox = await AsyncSandbox.create() -``` - - -### run\_code - -```python -@overload -async def run_code(code: str, - language: Union[Literal["python"], None] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code as Python. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -async def run_code(code: str, - language: Optional[str] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code for the specified language. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. -If no language is specified, Python is used. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -async def run_code(code: str, - context: Optional[Context] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code in the specified context, if not specified, the default context is used. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `context`: Concrete context to run the code in. If not specified, the default context for the language is used. It's mutually exclusive with the language. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### create\_code\_context - -```python -async def create_code_context( - cwd: Optional[str] = None, - language: Optional[str] = None, - request_timeout: Optional[float] = None) -> Context -``` - -Creates a new context to run code in. - -**Arguments**: - -- `cwd`: Set the current working directory for the context, defaults to `/home/user` -- `language`: Language of the context. If not specified, defaults to Python -- `request_timeout`: Timeout for the request in **milliseconds** - -**Returns**: - -Context object - - - - -## Sandbox - -```python -class Sandbox(BaseSandbox) -``` - -E2B cloud sandbox is a secure and isolated cloud environment. - -The sandbox allows you to: -- Access Linux OS -- Create, list, and delete files and directories -- Run commands -- Run isolated code -- Access the internet - -Check docs [here](https://e2b.dev/docs). - -Use the `Sandbox()` to create a new sandbox. - -**Example**: - -```python -from e2b_code_interpreter import Sandbox - -sandbox = Sandbox() -``` - - -### run\_code - -```python -@overload -def run_code(code: str, - language: Union[Literal["python"], None] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code as Python. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -def run_code(code: str, - language: Optional[str] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code for the specified language. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. -If no language is specified, Python is used. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -def run_code(code: str, - context: Optional[Context] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code in the specified context, if not specified, the default context is used. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `context`: Concrete context to run the code in. If not specified, the default context for the language is used. It's mutually exclusive with the language. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### create\_code\_context - -```python -def create_code_context(cwd: Optional[str] = None, - language: Optional[str] = None, - request_timeout: Optional[float] = None) -> Context -``` - -Creates a new context to run code in. - -**Arguments**: - -- `cwd`: Set the current working directory for the context, defaults to `/home/user` -- `language`: Language of the context. If not specified, defaults to Python -- `request_timeout`: Timeout for the request in **milliseconds** - -**Returns**: - -Context object - diff --git a/sdk-reference/code-interpreter-python-sdk/v1.2.1/sandbox/page.mdx b/sdk-reference/code-interpreter-python-sdk/v1.2.1/sandbox/page.mdx deleted file mode 100644 index 19778c89..00000000 --- a/sdk-reference/code-interpreter-python-sdk/v1.2.1/sandbox/page.mdx +++ /dev/null @@ -1,722 +0,0 @@ - - - - - -## Sandbox - -```python -class Sandbox(BaseSandbox) -``` - -E2B cloud sandbox is a secure and isolated cloud environment. - -The sandbox allows you to: -- Access Linux OS -- Create, list, and delete files and directories -- Run commands -- Run isolated code -- Access the internet - -Check docs [here](https://e2b.dev/docs). - -Use the `Sandbox()` to create a new sandbox. - -**Example**: - -```python -from e2b_code_interpreter import Sandbox - -sandbox = Sandbox() -``` - - -### run\_code - -```python -@overload -def run_code(code: str, - language: Union[Literal["python"], None] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code as Python. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -def run_code(code: str, - language: Optional[str] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code for the specified language. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. -If no language is specified, Python is used. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -def run_code(code: str, - context: Optional[Context] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code in the specified context, if not specified, the default context is used. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `context`: Concrete context to run the code in. If not specified, the default context for the language is used. It's mutually exclusive with the language. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### create\_code\_context - -```python -def create_code_context(cwd: Optional[str] = None, - language: Optional[str] = None, - request_timeout: Optional[float] = None) -> Context -``` - -Creates a new context to run code in. - -**Arguments**: - -- `cwd`: Set the current working directory for the context, defaults to `/home/user` -- `language`: Language of the context. If not specified, defaults to Python -- `request_timeout`: Timeout for the request in **milliseconds** - -**Returns**: - -Context object - - - - - - -## ChartType - -```python -class ChartType(str, enum.Enum) -``` - -Chart types - - -## ScaleType - -```python -class ScaleType(str, enum.Enum) -``` - -Ax scale types - - -## Chart - -```python -class Chart() -``` - -Extracted data from a chart. It's useful for building an interactive charts or custom visualizations. - - - - -## OutputMessage - -```python -@dataclass -class OutputMessage() -``` - -Represents an output message from the sandbox code execution. - - -### line - -The output line. - - -### timestamp - -Unix epoch in nanoseconds - - -### error - -Whether the output is an error. - - -## ExecutionError - -```python -@dataclass -class ExecutionError() -``` - -Represents an error that occurred during the execution of a cell. -The error contains the name of the error, the value of the error, and the traceback. - - -### name - -Name of the error. - - -### value - -Value of the error. - - -### traceback - -The raw traceback of the error. - - -### to\_json - -```python -def to_json() -> str -``` - -Returns the JSON representation of the Error object. - - -## MIMEType - -```python -class MIMEType(str) -``` - -Represents a MIME type. - - -## Result - -```python -@dataclass -class Result() -``` - -Represents the data to be displayed as a result of executing a cell in a Jupyter notebook. -The result is similar to the structure returned by ipython kernel: https://ipython.readthedocs.io/en/stable/development/execution.html#execution-semantics - -The result can contain multiple types of data, such as text, images, plots, etc. Each type of data is represented -as a string, and the result can contain multiple types of data. The display calls don't have to have text representation, -for the actual result the representation is always present for the result, the other representations are always optional. - - -### is\_main\_result - -Whether this data is the result of the cell. Data can be produced by display calls of which can be multiple in a cell. - - -### extra - -Extra data that can be included. Not part of the standard types. - - -### formats - -```python -def formats() -> Iterable[str] -``` - -Returns all available formats of the result. - -**Returns**: - -All available formats of the result in MIME types. - - -### \_\_str\_\_ - -```python -def __str__() -> Optional[str] -``` - -Returns the text representation of the data. - -**Returns**: - -The text representation of the data. - - -### \_repr\_html\_ - -```python -def _repr_html_() -> Optional[str] -``` - -Returns the HTML representation of the data. - -**Returns**: - -The HTML representation of the data. - - -### \_repr\_markdown\_ - -```python -def _repr_markdown_() -> Optional[str] -``` - -Returns the Markdown representation of the data. - -**Returns**: - -The Markdown representation of the data. - - -### \_repr\_svg\_ - -```python -def _repr_svg_() -> Optional[str] -``` - -Returns the SVG representation of the data. - -**Returns**: - -The SVG representation of the data. - - -### \_repr\_png\_ - -```python -def _repr_png_() -> Optional[str] -``` - -Returns the base64 representation of the PNG data. - -**Returns**: - -The base64 representation of the PNG data. - - -### \_repr\_jpeg\_ - -```python -def _repr_jpeg_() -> Optional[str] -``` - -Returns the base64 representation of the JPEG data. - -**Returns**: - -The base64 representation of the JPEG data. - - -### \_repr\_pdf\_ - -```python -def _repr_pdf_() -> Optional[str] -``` - -Returns the PDF representation of the data. - -**Returns**: - -The PDF representation of the data. - - -### \_repr\_latex\_ - -```python -def _repr_latex_() -> Optional[str] -``` - -Returns the LaTeX representation of the data. - -**Returns**: - -The LaTeX representation of the data. - - -### \_repr\_json\_ - -```python -def _repr_json_() -> Optional[dict] -``` - -Returns the JSON representation of the data. - -**Returns**: - -The JSON representation of the data. - - -### \_repr\_javascript\_ - -```python -def _repr_javascript_() -> Optional[str] -``` - -Returns the JavaScript representation of the data. - -**Returns**: - -The JavaScript representation of the data. - - -## Logs - -```python -@dataclass(repr=False) -class Logs() -``` - -Data printed to stdout and stderr during execution, usually by print statements, logs, warnings, subprocesses, etc. - - -### stdout - -List of strings printed to stdout by prints, subprocesses, etc. - - -### stderr - -List of strings printed to stderr by prints, subprocesses, etc. - - -### to\_json - -```python -def to_json() -> str -``` - -Returns the JSON representation of the Logs object. - - -### serialize\_results - -```python -def serialize_results(results: List[Result]) -> List[Dict[str, str]] -``` - -Serializes the results to JSON. - - -## Execution - -```python -@dataclass(repr=False) -class Execution() -``` - -Represents the result of a cell execution. - - -### results - -List of the result of the cell (interactively interpreted last line), display calls (e.g. matplotlib plots). - - -### logs - -Logs printed to stdout and stderr during execution. - - -### error - -Error object if an error occurred, None otherwise. - - -### execution\_count - -Execution count of the cell. - - -### text - -```python -@property -def text() -> Optional[str] -``` - -Returns the text representation of the result. - -**Returns**: - -The text representation of the result. - - -### to\_json - -```python -def to_json() -> str -``` - -Returns the JSON representation of the Execution object. - - -## Context - -```python -@dataclass -class Context() -``` - -Represents a context for code execution. - - -### id - -The ID of the context. - - -### language - -The language of the context. - - -### cwd - -The working directory of the context. - - - - -## AsyncSandbox - -```python -class AsyncSandbox(BaseAsyncSandbox) -``` - -E2B cloud sandbox is a secure and isolated cloud environment. - -The sandbox allows you to: -- Access Linux OS -- Create, list, and delete files and directories -- Run commands -- Run isolated code -- Access the internet - -Check docs [here](https://e2b.dev/docs). - -Use the `AsyncSandbox.create()` to create a new sandbox. - -**Example**: - -```python -from e2b_code_interpreter import AsyncSandbox -sandbox = await AsyncSandbox.create() -``` - - -### run\_code - -```python -@overload -async def run_code(code: str, - language: Union[Literal["python"], None] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code as Python. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -async def run_code(code: str, - language: Optional[str] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code for the specified language. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. -If no language is specified, Python is used. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -async def run_code(code: str, - context: Optional[Context] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code in the specified context, if not specified, the default context is used. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `context`: Concrete context to run the code in. If not specified, the default context for the language is used. It's mutually exclusive with the language. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### create\_code\_context - -```python -async def create_code_context( - cwd: Optional[str] = None, - language: Optional[str] = None, - request_timeout: Optional[float] = None) -> Context -``` - -Creates a new context to run code in. - -**Arguments**: - -- `cwd`: Set the current working directory for the context, defaults to `/home/user` -- `language`: Language of the context. If not specified, defaults to Python -- `request_timeout`: Timeout for the request in **milliseconds** - -**Returns**: - -Context object - - - diff --git a/sdk-reference/code-interpreter-python-sdk/v1.5.0/sandbox/page.mdx b/sdk-reference/code-interpreter-python-sdk/v1.5.0/sandbox/page.mdx deleted file mode 100644 index 6bee4003..00000000 --- a/sdk-reference/code-interpreter-python-sdk/v1.5.0/sandbox/page.mdx +++ /dev/null @@ -1,722 +0,0 @@ - - - - - -## OutputMessage - -```python -@dataclass -class OutputMessage() -``` - -Represents an output message from the sandbox code execution. - - -### line - -The output line. - - -### timestamp - -Unix epoch in nanoseconds - - -### error - -Whether the output is an error. - - -## ExecutionError - -```python -@dataclass -class ExecutionError() -``` - -Represents an error that occurred during the execution of a cell. -The error contains the name of the error, the value of the error, and the traceback. - - -### name - -Name of the error. - - -### value - -Value of the error. - - -### traceback - -The raw traceback of the error. - - -### to\_json - -```python -def to_json() -> str -``` - -Returns the JSON representation of the Error object. - - -## MIMEType - -```python -class MIMEType(str) -``` - -Represents a MIME type. - - -## Result - -```python -@dataclass -class Result() -``` - -Represents the data to be displayed as a result of executing a cell in a Jupyter notebook. -The result is similar to the structure returned by ipython kernel: https://ipython.readthedocs.io/en/stable/development/execution.html#execution-semantics - -The result can contain multiple types of data, such as text, images, plots, etc. Each type of data is represented -as a string, and the result can contain multiple types of data. The display calls don't have to have text representation, -for the actual result the representation is always present for the result, the other representations are always optional. - - -### is\_main\_result - -Whether this data is the result of the cell. Data can be produced by display calls of which can be multiple in a cell. - - -### extra - -Extra data that can be included. Not part of the standard types. - - -### formats - -```python -def formats() -> Iterable[str] -``` - -Returns all available formats of the result. - -**Returns**: - -All available formats of the result in MIME types. - - -### \_\_str\_\_ - -```python -def __str__() -> Optional[str] -``` - -Returns the text representation of the data. - -**Returns**: - -The text representation of the data. - - -### \_repr\_html\_ - -```python -def _repr_html_() -> Optional[str] -``` - -Returns the HTML representation of the data. - -**Returns**: - -The HTML representation of the data. - - -### \_repr\_markdown\_ - -```python -def _repr_markdown_() -> Optional[str] -``` - -Returns the Markdown representation of the data. - -**Returns**: - -The Markdown representation of the data. - - -### \_repr\_svg\_ - -```python -def _repr_svg_() -> Optional[str] -``` - -Returns the SVG representation of the data. - -**Returns**: - -The SVG representation of the data. - - -### \_repr\_png\_ - -```python -def _repr_png_() -> Optional[str] -``` - -Returns the base64 representation of the PNG data. - -**Returns**: - -The base64 representation of the PNG data. - - -### \_repr\_jpeg\_ - -```python -def _repr_jpeg_() -> Optional[str] -``` - -Returns the base64 representation of the JPEG data. - -**Returns**: - -The base64 representation of the JPEG data. - - -### \_repr\_pdf\_ - -```python -def _repr_pdf_() -> Optional[str] -``` - -Returns the PDF representation of the data. - -**Returns**: - -The PDF representation of the data. - - -### \_repr\_latex\_ - -```python -def _repr_latex_() -> Optional[str] -``` - -Returns the LaTeX representation of the data. - -**Returns**: - -The LaTeX representation of the data. - - -### \_repr\_json\_ - -```python -def _repr_json_() -> Optional[dict] -``` - -Returns the JSON representation of the data. - -**Returns**: - -The JSON representation of the data. - - -### \_repr\_javascript\_ - -```python -def _repr_javascript_() -> Optional[str] -``` - -Returns the JavaScript representation of the data. - -**Returns**: - -The JavaScript representation of the data. - - -## Logs - -```python -@dataclass(repr=False) -class Logs() -``` - -Data printed to stdout and stderr during execution, usually by print statements, logs, warnings, subprocesses, etc. - - -### stdout - -List of strings printed to stdout by prints, subprocesses, etc. - - -### stderr - -List of strings printed to stderr by prints, subprocesses, etc. - - -### to\_json - -```python -def to_json() -> str -``` - -Returns the JSON representation of the Logs object. - - -### serialize\_results - -```python -def serialize_results(results: List[Result]) -> List[Dict[str, str]] -``` - -Serializes the results to JSON. - - -## Execution - -```python -@dataclass(repr=False) -class Execution() -``` - -Represents the result of a cell execution. - - -### results - -List of the result of the cell (interactively interpreted last line), display calls (e.g. matplotlib plots). - - -### logs - -Logs printed to stdout and stderr during execution. - - -### error - -Error object if an error occurred, None otherwise. - - -### execution\_count - -Execution count of the cell. - - -### text - -```python -@property -def text() -> Optional[str] -``` - -Returns the text representation of the result. - -**Returns**: - -The text representation of the result. - - -### to\_json - -```python -def to_json() -> str -``` - -Returns the JSON representation of the Execution object. - - -## Context - -```python -@dataclass -class Context() -``` - -Represents a context for code execution. - - -### id - -The ID of the context. - - -### language - -The language of the context. - - -### cwd - -The working directory of the context. - - - - - - -## AsyncSandbox - -```python -class AsyncSandbox(BaseAsyncSandbox) -``` - -E2B cloud sandbox is a secure and isolated cloud environment. - -The sandbox allows you to: -- Access Linux OS -- Create, list, and delete files and directories -- Run commands -- Run isolated code -- Access the internet - -Check docs [here](https://e2b.dev/docs). - -Use the `AsyncSandbox.create()` to create a new sandbox. - -**Example**: - -```python -from e2b_code_interpreter import AsyncSandbox -sandbox = await AsyncSandbox.create() -``` - - -### run\_code - -```python -@overload -async def run_code(code: str, - language: Union[Literal["python"], None] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code as Python. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -async def run_code(code: str, - language: Optional[str] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code for the specified language. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. -If no language is specified, Python is used. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -async def run_code(code: str, - context: Optional[Context] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code in the specified context, if not specified, the default context is used. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `context`: Concrete context to run the code in. If not specified, the default context for the language is used. It's mutually exclusive with the language. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### create\_code\_context - -```python -async def create_code_context( - cwd: Optional[str] = None, - language: Optional[str] = None, - request_timeout: Optional[float] = None) -> Context -``` - -Creates a new context to run code in. - -**Arguments**: - -- `cwd`: Set the current working directory for the context, defaults to `/home/user` -- `language`: Language of the context. If not specified, defaults to Python -- `request_timeout`: Timeout for the request in **milliseconds** - -**Returns**: - -Context object - - - - -## ChartType - -```python -class ChartType(str, enum.Enum) -``` - -Chart types - - -## ScaleType - -```python -class ScaleType(str, enum.Enum) -``` - -Ax scale types - - -## Chart - -```python -class Chart() -``` - -Extracted data from a chart. It's useful for building an interactive charts or custom visualizations. - - - - - - -## Sandbox - -```python -class Sandbox(BaseSandbox) -``` - -E2B cloud sandbox is a secure and isolated cloud environment. - -The sandbox allows you to: -- Access Linux OS -- Create, list, and delete files and directories -- Run commands -- Run isolated code -- Access the internet - -Check docs [here](https://e2b.dev/docs). - -Use the `Sandbox()` to create a new sandbox. - -**Example**: - -```python -from e2b_code_interpreter import Sandbox - -sandbox = Sandbox() -``` - - -### run\_code - -```python -@overload -def run_code(code: str, - language: Union[Literal["python"], None] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code as Python. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -def run_code(code: str, - language: Optional[str] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code for the specified language. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. -If no language is specified, Python is used. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -def run_code(code: str, - context: Optional[Context] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code in the specified context, if not specified, the default context is used. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `context`: Concrete context to run the code in. If not specified, the default context for the language is used. It's mutually exclusive with the language. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### create\_code\_context - -```python -def create_code_context(cwd: Optional[str] = None, - language: Optional[str] = None, - request_timeout: Optional[float] = None) -> Context -``` - -Creates a new context to run code in. - -**Arguments**: - -- `cwd`: Set the current working directory for the context, defaults to `/home/user` -- `language`: Language of the context. If not specified, defaults to Python -- `request_timeout`: Timeout for the request in **milliseconds** - -**Returns**: - -Context object - diff --git a/sdk-reference/code-interpreter-python-sdk/v1.5.1/sandbox/page.mdx b/sdk-reference/code-interpreter-python-sdk/v1.5.1/sandbox/page.mdx deleted file mode 100644 index 6bee4003..00000000 --- a/sdk-reference/code-interpreter-python-sdk/v1.5.1/sandbox/page.mdx +++ /dev/null @@ -1,722 +0,0 @@ - - - - - -## OutputMessage - -```python -@dataclass -class OutputMessage() -``` - -Represents an output message from the sandbox code execution. - - -### line - -The output line. - - -### timestamp - -Unix epoch in nanoseconds - - -### error - -Whether the output is an error. - - -## ExecutionError - -```python -@dataclass -class ExecutionError() -``` - -Represents an error that occurred during the execution of a cell. -The error contains the name of the error, the value of the error, and the traceback. - - -### name - -Name of the error. - - -### value - -Value of the error. - - -### traceback - -The raw traceback of the error. - - -### to\_json - -```python -def to_json() -> str -``` - -Returns the JSON representation of the Error object. - - -## MIMEType - -```python -class MIMEType(str) -``` - -Represents a MIME type. - - -## Result - -```python -@dataclass -class Result() -``` - -Represents the data to be displayed as a result of executing a cell in a Jupyter notebook. -The result is similar to the structure returned by ipython kernel: https://ipython.readthedocs.io/en/stable/development/execution.html#execution-semantics - -The result can contain multiple types of data, such as text, images, plots, etc. Each type of data is represented -as a string, and the result can contain multiple types of data. The display calls don't have to have text representation, -for the actual result the representation is always present for the result, the other representations are always optional. - - -### is\_main\_result - -Whether this data is the result of the cell. Data can be produced by display calls of which can be multiple in a cell. - - -### extra - -Extra data that can be included. Not part of the standard types. - - -### formats - -```python -def formats() -> Iterable[str] -``` - -Returns all available formats of the result. - -**Returns**: - -All available formats of the result in MIME types. - - -### \_\_str\_\_ - -```python -def __str__() -> Optional[str] -``` - -Returns the text representation of the data. - -**Returns**: - -The text representation of the data. - - -### \_repr\_html\_ - -```python -def _repr_html_() -> Optional[str] -``` - -Returns the HTML representation of the data. - -**Returns**: - -The HTML representation of the data. - - -### \_repr\_markdown\_ - -```python -def _repr_markdown_() -> Optional[str] -``` - -Returns the Markdown representation of the data. - -**Returns**: - -The Markdown representation of the data. - - -### \_repr\_svg\_ - -```python -def _repr_svg_() -> Optional[str] -``` - -Returns the SVG representation of the data. - -**Returns**: - -The SVG representation of the data. - - -### \_repr\_png\_ - -```python -def _repr_png_() -> Optional[str] -``` - -Returns the base64 representation of the PNG data. - -**Returns**: - -The base64 representation of the PNG data. - - -### \_repr\_jpeg\_ - -```python -def _repr_jpeg_() -> Optional[str] -``` - -Returns the base64 representation of the JPEG data. - -**Returns**: - -The base64 representation of the JPEG data. - - -### \_repr\_pdf\_ - -```python -def _repr_pdf_() -> Optional[str] -``` - -Returns the PDF representation of the data. - -**Returns**: - -The PDF representation of the data. - - -### \_repr\_latex\_ - -```python -def _repr_latex_() -> Optional[str] -``` - -Returns the LaTeX representation of the data. - -**Returns**: - -The LaTeX representation of the data. - - -### \_repr\_json\_ - -```python -def _repr_json_() -> Optional[dict] -``` - -Returns the JSON representation of the data. - -**Returns**: - -The JSON representation of the data. - - -### \_repr\_javascript\_ - -```python -def _repr_javascript_() -> Optional[str] -``` - -Returns the JavaScript representation of the data. - -**Returns**: - -The JavaScript representation of the data. - - -## Logs - -```python -@dataclass(repr=False) -class Logs() -``` - -Data printed to stdout and stderr during execution, usually by print statements, logs, warnings, subprocesses, etc. - - -### stdout - -List of strings printed to stdout by prints, subprocesses, etc. - - -### stderr - -List of strings printed to stderr by prints, subprocesses, etc. - - -### to\_json - -```python -def to_json() -> str -``` - -Returns the JSON representation of the Logs object. - - -### serialize\_results - -```python -def serialize_results(results: List[Result]) -> List[Dict[str, str]] -``` - -Serializes the results to JSON. - - -## Execution - -```python -@dataclass(repr=False) -class Execution() -``` - -Represents the result of a cell execution. - - -### results - -List of the result of the cell (interactively interpreted last line), display calls (e.g. matplotlib plots). - - -### logs - -Logs printed to stdout and stderr during execution. - - -### error - -Error object if an error occurred, None otherwise. - - -### execution\_count - -Execution count of the cell. - - -### text - -```python -@property -def text() -> Optional[str] -``` - -Returns the text representation of the result. - -**Returns**: - -The text representation of the result. - - -### to\_json - -```python -def to_json() -> str -``` - -Returns the JSON representation of the Execution object. - - -## Context - -```python -@dataclass -class Context() -``` - -Represents a context for code execution. - - -### id - -The ID of the context. - - -### language - -The language of the context. - - -### cwd - -The working directory of the context. - - - - - - -## AsyncSandbox - -```python -class AsyncSandbox(BaseAsyncSandbox) -``` - -E2B cloud sandbox is a secure and isolated cloud environment. - -The sandbox allows you to: -- Access Linux OS -- Create, list, and delete files and directories -- Run commands -- Run isolated code -- Access the internet - -Check docs [here](https://e2b.dev/docs). - -Use the `AsyncSandbox.create()` to create a new sandbox. - -**Example**: - -```python -from e2b_code_interpreter import AsyncSandbox -sandbox = await AsyncSandbox.create() -``` - - -### run\_code - -```python -@overload -async def run_code(code: str, - language: Union[Literal["python"], None] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code as Python. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -async def run_code(code: str, - language: Optional[str] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code for the specified language. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. -If no language is specified, Python is used. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -async def run_code(code: str, - context: Optional[Context] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code in the specified context, if not specified, the default context is used. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `context`: Concrete context to run the code in. If not specified, the default context for the language is used. It's mutually exclusive with the language. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### create\_code\_context - -```python -async def create_code_context( - cwd: Optional[str] = None, - language: Optional[str] = None, - request_timeout: Optional[float] = None) -> Context -``` - -Creates a new context to run code in. - -**Arguments**: - -- `cwd`: Set the current working directory for the context, defaults to `/home/user` -- `language`: Language of the context. If not specified, defaults to Python -- `request_timeout`: Timeout for the request in **milliseconds** - -**Returns**: - -Context object - - - - -## ChartType - -```python -class ChartType(str, enum.Enum) -``` - -Chart types - - -## ScaleType - -```python -class ScaleType(str, enum.Enum) -``` - -Ax scale types - - -## Chart - -```python -class Chart() -``` - -Extracted data from a chart. It's useful for building an interactive charts or custom visualizations. - - - - - - -## Sandbox - -```python -class Sandbox(BaseSandbox) -``` - -E2B cloud sandbox is a secure and isolated cloud environment. - -The sandbox allows you to: -- Access Linux OS -- Create, list, and delete files and directories -- Run commands -- Run isolated code -- Access the internet - -Check docs [here](https://e2b.dev/docs). - -Use the `Sandbox()` to create a new sandbox. - -**Example**: - -```python -from e2b_code_interpreter import Sandbox - -sandbox = Sandbox() -``` - - -### run\_code - -```python -@overload -def run_code(code: str, - language: Union[Literal["python"], None] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code as Python. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -def run_code(code: str, - language: Optional[str] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code for the specified language. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. -If no language is specified, Python is used. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -def run_code(code: str, - context: Optional[Context] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code in the specified context, if not specified, the default context is used. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `context`: Concrete context to run the code in. If not specified, the default context for the language is used. It's mutually exclusive with the language. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### create\_code\_context - -```python -def create_code_context(cwd: Optional[str] = None, - language: Optional[str] = None, - request_timeout: Optional[float] = None) -> Context -``` - -Creates a new context to run code in. - -**Arguments**: - -- `cwd`: Set the current working directory for the context, defaults to `/home/user` -- `language`: Language of the context. If not specified, defaults to Python -- `request_timeout`: Timeout for the request in **milliseconds** - -**Returns**: - -Context object - diff --git a/sdk-reference/code-interpreter-python-sdk/v1.5.2/sandbox/page.mdx b/sdk-reference/code-interpreter-python-sdk/v1.5.2/sandbox/page.mdx deleted file mode 100644 index 80c7f2cd..00000000 --- a/sdk-reference/code-interpreter-python-sdk/v1.5.2/sandbox/page.mdx +++ /dev/null @@ -1,722 +0,0 @@ - - - - - - - -## AsyncSandbox - -```python -class AsyncSandbox(BaseAsyncSandbox) -``` - -E2B cloud sandbox is a secure and isolated cloud environment. - -The sandbox allows you to: -- Access Linux OS -- Create, list, and delete files and directories -- Run commands -- Run isolated code -- Access the internet - -Check docs [here](https://e2b.dev/docs). - -Use the `AsyncSandbox.create()` to create a new sandbox. - -**Example**: - -```python -from e2b_code_interpreter import AsyncSandbox -sandbox = await AsyncSandbox.create() -``` - - -### run\_code - -```python -@overload -async def run_code(code: str, - language: Union[Literal["python"], None] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code as Python. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -async def run_code(code: str, - language: Optional[str] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code for the specified language. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. -If no language is specified, Python is used. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -async def run_code(code: str, - context: Optional[Context] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code in the specified context, if not specified, the default context is used. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `context`: Concrete context to run the code in. If not specified, the default context for the language is used. It's mutually exclusive with the language. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### create\_code\_context - -```python -async def create_code_context( - cwd: Optional[str] = None, - language: Optional[str] = None, - request_timeout: Optional[float] = None) -> Context -``` - -Creates a new context to run code in. - -**Arguments**: - -- `cwd`: Set the current working directory for the context, defaults to `/home/user` -- `language`: Language of the context. If not specified, defaults to Python -- `request_timeout`: Timeout for the request in **milliseconds** - -**Returns**: - -Context object - - - - -## Sandbox - -```python -class Sandbox(BaseSandbox) -``` - -E2B cloud sandbox is a secure and isolated cloud environment. - -The sandbox allows you to: -- Access Linux OS -- Create, list, and delete files and directories -- Run commands -- Run isolated code -- Access the internet - -Check docs [here](https://e2b.dev/docs). - -Use the `Sandbox()` to create a new sandbox. - -**Example**: - -```python -from e2b_code_interpreter import Sandbox - -sandbox = Sandbox() -``` - - -### run\_code - -```python -@overload -def run_code(code: str, - language: Union[Literal["python"], None] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code as Python. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -def run_code(code: str, - language: Optional[str] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code for the specified language. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. -If no language is specified, Python is used. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -def run_code(code: str, - context: Optional[Context] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code in the specified context, if not specified, the default context is used. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `context`: Concrete context to run the code in. If not specified, the default context for the language is used. It's mutually exclusive with the language. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### create\_code\_context - -```python -def create_code_context(cwd: Optional[str] = None, - language: Optional[str] = None, - request_timeout: Optional[float] = None) -> Context -``` - -Creates a new context to run code in. - -**Arguments**: - -- `cwd`: Set the current working directory for the context, defaults to `/home/user` -- `language`: Language of the context. If not specified, defaults to Python -- `request_timeout`: Timeout for the request in **milliseconds** - -**Returns**: - -Context object - - - - -## OutputMessage - -```python -@dataclass -class OutputMessage() -``` - -Represents an output message from the sandbox code execution. - - -### line - -The output line. - - -### timestamp - -Unix epoch in nanoseconds - - -### error - -Whether the output is an error. - - -## ExecutionError - -```python -@dataclass -class ExecutionError() -``` - -Represents an error that occurred during the execution of a cell. -The error contains the name of the error, the value of the error, and the traceback. - - -### name - -Name of the error. - - -### value - -Value of the error. - - -### traceback - -The raw traceback of the error. - - -### to\_json - -```python -def to_json() -> str -``` - -Returns the JSON representation of the Error object. - - -## MIMEType - -```python -class MIMEType(str) -``` - -Represents a MIME type. - - -## Result - -```python -@dataclass -class Result() -``` - -Represents the data to be displayed as a result of executing a cell in a Jupyter notebook. -The result is similar to the structure returned by ipython kernel: https://ipython.readthedocs.io/en/stable/development/execution.html#execution-semantics - -The result can contain multiple types of data, such as text, images, plots, etc. Each type of data is represented -as a string, and the result can contain multiple types of data. The display calls don't have to have text representation, -for the actual result the representation is always present for the result, the other representations are always optional. - - -### is\_main\_result - -Whether this data is the result of the cell. Data can be produced by display calls of which can be multiple in a cell. - - -### extra - -Extra data that can be included. Not part of the standard types. - - -### formats - -```python -def formats() -> Iterable[str] -``` - -Returns all available formats of the result. - -**Returns**: - -All available formats of the result in MIME types. - - -### \_\_str\_\_ - -```python -def __str__() -> Optional[str] -``` - -Returns the text representation of the data. - -**Returns**: - -The text representation of the data. - - -### \_repr\_html\_ - -```python -def _repr_html_() -> Optional[str] -``` - -Returns the HTML representation of the data. - -**Returns**: - -The HTML representation of the data. - - -### \_repr\_markdown\_ - -```python -def _repr_markdown_() -> Optional[str] -``` - -Returns the Markdown representation of the data. - -**Returns**: - -The Markdown representation of the data. - - -### \_repr\_svg\_ - -```python -def _repr_svg_() -> Optional[str] -``` - -Returns the SVG representation of the data. - -**Returns**: - -The SVG representation of the data. - - -### \_repr\_png\_ - -```python -def _repr_png_() -> Optional[str] -``` - -Returns the base64 representation of the PNG data. - -**Returns**: - -The base64 representation of the PNG data. - - -### \_repr\_jpeg\_ - -```python -def _repr_jpeg_() -> Optional[str] -``` - -Returns the base64 representation of the JPEG data. - -**Returns**: - -The base64 representation of the JPEG data. - - -### \_repr\_pdf\_ - -```python -def _repr_pdf_() -> Optional[str] -``` - -Returns the PDF representation of the data. - -**Returns**: - -The PDF representation of the data. - - -### \_repr\_latex\_ - -```python -def _repr_latex_() -> Optional[str] -``` - -Returns the LaTeX representation of the data. - -**Returns**: - -The LaTeX representation of the data. - - -### \_repr\_json\_ - -```python -def _repr_json_() -> Optional[dict] -``` - -Returns the JSON representation of the data. - -**Returns**: - -The JSON representation of the data. - - -### \_repr\_javascript\_ - -```python -def _repr_javascript_() -> Optional[str] -``` - -Returns the JavaScript representation of the data. - -**Returns**: - -The JavaScript representation of the data. - - -## Logs - -```python -@dataclass(repr=False) -class Logs() -``` - -Data printed to stdout and stderr during execution, usually by print statements, logs, warnings, subprocesses, etc. - - -### stdout - -List of strings printed to stdout by prints, subprocesses, etc. - - -### stderr - -List of strings printed to stderr by prints, subprocesses, etc. - - -### to\_json - -```python -def to_json() -> str -``` - -Returns the JSON representation of the Logs object. - - -### serialize\_results - -```python -def serialize_results(results: List[Result]) -> List[Dict[str, str]] -``` - -Serializes the results to JSON. - - -## Execution - -```python -@dataclass(repr=False) -class Execution() -``` - -Represents the result of a cell execution. - - -### results - -List of the result of the cell (interactively interpreted last line), display calls (e.g. matplotlib plots). - - -### logs - -Logs printed to stdout and stderr during execution. - - -### error - -Error object if an error occurred, None otherwise. - - -### execution\_count - -Execution count of the cell. - - -### text - -```python -@property -def text() -> Optional[str] -``` - -Returns the text representation of the result. - -**Returns**: - -The text representation of the result. - - -### to\_json - -```python -def to_json() -> str -``` - -Returns the JSON representation of the Execution object. - - -## Context - -```python -@dataclass -class Context() -``` - -Represents a context for code execution. - - -### id - -The ID of the context. - - -### language - -The language of the context. - - -### cwd - -The working directory of the context. - - - - - - -## ChartType - -```python -class ChartType(str, enum.Enum) -``` - -Chart types - - -## ScaleType - -```python -class ScaleType(str, enum.Enum) -``` - -Ax scale types - - -## Chart - -```python -class Chart() -``` - -Extracted data from a chart. It's useful for building an interactive charts or custom visualizations. - diff --git a/sdk-reference/code-interpreter-python-sdk/v2.0.0/sandbox/page.mdx b/sdk-reference/code-interpreter-python-sdk/v2.0.0/sandbox/page.mdx deleted file mode 100644 index a3bb8d72..00000000 --- a/sdk-reference/code-interpreter-python-sdk/v2.0.0/sandbox/page.mdx +++ /dev/null @@ -1,722 +0,0 @@ - - - - - - - -## AsyncSandbox - -```python -class AsyncSandbox(BaseAsyncSandbox) -``` - -E2B cloud sandbox is a secure and isolated cloud environment. - -The sandbox allows you to: -- Access Linux OS -- Create, list, and delete files and directories -- Run commands -- Run isolated code -- Access the internet - -Check docs [here](https://e2b.dev/docs). - -Use the `AsyncSandbox.create()` to create a new sandbox. - -**Example**: - -```python -from e2b_code_interpreter import AsyncSandbox -sandbox = await AsyncSandbox.create() -``` - - -### run\_code - -```python -@overload -async def run_code(code: str, - language: Union[Literal["python"], None] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code as Python. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -async def run_code(code: str, - language: Optional[str] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code for the specified language. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. -If no language is specified, Python is used. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -async def run_code(code: str, - context: Optional[Context] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code in the specified context, if not specified, the default context is used. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `context`: Concrete context to run the code in. If not specified, the default context for the language is used. It's mutually exclusive with the language. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### create\_code\_context - -```python -async def create_code_context( - cwd: Optional[str] = None, - language: Optional[str] = None, - request_timeout: Optional[float] = None) -> Context -``` - -Creates a new context to run code in. - -**Arguments**: - -- `cwd`: Set the current working directory for the context, defaults to `/home/user` -- `language`: Language of the context. If not specified, defaults to Python -- `request_timeout`: Timeout for the request in **milliseconds** - -**Returns**: - -Context object - - - - -## Sandbox - -```python -class Sandbox(BaseSandbox) -``` - -E2B cloud sandbox is a secure and isolated cloud environment. - -The sandbox allows you to: -- Access Linux OS -- Create, list, and delete files and directories -- Run commands -- Run isolated code -- Access the internet - -Check docs [here](https://e2b.dev/docs). - -Use the `Sandbox.create()` to create a new sandbox. - -**Example**: - -```python -from e2b_code_interpreter import Sandbox - -sandbox = Sandbox.create() -``` - - -### run\_code - -```python -@overload -def run_code(code: str, - language: Union[Literal["python"], None] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code as Python. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -def run_code(code: str, - language: Optional[str] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code for the specified language. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. -If no language is specified, Python is used. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -def run_code(code: str, - context: Optional[Context] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code in the specified context, if not specified, the default context is used. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `context`: Concrete context to run the code in. If not specified, the default context for the language is used. It's mutually exclusive with the language. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### create\_code\_context - -```python -def create_code_context(cwd: Optional[str] = None, - language: Optional[str] = None, - request_timeout: Optional[float] = None) -> Context -``` - -Creates a new context to run code in. - -**Arguments**: - -- `cwd`: Set the current working directory for the context, defaults to `/home/user` -- `language`: Language of the context. If not specified, defaults to Python -- `request_timeout`: Timeout for the request in **milliseconds** - -**Returns**: - -Context object - - - - -## OutputMessage - -```python -@dataclass -class OutputMessage() -``` - -Represents an output message from the sandbox code execution. - - -### line - -The output line. - - -### timestamp - -Unix epoch in nanoseconds - - -### error - -Whether the output is an error. - - -## ExecutionError - -```python -@dataclass -class ExecutionError() -``` - -Represents an error that occurred during the execution of a cell. -The error contains the name of the error, the value of the error, and the traceback. - - -### name - -Name of the error. - - -### value - -Value of the error. - - -### traceback - -The raw traceback of the error. - - -### to\_json - -```python -def to_json() -> str -``` - -Returns the JSON representation of the Error object. - - -## MIMEType - -```python -class MIMEType(str) -``` - -Represents a MIME type. - - -## Result - -```python -@dataclass -class Result() -``` - -Represents the data to be displayed as a result of executing a cell in a Jupyter notebook. -The result is similar to the structure returned by ipython kernel: https://ipython.readthedocs.io/en/stable/development/execution.html#execution-semantics - -The result can contain multiple types of data, such as text, images, plots, etc. Each type of data is represented -as a string, and the result can contain multiple types of data. The display calls don't have to have text representation, -for the actual result the representation is always present for the result, the other representations are always optional. - - -### is\_main\_result - -Whether this data is the result of the cell. Data can be produced by display calls of which can be multiple in a cell. - - -### extra - -Extra data that can be included. Not part of the standard types. - - -### formats - -```python -def formats() -> Iterable[str] -``` - -Returns all available formats of the result. - -**Returns**: - -All available formats of the result in MIME types. - - -### \_\_str\_\_ - -```python -def __str__() -> Optional[str] -``` - -Returns the text representation of the data. - -**Returns**: - -The text representation of the data. - - -### \_repr\_html\_ - -```python -def _repr_html_() -> Optional[str] -``` - -Returns the HTML representation of the data. - -**Returns**: - -The HTML representation of the data. - - -### \_repr\_markdown\_ - -```python -def _repr_markdown_() -> Optional[str] -``` - -Returns the Markdown representation of the data. - -**Returns**: - -The Markdown representation of the data. - - -### \_repr\_svg\_ - -```python -def _repr_svg_() -> Optional[str] -``` - -Returns the SVG representation of the data. - -**Returns**: - -The SVG representation of the data. - - -### \_repr\_png\_ - -```python -def _repr_png_() -> Optional[str] -``` - -Returns the base64 representation of the PNG data. - -**Returns**: - -The base64 representation of the PNG data. - - -### \_repr\_jpeg\_ - -```python -def _repr_jpeg_() -> Optional[str] -``` - -Returns the base64 representation of the JPEG data. - -**Returns**: - -The base64 representation of the JPEG data. - - -### \_repr\_pdf\_ - -```python -def _repr_pdf_() -> Optional[str] -``` - -Returns the PDF representation of the data. - -**Returns**: - -The PDF representation of the data. - - -### \_repr\_latex\_ - -```python -def _repr_latex_() -> Optional[str] -``` - -Returns the LaTeX representation of the data. - -**Returns**: - -The LaTeX representation of the data. - - -### \_repr\_json\_ - -```python -def _repr_json_() -> Optional[dict] -``` - -Returns the JSON representation of the data. - -**Returns**: - -The JSON representation of the data. - - -### \_repr\_javascript\_ - -```python -def _repr_javascript_() -> Optional[str] -``` - -Returns the JavaScript representation of the data. - -**Returns**: - -The JavaScript representation of the data. - - -## Logs - -```python -@dataclass(repr=False) -class Logs() -``` - -Data printed to stdout and stderr during execution, usually by print statements, logs, warnings, subprocesses, etc. - - -### stdout - -List of strings printed to stdout by prints, subprocesses, etc. - - -### stderr - -List of strings printed to stderr by prints, subprocesses, etc. - - -### to\_json - -```python -def to_json() -> str -``` - -Returns the JSON representation of the Logs object. - - -### serialize\_results - -```python -def serialize_results(results: List[Result]) -> List[Dict[str, str]] -``` - -Serializes the results to JSON. - - -## Execution - -```python -@dataclass(repr=False) -class Execution() -``` - -Represents the result of a cell execution. - - -### results - -List of the result of the cell (interactively interpreted last line), display calls (e.g. matplotlib plots). - - -### logs - -Logs printed to stdout and stderr during execution. - - -### error - -Error object if an error occurred, None otherwise. - - -### execution\_count - -Execution count of the cell. - - -### text - -```python -@property -def text() -> Optional[str] -``` - -Returns the text representation of the result. - -**Returns**: - -The text representation of the result. - - -### to\_json - -```python -def to_json() -> str -``` - -Returns the JSON representation of the Execution object. - - -## Context - -```python -@dataclass -class Context() -``` - -Represents a context for code execution. - - -### id - -The ID of the context. - - -### language - -The language of the context. - - -### cwd - -The working directory of the context. - - - - - - -## ChartType - -```python -class ChartType(str, enum.Enum) -``` - -Chart types - - -## ScaleType - -```python -class ScaleType(str, enum.Enum) -``` - -Ax scale types - - -## Chart - -```python -class Chart() -``` - -Extracted data from a chart. It's useful for building an interactive charts or custom visualizations. - diff --git a/sdk-reference/code-interpreter-python-sdk/v2.1.0/sandbox/page.mdx b/sdk-reference/code-interpreter-python-sdk/v2.1.0/sandbox/page.mdx deleted file mode 100644 index 8b8082cd..00000000 --- a/sdk-reference/code-interpreter-python-sdk/v2.1.0/sandbox/page.mdx +++ /dev/null @@ -1,722 +0,0 @@ - - - - - -## Sandbox - -```python -class Sandbox(BaseSandbox) -``` - -E2B cloud sandbox is a secure and isolated cloud environment. - -The sandbox allows you to: -- Access Linux OS -- Create, list, and delete files and directories -- Run commands -- Run isolated code -- Access the internet - -Check docs [here](https://e2b.dev/docs). - -Use the `Sandbox.create()` to create a new sandbox. - -**Example**: - -```python -from e2b_code_interpreter import Sandbox - -sandbox = Sandbox.create() -``` - - -### run\_code - -```python -@overload -def run_code(code: str, - language: Union[Literal["python"], None] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code as Python. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -def run_code(code: str, - language: Optional[str] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code for the specified language. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. -If no language is specified, Python is used. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -def run_code(code: str, - context: Optional[Context] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code in the specified context, if not specified, the default context is used. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `context`: Concrete context to run the code in. If not specified, the default context for the language is used. It's mutually exclusive with the language. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### create\_code\_context - -```python -def create_code_context(cwd: Optional[str] = None, - language: Optional[str] = None, - request_timeout: Optional[float] = None) -> Context -``` - -Creates a new context to run code in. - -**Arguments**: - -- `cwd`: Set the current working directory for the context, defaults to `/home/user` -- `language`: Language of the context. If not specified, defaults to Python -- `request_timeout`: Timeout for the request in **milliseconds** - -**Returns**: - -Context object - - - - - - - - -## ChartType - -```python -class ChartType(str, enum.Enum) -``` - -Chart types - - -## ScaleType - -```python -class ScaleType(str, enum.Enum) -``` - -Ax scale types - - -## Chart - -```python -class Chart() -``` - -Extracted data from a chart. It's useful for building an interactive charts or custom visualizations. - - - - -## AsyncSandbox - -```python -class AsyncSandbox(BaseAsyncSandbox) -``` - -E2B cloud sandbox is a secure and isolated cloud environment. - -The sandbox allows you to: -- Access Linux OS -- Create, list, and delete files and directories -- Run commands -- Run isolated code -- Access the internet - -Check docs [here](https://e2b.dev/docs). - -Use the `AsyncSandbox.create()` to create a new sandbox. - -**Example**: - -```python -from e2b_code_interpreter import AsyncSandbox -sandbox = await AsyncSandbox.create() -``` - - -### run\_code - -```python -@overload -async def run_code(code: str, - language: Union[Literal["python"], None] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code as Python. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -async def run_code(code: str, - language: Optional[str] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code for the specified language. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. -If no language is specified, Python is used. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -async def run_code(code: str, - context: Optional[Context] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code in the specified context, if not specified, the default context is used. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `context`: Concrete context to run the code in. If not specified, the default context for the language is used. It's mutually exclusive with the language. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### create\_code\_context - -```python -async def create_code_context( - cwd: Optional[str] = None, - language: Optional[str] = None, - request_timeout: Optional[float] = None) -> Context -``` - -Creates a new context to run code in. - -**Arguments**: - -- `cwd`: Set the current working directory for the context, defaults to `/home/user` -- `language`: Language of the context. If not specified, defaults to Python -- `request_timeout`: Timeout for the request in **milliseconds** - -**Returns**: - -Context object - - - - -## OutputMessage - -```python -@dataclass -class OutputMessage() -``` - -Represents an output message from the sandbox code execution. - - -### line - -The output line. - - -### timestamp - -Unix epoch in nanoseconds - - -### error - -Whether the output is an error. - - -## ExecutionError - -```python -@dataclass -class ExecutionError() -``` - -Represents an error that occurred during the execution of a cell. -The error contains the name of the error, the value of the error, and the traceback. - - -### name - -Name of the error. - - -### value - -Value of the error. - - -### traceback - -The raw traceback of the error. - - -### to\_json - -```python -def to_json() -> str -``` - -Returns the JSON representation of the Error object. - - -## MIMEType - -```python -class MIMEType(str) -``` - -Represents a MIME type. - - -## Result - -```python -@dataclass -class Result() -``` - -Represents the data to be displayed as a result of executing a cell in a Jupyter notebook. -The result is similar to the structure returned by ipython kernel: https://ipython.readthedocs.io/en/stable/development/execution.html#execution-semantics - -The result can contain multiple types of data, such as text, images, plots, etc. Each type of data is represented -as a string, and the result can contain multiple types of data. The display calls don't have to have text representation, -for the actual result the representation is always present for the result, the other representations are always optional. - - -### is\_main\_result - -Whether this data is the result of the cell. Data can be produced by display calls of which can be multiple in a cell. - - -### extra - -Extra data that can be included. Not part of the standard types. - - -### formats - -```python -def formats() -> Iterable[str] -``` - -Returns all available formats of the result. - -**Returns**: - -All available formats of the result in MIME types. - - -### \_\_str\_\_ - -```python -def __str__() -> Optional[str] -``` - -Returns the text representation of the data. - -**Returns**: - -The text representation of the data. - - -### \_repr\_html\_ - -```python -def _repr_html_() -> Optional[str] -``` - -Returns the HTML representation of the data. - -**Returns**: - -The HTML representation of the data. - - -### \_repr\_markdown\_ - -```python -def _repr_markdown_() -> Optional[str] -``` - -Returns the Markdown representation of the data. - -**Returns**: - -The Markdown representation of the data. - - -### \_repr\_svg\_ - -```python -def _repr_svg_() -> Optional[str] -``` - -Returns the SVG representation of the data. - -**Returns**: - -The SVG representation of the data. - - -### \_repr\_png\_ - -```python -def _repr_png_() -> Optional[str] -``` - -Returns the base64 representation of the PNG data. - -**Returns**: - -The base64 representation of the PNG data. - - -### \_repr\_jpeg\_ - -```python -def _repr_jpeg_() -> Optional[str] -``` - -Returns the base64 representation of the JPEG data. - -**Returns**: - -The base64 representation of the JPEG data. - - -### \_repr\_pdf\_ - -```python -def _repr_pdf_() -> Optional[str] -``` - -Returns the PDF representation of the data. - -**Returns**: - -The PDF representation of the data. - - -### \_repr\_latex\_ - -```python -def _repr_latex_() -> Optional[str] -``` - -Returns the LaTeX representation of the data. - -**Returns**: - -The LaTeX representation of the data. - - -### \_repr\_json\_ - -```python -def _repr_json_() -> Optional[dict] -``` - -Returns the JSON representation of the data. - -**Returns**: - -The JSON representation of the data. - - -### \_repr\_javascript\_ - -```python -def _repr_javascript_() -> Optional[str] -``` - -Returns the JavaScript representation of the data. - -**Returns**: - -The JavaScript representation of the data. - - -## Logs - -```python -@dataclass(repr=False) -class Logs() -``` - -Data printed to stdout and stderr during execution, usually by print statements, logs, warnings, subprocesses, etc. - - -### stdout - -List of strings printed to stdout by prints, subprocesses, etc. - - -### stderr - -List of strings printed to stderr by prints, subprocesses, etc. - - -### to\_json - -```python -def to_json() -> str -``` - -Returns the JSON representation of the Logs object. - - -### serialize\_results - -```python -def serialize_results(results: List[Result]) -> List[Dict[str, str]] -``` - -Serializes the results to JSON. - - -## Execution - -```python -@dataclass(repr=False) -class Execution() -``` - -Represents the result of a cell execution. - - -### results - -List of the result of the cell (interactively interpreted last line), display calls (e.g. matplotlib plots). - - -### logs - -Logs printed to stdout and stderr during execution. - - -### error - -Error object if an error occurred, None otherwise. - - -### execution\_count - -Execution count of the cell. - - -### text - -```python -@property -def text() -> Optional[str] -``` - -Returns the text representation of the result. - -**Returns**: - -The text representation of the result. - - -### to\_json - -```python -def to_json() -> str -``` - -Returns the JSON representation of the Execution object. - - -## Context - -```python -@dataclass -class Context() -``` - -Represents a context for code execution. - - -### id - -The ID of the context. - - -### language - -The language of the context. - - -### cwd - -The working directory of the context. - diff --git a/sdk-reference/code-interpreter-python-sdk/v2.1.1/sandbox/page.mdx b/sdk-reference/code-interpreter-python-sdk/v2.1.1/sandbox/page.mdx deleted file mode 100644 index 8b8082cd..00000000 --- a/sdk-reference/code-interpreter-python-sdk/v2.1.1/sandbox/page.mdx +++ /dev/null @@ -1,722 +0,0 @@ - - - - - -## Sandbox - -```python -class Sandbox(BaseSandbox) -``` - -E2B cloud sandbox is a secure and isolated cloud environment. - -The sandbox allows you to: -- Access Linux OS -- Create, list, and delete files and directories -- Run commands -- Run isolated code -- Access the internet - -Check docs [here](https://e2b.dev/docs). - -Use the `Sandbox.create()` to create a new sandbox. - -**Example**: - -```python -from e2b_code_interpreter import Sandbox - -sandbox = Sandbox.create() -``` - - -### run\_code - -```python -@overload -def run_code(code: str, - language: Union[Literal["python"], None] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code as Python. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -def run_code(code: str, - language: Optional[str] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code for the specified language. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. -If no language is specified, Python is used. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -def run_code(code: str, - context: Optional[Context] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code in the specified context, if not specified, the default context is used. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `context`: Concrete context to run the code in. If not specified, the default context for the language is used. It's mutually exclusive with the language. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### create\_code\_context - -```python -def create_code_context(cwd: Optional[str] = None, - language: Optional[str] = None, - request_timeout: Optional[float] = None) -> Context -``` - -Creates a new context to run code in. - -**Arguments**: - -- `cwd`: Set the current working directory for the context, defaults to `/home/user` -- `language`: Language of the context. If not specified, defaults to Python -- `request_timeout`: Timeout for the request in **milliseconds** - -**Returns**: - -Context object - - - - - - - - -## ChartType - -```python -class ChartType(str, enum.Enum) -``` - -Chart types - - -## ScaleType - -```python -class ScaleType(str, enum.Enum) -``` - -Ax scale types - - -## Chart - -```python -class Chart() -``` - -Extracted data from a chart. It's useful for building an interactive charts or custom visualizations. - - - - -## AsyncSandbox - -```python -class AsyncSandbox(BaseAsyncSandbox) -``` - -E2B cloud sandbox is a secure and isolated cloud environment. - -The sandbox allows you to: -- Access Linux OS -- Create, list, and delete files and directories -- Run commands -- Run isolated code -- Access the internet - -Check docs [here](https://e2b.dev/docs). - -Use the `AsyncSandbox.create()` to create a new sandbox. - -**Example**: - -```python -from e2b_code_interpreter import AsyncSandbox -sandbox = await AsyncSandbox.create() -``` - - -### run\_code - -```python -@overload -async def run_code(code: str, - language: Union[Literal["python"], None] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code as Python. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -async def run_code(code: str, - language: Optional[str] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code for the specified language. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. -If no language is specified, Python is used. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -async def run_code(code: str, - context: Optional[Context] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code in the specified context, if not specified, the default context is used. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `context`: Concrete context to run the code in. If not specified, the default context for the language is used. It's mutually exclusive with the language. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### create\_code\_context - -```python -async def create_code_context( - cwd: Optional[str] = None, - language: Optional[str] = None, - request_timeout: Optional[float] = None) -> Context -``` - -Creates a new context to run code in. - -**Arguments**: - -- `cwd`: Set the current working directory for the context, defaults to `/home/user` -- `language`: Language of the context. If not specified, defaults to Python -- `request_timeout`: Timeout for the request in **milliseconds** - -**Returns**: - -Context object - - - - -## OutputMessage - -```python -@dataclass -class OutputMessage() -``` - -Represents an output message from the sandbox code execution. - - -### line - -The output line. - - -### timestamp - -Unix epoch in nanoseconds - - -### error - -Whether the output is an error. - - -## ExecutionError - -```python -@dataclass -class ExecutionError() -``` - -Represents an error that occurred during the execution of a cell. -The error contains the name of the error, the value of the error, and the traceback. - - -### name - -Name of the error. - - -### value - -Value of the error. - - -### traceback - -The raw traceback of the error. - - -### to\_json - -```python -def to_json() -> str -``` - -Returns the JSON representation of the Error object. - - -## MIMEType - -```python -class MIMEType(str) -``` - -Represents a MIME type. - - -## Result - -```python -@dataclass -class Result() -``` - -Represents the data to be displayed as a result of executing a cell in a Jupyter notebook. -The result is similar to the structure returned by ipython kernel: https://ipython.readthedocs.io/en/stable/development/execution.html#execution-semantics - -The result can contain multiple types of data, such as text, images, plots, etc. Each type of data is represented -as a string, and the result can contain multiple types of data. The display calls don't have to have text representation, -for the actual result the representation is always present for the result, the other representations are always optional. - - -### is\_main\_result - -Whether this data is the result of the cell. Data can be produced by display calls of which can be multiple in a cell. - - -### extra - -Extra data that can be included. Not part of the standard types. - - -### formats - -```python -def formats() -> Iterable[str] -``` - -Returns all available formats of the result. - -**Returns**: - -All available formats of the result in MIME types. - - -### \_\_str\_\_ - -```python -def __str__() -> Optional[str] -``` - -Returns the text representation of the data. - -**Returns**: - -The text representation of the data. - - -### \_repr\_html\_ - -```python -def _repr_html_() -> Optional[str] -``` - -Returns the HTML representation of the data. - -**Returns**: - -The HTML representation of the data. - - -### \_repr\_markdown\_ - -```python -def _repr_markdown_() -> Optional[str] -``` - -Returns the Markdown representation of the data. - -**Returns**: - -The Markdown representation of the data. - - -### \_repr\_svg\_ - -```python -def _repr_svg_() -> Optional[str] -``` - -Returns the SVG representation of the data. - -**Returns**: - -The SVG representation of the data. - - -### \_repr\_png\_ - -```python -def _repr_png_() -> Optional[str] -``` - -Returns the base64 representation of the PNG data. - -**Returns**: - -The base64 representation of the PNG data. - - -### \_repr\_jpeg\_ - -```python -def _repr_jpeg_() -> Optional[str] -``` - -Returns the base64 representation of the JPEG data. - -**Returns**: - -The base64 representation of the JPEG data. - - -### \_repr\_pdf\_ - -```python -def _repr_pdf_() -> Optional[str] -``` - -Returns the PDF representation of the data. - -**Returns**: - -The PDF representation of the data. - - -### \_repr\_latex\_ - -```python -def _repr_latex_() -> Optional[str] -``` - -Returns the LaTeX representation of the data. - -**Returns**: - -The LaTeX representation of the data. - - -### \_repr\_json\_ - -```python -def _repr_json_() -> Optional[dict] -``` - -Returns the JSON representation of the data. - -**Returns**: - -The JSON representation of the data. - - -### \_repr\_javascript\_ - -```python -def _repr_javascript_() -> Optional[str] -``` - -Returns the JavaScript representation of the data. - -**Returns**: - -The JavaScript representation of the data. - - -## Logs - -```python -@dataclass(repr=False) -class Logs() -``` - -Data printed to stdout and stderr during execution, usually by print statements, logs, warnings, subprocesses, etc. - - -### stdout - -List of strings printed to stdout by prints, subprocesses, etc. - - -### stderr - -List of strings printed to stderr by prints, subprocesses, etc. - - -### to\_json - -```python -def to_json() -> str -``` - -Returns the JSON representation of the Logs object. - - -### serialize\_results - -```python -def serialize_results(results: List[Result]) -> List[Dict[str, str]] -``` - -Serializes the results to JSON. - - -## Execution - -```python -@dataclass(repr=False) -class Execution() -``` - -Represents the result of a cell execution. - - -### results - -List of the result of the cell (interactively interpreted last line), display calls (e.g. matplotlib plots). - - -### logs - -Logs printed to stdout and stderr during execution. - - -### error - -Error object if an error occurred, None otherwise. - - -### execution\_count - -Execution count of the cell. - - -### text - -```python -@property -def text() -> Optional[str] -``` - -Returns the text representation of the result. - -**Returns**: - -The text representation of the result. - - -### to\_json - -```python -def to_json() -> str -``` - -Returns the JSON representation of the Execution object. - - -## Context - -```python -@dataclass -class Context() -``` - -Represents a context for code execution. - - -### id - -The ID of the context. - - -### language - -The language of the context. - - -### cwd - -The working directory of the context. - diff --git a/sdk-reference/code-interpreter-python-sdk/v2.2.0/sandbox/page.mdx b/sdk-reference/code-interpreter-python-sdk/v2.2.0/sandbox/page.mdx deleted file mode 100644 index 8b8082cd..00000000 --- a/sdk-reference/code-interpreter-python-sdk/v2.2.0/sandbox/page.mdx +++ /dev/null @@ -1,722 +0,0 @@ - - - - - -## Sandbox - -```python -class Sandbox(BaseSandbox) -``` - -E2B cloud sandbox is a secure and isolated cloud environment. - -The sandbox allows you to: -- Access Linux OS -- Create, list, and delete files and directories -- Run commands -- Run isolated code -- Access the internet - -Check docs [here](https://e2b.dev/docs). - -Use the `Sandbox.create()` to create a new sandbox. - -**Example**: - -```python -from e2b_code_interpreter import Sandbox - -sandbox = Sandbox.create() -``` - - -### run\_code - -```python -@overload -def run_code(code: str, - language: Union[Literal["python"], None] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code as Python. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -def run_code(code: str, - language: Optional[str] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code for the specified language. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. -If no language is specified, Python is used. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -def run_code(code: str, - context: Optional[Context] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code in the specified context, if not specified, the default context is used. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `context`: Concrete context to run the code in. If not specified, the default context for the language is used. It's mutually exclusive with the language. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### create\_code\_context - -```python -def create_code_context(cwd: Optional[str] = None, - language: Optional[str] = None, - request_timeout: Optional[float] = None) -> Context -``` - -Creates a new context to run code in. - -**Arguments**: - -- `cwd`: Set the current working directory for the context, defaults to `/home/user` -- `language`: Language of the context. If not specified, defaults to Python -- `request_timeout`: Timeout for the request in **milliseconds** - -**Returns**: - -Context object - - - - - - - - -## ChartType - -```python -class ChartType(str, enum.Enum) -``` - -Chart types - - -## ScaleType - -```python -class ScaleType(str, enum.Enum) -``` - -Ax scale types - - -## Chart - -```python -class Chart() -``` - -Extracted data from a chart. It's useful for building an interactive charts or custom visualizations. - - - - -## AsyncSandbox - -```python -class AsyncSandbox(BaseAsyncSandbox) -``` - -E2B cloud sandbox is a secure and isolated cloud environment. - -The sandbox allows you to: -- Access Linux OS -- Create, list, and delete files and directories -- Run commands -- Run isolated code -- Access the internet - -Check docs [here](https://e2b.dev/docs). - -Use the `AsyncSandbox.create()` to create a new sandbox. - -**Example**: - -```python -from e2b_code_interpreter import AsyncSandbox -sandbox = await AsyncSandbox.create() -``` - - -### run\_code - -```python -@overload -async def run_code(code: str, - language: Union[Literal["python"], None] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code as Python. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -async def run_code(code: str, - language: Optional[str] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code for the specified language. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. -If no language is specified, Python is used. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -async def run_code(code: str, - context: Optional[Context] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code in the specified context, if not specified, the default context is used. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `context`: Concrete context to run the code in. If not specified, the default context for the language is used. It's mutually exclusive with the language. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### create\_code\_context - -```python -async def create_code_context( - cwd: Optional[str] = None, - language: Optional[str] = None, - request_timeout: Optional[float] = None) -> Context -``` - -Creates a new context to run code in. - -**Arguments**: - -- `cwd`: Set the current working directory for the context, defaults to `/home/user` -- `language`: Language of the context. If not specified, defaults to Python -- `request_timeout`: Timeout for the request in **milliseconds** - -**Returns**: - -Context object - - - - -## OutputMessage - -```python -@dataclass -class OutputMessage() -``` - -Represents an output message from the sandbox code execution. - - -### line - -The output line. - - -### timestamp - -Unix epoch in nanoseconds - - -### error - -Whether the output is an error. - - -## ExecutionError - -```python -@dataclass -class ExecutionError() -``` - -Represents an error that occurred during the execution of a cell. -The error contains the name of the error, the value of the error, and the traceback. - - -### name - -Name of the error. - - -### value - -Value of the error. - - -### traceback - -The raw traceback of the error. - - -### to\_json - -```python -def to_json() -> str -``` - -Returns the JSON representation of the Error object. - - -## MIMEType - -```python -class MIMEType(str) -``` - -Represents a MIME type. - - -## Result - -```python -@dataclass -class Result() -``` - -Represents the data to be displayed as a result of executing a cell in a Jupyter notebook. -The result is similar to the structure returned by ipython kernel: https://ipython.readthedocs.io/en/stable/development/execution.html#execution-semantics - -The result can contain multiple types of data, such as text, images, plots, etc. Each type of data is represented -as a string, and the result can contain multiple types of data. The display calls don't have to have text representation, -for the actual result the representation is always present for the result, the other representations are always optional. - - -### is\_main\_result - -Whether this data is the result of the cell. Data can be produced by display calls of which can be multiple in a cell. - - -### extra - -Extra data that can be included. Not part of the standard types. - - -### formats - -```python -def formats() -> Iterable[str] -``` - -Returns all available formats of the result. - -**Returns**: - -All available formats of the result in MIME types. - - -### \_\_str\_\_ - -```python -def __str__() -> Optional[str] -``` - -Returns the text representation of the data. - -**Returns**: - -The text representation of the data. - - -### \_repr\_html\_ - -```python -def _repr_html_() -> Optional[str] -``` - -Returns the HTML representation of the data. - -**Returns**: - -The HTML representation of the data. - - -### \_repr\_markdown\_ - -```python -def _repr_markdown_() -> Optional[str] -``` - -Returns the Markdown representation of the data. - -**Returns**: - -The Markdown representation of the data. - - -### \_repr\_svg\_ - -```python -def _repr_svg_() -> Optional[str] -``` - -Returns the SVG representation of the data. - -**Returns**: - -The SVG representation of the data. - - -### \_repr\_png\_ - -```python -def _repr_png_() -> Optional[str] -``` - -Returns the base64 representation of the PNG data. - -**Returns**: - -The base64 representation of the PNG data. - - -### \_repr\_jpeg\_ - -```python -def _repr_jpeg_() -> Optional[str] -``` - -Returns the base64 representation of the JPEG data. - -**Returns**: - -The base64 representation of the JPEG data. - - -### \_repr\_pdf\_ - -```python -def _repr_pdf_() -> Optional[str] -``` - -Returns the PDF representation of the data. - -**Returns**: - -The PDF representation of the data. - - -### \_repr\_latex\_ - -```python -def _repr_latex_() -> Optional[str] -``` - -Returns the LaTeX representation of the data. - -**Returns**: - -The LaTeX representation of the data. - - -### \_repr\_json\_ - -```python -def _repr_json_() -> Optional[dict] -``` - -Returns the JSON representation of the data. - -**Returns**: - -The JSON representation of the data. - - -### \_repr\_javascript\_ - -```python -def _repr_javascript_() -> Optional[str] -``` - -Returns the JavaScript representation of the data. - -**Returns**: - -The JavaScript representation of the data. - - -## Logs - -```python -@dataclass(repr=False) -class Logs() -``` - -Data printed to stdout and stderr during execution, usually by print statements, logs, warnings, subprocesses, etc. - - -### stdout - -List of strings printed to stdout by prints, subprocesses, etc. - - -### stderr - -List of strings printed to stderr by prints, subprocesses, etc. - - -### to\_json - -```python -def to_json() -> str -``` - -Returns the JSON representation of the Logs object. - - -### serialize\_results - -```python -def serialize_results(results: List[Result]) -> List[Dict[str, str]] -``` - -Serializes the results to JSON. - - -## Execution - -```python -@dataclass(repr=False) -class Execution() -``` - -Represents the result of a cell execution. - - -### results - -List of the result of the cell (interactively interpreted last line), display calls (e.g. matplotlib plots). - - -### logs - -Logs printed to stdout and stderr during execution. - - -### error - -Error object if an error occurred, None otherwise. - - -### execution\_count - -Execution count of the cell. - - -### text - -```python -@property -def text() -> Optional[str] -``` - -Returns the text representation of the result. - -**Returns**: - -The text representation of the result. - - -### to\_json - -```python -def to_json() -> str -``` - -Returns the JSON representation of the Execution object. - - -## Context - -```python -@dataclass -class Context() -``` - -Represents a context for code execution. - - -### id - -The ID of the context. - - -### language - -The language of the context. - - -### cwd - -The working directory of the context. - diff --git a/sdk-reference/code-interpreter-python-sdk/v2.2.1/sandbox/page.mdx b/sdk-reference/code-interpreter-python-sdk/v2.2.1/sandbox/page.mdx deleted file mode 100644 index 40b9bb92..00000000 --- a/sdk-reference/code-interpreter-python-sdk/v2.2.1/sandbox/page.mdx +++ /dev/null @@ -1,725 +0,0 @@ - - - - - -## Sandbox - -```python -class Sandbox(BaseSandbox) -``` - -E2B cloud sandbox is a secure and isolated cloud environment. - -The sandbox allows you to: -- Access Linux OS -- Create, list, and delete files and directories -- Run commands -- Run isolated code -- Access the internet - -Check docs [here](https://e2b.dev/docs). - -Use the `Sandbox.create()` to create a new sandbox. - -**Example**: - -```python -from e2b_code_interpreter import Sandbox - -sandbox = Sandbox.create() -``` - - -### run\_code - -```python -@overload -def run_code(code: str, - language: Union[Literal["python"], None] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code as Python. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -def run_code(code: str, - language: Optional[str] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code for the specified language. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. -If no language is specified, Python is used. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -def run_code(code: str, - context: Optional[Context] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code in the specified context, if not specified, the default context is used. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `context`: Concrete context to run the code in. If not specified, the default context for the language is used. It's mutually exclusive with the language. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### create\_code\_context - -```python -def create_code_context(cwd: Optional[str] = None, - language: Optional[str] = None, - request_timeout: Optional[float] = None) -> Context -``` - -Creates a new context to run code in. - -**Arguments**: - -- `cwd`: Set the current working directory for the context, defaults to `/home/user` -- `language`: Language of the context. If not specified, defaults to Python -- `request_timeout`: Timeout for the request in **milliseconds** - -**Returns**: - -Context object - - - - - - - - -## ChartType - -```python -class ChartType(str, enum.Enum) -``` - -Chart types - - -## ScaleType - -```python -class ScaleType(str, enum.Enum) -``` - -Ax scale types - - -## Chart - -```python -class Chart() -``` - -Extracted data from a chart. It's useful for building an interactive charts or custom visualizations. - - - - -## AsyncSandbox - -```python -class AsyncSandbox(BaseAsyncSandbox) -``` - -E2B cloud sandbox is a secure and isolated cloud environment. - -The sandbox allows you to: -- Access Linux OS -- Create, list, and delete files and directories -- Run commands -- Run isolated code -- Access the internet - -Check docs [here](https://e2b.dev/docs). - -Use the `AsyncSandbox.create()` to create a new sandbox. - -**Example**: - -```python -from e2b_code_interpreter import AsyncSandbox -sandbox = await AsyncSandbox.create() -``` - - -### run\_code - -```python -@overload -async def run_code( - code: str, - language: Union[Literal["python"], None] = None, - on_stdout: Optional[OutputHandlerWithAsync[OutputMessage]] = None, - on_stderr: Optional[OutputHandlerWithAsync[OutputMessage]] = None, - on_result: Optional[OutputHandlerWithAsync[Result]] = None, - on_error: Optional[OutputHandlerWithAsync[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code as Python. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -async def run_code( - code: str, - language: Optional[str] = None, - on_stdout: Optional[OutputHandlerWithAsync[OutputMessage]] = None, - on_stderr: Optional[OutputHandlerWithAsync[OutputMessage]] = None, - on_result: Optional[OutputHandlerWithAsync[Result]] = None, - on_error: Optional[OutputHandlerWithAsync[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code for the specified language. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. -If no language is specified, Python is used. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -async def run_code( - code: str, - context: Optional[Context] = None, - on_stdout: Optional[OutputHandlerWithAsync[OutputMessage]] = None, - on_stderr: Optional[OutputHandlerWithAsync[OutputMessage]] = None, - on_result: Optional[OutputHandlerWithAsync[Result]] = None, - on_error: Optional[OutputHandlerWithAsync[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code in the specified context, if not specified, the default context is used. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `context`: Concrete context to run the code in. If not specified, the default context for the language is used. It's mutually exclusive with the language. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### create\_code\_context - -```python -async def create_code_context( - cwd: Optional[str] = None, - language: Optional[str] = None, - request_timeout: Optional[float] = None) -> Context -``` - -Creates a new context to run code in. - -**Arguments**: - -- `cwd`: Set the current working directory for the context, defaults to `/home/user` -- `language`: Language of the context. If not specified, defaults to Python -- `request_timeout`: Timeout for the request in **milliseconds** - -**Returns**: - -Context object - - - - -## OutputMessage - -```python -@dataclass -class OutputMessage() -``` - -Represents an output message from the sandbox code execution. - - -### line - -The output line. - - -### timestamp - -Unix epoch in nanoseconds - - -### error - -Whether the output is an error. - - -## ExecutionError - -```python -@dataclass -class ExecutionError() -``` - -Represents an error that occurred during the execution of a cell. -The error contains the name of the error, the value of the error, and the traceback. - - -### name - -Name of the error. - - -### value - -Value of the error. - - -### traceback - -The raw traceback of the error. - - -### to\_json - -```python -def to_json() -> str -``` - -Returns the JSON representation of the Error object. - - -## MIMEType - -```python -class MIMEType(str) -``` - -Represents a MIME type. - - -## Result - -```python -@dataclass -class Result() -``` - -Represents the data to be displayed as a result of executing a cell in a Jupyter notebook. -The result is similar to the structure returned by ipython kernel: https://ipython.readthedocs.io/en/stable/development/execution.html#execution-semantics - -The result can contain multiple types of data, such as text, images, plots, etc. Each type of data is represented -as a string, and the result can contain multiple types of data. The display calls don't have to have text representation, -for the actual result the representation is always present for the result, the other representations are always optional. - - -### is\_main\_result - -Whether this data is the result of the cell. Data can be produced by display calls of which can be multiple in a cell. - - -### extra - -Extra data that can be included. Not part of the standard types. - - -### formats - -```python -def formats() -> Iterable[str] -``` - -Returns all available formats of the result. - -**Returns**: - -All available formats of the result in MIME types. - - -### \_\_str\_\_ - -```python -def __str__() -> Optional[str] -``` - -Returns the text representation of the data. - -**Returns**: - -The text representation of the data. - - -### \_repr\_html\_ - -```python -def _repr_html_() -> Optional[str] -``` - -Returns the HTML representation of the data. - -**Returns**: - -The HTML representation of the data. - - -### \_repr\_markdown\_ - -```python -def _repr_markdown_() -> Optional[str] -``` - -Returns the Markdown representation of the data. - -**Returns**: - -The Markdown representation of the data. - - -### \_repr\_svg\_ - -```python -def _repr_svg_() -> Optional[str] -``` - -Returns the SVG representation of the data. - -**Returns**: - -The SVG representation of the data. - - -### \_repr\_png\_ - -```python -def _repr_png_() -> Optional[str] -``` - -Returns the base64 representation of the PNG data. - -**Returns**: - -The base64 representation of the PNG data. - - -### \_repr\_jpeg\_ - -```python -def _repr_jpeg_() -> Optional[str] -``` - -Returns the base64 representation of the JPEG data. - -**Returns**: - -The base64 representation of the JPEG data. - - -### \_repr\_pdf\_ - -```python -def _repr_pdf_() -> Optional[str] -``` - -Returns the PDF representation of the data. - -**Returns**: - -The PDF representation of the data. - - -### \_repr\_latex\_ - -```python -def _repr_latex_() -> Optional[str] -``` - -Returns the LaTeX representation of the data. - -**Returns**: - -The LaTeX representation of the data. - - -### \_repr\_json\_ - -```python -def _repr_json_() -> Optional[dict] -``` - -Returns the JSON representation of the data. - -**Returns**: - -The JSON representation of the data. - - -### \_repr\_javascript\_ - -```python -def _repr_javascript_() -> Optional[str] -``` - -Returns the JavaScript representation of the data. - -**Returns**: - -The JavaScript representation of the data. - - -## Logs - -```python -@dataclass(repr=False) -class Logs() -``` - -Data printed to stdout and stderr during execution, usually by print statements, logs, warnings, subprocesses, etc. - - -### stdout - -List of strings printed to stdout by prints, subprocesses, etc. - - -### stderr - -List of strings printed to stderr by prints, subprocesses, etc. - - -### to\_json - -```python -def to_json() -> str -``` - -Returns the JSON representation of the Logs object. - - -### serialize\_results - -```python -def serialize_results(results: List[Result]) -> List[Dict[str, str]] -``` - -Serializes the results to JSON. - - -## Execution - -```python -@dataclass(repr=False) -class Execution() -``` - -Represents the result of a cell execution. - - -### results - -List of the result of the cell (interactively interpreted last line), display calls (e.g. matplotlib plots). - - -### logs - -Logs printed to stdout and stderr during execution. - - -### error - -Error object if an error occurred, None otherwise. - - -### execution\_count - -Execution count of the cell. - - -### text - -```python -@property -def text() -> Optional[str] -``` - -Returns the text representation of the result. - -**Returns**: - -The text representation of the result. - - -### to\_json - -```python -def to_json() -> str -``` - -Returns the JSON representation of the Execution object. - - -## Context - -```python -@dataclass -class Context() -``` - -Represents a context for code execution. - - -### id - -The ID of the context. - - -### language - -The language of the context. - - -### cwd - -The working directory of the context. - diff --git a/sdk-reference/code-interpreter-python-sdk/v2.3.0/sandbox/page.mdx b/sdk-reference/code-interpreter-python-sdk/v2.3.0/sandbox/page.mdx deleted file mode 100644 index 40b9bb92..00000000 --- a/sdk-reference/code-interpreter-python-sdk/v2.3.0/sandbox/page.mdx +++ /dev/null @@ -1,725 +0,0 @@ - - - - - -## Sandbox - -```python -class Sandbox(BaseSandbox) -``` - -E2B cloud sandbox is a secure and isolated cloud environment. - -The sandbox allows you to: -- Access Linux OS -- Create, list, and delete files and directories -- Run commands -- Run isolated code -- Access the internet - -Check docs [here](https://e2b.dev/docs). - -Use the `Sandbox.create()` to create a new sandbox. - -**Example**: - -```python -from e2b_code_interpreter import Sandbox - -sandbox = Sandbox.create() -``` - - -### run\_code - -```python -@overload -def run_code(code: str, - language: Union[Literal["python"], None] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code as Python. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -def run_code(code: str, - language: Optional[str] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code for the specified language. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. -If no language is specified, Python is used. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -def run_code(code: str, - context: Optional[Context] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code in the specified context, if not specified, the default context is used. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `context`: Concrete context to run the code in. If not specified, the default context for the language is used. It's mutually exclusive with the language. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### create\_code\_context - -```python -def create_code_context(cwd: Optional[str] = None, - language: Optional[str] = None, - request_timeout: Optional[float] = None) -> Context -``` - -Creates a new context to run code in. - -**Arguments**: - -- `cwd`: Set the current working directory for the context, defaults to `/home/user` -- `language`: Language of the context. If not specified, defaults to Python -- `request_timeout`: Timeout for the request in **milliseconds** - -**Returns**: - -Context object - - - - - - - - -## ChartType - -```python -class ChartType(str, enum.Enum) -``` - -Chart types - - -## ScaleType - -```python -class ScaleType(str, enum.Enum) -``` - -Ax scale types - - -## Chart - -```python -class Chart() -``` - -Extracted data from a chart. It's useful for building an interactive charts or custom visualizations. - - - - -## AsyncSandbox - -```python -class AsyncSandbox(BaseAsyncSandbox) -``` - -E2B cloud sandbox is a secure and isolated cloud environment. - -The sandbox allows you to: -- Access Linux OS -- Create, list, and delete files and directories -- Run commands -- Run isolated code -- Access the internet - -Check docs [here](https://e2b.dev/docs). - -Use the `AsyncSandbox.create()` to create a new sandbox. - -**Example**: - -```python -from e2b_code_interpreter import AsyncSandbox -sandbox = await AsyncSandbox.create() -``` - - -### run\_code - -```python -@overload -async def run_code( - code: str, - language: Union[Literal["python"], None] = None, - on_stdout: Optional[OutputHandlerWithAsync[OutputMessage]] = None, - on_stderr: Optional[OutputHandlerWithAsync[OutputMessage]] = None, - on_result: Optional[OutputHandlerWithAsync[Result]] = None, - on_error: Optional[OutputHandlerWithAsync[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code as Python. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -async def run_code( - code: str, - language: Optional[str] = None, - on_stdout: Optional[OutputHandlerWithAsync[OutputMessage]] = None, - on_stderr: Optional[OutputHandlerWithAsync[OutputMessage]] = None, - on_result: Optional[OutputHandlerWithAsync[Result]] = None, - on_error: Optional[OutputHandlerWithAsync[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code for the specified language. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. -If no language is specified, Python is used. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -async def run_code( - code: str, - context: Optional[Context] = None, - on_stdout: Optional[OutputHandlerWithAsync[OutputMessage]] = None, - on_stderr: Optional[OutputHandlerWithAsync[OutputMessage]] = None, - on_result: Optional[OutputHandlerWithAsync[Result]] = None, - on_error: Optional[OutputHandlerWithAsync[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code in the specified context, if not specified, the default context is used. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `context`: Concrete context to run the code in. If not specified, the default context for the language is used. It's mutually exclusive with the language. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### create\_code\_context - -```python -async def create_code_context( - cwd: Optional[str] = None, - language: Optional[str] = None, - request_timeout: Optional[float] = None) -> Context -``` - -Creates a new context to run code in. - -**Arguments**: - -- `cwd`: Set the current working directory for the context, defaults to `/home/user` -- `language`: Language of the context. If not specified, defaults to Python -- `request_timeout`: Timeout for the request in **milliseconds** - -**Returns**: - -Context object - - - - -## OutputMessage - -```python -@dataclass -class OutputMessage() -``` - -Represents an output message from the sandbox code execution. - - -### line - -The output line. - - -### timestamp - -Unix epoch in nanoseconds - - -### error - -Whether the output is an error. - - -## ExecutionError - -```python -@dataclass -class ExecutionError() -``` - -Represents an error that occurred during the execution of a cell. -The error contains the name of the error, the value of the error, and the traceback. - - -### name - -Name of the error. - - -### value - -Value of the error. - - -### traceback - -The raw traceback of the error. - - -### to\_json - -```python -def to_json() -> str -``` - -Returns the JSON representation of the Error object. - - -## MIMEType - -```python -class MIMEType(str) -``` - -Represents a MIME type. - - -## Result - -```python -@dataclass -class Result() -``` - -Represents the data to be displayed as a result of executing a cell in a Jupyter notebook. -The result is similar to the structure returned by ipython kernel: https://ipython.readthedocs.io/en/stable/development/execution.html#execution-semantics - -The result can contain multiple types of data, such as text, images, plots, etc. Each type of data is represented -as a string, and the result can contain multiple types of data. The display calls don't have to have text representation, -for the actual result the representation is always present for the result, the other representations are always optional. - - -### is\_main\_result - -Whether this data is the result of the cell. Data can be produced by display calls of which can be multiple in a cell. - - -### extra - -Extra data that can be included. Not part of the standard types. - - -### formats - -```python -def formats() -> Iterable[str] -``` - -Returns all available formats of the result. - -**Returns**: - -All available formats of the result in MIME types. - - -### \_\_str\_\_ - -```python -def __str__() -> Optional[str] -``` - -Returns the text representation of the data. - -**Returns**: - -The text representation of the data. - - -### \_repr\_html\_ - -```python -def _repr_html_() -> Optional[str] -``` - -Returns the HTML representation of the data. - -**Returns**: - -The HTML representation of the data. - - -### \_repr\_markdown\_ - -```python -def _repr_markdown_() -> Optional[str] -``` - -Returns the Markdown representation of the data. - -**Returns**: - -The Markdown representation of the data. - - -### \_repr\_svg\_ - -```python -def _repr_svg_() -> Optional[str] -``` - -Returns the SVG representation of the data. - -**Returns**: - -The SVG representation of the data. - - -### \_repr\_png\_ - -```python -def _repr_png_() -> Optional[str] -``` - -Returns the base64 representation of the PNG data. - -**Returns**: - -The base64 representation of the PNG data. - - -### \_repr\_jpeg\_ - -```python -def _repr_jpeg_() -> Optional[str] -``` - -Returns the base64 representation of the JPEG data. - -**Returns**: - -The base64 representation of the JPEG data. - - -### \_repr\_pdf\_ - -```python -def _repr_pdf_() -> Optional[str] -``` - -Returns the PDF representation of the data. - -**Returns**: - -The PDF representation of the data. - - -### \_repr\_latex\_ - -```python -def _repr_latex_() -> Optional[str] -``` - -Returns the LaTeX representation of the data. - -**Returns**: - -The LaTeX representation of the data. - - -### \_repr\_json\_ - -```python -def _repr_json_() -> Optional[dict] -``` - -Returns the JSON representation of the data. - -**Returns**: - -The JSON representation of the data. - - -### \_repr\_javascript\_ - -```python -def _repr_javascript_() -> Optional[str] -``` - -Returns the JavaScript representation of the data. - -**Returns**: - -The JavaScript representation of the data. - - -## Logs - -```python -@dataclass(repr=False) -class Logs() -``` - -Data printed to stdout and stderr during execution, usually by print statements, logs, warnings, subprocesses, etc. - - -### stdout - -List of strings printed to stdout by prints, subprocesses, etc. - - -### stderr - -List of strings printed to stderr by prints, subprocesses, etc. - - -### to\_json - -```python -def to_json() -> str -``` - -Returns the JSON representation of the Logs object. - - -### serialize\_results - -```python -def serialize_results(results: List[Result]) -> List[Dict[str, str]] -``` - -Serializes the results to JSON. - - -## Execution - -```python -@dataclass(repr=False) -class Execution() -``` - -Represents the result of a cell execution. - - -### results - -List of the result of the cell (interactively interpreted last line), display calls (e.g. matplotlib plots). - - -### logs - -Logs printed to stdout and stderr during execution. - - -### error - -Error object if an error occurred, None otherwise. - - -### execution\_count - -Execution count of the cell. - - -### text - -```python -@property -def text() -> Optional[str] -``` - -Returns the text representation of the result. - -**Returns**: - -The text representation of the result. - - -### to\_json - -```python -def to_json() -> str -``` - -Returns the JSON representation of the Execution object. - - -## Context - -```python -@dataclass -class Context() -``` - -Represents a context for code execution. - - -### id - -The ID of the context. - - -### language - -The language of the context. - - -### cwd - -The working directory of the context. - diff --git a/sdk-reference/code-interpreter-python-sdk/v2.4.0/sandbox/page.mdx b/sdk-reference/code-interpreter-python-sdk/v2.4.0/sandbox/page.mdx deleted file mode 100644 index d6466bf3..00000000 --- a/sdk-reference/code-interpreter-python-sdk/v2.4.0/sandbox/page.mdx +++ /dev/null @@ -1,819 +0,0 @@ - - - - - -## Sandbox - -```python -class Sandbox(BaseSandbox) -``` - -E2B cloud sandbox is a secure and isolated cloud environment. - -The sandbox allows you to: -- Access Linux OS -- Create, list, and delete files and directories -- Run commands -- Run isolated code -- Access the internet - -Check docs [here](https://e2b.dev/docs). - -Use the `Sandbox.create()` to create a new sandbox. - -**Example**: - -```python -from e2b_code_interpreter import Sandbox - -sandbox = Sandbox.create() -``` - - -### run\_code - -```python -@overload -def run_code(code: str, - language: Union[Literal["python"], None] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code as Python. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -def run_code(code: str, - language: Optional[str] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code for the specified language. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. -If no language is specified, Python is used. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -def run_code(code: str, - context: Optional[Context] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code in the specified context, if not specified, the default context is used. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `context`: Concrete context to run the code in. If not specified, the default context for the language is used. It's mutually exclusive with the language. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### create\_code\_context - -```python -def create_code_context(cwd: Optional[str] = None, - language: Optional[str] = None, - request_timeout: Optional[float] = None) -> Context -``` - -Creates a new context to run code in. - -**Arguments**: - -- `cwd`: Set the current working directory for the context, defaults to `/home/user` -- `language`: Language of the context. If not specified, defaults to Python -- `request_timeout`: Timeout for the request in **milliseconds** - -**Returns**: - -Context object - - -### remove\_code\_context - -```python -def remove_code_context(context: Union[Context, str]) -> None -``` - -Removes a context. - -**Arguments**: - -- `context`: Context to remove. Can be a Context object or a context ID string. - -**Returns**: - -None - - -### list\_code\_contexts - -```python -def list_code_contexts() -> List[Context] -``` - -List all contexts. - -**Returns**: - -List of contexts. - - -### restart\_code\_context - -```python -def restart_code_context(context: Union[Context, str]) -> None -``` - -Restart a context. - -**Arguments**: - -- `context`: Context to restart. Can be a Context object or a context ID string. - -**Returns**: - -None - - - - - - - - -## ChartType - -```python -class ChartType(str, enum.Enum) -``` - -Chart types - - -## ScaleType - -```python -class ScaleType(str, enum.Enum) -``` - -Ax scale types - - -## Chart - -```python -class Chart() -``` - -Extracted data from a chart. It's useful for building an interactive charts or custom visualizations. - - - - -## AsyncSandbox - -```python -class AsyncSandbox(BaseAsyncSandbox) -``` - -E2B cloud sandbox is a secure and isolated cloud environment. - -The sandbox allows you to: -- Access Linux OS -- Create, list, and delete files and directories -- Run commands -- Run isolated code -- Access the internet - -Check docs [here](https://e2b.dev/docs). - -Use the `AsyncSandbox.create()` to create a new sandbox. - -**Example**: - -```python -from e2b_code_interpreter import AsyncSandbox -sandbox = await AsyncSandbox.create() -``` - - -### run\_code - -```python -@overload -async def run_code( - code: str, - language: Union[Literal["python"], None] = None, - on_stdout: Optional[OutputHandlerWithAsync[OutputMessage]] = None, - on_stderr: Optional[OutputHandlerWithAsync[OutputMessage]] = None, - on_result: Optional[OutputHandlerWithAsync[Result]] = None, - on_error: Optional[OutputHandlerWithAsync[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code as Python. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -async def run_code( - code: str, - language: Optional[str] = None, - on_stdout: Optional[OutputHandlerWithAsync[OutputMessage]] = None, - on_stderr: Optional[OutputHandlerWithAsync[OutputMessage]] = None, - on_result: Optional[OutputHandlerWithAsync[Result]] = None, - on_error: Optional[OutputHandlerWithAsync[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code for the specified language. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. -If no language is specified, Python is used. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -async def run_code( - code: str, - context: Optional[Context] = None, - on_stdout: Optional[OutputHandlerWithAsync[OutputMessage]] = None, - on_stderr: Optional[OutputHandlerWithAsync[OutputMessage]] = None, - on_result: Optional[OutputHandlerWithAsync[Result]] = None, - on_error: Optional[OutputHandlerWithAsync[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code in the specified context, if not specified, the default context is used. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `context`: Concrete context to run the code in. If not specified, the default context for the language is used. It's mutually exclusive with the language. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### create\_code\_context - -```python -async def create_code_context( - cwd: Optional[str] = None, - language: Optional[str] = None, - request_timeout: Optional[float] = None) -> Context -``` - -Creates a new context to run code in. - -**Arguments**: - -- `cwd`: Set the current working directory for the context, defaults to `/home/user` -- `language`: Language of the context. If not specified, defaults to Python -- `request_timeout`: Timeout for the request in **milliseconds** - -**Returns**: - -Context object - - -### remove\_code\_context - -```python -async def remove_code_context(context: Union[Context, str]) -> None -``` - -Removes a context. - -**Arguments**: - -- `context`: Context to remove. Can be a Context object or a context ID string. - -**Returns**: - -None - - -### list\_code\_contexts - -```python -async def list_code_contexts() -> List[Context] -``` - -List all contexts. - -**Returns**: - -List of contexts. - - -### restart\_code\_context - -```python -async def restart_code_context(context: Union[Context, str]) -> None -``` - -Restart a context. - -**Arguments**: - -- `context`: Context to restart. Can be a Context object or a context ID string. - -**Returns**: - -None - - - - -## OutputMessage - -```python -@dataclass -class OutputMessage() -``` - -Represents an output message from the sandbox code execution. - - -### line - -The output line. - - -### timestamp - -Unix epoch in nanoseconds - - -### error - -Whether the output is an error. - - -## ExecutionError - -```python -@dataclass -class ExecutionError() -``` - -Represents an error that occurred during the execution of a cell. -The error contains the name of the error, the value of the error, and the traceback. - - -### name - -Name of the error. - - -### value - -Value of the error. - - -### traceback - -The raw traceback of the error. - - -### to\_json - -```python -def to_json() -> str -``` - -Returns the JSON representation of the Error object. - - -## MIMEType - -```python -class MIMEType(str) -``` - -Represents a MIME type. - - -## Result - -```python -@dataclass -class Result() -``` - -Represents the data to be displayed as a result of executing a cell in a Jupyter notebook. -The result is similar to the structure returned by ipython kernel: https://ipython.readthedocs.io/en/stable/development/execution.html#execution-semantics - -The result can contain multiple types of data, such as text, images, plots, etc. Each type of data is represented -as a string, and the result can contain multiple types of data. The display calls don't have to have text representation, -for the actual result the representation is always present for the result, the other representations are always optional. - - -### is\_main\_result - -Whether this data is the result of the cell. Data can be produced by display calls of which can be multiple in a cell. - - -### extra - -Extra data that can be included. Not part of the standard types. - - -### formats - -```python -def formats() -> Iterable[str] -``` - -Returns all available formats of the result. - -**Returns**: - -All available formats of the result in MIME types. - - -### \_\_str\_\_ - -```python -def __str__() -> Optional[str] -``` - -Returns the text representation of the data. - -**Returns**: - -The text representation of the data. - - -### \_repr\_html\_ - -```python -def _repr_html_() -> Optional[str] -``` - -Returns the HTML representation of the data. - -**Returns**: - -The HTML representation of the data. - - -### \_repr\_markdown\_ - -```python -def _repr_markdown_() -> Optional[str] -``` - -Returns the Markdown representation of the data. - -**Returns**: - -The Markdown representation of the data. - - -### \_repr\_svg\_ - -```python -def _repr_svg_() -> Optional[str] -``` - -Returns the SVG representation of the data. - -**Returns**: - -The SVG representation of the data. - - -### \_repr\_png\_ - -```python -def _repr_png_() -> Optional[str] -``` - -Returns the base64 representation of the PNG data. - -**Returns**: - -The base64 representation of the PNG data. - - -### \_repr\_jpeg\_ - -```python -def _repr_jpeg_() -> Optional[str] -``` - -Returns the base64 representation of the JPEG data. - -**Returns**: - -The base64 representation of the JPEG data. - - -### \_repr\_pdf\_ - -```python -def _repr_pdf_() -> Optional[str] -``` - -Returns the PDF representation of the data. - -**Returns**: - -The PDF representation of the data. - - -### \_repr\_latex\_ - -```python -def _repr_latex_() -> Optional[str] -``` - -Returns the LaTeX representation of the data. - -**Returns**: - -The LaTeX representation of the data. - - -### \_repr\_json\_ - -```python -def _repr_json_() -> Optional[dict] -``` - -Returns the JSON representation of the data. - -**Returns**: - -The JSON representation of the data. - - -### \_repr\_javascript\_ - -```python -def _repr_javascript_() -> Optional[str] -``` - -Returns the JavaScript representation of the data. - -**Returns**: - -The JavaScript representation of the data. - - -## Logs - -```python -@dataclass(repr=False) -class Logs() -``` - -Data printed to stdout and stderr during execution, usually by print statements, logs, warnings, subprocesses, etc. - - -### stdout - -List of strings printed to stdout by prints, subprocesses, etc. - - -### stderr - -List of strings printed to stderr by prints, subprocesses, etc. - - -### to\_json - -```python -def to_json() -> str -``` - -Returns the JSON representation of the Logs object. - - -### serialize\_results - -```python -def serialize_results(results: List[Result]) -> List[Dict[str, str]] -``` - -Serializes the results to JSON. - - -## Execution - -```python -@dataclass(repr=False) -class Execution() -``` - -Represents the result of a cell execution. - - -### results - -List of the result of the cell (interactively interpreted last line), display calls (e.g. matplotlib plots). - - -### logs - -Logs printed to stdout and stderr during execution. - - -### error - -Error object if an error occurred, None otherwise. - - -### execution\_count - -Execution count of the cell. - - -### text - -```python -@property -def text() -> Optional[str] -``` - -Returns the text representation of the result. - -**Returns**: - -The text representation of the result. - - -### to\_json - -```python -def to_json() -> str -``` - -Returns the JSON representation of the Execution object. - - -## Context - -```python -@dataclass -class Context() -``` - -Represents a context for code execution. - - -### id - -The ID of the context. - - -### language - -The language of the context. - - -### cwd - -The working directory of the context. - diff --git a/sdk-reference/code-interpreter-python-sdk/v2.4.1/sandbox/page.mdx b/sdk-reference/code-interpreter-python-sdk/v2.4.1/sandbox/page.mdx deleted file mode 100644 index f668374c..00000000 --- a/sdk-reference/code-interpreter-python-sdk/v2.4.1/sandbox/page.mdx +++ /dev/null @@ -1,819 +0,0 @@ - - - - - -## AsyncSandbox - -```python -class AsyncSandbox(BaseAsyncSandbox) -``` - -E2B cloud sandbox is a secure and isolated cloud environment. - -The sandbox allows you to: -- Access Linux OS -- Create, list, and delete files and directories -- Run commands -- Run isolated code -- Access the internet - -Check docs [here](https://e2b.dev/docs). - -Use the `AsyncSandbox.create()` to create a new sandbox. - -**Example**: - -```python -from e2b_code_interpreter import AsyncSandbox -sandbox = await AsyncSandbox.create() -``` - - -### run\_code - -```python -@overload -async def run_code( - code: str, - language: Union[Literal["python"], None] = None, - on_stdout: Optional[OutputHandlerWithAsync[OutputMessage]] = None, - on_stderr: Optional[OutputHandlerWithAsync[OutputMessage]] = None, - on_result: Optional[OutputHandlerWithAsync[Result]] = None, - on_error: Optional[OutputHandlerWithAsync[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code as Python. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -async def run_code( - code: str, - language: Optional[str] = None, - on_stdout: Optional[OutputHandlerWithAsync[OutputMessage]] = None, - on_stderr: Optional[OutputHandlerWithAsync[OutputMessage]] = None, - on_result: Optional[OutputHandlerWithAsync[Result]] = None, - on_error: Optional[OutputHandlerWithAsync[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code for the specified language. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. -If no language is specified, Python is used. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -async def run_code( - code: str, - context: Optional[Context] = None, - on_stdout: Optional[OutputHandlerWithAsync[OutputMessage]] = None, - on_stderr: Optional[OutputHandlerWithAsync[OutputMessage]] = None, - on_result: Optional[OutputHandlerWithAsync[Result]] = None, - on_error: Optional[OutputHandlerWithAsync[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code in the specified context, if not specified, the default context is used. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `context`: Concrete context to run the code in. If not specified, the default context for the language is used. It's mutually exclusive with the language. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### create\_code\_context - -```python -async def create_code_context( - cwd: Optional[str] = None, - language: Optional[str] = None, - request_timeout: Optional[float] = None) -> Context -``` - -Creates a new context to run code in. - -**Arguments**: - -- `cwd`: Set the current working directory for the context, defaults to `/home/user` -- `language`: Language of the context. If not specified, defaults to Python -- `request_timeout`: Timeout for the request in **milliseconds** - -**Returns**: - -Context object - - -### remove\_code\_context - -```python -async def remove_code_context(context: Union[Context, str]) -> None -``` - -Removes a context. - -**Arguments**: - -- `context`: Context to remove. Can be a Context object or a context ID string. - -**Returns**: - -None - - -### list\_code\_contexts - -```python -async def list_code_contexts() -> List[Context] -``` - -List all contexts. - -**Returns**: - -List of contexts. - - -### restart\_code\_context - -```python -async def restart_code_context(context: Union[Context, str]) -> None -``` - -Restart a context. - -**Arguments**: - -- `context`: Context to restart. Can be a Context object or a context ID string. - -**Returns**: - -None - - - - -## OutputMessage - -```python -@dataclass -class OutputMessage() -``` - -Represents an output message from the sandbox code execution. - - -### line - -The output line. - - -### timestamp - -Unix epoch in nanoseconds - - -### error - -Whether the output is an error. - - -## ExecutionError - -```python -@dataclass -class ExecutionError() -``` - -Represents an error that occurred during the execution of a cell. -The error contains the name of the error, the value of the error, and the traceback. - - -### name - -Name of the error. - - -### value - -Value of the error. - - -### traceback - -The raw traceback of the error. - - -### to\_json - -```python -def to_json() -> str -``` - -Returns the JSON representation of the Error object. - - -## MIMEType - -```python -class MIMEType(str) -``` - -Represents a MIME type. - - -## Result - -```python -@dataclass -class Result() -``` - -Represents the data to be displayed as a result of executing a cell in a Jupyter notebook. -The result is similar to the structure returned by ipython kernel: https://ipython.readthedocs.io/en/stable/development/execution.html#execution-semantics - -The result can contain multiple types of data, such as text, images, plots, etc. Each type of data is represented -as a string, and the result can contain multiple types of data. The display calls don't have to have text representation, -for the actual result the representation is always present for the result, the other representations are always optional. - - -### is\_main\_result - -Whether this data is the result of the cell. Data can be produced by display calls of which can be multiple in a cell. - - -### extra - -Extra data that can be included. Not part of the standard types. - - -### formats - -```python -def formats() -> Iterable[str] -``` - -Returns all available formats of the result. - -**Returns**: - -All available formats of the result in MIME types. - - -### \_\_str\_\_ - -```python -def __str__() -> Optional[str] -``` - -Returns the text representation of the data. - -**Returns**: - -The text representation of the data. - - -### \_repr\_html\_ - -```python -def _repr_html_() -> Optional[str] -``` - -Returns the HTML representation of the data. - -**Returns**: - -The HTML representation of the data. - - -### \_repr\_markdown\_ - -```python -def _repr_markdown_() -> Optional[str] -``` - -Returns the Markdown representation of the data. - -**Returns**: - -The Markdown representation of the data. - - -### \_repr\_svg\_ - -```python -def _repr_svg_() -> Optional[str] -``` - -Returns the SVG representation of the data. - -**Returns**: - -The SVG representation of the data. - - -### \_repr\_png\_ - -```python -def _repr_png_() -> Optional[str] -``` - -Returns the base64 representation of the PNG data. - -**Returns**: - -The base64 representation of the PNG data. - - -### \_repr\_jpeg\_ - -```python -def _repr_jpeg_() -> Optional[str] -``` - -Returns the base64 representation of the JPEG data. - -**Returns**: - -The base64 representation of the JPEG data. - - -### \_repr\_pdf\_ - -```python -def _repr_pdf_() -> Optional[str] -``` - -Returns the PDF representation of the data. - -**Returns**: - -The PDF representation of the data. - - -### \_repr\_latex\_ - -```python -def _repr_latex_() -> Optional[str] -``` - -Returns the LaTeX representation of the data. - -**Returns**: - -The LaTeX representation of the data. - - -### \_repr\_json\_ - -```python -def _repr_json_() -> Optional[dict] -``` - -Returns the JSON representation of the data. - -**Returns**: - -The JSON representation of the data. - - -### \_repr\_javascript\_ - -```python -def _repr_javascript_() -> Optional[str] -``` - -Returns the JavaScript representation of the data. - -**Returns**: - -The JavaScript representation of the data. - - -## Logs - -```python -@dataclass(repr=False) -class Logs() -``` - -Data printed to stdout and stderr during execution, usually by print statements, logs, warnings, subprocesses, etc. - - -### stdout - -List of strings printed to stdout by prints, subprocesses, etc. - - -### stderr - -List of strings printed to stderr by prints, subprocesses, etc. - - -### to\_json - -```python -def to_json() -> str -``` - -Returns the JSON representation of the Logs object. - - -### serialize\_results - -```python -def serialize_results(results: List[Result]) -> List[Dict[str, str]] -``` - -Serializes the results to JSON. - - -## Execution - -```python -@dataclass(repr=False) -class Execution() -``` - -Represents the result of a cell execution. - - -### results - -List of the result of the cell (interactively interpreted last line), display calls (e.g. matplotlib plots). - - -### logs - -Logs printed to stdout and stderr during execution. - - -### error - -Error object if an error occurred, None otherwise. - - -### execution\_count - -Execution count of the cell. - - -### text - -```python -@property -def text() -> Optional[str] -``` - -Returns the text representation of the result. - -**Returns**: - -The text representation of the result. - - -### to\_json - -```python -def to_json() -> str -``` - -Returns the JSON representation of the Execution object. - - -## Context - -```python -@dataclass -class Context() -``` - -Represents a context for code execution. - - -### id - -The ID of the context. - - -### language - -The language of the context. - - -### cwd - -The working directory of the context. - - - - -## Sandbox - -```python -class Sandbox(BaseSandbox) -``` - -E2B cloud sandbox is a secure and isolated cloud environment. - -The sandbox allows you to: -- Access Linux OS -- Create, list, and delete files and directories -- Run commands -- Run isolated code -- Access the internet - -Check docs [here](https://e2b.dev/docs). - -Use the `Sandbox.create()` to create a new sandbox. - -**Example**: - -```python -from e2b_code_interpreter import Sandbox - -sandbox = Sandbox.create() -``` - - -### run\_code - -```python -@overload -def run_code(code: str, - language: Union[Literal["python"], None] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code as Python. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -def run_code(code: str, - language: Optional[str] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code for the specified language. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. -If no language is specified, Python is used. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `language`: Language to use for code execution. If not defined, the default Python context is used. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### run\_code - -```python -@overload -def run_code(code: str, - context: Optional[Context] = None, - on_stdout: Optional[OutputHandler[OutputMessage]] = None, - on_stderr: Optional[OutputHandler[OutputMessage]] = None, - on_result: Optional[OutputHandler[Result]] = None, - on_error: Optional[OutputHandler[ExecutionError]] = None, - envs: Optional[Dict[str, str]] = None, - timeout: Optional[float] = None, - request_timeout: Optional[float] = None) -> Execution -``` - -Runs the code in the specified context, if not specified, the default context is used. - -Specify the `language` or `context` option to run the code as a different language or in a different `Context`. - -You can reference previously defined variables, imports, and functions in the code. - -**Arguments**: - -- `code`: Code to execute -- `context`: Concrete context to run the code in. If not specified, the default context for the language is used. It's mutually exclusive with the language. -- `on_stdout`: Callback for stdout messages -- `on_stderr`: Callback for stderr messages -- `on_result`: Callback for the `Result` object -- `on_error`: Callback for the `ExecutionError` object -- `envs`: Custom environment variables -- `timeout`: Timeout for the code execution in **seconds** -- `request_timeout`: Timeout for the request in **seconds** - -**Returns**: - -`Execution` result object - - -### create\_code\_context - -```python -def create_code_context(cwd: Optional[str] = None, - language: Optional[str] = None, - request_timeout: Optional[float] = None) -> Context -``` - -Creates a new context to run code in. - -**Arguments**: - -- `cwd`: Set the current working directory for the context, defaults to `/home/user` -- `language`: Language of the context. If not specified, defaults to Python -- `request_timeout`: Timeout for the request in **milliseconds** - -**Returns**: - -Context object - - -### remove\_code\_context - -```python -def remove_code_context(context: Union[Context, str]) -> None -``` - -Removes a context. - -**Arguments**: - -- `context`: Context to remove. Can be a Context object or a context ID string. - -**Returns**: - -None - - -### list\_code\_contexts - -```python -def list_code_contexts() -> List[Context] -``` - -List all contexts. - -**Returns**: - -List of contexts. - - -### restart\_code\_context - -```python -def restart_code_context(context: Union[Context, str]) -> None -``` - -Restart a context. - -**Arguments**: - -- `context`: Context to restart. Can be a Context object or a context ID string. - -**Returns**: - -None - - - - -## ChartType - -```python -class ChartType(str, enum.Enum) -``` - -Chart types - - -## ScaleType - -```python -class ScaleType(str, enum.Enum) -``` - -Ax scale types - - -## Chart - -```python -class Chart() -``` - -Extracted data from a chart. It's useful for building an interactive charts or custom visualizations. - - - - -