5 ms·
For those of us more dictionary oriented, there is https://pypi.python.org/pypi/voluptuous https://pypi.python.org/pypi/voluptuous (which is OK for the most par
by fidget 11y ago
For those of us more dictionary oriented, there is https://pypi.python.org/pypi/voluptuous 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)
- StavrosK 11y agoHuh, 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.
- mixmastamyk 11y agoI believe it may, perhaps analogous to its Any and All, etc.
- odonnellryan 11y agoSimilar, I've used this library with a lot of success: https://marshmallow.readthedocs.org/en/latest/ https://marshmallow.readthedocs.org/en/latest/
- aidos 11y agoI'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.
- odonnellryan 11y agoIt's very easy and does everything I've needed it to!
- Walkman 11y agoMarshmallow is also my favourite lib of the year. Pyramid guys love it too! The developer is responsive, and the library moves really fast!
- stuaxo 11y agoThat looks great, I've built similar things myself and it's great to find someone elses I can use.
- NightMKoder 11y agoLooks extremely similar to https://github.com/schematics/schematics 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?
- makmanalp 11y ago+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.
- Dowwie 11y agohear hear. Steve Loria, the author, has done tremendous work this year. Thanks Steve!
- hedgehog 11y agoOn the binary side Construct is quite nice: https://construct.readthedocs.org https://construct.readthedocs.org I've used it for parsing various network protocols to good effect.
- rezacks 11y agovoluptuous is simple and useful