Something went wrong. Try again.
lol
Something went wrong. Try again.
1.4 kB · 73 lines
Nix
at master
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374{ # Basic lib, buildPythonPackage, fetchFromGitHub, # Build system setuptools, # Dependencies aiohttp, requests, websocket-client, cryptography, certifi, # Test pytestCheckHook, tiktoken,}:
buildPythonPackage rec { pname = "dashscope"; version = "1.25.9"; pyproject = true;
src = fetchFromGitHub { owner = "dashscope"; repo = "dashscope-sdk-python"; tag = "v${version}"; hash = "sha256-VR7Auso+0al9qAE3IDFAPl5zIX0Yp9OfJchR+Q9DB1o="; };
build-system = [ setuptools ];
dependencies = [ aiohttp requests websocket-client cryptography certifi ];
# Specify the version explicitly postPatch = '' substituteInPlace setup.py \ --replace-fail "version=get_version()," "version='${version}'," '';
nativeCheckInputs = [ pytestCheckHook tiktoken ];
pythonImportsCheck = [ "dashscope" ];
disabledTests = [ # Needs network access and/or API key "TestAsyncImageSynthesisRequest" "TestAsyncRequest" "TestAsyncVideoSynthesisRequest" "TestEncryption" "TestSpeechRecognition" "TestSpeechTranscribe" "TestSynthesis" "TestWebSocketAsyncRequest" "TestWebSocketSyncRequest" ];
meta = { description = "Python SDK for dashscope"; homepage = "https://github.com/dashscope/dashscope-sdk-python"; license = lib.licenses.asl20; maintainers = with lib.maintainers; [ thattemperature ]; };}