Skip to content

Commit

Permalink
Merge pull request #1829 from langchain-ai/vb/combine-sdk-into-single…
Browse files Browse the repository at this point in the history
…-file

sdk-py: combine sync & async into a single file
  • Loading branch information
nfcampos authored Sep 24, 2024
2 parents 88335ea + cc8ea9e commit 44afec9
Show file tree
Hide file tree
Showing 7 changed files with 3,638 additions and 3,685 deletions.
12 changes: 6 additions & 6 deletions docs/docs/cloud/reference/sdk/python_sdk_ref.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ client = get_client(url="http://localhost:8123")
assistants = await client.assistants.get(assistant_id="some_uuid")
```

::: langgraph_sdk.client.async_client.get_client
::: langgraph_sdk.client.get_client
handler: python

## LangGraphClient

`LangGraphClient` is the top-level client for accessing `AssistantsClient`, `ThreadsClient`, `RunsClient`, and `CronClient`.

::: langgraph_sdk.client.async_client.LangGraphClient
::: langgraph_sdk.client.LangGraphClient
handler: python

## AssistantsClient
Expand All @@ -36,7 +36,7 @@ client = get_client(url="http://localhost:8123")
await client.assistants.<method_name>()
```

::: langgraph_sdk.client.async_client.AssistantsClient
::: langgraph_sdk.client.AssistantsClient
handler: python

## ThreadsClient
Expand All @@ -49,7 +49,7 @@ client = get_client(url="http://localhost:8123")
await client.threads.<method_name>()
```

::: langgraph_sdk.client.async_client.ThreadsClient
::: langgraph_sdk.client.ThreadsClient
handler: python

## RunsClient
Expand All @@ -62,7 +62,7 @@ client = get_client(url="http://localhost:8123")
await client.runs.<method_name>()
```

::: langgraph_sdk.client.async_client.RunsClient
::: langgraph_sdk.client.RunsClient
handler: python

## CronClient
Expand All @@ -75,5 +75,5 @@ client = get_client(url="http://localhost:8123")
await client.crons.<method_name>()
```

::: langgraph_sdk.client.async_client.CronClient
::: langgraph_sdk.client.CronClient
handler: python
4 changes: 2 additions & 2 deletions libs/sdk-py/langgraph_sdk/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from langgraph_sdk.client import get_client
from langgraph_sdk.client import get_client, get_sync_client

try:
from importlib import metadata
Expand All @@ -7,4 +7,4 @@
except metadata.PackageNotFoundError:
__version__ = "unknown"

__all__ = ["get_client"]
__all__ = ["get_client", "get_sync_client"]
Loading

0 comments on commit 44afec9

Please sign in to comment.