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?
I've used it for parsing various network protocols to good effect.
Thank you so much for providing this example. I couldn't grok what schema did, and your code made it make sense.
If people want to provide examples for the other libraries in this thread, you'll be popular :)
I generally like the simplicity of Rx and the fact that's language agnostic (I've used it with both json and yaml and other serialization libraries), with schemas themselves being written both systems. However, the lacking documentation has always been a problem.
I have yet to find a validation library that supports all the sorts of things I expect it to. One place they tend to fail is the ways they can fulfill default values.
Say a field has an error and I want to just give it a default value when it's broken? That particular feature doesn't exist in any library i've found so far (for python) =/
Granted, this sort of blends into the usual "It's a validation library not a serialization library". But they all make a half-assed attempt at the other side in my experience.
https://pypi.python.org/pypi/schema
Here's a schema I use in production, see how readable it makes the parameters of the API and how quick all the validation and normalization is:
https://www.pastery.net/mhwwnv/
At the end, you get an object called data, and you can do data.title, data.language, etc, and be sure that everything is as you expect.