Creating a widget registry on the Python side.

Widgets classes are registered on definition of the class using a decorator called `register`.

```Python
@register(key='Foo')
class Baz(Widget)
    #   ....
```
When not specifying any argument, the view name is used as a key. 
```Python
@register()
class Baz(Widget)
    #   ....
```

The motivation is twofold: 
1- Creation of Widgets from the JavaScript side
2- Graphical gui building interface, that needs to know about a registry of widgets. 

For the latter case rather than using a registry in the form of a `key: widget_class` dictionary as now, we could have some other metadata store with it:
```Python
key: {
    class: widget_class, 
    metadata: {}
}
``` 
The metadata could be used for categorization of widget (control, visualization, container) etc...
Not yet

On Thu, Sep 25, 2014 at 1:10 PM, Jonathan Frederic <notifications@github.com
> wrote:

> In IPython/html/widgets/widget_float.py:
>
> > @@ -43,14 +43,17 @@ def _validate(self, name, old, new):
> >              self.value = min(max(new, self.min), self.max)
> >
> >
> > +@register('jupyter.FloatText')
>
> Gotcha , I agree Jupyter is the right name, since the backend could be
> arbitrary. @ellisonbg <https://github.com/ellisonbg> do you think it's
> okay to introduce the name Jupyter into the IPython repository in this
> context?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/ipython/ipython/pull/6493/files#r18056451>.
>



-- 
Brian E. Granger
Cal Poly State University, San Luis Obispo
@ellisonbg on Twitter and GitHub
bgranger@calpoly.edu and ellisonbg@gmail.com