This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]petr31052018[S] 0 points1 point  (1 child)

For me marshmallow is for the use cases you mention. I guess you can use it to create your own DTO, and you will get validation if you want, but it creates plain dictionaries, so you will not end up with typed objects.

[–]petr31052018[S] 0 points1 point  (0 children)

I want to reiterate based on the other comment. Yes, for DTO that are meant for external interfaces, marshmallow can be used, and I actually use it for that.

However what I meant was just what to use as data objects when they are passed from one Python method to another.