This page is about the Python interpreter
environment inside the Riza Code Interpreter API.
If you’re looking to call the API from Python,
head over to the API Client Libraries page.
Runtime
Riza runs Python 3.12.0 compiled to WASM (in the default WASI environment) or directly (in the microVM environment). The entire standard library is included. To add additional packages from PyPI, you’ll need to build a custom runtime. See Adding Packages for more information.Resource limits
There are no limitations beyond the general limits that apply to all Riza interpreter runtime environments. See our roadmap for planned future improvements.Standard I/O
You can write tostdout and stderr as you typically would.
stdin and access command line arguments and environment
variables, all as you typically would.
Files
The filesystem is read-only in all environments.
files parameter in the WASI and V8 environments.
This feature is not yet available in the microVM environment.
See the Files reference for more details.
Accessing the network
Network access is blocked by default, so you need to allow traffic to
individual hosts using the
http request parameter. See the HTTP
reference for a full example.In the WASI environment
You can make HTTP requests using therequests or httpx packages. Protocols other
than HTTP are not supported, and code can’t access the network directly.
In the microVM environment
You can access the network any way you like, but you’ll need to set the (unfortunately named in this context)http request parameter to allow traffic to all hosts. Host-specific
network controls are not yet supported.