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
15 changes: 15 additions & 0 deletions 06-assets/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Assets Handling Example

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.

## How to Run

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.

You can also run `uv run pywrangler deploy` to deploy the example.
Binary file added 06-assets/assets/favicon.ico
Binary file not shown.
4 changes: 4 additions & 0 deletions 06-assets/assets/image.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions 06-assets/assets/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
console.log('Hello from Python Worker!');
document.addEventListener('DOMContentLoaded', function() {
document.body.style.transition = 'all 0.3s ease';
});
11 changes: 11 additions & 0 deletions 06-assets/assets/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
body {
background-color: #f0f0f0;
color: #333;
line-height: 1.6;
}
.container {
background: white;
padding: 20px;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
Loading