title: Plotly figures with Pyodide and standalone client-side Python script
body: <p>I'd like to run a simple Python script that generates <a href="https://plotly.com/python/candlestick-charts/" rel="nofollow noreferrer">Plotly figures with interactive JavaScript</a>.</p>
  <ul>
  <li><p>I can already accomplish this within <a href="https://jupyterlite.readthedocs.io/en/latest/" rel="nofollow noreferrer">JupyterLite</a> notebook</p>
  </li>
  <li><p>The Python script pulls data using <code>fetch</code> and then performs calculations using <code>pandas</code></p>
  </li>
  <li><p>However, I'd like to have this standalone: run some dynamic Python code embedded in an HTML page and then show the data using Plotly. Preferably interactive chart, but a static image can do as well.</p>
  </li>
  <li><p>Happy to build Pyodide offline beforehand, all libraries, bells and whistles included</p>
  </li>
  </ul>
  <p>I know how to run Python using Pyodide, but I am unsure how to integrate with Plotly and how to pass data from Pyodide's background worker context to Plotly to be consumed in the frontend JavaScript? What's the recommended integration approach for standalone client-side Python with Pyodide and Plotly figures? Are there documentation or examples on such?</p>