jmosbacher / pydantic-panel

Edit pydantic models with widgets from the awesome Panel package
MIT License
24 stars 3 forks source link

Let Pydantic pane mimic api of Param #10

Open MarcSkovMadsen opened 2 years ago

MarcSkovMadsen commented 2 years ago

A Pydantic model is very similar to a param.Parameterized class. In Panel you can turn a Parameterized class into a component using pn.Param. pn.Param enables you to

It would be powerful if the Pydantic pane worked in a similar fashion.

jmosbacher commented 2 years ago

I definitely plan on doing this at some point. I already have the fields parameter that lets you choose which fields to include but have not yet added a widgets option. I would like the implementation to play nice with the dispatch system so probably would have to define a new class called eg "WidgetSpec" that is registered in the dispatch system to a widget builder that returns the correct widget based on the spec.