mirror of https://github.com/pyodide/pyodide.git
764 B
764 B
(js_api_pyodide_pyimport)=
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. |