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
Explore where pydantic
might help with UX
#2860
Comments
I think this idea is great for runtime type checking. The objects need to inherit from |
I'm very much looking forward to this feature. In my work, I encapsulate a bunch of pydantic Models outside of But actually there are some problems here. In my work, I use Also, |
Nice to see some discussion on this already! @e3243eric I opened this as more of an exploratory "research" issue to track pros, cons, possible improvements, etc. There's not a real void to be filled with a PR quite yet but happy to see the interest coming in for it! @XiaoHuiHui233, thanks for getting the conversation started and providing some solid input here. Very much appreciated. Looks like some benchmarking could be useful. It might be nice to benchmark on a subset of calls / types to compare against the current state of things. Yeah, looks like V2 release is slated for Q1 of 2023 - will be good to keep an eye out for it. I don't quite have the bandwidth to dive in here at the moment but being as this would likely be part of the next major version of web3.py ( |
That's funny, I was literally thinking about this earlier but was worried about pushback on adding another dependency. Would the idea be that this replaces |
Explore the idea of using
pydantic
dependency to better validate request object types and their params. This could help with field validation and error messages. There may be some UX improvements that are worth exploring there.The text was updated successfully, but these errors were encountered: