Skip to content
File

Blob: samples/pyodide-env/worker.py

python13 lines
1from js import Response
2from workers import WorkerEntrypoint
3 
4 
5class Default(WorkerEntrypoint):
6 def fetch(self, request):
7 print(self.env.MY_VAR)
8 return Response.new("hello world")
9 
10 def test(self, ctx):
11 print(self.env.MY_VAR)
12 print("Hi there, this is a test")