Marshmallow: Simplified object serialization for Python
1–10 of 16 posts
Re: Marshmallow: Simplified object serialization for Python
#2I'm also a fan of Schematics (https://schematics.readthedocs.org/en/latest/) which is more or less identical in intent
Re: Marshmallow: Simplified object serialization for Python
#3Awesome project. Using it on several customer projects (non public code) and probably soon on Abilian Platform.
Re: Marshmallow: Simplified object serialization for Python
#4I'm used to colander - http://colander.readthedocs.org/en/latest/
Re: Marshmallow: Simplified object serialization for Python
#5Just wanted to say, this project has some of the best documentation around. Really happy to have this library around :)
Re: Marshmallow: Simplified object serialization for Python
#6I really hate this property magic, it was bad in the Django ORM and it'll be bad in Marshmallow too. It looks nice in the examples, but then when you have to use it in anger and a certain problem requires metaclasses to fix...
Re: Marshmallow: Simplified object serialization for Python
#7And then there is clojure where you just keep things as data all the time.
Re: Marshmallow: Simplified object serialization for Python
#8I'm also a fan of Schematics ( https://schematics.readthedocs.org/en/latest/ ) which is more or less identical in intent
It looks good but using it in a naive manner to interface with a database, as shown in the example, without binding variables, leaving you totally open to injections is quite bad. What would be good is a lightweight binding to sqlalchemy, leaving the dangerous part to the expertsm.
That said, there is a real place for this library and quite a few new ones have popped up in the last year.
Re: Marshmallow: Simplified object serialization for Python
#9I really hate this property magic, it was bad in the Django ORM and it'll be bad in Marshmallow too. It looks nice in the examples, but then when you have to use it in anger and a certain problem requires metaclasses to fix...
Please elaborate. I share your sentiment, but I also see the value in this kind of api.
Re: Marshmallow: Simplified object serialization for Python
#10Used it on a huge project where I wanted the interfaces clean between the Python project at runtime and to serialize the Python objects to the database. Using pickling gave me sleepless night until I moved to Marshmallow. Whilst Django REST Framework comes with a nice serializer and parser modules, marshmallow's ability to do just the part was a godsend.
This alone gave us the flexibility to expose the Python modules and objects as a simple JSON API and the DB load / save came for free.
Highly recommended.