From 4c74af606f7daef6316b77be80ad25d2e9678efc Mon Sep 17 00:00:00 2001 From: William Fu-Hinthorn <13333726+hinthornw@users.noreply.github.com> Date: Thu, 27 Mar 2025 16:03:11 -0700 Subject: [PATCH] Update auth user type --- libs/sdk-py/langgraph_sdk/auth/types.py | 12 ++++++++++++ libs/sdk-py/pyproject.toml | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/libs/sdk-py/langgraph_sdk/auth/types.py b/libs/sdk-py/langgraph_sdk/auth/types.py index 4fccc800d..b8d7e408b 100644 --- a/libs/sdk-py/langgraph_sdk/auth/types.py +++ b/libs/sdk-py/langgraph_sdk/auth/types.py @@ -192,6 +192,18 @@ class BaseUser(typing.Protocol): """The permissions associated with the user.""" ... + def __getitem__(self, key): + """Get a key from your minimal user dict.""" + ... + + def __contains__(self, key): + """Check if a property exists.""" + ... + + def __iter__(self): + """Iterate over the keys of the user.""" + ... + class StudioUser: """A user object that's populated from authenticated requests from the LangGraph studio. diff --git a/libs/sdk-py/pyproject.toml b/libs/sdk-py/pyproject.toml index 1eed839e6..1f1b409e8 100644 --- a/libs/sdk-py/pyproject.toml +++ b/libs/sdk-py/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "langgraph-sdk" -version = "0.1.59" +version = "0.1.60" description = "SDK for interacting with LangGraph API" authors = [] license = "MIT"