Skip to main content

Simplify the creation of GUI elements in Jupyter notebooks

Project description

Easy GUI Jupyter

PyPI version Python versions License: MIT

Easy GUI Jupyter is a Python library that simplifies the creation of graphical user interfaces (GUIs) in Jupyter notebooks using ipywidgets. It provides a convenient way to add various types of widgets to your Jupyter notebooks, making it easier to interact with your code and visualize results.

Features

  • Simplifies the creation of GUIs in Jupyter notebooks
  • Supports a variety of widget types, including labels, buttons, text inputs, sliders, checkboxes, and dropdowns
  • Allows saving and loading widget values to maintain user settings across sessions
  • Provides a clean and intuitive API for adding and managing widgets

Installation

To install Easy GUI Jupyter, you can use pip:

pip install easy_gui_jupyter

Usage

Here's a simple example of how to use Easy GUI Jupyter in your Jupyter notebook:

from easy_gui_jupyter import EasyGUI

# Create an instance of EasyGUI
eg = EasyGUI()

# Add a text widget
eg.add_text("text", value="Hello, world!")

# Display the GUI
eg.show()

This will create a GUI with a single text widget displaying "Hello, world!".

You can add more widgets using the various add_* methods provided by the EasyGUI class. For example:

# Add an integer slider
eg.add_int_slider("int_slider", min=0, max=10, value=5)

# Add a checkbox
eg.add_checkbox("checkbox", value=True)

# Add a dropdown
options = ["Option 1", "Option 2", "Option 3"]
eg.add_dropdown("dropdown", options=options, value=options)

To access the values of the widgets, you can use the [] operator with the widget's tag:

# Get the value of the text widget
text_value = eg["text"].value

# Get the value of the integer slider
int_slider_value = eg["int_slider"].value

Saving and Loading Settings

Easy GUI Jupyter allows you to save and load widget values to maintain user settings across sessions. To enable this feature, set the remember_value parameter to True when adding a widget:

# Add a float slider with remembered value
eg.add_float_slider("float_slider", min=0.0, max=1.0, step=0.1, value=0.5, remember_value=True)

To save the current widget values, call the save_settings() method:

# Save the current widget values
eg.save_settings()

The widget values will be saved to a configuration file in the user's home directory.

Contributing

Contributions to Easy GUI Jupyter are welcome! If you find a bug, have a feature request, or want to contribute improvements, please open an issue or submit a pull request on the GitHub repository.

License

Easy GUI Jupyter is open-source software licensed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

easy_gui_jupyter-2024.5.28.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

easy_gui_jupyter-2024.5.28-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file easy_gui_jupyter-2024.5.28.tar.gz.

File metadata

  • Download URL: easy_gui_jupyter-2024.5.28.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.3 Darwin/23.5.0

File hashes

Hashes for easy_gui_jupyter-2024.5.28.tar.gz
Algorithm Hash digest
SHA256 9a84ffb17d70f3efb37d6e7118b78aa584fe1ca42fe63b2887436a808d90d46f
MD5 d6180147c2290914d22f1022f654457e
BLAKE2b-256 177988a4181c14e4bfe975e3f03cda2d88a5ed40411af64dcdb8bceec0d655e0

See more details on using hashes here.

File details

Details for the file easy_gui_jupyter-2024.5.28-py3-none-any.whl.

File metadata

File hashes

Hashes for easy_gui_jupyter-2024.5.28-py3-none-any.whl
Algorithm Hash digest
SHA256 b83f2eb5de9dc860702d54c9ebedf6cbea3cc2840797807760da91c8f5826b74
MD5 ec16e07a1e5422c266fb8554f6c6f6f1
BLAKE2b-256 ab1a8891fddb627c58adaf90c090093c1479dfe4bdc91dfc5d320229502b42e0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page