1{
2 anyio,
3 buildPythonPackage,
4 fetchFromGitHub,
5 google-auth,
6 httpx,
7 lib,
8 pydantic,
9 pytestCheckHook,
10 requests,
11 setuptools,
12 twine,
13 typing-extensions,
14 websockets,
15}:
16
17buildPythonPackage rec {
18 pname = "google-genai";
19 version = "1.15.0";
20 pyproject = true;
21
22 src = fetchFromGitHub {
23 owner = "googleapis";
24 repo = "python-genai";
25 tag = "v${version}";
26 hash = "sha256-UKd4imkUIuhhj+7v5vT3ZQkz9qk3dAo3q5WBOqppFAc=";
27 };
28
29 build-system = [
30 setuptools
31 twine
32 ];
33
34 pythonRelaxDeps = [ "websockets" ];
35
36 dependencies = [
37 anyio
38 google-auth
39 httpx
40 pydantic
41 requests
42 typing-extensions
43 websockets
44 ];
45
46 pythonImportsCheck = [ "google.genai" ];
47
48 nativeCheckInputs = [
49 pytestCheckHook
50 ];
51
52 # ValueError: GOOGLE_GENAI_REPLAYS_DIRECTORY environment variable is not set
53 doCheck = false;
54
55 meta = {
56 changelog = "https://github.com/googleapis/python-genai/blob/${src.tag}/CHANGELOG.md";
57 description = "Google Generative AI Python SDK";
58 homepage = "https://github.com/googleapis/python-genai";
59 license = lib.licenses.asl20;
60 maintainers = with lib.maintainers; [ dotlambda ];
61 };
62}