langgraph-sdk 0.2.0__tar.gz → 0.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {langgraph_sdk-0.2.0 → langgraph_sdk-0.2.1}/Makefile +3 -2
- {langgraph_sdk-0.2.0 → langgraph_sdk-0.2.1}/PKG-INFO +1 -1
- langgraph_sdk-0.2.1/langgraph_sdk/__init__.py +6 -0
- {langgraph_sdk-0.2.0 → langgraph_sdk-0.2.1}/langgraph_sdk/auth/__init__.py +6 -4
- {langgraph_sdk-0.2.0 → langgraph_sdk-0.2.1}/langgraph_sdk/client.py +345 -65
- {langgraph_sdk-0.2.0 → langgraph_sdk-0.2.1}/langgraph_sdk/schema.py +56 -0
- {langgraph_sdk-0.2.0 → langgraph_sdk-0.2.1}/langgraph_sdk/sse.py +1 -1
- {langgraph_sdk-0.2.0 → langgraph_sdk-0.2.1}/pyproject.toml +4 -1
- langgraph_sdk-0.2.1/tests/test_select_fields_sync.py +76 -0
- langgraph_sdk-0.2.1/uv.lock +525 -0
- langgraph_sdk-0.2.0/langgraph_sdk/__init__.py +0 -11
- langgraph_sdk-0.2.0/uv.lock +0 -498
- {langgraph_sdk-0.2.0 → langgraph_sdk-0.2.1}/.gitignore +0 -0
- {langgraph_sdk-0.2.0 → langgraph_sdk-0.2.1}/LICENSE +0 -0
- {langgraph_sdk-0.2.0 → langgraph_sdk-0.2.1}/README.md +0 -0
- {langgraph_sdk-0.2.0 → langgraph_sdk-0.2.1}/langgraph_sdk/auth/exceptions.py +0 -0
- {langgraph_sdk-0.2.0 → langgraph_sdk-0.2.1}/langgraph_sdk/auth/types.py +0 -0
- {langgraph_sdk-0.2.0 → langgraph_sdk-0.2.1}/langgraph_sdk/py.typed +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
.PHONY: lint format
|
|
1
|
+
.PHONY: lint format test
|
|
2
2
|
|
|
3
3
|
test:
|
|
4
|
-
|
|
4
|
+
uv run pytest tests
|
|
5
5
|
|
|
6
6
|
######################
|
|
7
7
|
# LINTING AND FORMATTING
|
|
@@ -18,6 +18,7 @@ lint lint_diff:
|
|
|
18
18
|
[ "$(PYTHON_FILES)" = "" ] || uv run ruff format $(PYTHON_FILES) --diff
|
|
19
19
|
[ "$(PYTHON_FILES)" = "" ] || uv run ruff check --select I $(PYTHON_FILES)
|
|
20
20
|
[ "$(PYTHON_FILES)" = "" ] || mkdir -p $(MYPY_CACHE) || uv run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
|
|
21
|
+
uvx ty check .
|
|
21
22
|
|
|
22
23
|
format format_diff:
|
|
23
24
|
uv run ruff check --select I --fix $(PYTHON_FILES)
|
|
@@ -701,7 +701,7 @@ def _validate_handler(fn: Callable[..., typing.Any]) -> None:
|
|
|
701
701
|
"""
|
|
702
702
|
if not inspect.iscoroutinefunction(fn):
|
|
703
703
|
raise ValueError(
|
|
704
|
-
f"Auth handler '{fn
|
|
704
|
+
f"Auth handler '{getattr(fn, '__name__', fn)}' must be an async function. "
|
|
705
705
|
"Add 'async' before 'def' to make it asynchronous and ensure"
|
|
706
706
|
" any IO operations are non-blocking."
|
|
707
707
|
)
|
|
@@ -709,18 +709,20 @@ def _validate_handler(fn: Callable[..., typing.Any]) -> None:
|
|
|
709
709
|
sig = inspect.signature(fn)
|
|
710
710
|
if "ctx" not in sig.parameters:
|
|
711
711
|
raise ValueError(
|
|
712
|
-
f"Auth handler '{fn
|
|
712
|
+
f"Auth handler '{getattr(fn, '__name__', fn)}' must have a 'ctx: AuthContext' parameter. "
|
|
713
713
|
"Update the function signature to include this required parameter."
|
|
714
714
|
)
|
|
715
715
|
if "value" not in sig.parameters:
|
|
716
716
|
raise ValueError(
|
|
717
|
-
f"Auth handler '{fn
|
|
717
|
+
f"Auth handler '{getattr(fn, '__name__', fn)}' must have a 'value' parameter. "
|
|
718
718
|
" The value contains the mutable data being sent to the endpoint."
|
|
719
719
|
"Update the function signature to include this required parameter."
|
|
720
720
|
)
|
|
721
721
|
|
|
722
722
|
|
|
723
|
-
def is_studio_user(
|
|
723
|
+
def is_studio_user(
|
|
724
|
+
user: types.MinimalUser | types.BaseUser | types.MinimalUserDict,
|
|
725
|
+
) -> bool:
|
|
724
726
|
return (
|
|
725
727
|
isinstance(user, types.StudioUser)
|
|
726
728
|
or isinstance(user, dict)
|