Hello PyScript!
packages = ["numpy", "matplotlib", "graphviz"] # Example: include numpy package
from js import document # Import the document object
print("Hello from inline Python!")
document.getElementById("output").innerText = "This is from inline Python."
import graphviz
from js import document
python_code="""
# Create a Digraph object
dot = graphviz.Digraph(comment='My Simple Graph')
# Add nodes and edges
dot.node('A', 'Node A')
dot.node('B', 'Node B')
dot.edge('A', 'B', label='Connects A to B')
"""
output_div = document.getElementById("python-output")
output_div.innerHTML = python_code