News for hackers. Stuff that matters.
Re:'New' Python modules of 2015 by fidget on Wednesday December 23, 2015 @12:32PM (#10784422)
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)
Re:'New' Python modules of 2015 by odonnellryan on Wednesday December 23, 2015 @02:00PM (#10784940)
Similar, I've used this library with a lot of success: https://marshmallow.readthedocs.org/en/latest/
Re:'New' Python modules of 2015 by makmanalp on Wednesday December 23, 2015 @05:34PM (#10786075)
+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.
Re:'New' Python modules of 2015 by aidos on Wednesday December 23, 2015 @02:40PM (#10785162)
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.
Re:'New' Python modules of 2015 by odonnellryan on Wednesday December 23, 2015 @02:53PM (#10785237)
It's very easy and does everything I've needed it to!
Re:'New' Python modules of 2015 by NightMKoder on Wednesday December 23, 2015 @04:52PM (#10785901)
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?

Re:'New' Python modules of 2015 by Walkman on Wednesday December 23, 2015 @04:10PM (#10785665)
Marshmallow is also my favourite lib of the year. Pyramid guys love it too! The developer is responsive, and the library moves really fast!
Re:'New' Python modules of 2015 by stuaxo on Wednesday December 23, 2015 @04:12PM (#10785680)
That looks great, I've built similar things myself and it's great to find someone elses I can use.
Re:'New' Python modules of 2015 by Dowwie on Wednesday December 23, 2015 @08:22PM (#10786571)
hear hear. Steve Loria, the author, has done tremendous work this year. Thanks Steve!
Re:'New' Python modules of 2015 by hedgehog on Wednesday December 23, 2015 @02:15PM (#10785032)
On the binary side Construct is quite nice: https://construct.readthedocs.org

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

Re:'New' Python modules of 2015 by StavrosK on Wednesday December 23, 2015 @12:41PM (#10784469)
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.
Re:'New' Python modules of 2015 by mixmastamyk on Wednesday December 23, 2015 @01:05PM (#10784607)
I believe it may, perhaps analogous to its Any and All, etc.
Re:'New' Python modules of 2015 by rezacks on Thursday December 24, 2015 @02:04AM (#10787409)
voluptuous is simple and useful