Unverified Commit c74daf34 authored by Gaétan Lepage's avatar Gaétan Lepage Committed by GitHub
Browse files

python3Packages.e2b[-core-interpreter]: init at 1.5.1 (#416767)

parents 8ca040e9 99377b05
Loading
Loading
Loading
Loading
+51 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,

  # build-system
  poetry-core,

  # dependencies
  attrs,
  e2b,
  httpx,
}:

buildPythonPackage rec {
  pname = "e2b-code-interpreter";
  inherit (e2b) version;
  pyproject = true;

  src = fetchFromGitHub {
    owner = "e2b-dev";
    repo = "code-interpreter";
    tag = "@e2b/code-interpreter-python@${version}";
    hash = "sha256-a2rc7BtV+qwtqlB+JtLCs0BKN15yfwmG3XWWO8we2LA=";
  };

  sourceRoot = "${src.name}/python";

  build-system = [
    poetry-core
  ];

  dependencies = [
    attrs
    e2b
    httpx
  ];

  pythonImportsCheck = [ "e2b_code_interpreter" ];

  # Tests require an API key
  # e2b.exceptions.AuthenticationException: API key is required, please visit the Team tab at https://e2b.dev/dashboard to get your API key.
  doCheck = false;

  meta = {
    description = "E2B Code Interpreter - Stateful code execution";
    homepage = "https://github.com/e2b-dev/code-interpreter/tree/main/python";
    license = lib.licenses.asl20;
    maintainers = with lib.maintainers; [ GaetanLepage ];
  };
}
+63 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,

  # build-system
  poetry-core,

  # dependencies
  attrs,
  httpcore,
  httpx,
  packaging,
  protobuf,
  python-dateutil,
  typing-extensions,
}:

buildPythonPackage rec {
  pname = "e2b";
  version = "1.5.1";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "e2b-dev";
    repo = "E2B";
    tag = "@e2b/python-sdk@${version}";
    hash = "sha256-6THRc4rv/mzOWbsN1FpUu56kjvHvVBssK2glNoGdSzI=";
  };

  sourceRoot = "${src.name}/packages/python-sdk";

  build-system = [
    poetry-core
  ];

  pythonRelaxDeps = [
    "protobuf"
  ];

  dependencies = [
    attrs
    httpcore
    httpx
    packaging
    protobuf
    python-dateutil
    typing-extensions
  ];

  pythonImportsCheck = [ "e2b" ];

  # Tests require an API key
  # e2b.exceptions.AuthenticationException: API key is required, please visit the Team tab at https://e2b.dev/dashboard to get your API key.
  doCheck = false;

  meta = {
    description = "E2B SDK that give agents cloud environments";
    homepage = "https://github.com/e2b-dev/E2B/blob/main/packages/python-sdk";
    license = lib.licenses.asl20;
    maintainers = with lib.maintainers; [ GaetanLepage ];
  };
}
+4 −0
Original line number Diff line number Diff line
@@ -4379,6 +4379,10 @@ self: super: with self; {
  dynd = callPackage ../development/python-modules/dynd { };
  e2b = callPackage ../development/python-modules/e2b { };
  e2b-code-interpreter = callPackage ../development/python-modules/e2b-code-interpreter { };
  e3-core = callPackage ../development/python-modules/e3-core { };
  e3-testsuite = callPackage ../development/python-modules/e3-testsuite { };