Pandera Models with FastAPI #1319
Unanswered
vilmar-hillow
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Is there any detailed documentation on the interactions of pandera Models with FastAPI?
For example, let's take this sample:
Calling
/pathendpoint with{"some_int": [1], "some_float": [2.0]}payload will return a500due to serialization issues:ValueError: [TypeError("'numpy.int64' object is not iterable"), TypeError('vars() argument must have __dict__ attribute')]This can be circumvented by using a float instead of int in the spec, or specifying
to_format = "dict"in the Config, but both behaviours are not expected.I'm using pandera
0.16.1and fastapi0.99.1(0.100 and higher seem to conflict with pandera)Beta Was this translation helpful? Give feedback.
All reactions