Skip to content
Commit Detail

Commit 10d1c88

Author
Dan Lapid <dan.lapid@gmail.com> 2025-04-18 18:29:37 +0000
Parents
2621a08
Tree
42d96d1
Python Workers: Support importable env

Enhances Python Workers with the ability to import JavaScript modules from Python code,
specifically adding support for environment access via `import_from_javascript`. This
enables Python Workers to:

- Import and use `cloudflare:workers` and `cloudflare:sockets` modules in global scope
- Access environment variables and bindings through imported modules
- Handle dynamic imports with proper error handling for unsupported scenarios

Includes comprehensive test coverage for module imports, environment access, and
compatibility handling across different Python runtime versions.

Files changed