Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

For those of us more dictionary oriented, there is https://pypi.python.org/pypi/voluptuous (which is OK for the most part, as long as you are only trying to do validation, and nothing too crazy)


Similar, I've used this library with a lot of success: https://marshmallow.readthedocs.org/en/latest/


+1 for marshmallow - most of the serialization libraries are 80% there, but marshmallow has it 95% down - all the weird corner cases about nested models and lists of nested models and all that. Plus the dev is very helpful and courteous on github.


I've tried truckloads of Python serialisation libs over the last few years and marshmallow is the one that finally makes me feel like I don't need to look for another one.


It's very easy and does everything I've needed it to!


Looks extremely similar to https://github.com/schematics/schematics . Always good to see two projects approach the problem the same way independently - higher chance that the solution is right :)

Schematics has a very useful feature in "roles" - i.e. a good way of hiding certain fields in certain situations (e.g. admin views vs self vs other vs anonymous). Does marshmallow have something similar?


Marshmallow is also my favourite lib of the year. Pyramid guys love it too! The developer is responsive, and the library moves really fast!


That looks great, I've built similar things myself and it's great to find someone elses I can use.


hear hear. Steve Loria, the author, has done tremendous work this year. Thanks Steve!


On the binary side Construct is quite nice: https://construct.readthedocs.org

I've used it for parsing various network protocols to good effect.


Huh, voluptuous looks pretty much exactly the same as schema. Or at least a subset of it, as it doesn't have And/Or/Use, as far as I can see.


I believe it may, perhaps analogous to its Any and All, etc.


voluptuous is simple and useful




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: