Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions 04-langchain/README.md → 05-langchain/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# LangChain Example

** Currently this example is broken. **

Warning: Python support in Workers is experimental and things will break. This
example is meant for reference only right now; you should be prepared to update
your code between now and official release time as APIs may change.
Expand Down
4 changes: 0 additions & 4 deletions 04-langchain/pyproject.toml → 05-langchain/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,3 @@ dependencies = [
dev = [
"workers-py"
]


[tool.uv.sources]
bar = { path = "../../workers-sdk", package = true }
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ Need to deploy your Worker to Cloudflare? Python Workers are in open beta and ha
- [**`01-hello/`**](01-hello) — the most basic Python Worker
- [**`02-binding/`**](02-binding) — shows how [bindings](https://developers.cloudflare.com/workers/configuration/bindings/) work in Python Workers. Put a key into Workers KV, and then read it.
- [**`03-fastapi/`**](03-fastapi) — demonstrates how to use the [FastAPI](https://fastapi.tiangolo.com/) package with Python Workers
- [**`04-langchain/`**](04-langchain) — demonstrates how to use the [LangChain](https://pypi.org/project/langchain/) package with Python Workers
- [**`05-query-d1/`**](05-query-d1) - shows how to query D1 with Python Workers
- [**`04-query-d1/`**](04-query-d1) - shows how to query D1 with Python Workers
- [**`05-langchain/`**](04-langchain) — demonstrates how to use the [LangChain](https://pypi.org/project/langchain/) package with Python Workers. Currently broken.



## Open Beta and Limits
Expand Down
14 changes: 7 additions & 7 deletions tests/test_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,6 @@ def test_03_fastapi(dev_server):
assert response.headers["content-type"] == "application/json"


@pytest.mark.xfail(reason="Not working")
def test_04_langchain(dev_server):
pass


@pytest.fixture
def init_db():
subprocess.run(
Expand All @@ -60,12 +55,12 @@ def init_db():
"--file",
"db_init.sql",
],
cwd=REPO_ROOT / "05-query-d1",
cwd=REPO_ROOT / "04-query-d1",
check=True,
)


def test_05_query_d1(init_db, dev_server):
def test_04_query_d1(init_db, dev_server):
port = dev_server
response = requests.get(f"http://localhost:{port}")
assert response.status_code == 200
Expand All @@ -74,3 +69,8 @@ def test_05_query_d1(init_db, dev_server):
"Dominik Picheta",
"Hood Chatham",
]

@pytest.mark.xfail(reason="Not working")
def test_05_langchain(dev_server):
pass