holoviz / param

Param: Make your Python code clearer and more reliable by declaring Parameters
https://param.holoviz.org
BSD 3-Clause "New" or "Revised" License
412 stars 69 forks source link

Translate param.Parameterized to pydantic.BaseModel #828

Open ahuang11 opened 10 months ago

ahuang11 commented 10 months ago

Jim mentioned adding what Marc and I shared on Discourse to param, perhaps as a util(?), or simply briefly mention in docs. https://discourse.holoviz.org/t/how-would-i-create-a-parameterized-class-programmatically/3149/4?u=ahuang11

Note, this does not handle converting param methods at all; simply incompletely translating the parameters into fields.

The opposite issue (converting from pydantic -> param) can be found here: https://github.com/holoviz/param/issues/809