Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: Support Pydantic / dataclasses #4700

Open
sandias42 opened this issue Nov 13, 2024 · 0 comments
Open

feature: Support Pydantic / dataclasses #4700

sandias42 opened this issue Nov 13, 2024 · 0 comments
Assignees

Comments

@sandias42
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants