Skip to content

Interactive playground

This example imports the production files generated in dist/. The shared runtime is loaded on the first operation; using the other module afterward reuses the same initialized CPython component.

The equivalent application code is:

ts
const { math, hashlib } = await import("pystd");

math.factorial(10n);
hashlib.sha256(new TextEncoder().encode("hello")).hexdigest(undefined);