tiangolo / pydantic-sqlalchemy

Tools to convert SQLAlchemy models to Pydantic models

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ability to pass list of included attributes

sundeep-amrute-bfef opened this issue · comments

Similar to the exclude parameter of sqlalchemy_to_pydantic(), it would be useful to be alternately able to specify an include list of columns. This would be convenient when we have a model with say 30 columns of which only 10 need to be specified when creating a new item. This would be similar to the Marshmallow "only" option.

fro reference, it is implemented in this fork
https://github.com/ggabriel96/alchemista/