This blog post explores PyScript, a new technology recently released by Anaconda that enables developers to run Python code and popular libraries on web browsers, and best practices when using it.
PyScript was created with the idea of making it web-friendly and enabling the capacity of Python developers to generate interesting and interactive applications. Their developers expect to combine multiple open frameworks to provide a way to create sophisticated applications rather than focusing on making them accessible to all.
It is required to add the file to the web server or use the CDN. It is also suggested to add the CSS file:
For developers, it can be helpful to install the VS Code extension. It provides more than 200 snippets for PyScript, Django Template, Python, and HTML and provides code highlighting for the Python language in PyScript in HTML files.
Import a JS function, for example:
Don’t forget to include the JS script in the HTML file:
When developers are working on training models for data science, Python notebooks are the most used. We talk about Jupyter or Ipython. The client asks for some examples. Sending the notebook and giving them a preview is always a hard task to complete. Using the model and transforming the outputs into images or web pages may not meet the client's expectations, and it may lose possible interaction with the model. One of the best features of PyScript is the plot model for the end-user.
We’d love to learn more about your project.
Engagements start at $75,000.