pythonPackages.openai: init at 0.11.4

authored by Malo Bourgon and committed by Jonathan Ringer 3440beb1 4d31093a

+57
+55
pkgs/development/python-modules/openai/default.nix
···
··· 1 + { lib 2 + , buildPythonPackage 3 + , fetchFromGitHub 4 + , pythonOlder 5 + 6 + # Python dependencies 7 + , openpyxl 8 + , pandas 9 + , pandas-stubs 10 + , requests 11 + , tqdm 12 + 13 + # Check dependencies 14 + , pytest-mock 15 + , pytestCheckHook 16 + }: 17 + 18 + buildPythonPackage rec { 19 + pname = "openai"; 20 + version = "0.11.4"; 21 + 22 + disabled = pythonOlder "3.7.1"; 23 + 24 + # Use GitHub source since PyPi source does not include tests 25 + src = fetchFromGitHub { 26 + owner = "openai"; 27 + repo = "openai-python"; 28 + rev = "v${version}"; 29 + sha256 = "O2O4+GkyMyAxJqMNgiyPKoSXeJk0HGAst02QV6c9mJs="; 30 + }; 31 + 32 + propagatedBuildInputs = [ 33 + openpyxl 34 + pandas 35 + pandas-stubs 36 + requests 37 + tqdm 38 + ]; 39 + 40 + pythonImportsCheck = [ "openai" ]; 41 + checkInputs = [ pytestCheckHook pytest-mock ]; 42 + pytestFlagsArray = [ "openai/tests" ]; 43 + OPENAI_API_KEY = "sk-foo"; 44 + disabledTestPaths = [ 45 + "openai/tests/test_endpoints.py" # requires a real API key 46 + "openai/tests/test_file_cli.py" 47 + ]; 48 + 49 + meta = with lib; { 50 + description = "Python client library for the OpenAI API"; 51 + homepage = "https://github.com/openai/openai-python"; 52 + license = licenses.mit; 53 + maintainers = [ maintainers.malo ]; 54 + }; 55 + }
+2
pkgs/top-level/python-packages.nix
··· 5826 5827 netmap = callPackage ../development/python-modules/netmap { }; 5828 5829 openapi-core = callPackage ../development/python-modules/openapi-core { }; 5830 5831 pandas-stubs = callPackage ../development/python-modules/pandas-stubs { };
··· 5826 5827 netmap = callPackage ../development/python-modules/netmap { }; 5828 5829 + openai = callPackage ../development/python-modules/openai { }; 5830 + 5831 openapi-core = callPackage ../development/python-modules/openapi-core { }; 5832 5833 pandas-stubs = callPackage ../development/python-modules/pandas-stubs { };