Something went wrong. Try again.
What happens if I push all of nixpkgs
Something went wrong. Try again.
1.6 kB · 94 lines
Nix
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495{ lib, buildPythonPackage, fetchFromGitHub, pythonOlder, hatchling# propagated, httpx, pydantic, typing-extensions, anyio, distro, sniffio, cached-property, tqdm# optional, numpy, pandas, pandas-stubs# tests, pytestCheckHook, pytest-asyncio, pytest-mock, respx, dirty-equals}:
buildPythonPackage rec { pname = "openai"; version = "1.9.0"; pyproject = true;
disabled = pythonOlder "3.7.1";
src = fetchFromGitHub { owner = "openai"; repo = "openai-python"; rev = "refs/tags/v${version}"; hash = "sha256-+3tCttKWbWt3Nsf5E6NWYt0yLRV0kfj7Qz6PhaOmBsY="; };
nativeBuildInputs = [ hatchling ];
propagatedBuildInputs = [ httpx pydantic typing-extensions anyio distro sniffio tqdm ] ++ lib.optionals (pythonOlder "3.8") [ cached-property ];
passthru.optional-dependencies = { datalib = [ numpy pandas pandas-stubs ]; };
pythonImportsCheck = [ "openai" ];
nativeCheckInputs = [ pytestCheckHook pytest-asyncio pytest-mock respx dirty-equals ];
disabledTests = [ # makes network requests "test_streaming_response" ];
disabledTestPaths = [ # makes network requests "tests/api_resources" ];
meta = with lib; { description = "Python client library for the OpenAI API"; homepage = "https://github.com/openai/openai-python"; changelog = "https://github.com/openai/openai-python/releases/tag/v${version}"; license = licenses.mit; maintainers = with maintainers; [ malo ]; };}