depot/third_party/nixpkgs/pkgs/development/python-modules/anthropic/default.nix
Default email 5e7c2d6cef Project import generated by Copybara.
GitOrigin-RevId: f99e5f03cc0aa231ab5950a15ed02afec45ed51a
2023-10-09 21:29:22 +02:00

65 lines
1.2 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, poetry-core
, anyio
, distro
, httpx
, pydantic
, pytest-asyncio
, respx
, tokenizers
, typing-extensions
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "anthropic";
version = "0.3.11";
format = "pyproject";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "anthropics";
repo = "anthropic-sdk-python";
rev = "refs/tags/v${version}";
hash = "sha256-bjagT0I0/N76CGf1b8EBNyOTzPBWybr2I2yO5NWO3po=";
};
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
anyio
distro
httpx
pydantic
tokenizers
typing-extensions
];
nativeCheckInputs = [
pytest-asyncio
pytestCheckHook
respx
];
disabledTests = [
"api_resources"
];
pythonImportsCheck = [
"anthropic"
];
meta = with lib; {
description = "Anthropic's safety-first language model APIs";
homepage = "https://github.com/anthropics/anthropic-sdk-python";
changelog = "https://github.com/anthropics/anthropic-sdk-python/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ natsukium ];
};
}