1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5
6 # build-system
7 hatchling,
8
9 # dependencies
10 httpx,
11 httpx-sse,
12 orjson,
13 typing-extensions,
14
15 # passthru
16 gitUpdater,
17}:
18
19buildPythonPackage rec {
20 pname = "langgraph-sdk";
21 version = "0.2.9";
22 pyproject = true;
23
24 src = fetchFromGitHub {
25 owner = "langchain-ai";
26 repo = "langgraph";
27 tag = "sdk==${version}";
28 hash = "sha256-aEvZFF1bTRAZ7EQ6YL7p1OcQJmdysKYtTZJVPcsNU50=";
29 };
30
31 sourceRoot = "${src.name}/libs/sdk-py";
32
33 build-system = [ hatchling ];
34
35 dependencies = [
36 httpx
37 httpx-sse
38 orjson
39 typing-extensions
40 ];
41
42 disabledTests = [ "test_aevaluate_results" ]; # Compares execution time to magic number
43
44 pythonImportsCheck = [ "langgraph_sdk" ];
45
46 passthru = {
47 # python updater script sets the wrong tag
48 skipBulkUpdate = true;
49 updateScript = gitUpdater {
50 rev-prefix = "sdk==";
51 };
52 };
53
54 meta = {
55 description = "SDK for interacting with the LangGraph Cloud REST API";
56 homepage = "https://github.com/langchain-ai/langgraph/tree/main/libs/sdk-py";
57 changelog = "https://github.com/langchain-ai/langgraph/releases/tag/${src.tag}";
58 license = lib.licenses.mit;
59 maintainers = with lib.maintainers; [ sarahec ];
60 };
61}