langgraph-sdk 0.2.0a1__tar.gz → 0.2.2__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.0a1 → langgraph_sdk-0.2.2}/Makefile +3 -3
- {langgraph_sdk-0.2.0a1 → langgraph_sdk-0.2.2}/PKG-INFO +1 -1
- langgraph_sdk-0.2.2/langgraph_sdk/__init__.py +6 -0
- {langgraph_sdk-0.2.0a1 → langgraph_sdk-0.2.2}/langgraph_sdk/auth/__init__.py +8 -4
- {langgraph_sdk-0.2.0a1 → langgraph_sdk-0.2.2}/langgraph_sdk/client.py +677 -257
- {langgraph_sdk-0.2.0a1 → langgraph_sdk-0.2.2}/langgraph_sdk/schema.py +68 -1
- {langgraph_sdk-0.2.0a1 → langgraph_sdk-0.2.2}/langgraph_sdk/sse.py +1 -1
- {langgraph_sdk-0.2.0a1 → langgraph_sdk-0.2.2}/pyproject.toml +5 -1
- langgraph_sdk-0.2.2/tests/test_api_parity.py +120 -0
- langgraph_sdk-0.2.2/tests/test_select_fields_sync.py +76 -0
- langgraph_sdk-0.2.2/uv.lock +525 -0
- langgraph_sdk-0.2.0a1/langgraph_sdk/__init__.py +0 -11
- langgraph_sdk-0.2.0a1/uv.lock +0 -498
- {langgraph_sdk-0.2.0a1 → langgraph_sdk-0.2.2}/.gitignore +0 -0
- {langgraph_sdk-0.2.0a1 → langgraph_sdk-0.2.2}/LICENSE +0 -0
- {langgraph_sdk-0.2.0a1 → langgraph_sdk-0.2.2}/README.md +0 -0
- {langgraph_sdk-0.2.0a1 → langgraph_sdk-0.2.2}/langgraph_sdk/auth/exceptions.py +0 -0
- {langgraph_sdk-0.2.0a1 → langgraph_sdk-0.2.2}/langgraph_sdk/auth/types.py +0 -0
- {langgraph_sdk-0.2.0a1 → langgraph_sdk-0.2.2}/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
|
|
@@ -17,7 +17,7 @@ lint lint_diff:
|
|
|
17
17
|
uv run ruff check .
|
|
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
|
+
uvx ty check .
|
|
21
21
|
|
|
22
22
|
format format_diff:
|
|
23
23
|
uv run ruff check --select I --fix $(PYTHON_FILES)
|
|
@@ -385,6 +385,8 @@ class _ResourceOn(typing.Generic[VCreate, VRead, VUpdate, VDelete, VSearch]):
|
|
|
385
385
|
_register_handler(self.auth, self.resource, "*", handler),
|
|
386
386
|
)
|
|
387
387
|
|
|
388
|
+
# Accept keyword-only parameters for future filtering behavior; referenced to satisfy linters.
|
|
389
|
+
_ = resources, actions
|
|
388
390
|
return decorator
|
|
389
391
|
|
|
390
392
|
|
|
@@ -701,7 +703,7 @@ def _validate_handler(fn: Callable[..., typing.Any]) -> None:
|
|
|
701
703
|
"""
|
|
702
704
|
if not inspect.iscoroutinefunction(fn):
|
|
703
705
|
raise ValueError(
|
|
704
|
-
f"Auth handler '{fn
|
|
706
|
+
f"Auth handler '{getattr(fn, '__name__', fn)}' must be an async function. "
|
|
705
707
|
"Add 'async' before 'def' to make it asynchronous and ensure"
|
|
706
708
|
" any IO operations are non-blocking."
|
|
707
709
|
)
|
|
@@ -709,18 +711,20 @@ def _validate_handler(fn: Callable[..., typing.Any]) -> None:
|
|
|
709
711
|
sig = inspect.signature(fn)
|
|
710
712
|
if "ctx" not in sig.parameters:
|
|
711
713
|
raise ValueError(
|
|
712
|
-
f"Auth handler '{fn
|
|
714
|
+
f"Auth handler '{getattr(fn, '__name__', fn)}' must have a 'ctx: AuthContext' parameter. "
|
|
713
715
|
"Update the function signature to include this required parameter."
|
|
714
716
|
)
|
|
715
717
|
if "value" not in sig.parameters:
|
|
716
718
|
raise ValueError(
|
|
717
|
-
f"Auth handler '{fn
|
|
719
|
+
f"Auth handler '{getattr(fn, '__name__', fn)}' must have a 'value' parameter. "
|
|
718
720
|
" The value contains the mutable data being sent to the endpoint."
|
|
719
721
|
"Update the function signature to include this required parameter."
|
|
720
722
|
)
|
|
721
723
|
|
|
722
724
|
|
|
723
|
-
def is_studio_user(
|
|
725
|
+
def is_studio_user(
|
|
726
|
+
user: types.MinimalUser | types.BaseUser | types.MinimalUserDict,
|
|
727
|
+
) -> bool:
|
|
724
728
|
return (
|
|
725
729
|
isinstance(user, types.StudioUser)
|
|
726
730
|
or isinstance(user, dict)
|