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

How to integrate with PickleType #201

Open
kaito-albert opened this issue Oct 2, 2020 · 1 comment
Open

How to integrate with PickleType #201

kaito-albert opened this issue Oct 2, 2020 · 1 comment

Comments

@kaito-albert
Copy link

I want to pass a list to the schema which uses SQLAlchemy's PickleType column.
The json file will looks like this:

json_data = {uuid: '123456...', coords: [[x1, y1], [x2, y2]]}

But looks like ma.SQLAlchemyAutoSchema treat PickleType column as string so if I do schema.load(json_data) it will say coords is not a valid string.
I use some trick like str(json_data(coords) before schema.load(json_data) and eval(json_data(coords) after. But when I do schema.dump(model), it will still convert coords to string. And I have to eval it again.
Is there better way to to integrate with PickleType? Or is there any way to skip the validation for specific column.

@iFreilicht
Copy link

iFreilicht commented Oct 15, 2021

I have the same problem. Did you ever find a better solution?

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

2 participants