Giter Club home page Giter Club logo

ipywidgets-examples's Introduction

Jupyter widget example

This is intended as a straightforward example of how to build a pure-python widget that uses a Model-View-Controller design. It works with ipywidgets 5+ and traitlets 4.1+. This is not currently packaged for installation via pypi. Instead, download it as a zip from github, or, even better, clone it and improve it!

The widget is a simple password generator.

The file model.py contains the data model: a class that has as traitlet properties the parameters that go into generating the password and a method for doing the generation based on the parameters. The observe decorator indicates which method gets called when properties of the widgets change because the user has adjusted them; this is one piece of the controller.

The file gui.py does two things: set up the actual widgets (the view) and link properties of the widget elements to traits in the model (one piece of the controller).

ipywidgets-examples's People

Contributors

mwcraig avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

sfyertj

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.