Python API — Version 0.27.5 (original) (raw)
- Getting started
- Downloading and deploying Pyodide
- Using Pyodide
- Accessing Files Quick Reference
- Loading packages
- Building and testing Python packages out of tree
- Pyodide Python compatibility
- Type translations
- Interrupting execution
- Redirecting standard streams
- API Reference
- Frequently Asked Questions
- Community Examples
Development
- Adding a package to the Pyodide Distribution
- Building from source
- Testing and benchmarking
- Debugging tips
- How to Contribute
- Pyodide Platform ABI
Project
Python API#
Backward compatibility of the API is not guaranteed at this point.
JavaScript Modules
By default there are two JavaScript modules. More can be added withpyodide.registerJsModule(). You can import these modules using the Pythonimport
statement in the normal way.
js | The global JavaScript scope. |
---|---|
pyodide_js | The JavaScript Pyodide module. |
Python Modules
pyodide.code | Utilities for evaluating Python and JavaScript code. |
---|---|
pyodide.console | Similar to the builtin code module but handles top level await. Used for implementing the Pyodide console. |
pyodide.ffi | The JsProxy class and utilities to help interact with JavaScript code. |
pyodide.http | Defines pyfetch() and other functions for making network requests. |
pyodide.webloop | The Pyodide event loop implementation. This is automatically configured correctly for most use cases it is unlikely you will need it outside of niche use cases. |