Skip to main content

A Player for Widgets with Values with Jupyter Notebook

Project description

ValuePlayerWidget

ValuePlayerWidget is a tool to save and display the different steps of a visualisation. It allows the Player to watch all the steps leading to a final step backward and forward. It is also possible to set an UI : you may either display buttons or a delpy interface (which is a Blockly interface for jupyter).

ValuePlayerWidget takes four parameters for its initialization :

  • 'visualisation' : this parameter is obligatory, it has to be or inheritate from a traitlets object. This will be the visualisation, le Player interacts with.

  • 'UI' : This parameter is optional and set which user interface will be displayed. It is set to None by default. Possible values :

    • None : No user interface
    • 'btn' : display action buttons
    • 'delpy' : display a Delpy interface
  • 'actions' : this parameter is optionnal. It has to be a dictionary of lists. Each key of the dictionnary defines either a column for the buttons UI or a category for the Delpy UI. This is an example to understand its structure :

    • actions={'category1':[('f1_name',f1,p1,p2), ('f2_name',f2)],'category2':[('f1_name',f1,p3,p4),('f3_name',f3,p5),('f3_name',f3)]}

    Each list contains tupples and each tupple defines either a button or a deply method. In this example, we have two categories/columns. For each action, we give a tupple t in which we may find at least 2 elements : * "fX_name" : the name of the action, it will be displayed on the buttons or become the name of the Delpy method * "f1" : the function we wihs to execute * args : it is optional, they are arguments to give to the function before it is executed

  • 'language' : this parameter is optionnal and set to 'en_EN' by default. A french version is also available with language='fr_FR'

There are several possibles modes to watch the steps :

  • With the sliders : The player may choose which step to display with the "Time" slider and choose the speed with the "Speed" slider
  • With the buttons, each butons changes the way to display the step (from the left to the right):
    • Display the first step and pause
    • Display the steps backward or/and increase the speed
    • Display the steps backward with a normal speed
    • Display the previous step and pause
    • Play/Pause
    • Display the next step and pause
    • Display the steps wiath a normal speed
    • Display the steps or/and increase the speed
    • Display the last step and pause

Link to the Demo

Binder : Binder

Dependencies:

Install :

pip install valueplayerwidget

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

valueplayerwidget-0.1.3.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

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

valueplayerwidget-0.1.3-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file valueplayerwidget-0.1.3.tar.gz.

File metadata

  • Download URL: valueplayerwidget-0.1.3.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.3.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.4

File hashes

Hashes for valueplayerwidget-0.1.3.tar.gz
Algorithm Hash digest
SHA256 cfe39fe894979e3af23bf8dd989f3d19f99c1ac4641c2e2cdb4afaf2c638a17d
MD5 492387d037ee713bfd013d8bbee07317
BLAKE2b-256 350e8722c0a5dc7438de7fdb13f33449f728f74a0c1dff409f05f68d821eb3db

See more details on using hashes here.

File details

Details for the file valueplayerwidget-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: valueplayerwidget-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 9.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.3.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.4

File hashes

Hashes for valueplayerwidget-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1c823975c4878d801a672a538193be6b403a23e01003aa1a492dffaaabe07ee8
MD5 5e6c637016adcb43c2f2d8b79f3f8e31
BLAKE2b-256 e54471fc23d6cc58f3cc8e1358247cc89342c43b6f27a413b8b378725b610a84

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