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
2 changes: 1 addition & 1 deletion 01-hello/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ First ensure that `uv` is installed:
https://docs.astral.sh/uv/getting-started/installation/#standalone-installer

Now, if you run `uv run pywrangler dev` within this directory, it should use the config
in `wrangler.toml` to run the example.
in `wrangler.jsonc` to run the example.

You can also run `uv run pywrangler deploy` to deploy the example.
3 changes: 2 additions & 1 deletion 01-hello/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ dependencies = [

[dependency-groups]
dev = [
"workers-py"
"workers-py",
"workers-runtime-sdk"
]
12 changes: 12 additions & 0 deletions 01-hello/wrangler.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "node_modules/wrangler/config-schema.json",
"name": "hello-python",
"main": "src/entry.py",
"compatibility_date": "2025-11-02",
"compatibility_flags": [
"python_workers"
],
"observability": {
"enabled": true
}
}
4 changes: 0 additions & 4 deletions 01-hello/wrangler.toml

This file was deleted.

2 changes: 1 addition & 1 deletion 02-binding/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ First ensure that `uv` is installed:
https://docs.astral.sh/uv/getting-started/installation/#standalone-installer

Now, if you run `uv run pywrangler dev` within this directory, it should use the config
in `wrangler.toml` to run the example.
in `wrangler.jsonc` to run the example.

You can also run `uv run pywrangler deploy` to deploy the example.
3 changes: 2 additions & 1 deletion 02-binding/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ dependencies = [

[dependency-groups]
dev = [
"workers-py"
"workers-py",
"workers-runtime-sdk"
]
18 changes: 18 additions & 0 deletions 02-binding/wrangler.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"$schema": "node_modules/wrangler/config-schema.json",
"name": "hello-python-bindings",
"main": "src/entry.py",
"compatibility_date": "2025-11-02",
"compatibility_flags": [
"python_workers"
],
"kv_namespaces": [
{
"binding": "FOO",
"id": "<YOUR_KV_NAMESPACE_ID>"
}
],
"observability": {
"enabled": true
}
}
8 changes: 0 additions & 8 deletions 02-binding/wrangler.toml

This file was deleted.

2 changes: 1 addition & 1 deletion 03-fastapi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ First ensure that `uv` is installed:
https://docs.astral.sh/uv/getting-started/installation/#standalone-installer

Now, if you run `uv run pywrangler dev` within this directory, it should use the config
in `wrangler.toml` to run the example.
in `wrangler.jsonc` to run the example.

You can also run `uv run pywrangler deploy` to deploy the example.
3 changes: 2 additions & 1 deletion 03-fastapi/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ dependencies = [

[dependency-groups]
dev = [
"workers-py"
"workers-py",
"workers-runtime-sdk"
]
16 changes: 16 additions & 0 deletions 03-fastapi/wrangler.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"$schema": "node_modules/wrangler/config-schema.json",
"name": "fastapi-worker",
"main": "src/worker.py",
"compatibility_date": "2025-11-02",
"compatibility_flags": [
"python_workers",
"python_dedicated_snapshot"
],
"vars": {
"MESSAGE": "My env var"
},
"observability": {
"enabled": true
}
}
7 changes: 0 additions & 7 deletions 03-fastapi/wrangler.toml

This file was deleted.

2 changes: 1 addition & 1 deletion 04-query-d1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ Run `uv run pywrangler d1 execute quotes --local --file db_init.sql` to
initialize the d1 database.

Now, if you run `uv run pywrangler dev` within this directory, it should use the config
in `wrangler.toml` to run the example.
in `wrangler.jsonc` to run the example.

You can also run `uv run pywrangler deploy` to deploy the example.
3 changes: 2 additions & 1 deletion 04-query-d1/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ dependencies = [

[dependency-groups]
dev = [
"workers-py"
"workers-py",
"workers-runtime-sdk"
]
22 changes: 22 additions & 0 deletions 04-query-d1/wrangler.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"$schema": "node_modules/wrangler/config-schema.json",
"name": "python-d1",
"main": "src/entry.py",
"compatibility_date": "2025-11-02",
"compatibility_flags": [
"python_workers"
],
"ai": {
"binding": "AI"
},
"d1_databases": [
{
"binding": "DB", // i.e. available in your Worker on env.DB
"database_name": "quotes", // REPLACE WITH YOUR DB NAME
"database_id": "408cddb7-e3f7-40d7-a4f7-33136a7fd3fa" // REPLACE WITH YOUR DB ID
}
],
"observability": {
"enabled": true
}
}
14 changes: 0 additions & 14 deletions 04-query-d1/wrangler.toml

This file was deleted.

2 changes: 1 addition & 1 deletion 05-langchain/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ First ensure that `uv` is installed:
https://docs.astral.sh/uv/getting-started/installation/#standalone-installer

Now, if you run `uv run pywrangler dev` within this directory, it should use the config
in `wrangler.toml` to run the example.
in `wrangler.jsonc` to run the example.

You can also run `uv run pywrangler deploy` to deploy the example.
3 changes: 2 additions & 1 deletion 05-langchain/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ dependencies = [

[dependency-groups]
dev = [
"workers-py"
"workers-py",
"workers-runtime-sdk"
]
19 changes: 19 additions & 0 deletions 05-langchain/wrangler.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"$schema": "node_modules/wrangler/config-schema.json",
"name": "hello-langchain",
"main": "src/worker.py",
"compatibility_date": "2025-11-02",
"compatibility_flags": [
"python_workers"
],
"rules": [
{
"type": "Data",
"globs": ["python_modules/**/*.js"],
"fallthrough": true
}
],
"observability": {
"enabled": true
}
}
8 changes: 0 additions & 8 deletions 05-langchain/wrangler.toml

This file was deleted.

2 changes: 1 addition & 1 deletion 06-assets/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ First ensure that `uv` is installed:
https://docs.astral.sh/uv/getting-started/installation/#standalone-installer

Now, if you run `uv run pywrangler dev` within this directory, it should use the config
in `wrangler.toml` to run the example.
in `wrangler.jsonc` to run the example.

You can also run `uv run pywrangler deploy` to deploy the example.
Loading
Loading