pyodide.pyimport(name)ΒΆ

Access a Python object in the global namespace from Javascript.

For example, to access the foo Python object from Javascript:

var foo = pyodide.pyimport('foo')

Parameters

name

type

description

names

String

Python variable name

Returns

name

type

description

object

any

If one of the basic types (string, number,
boolean, array, object), the Python
object is converted to Javascript and
returned. For other types, a Proxy
object to the Python object is returned.