Skip to content

Commit 3ed385f

Browse files
authored
Adding various examples and tweaks (#43)
1 parent e44e5bc commit 3ed385f

48 files changed

Lines changed: 1154 additions & 1511 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

01-hello/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ First ensure that `uv` is installed:
1010
https://docs.astral.sh/uv/getting-started/installation/#standalone-installer
1111

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

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

01-hello/pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@ dependencies = [
1010

1111
[dependency-groups]
1212
dev = [
13-
"workers-py"
13+
"workers-py",
14+
"workers-runtime-sdk"
1415
]

01-hello/wrangler.jsonc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"$schema": "node_modules/wrangler/config-schema.json",
3+
"name": "hello-python",
4+
"main": "src/entry.py",
5+
"compatibility_date": "2025-11-02",
6+
"compatibility_flags": [
7+
"python_workers"
8+
],
9+
"observability": {
10+
"enabled": true
11+
}
12+
}

01-hello/wrangler.toml

Lines changed: 0 additions & 4 deletions
This file was deleted.

02-binding/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ First ensure that `uv` is installed:
1010
https://docs.astral.sh/uv/getting-started/installation/#standalone-installer
1111

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

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

02-binding/pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@ dependencies = [
1010

1111
[dependency-groups]
1212
dev = [
13-
"workers-py"
13+
"workers-py",
14+
"workers-runtime-sdk"
1415
]

02-binding/wrangler.jsonc

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"$schema": "node_modules/wrangler/config-schema.json",
3+
"name": "hello-python-bindings",
4+
"main": "src/entry.py",
5+
"compatibility_date": "2025-11-02",
6+
"compatibility_flags": [
7+
"python_workers"
8+
],
9+
"kv_namespaces": [
10+
{
11+
"binding": "FOO",
12+
"id": "<YOUR_KV_NAMESPACE_ID>"
13+
}
14+
],
15+
"observability": {
16+
"enabled": true
17+
}
18+
}

02-binding/wrangler.toml

Lines changed: 0 additions & 8 deletions
This file was deleted.

03-fastapi/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ First ensure that `uv` is installed:
66
https://docs.astral.sh/uv/getting-started/installation/#standalone-installer
77

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

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

03-fastapi/pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@ dependencies = [
1313

1414
[dependency-groups]
1515
dev = [
16-
"workers-py"
16+
"workers-py",
17+
"workers-runtime-sdk"
1718
]

0 commit comments

Comments
 (0)