Skip to content

feature: Support Pydantic / dataclasses #4700

@sandias42

Description

@sandias42

I love windmill as a way to trivially make python scripts into production-ready endpoints. Thanks for building it!

Idea: Any windmill Python script can take a pydantic model or return a pydantic model without breaking windmill's type inference.

But I was sad to see that the input spec inference only works for basic argument types, given that most ML-focused python developers I know rely on libraries like Pydantic (21k stars), Attrs or built-in dataclasses for defining data specs (in FastAPI (77k stars) for example).

I haven't looked at this for a minute, but I think pydantic supports conversion to json-schema, and this might "just work" for your argument type inference. Then, a python windmill script It would make me very very happy :D

(Note: there was a project geared towards python ML practitioners which does the pydantic bit, and I would love to use except it doesn't handle auth, hosting, etc which is where I see windmill shining).

Thanks for considering this idea.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions