Skip to main content

Collection of Jupyter Widgets

Project description

wigglystuff

"A collection of expressive Jupyter widgets."

The project uses anywidget under the hood so our tools should work in Jupyter, VSCode, Colab and Marimo. That also means that you get a proper widget that can interact with ipywidgets natively.

Installation

Installation occurs via pip.

python -m pip install wigglystuff

Usage

Slider2D

from wigglystuff import Slider2D

widget = Slider2D()
widget

This widget allows you to grab the widget.x and widget.y properties to get the current position of the slider. But you can also use the widget.observe method to listen to changes in the widget.

Example of widget.observe
import ipywidgets
from wigglystuff import Slider2D

widget = Slider2D()
output = ipywidgets.Output()
state = [[0.0, 0.0]]

@output.capture(clear_output=True)
def on_change(change):
    if abs(widget.x - state[-1][0]) > 0.01:
        if abs(widget.y - state[-1][1]) > 0.01:
            state.append([widget.x, widget.y])
    for elem in state[-5:]:
        print(elem)

widget.observe(on_change)
on_change(None)
ipywidgets.HBox([widget, output])

Matrix

from wigglystuff import Matrix

arr = Matrix(rows=1, cols=2, triangular=True, step=0.1)
mat = Matrix(matrix=np.eye(2), triangular=True, step=0.1)

This widget allows you to grab the mat.matrix property after editing the matrix. This returns a list of lists which can easily be cast into a numpy array via np.array(mat.matrix).

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

wigglystuff-0.1.6.tar.gz (8.2 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

wigglystuff-0.1.6-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

wigglystuff-0.1.6-py2.py3-none-any.whl (8.9 kB view details)

Uploaded Python 2Python 3

File details

Details for the file wigglystuff-0.1.6.tar.gz.

File metadata

  • Download URL: wigglystuff-0.1.6.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.4

File hashes

Hashes for wigglystuff-0.1.6.tar.gz
Algorithm Hash digest
SHA256 ed3607a41934def75675138e4648ad5526b03c0e7f7be3a29053671506b50cab
MD5 836a2a693e4890d6ed5fcef623165e6c
BLAKE2b-256 5063050176671f12b5733c8b3726881b9eb6cdcb6bb4b72c82aad800647601fe

See more details on using hashes here.

File details

Details for the file wigglystuff-0.1.6-py3-none-any.whl.

File metadata

File hashes

Hashes for wigglystuff-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 44e772df0b65c12e219f442d2ed32e6ed145a4b5535aa102d757ff6a44521586
MD5 cf7a9789f60d79beec2ad91c245e9d1e
BLAKE2b-256 6ad9288254d12acc5469bd9c16808f5af3a23091fca4cda65c1564db1584a724

See more details on using hashes here.

File details

Details for the file wigglystuff-0.1.6-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for wigglystuff-0.1.6-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 d1a3a2c8e018d5e634d6e33827672b6a6e1a08a877fedd22adff8b2bd7a231cf
MD5 811ca8084d9b9348b80284134289cbdd
BLAKE2b-256 196f2e448c8fce08afed80e2f336893672b3795cff103ad04de14fd95463a6f3

See more details on using hashes here.

Supported by

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