observablehq / stdlib

The Observable standard library.
https://observablehq.com/@observablehq/standard-library
ISC License
959 stars 83 forks source link

python literals via pyodide #293

Open mbostock opened 2 years ago

mbostock commented 2 years ago

This is roughly the same approach as taken by Grant Nestor, although I made some changes to fix falsey value interpolation and to adopt the recommended/public APIs such as runPythonAsync instead of calling eval_code_async directly.

mootari commented 2 years ago

Should the pyodide instance be exposed so that you can e.g. load micropip?

mbostock commented 2 years ago

Should the pyodide instance be exposed so that you can e.g. load micropip?

I’m not going to do this yet, but we might add this in the future.

mbostock commented 2 years ago

Putting this on hold as, at a minimum, I think we need to update the Observable Inspector to do a better job with PyProxy objects.