PySvelte screenshot

PySvelte

Author Avatar Theme by Anthropics
Updated: 22 Dec 2021
202 Stars

A library for bridging Python and HTML/Javascript (via Svelte) for creating interactive visualizations

Overview:

PySvelte is a library that aims to bridge the gap between deep learning research workflows in Python and data visualization using web standards. It provides an opinionated workflow for integrating visualizations into the deep learning research process. The library allows Python developers to create custom visualizations using web standards and Svelte, and use them seamlessly in their projects. It also enables researchers who are not familiar with web technologies to utilize visualizations created by their colleagues. PySvelte offers features such as publishing visualizations to cloud storage buckets and easy sharing of visualizations.

Features:

  • Integration of web standards and Svelte into Python deep learning workflows
  • Creation of bespoke, custom visualizations
  • Modularity and reusability of visualizations
  • Publishing of visualizations to standalone, sharable pages
  • Ability for researchers without web expertise to use visualizations created by others

Installation:

To use PySvelte, follow these steps:

  1. Create a config.py file with functions specific to your research setup, as many features in PySvelte require these custom functions.
  2. Create a Svelte component in the src/ folder, for example, src/Hello.svelte.
  3. Inside the Svelte component, define the visualization logic and UI.
  4. In Python, import the PySvelte library and access the Svelte component as pysvelte.Hello().
  5. Use the visualization component in your code, passing the required arguments.
  6. To display the visualization in a Jupyter or Colab notebook, the visualization will automatically show if it is the last item computed in a cell. Alternatively, you can use the .show() method to explicitly display the visualization.
  7. Configure the config.py file to enable publishing of visualizations. Once configured, you can use the .publish() method to easily share your visualizations.

Please note that some features in PySvelte may require additional setup and configuration, as specified in the config.py file.

Summary:

PySvelte is an unsupported library that aims to improve the integration of deep learning research workflows in Python with data visualization using web standards. It provides a way to easily create custom visualizations using web standards and Svelte, and use them in Python projects. PySvelte also focuses on modularity, reusability, and easy sharing of visualizations. With PySvelte, researchers who are not familiar with web technologies can still utilize visualizations created by their colleagues.