How do I run Python code on ICP?

Are there any relevant documents for reference at present?

There arenโ€™t at the moment. Broadly, the canisters can run any language that compiles down to WebAssembly (wasm), and Python would need its interpreter bundled with it in the wasm module, there looks like being some progress on this though: GitHub - appcypher/awesome-wasm-langs: ๐Ÿ˜Ž A curated list of languages that compile directly to or have their VMs in WebAssembly

1 Like

Thank you for your reply.

It might not be too far out there to create a canister that runs some Python: Using GitHub - RustPython/RustPython: A Python Interpreter written in Rust you can execute Python from Rust, and this compiles to Wasm. So someone could probably write a Python CDK based on that.

(I did some experiments last year, but got distracted.)

5 Likes