We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have an schema:
class ExampleSchema(Schema): name: str value: int | float | bool
When I pass an integer or boolean value, marshmallow converts it into a float. Is there any clean way to correct this?
The text was updated successfully, but these errors were encountered:
Duplicate of #270.
See https://github.com/Bachmann1234/marshmallow-polyfield
Your use case is closer to Union field, but it wouldn’t work because all the types are compatible.
https://github.com/adamboche/python-marshmallow-union
I suspect this “polynumber” use case is common enough to justify a utility that maps the type or minimizes value change.
Sorry, something went wrong.
No branches or pull requests
I have an schema:
When I pass an integer or boolean value, marshmallow converts it into a float. Is there any clean way to correct this?
The text was updated successfully, but these errors were encountered: