Bokeh Line Chart with AWS S3 JSON data source

hi there team, check out my article on most recent versions of Bokeh and Pyscript playing very nicely together with only 31 lines of code.

2 Likes

Great work! Could you share more details or a link to your article? Iā€™m interested in how Bokeh and Pyscript integrate in just 31 lines of code. :star_struck: :star_struck: :star_struck:

hi there and thanks for your interest in Pyscript. here is a link to my article

you can copy my code from there. Also I am presently experimenting on running code other than Bokeh from Pyscript so will keep you posted on my progress

here is a basic Pyscript template to work with

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>run Python in Browser with Pyscript</title>
    <link rel="stylesheet" href="https://pyscript.net/releases/2024.6.1/core.css"> <!--most recent pyscript lib-->
    <script type="module" src="https://pyscript.net/releases/2024.6.1/core.js"></script> <!--most recent pyscript lib-->
    <script type="text/javascript" src="https://cdn.bokeh.org/bokeh/release/bokeh-3.4.1.min.js"></script> <!--recent bokeh lib-->
    <py-config>packages = ["bokeh"]</py-config>
</head>
<body>

        <script type="py" async>

        //put python code here
        //note that u cannot use packages urllib or requests in pyscript
        //so far only experimenting with Bokeh but will be experimenting


        </script>

</body>
</html>

am experimenting with Fetch as an alternative to Requests / Urllib packages