Skip to content

Commit 1699452

Browse files
authored
Add assets example (#33)
1 parent 42cf9c3 commit 1699452

File tree

13 files changed

+1710
-1
lines changed

13 files changed

+1710
-1
lines changed

06-assets/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Assets Handling Example
2+
3+
Warning: Python support in Workers is experimental and things will break. This
4+
example is meant for reference only right now; you should be prepared to update
5+
your code between now and official release time as APIs may change.
6+
7+
## How to Run
8+
9+
First ensure that `uv` is installed:
10+
https://docs.astral.sh/uv/getting-started/installation/#standalone-installer
11+
12+
Now, if you run `uv run pywrangler dev` within this directory, it should use the config
13+
in `wrangler.toml` to run the example.
14+
15+
You can also run `uv run pywrangler deploy` to deploy the example.

06-assets/assets/favicon.ico

1.12 KB
Binary file not shown.

06-assets/assets/image.svg

Lines changed: 4 additions & 0 deletions
Loading

06-assets/assets/script.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
console.log('Hello from Python Worker!');
2+
document.addEventListener('DOMContentLoaded', function() {
3+
document.body.style.transition = 'all 0.3s ease';
4+
});

06-assets/assets/style.css

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
body {
2+
background-color: #f0f0f0;
3+
color: #333;
4+
line-height: 1.6;
5+
}
6+
.container {
7+
background: white;
8+
padding: 20px;
9+
border-radius: 8px;
10+
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
11+
}

0 commit comments

Comments
 (0)