This is a tangent, but the most annoying change in the latest Python versions is you can no longer write print "foo". Now it has to be print("foo"). Damn kids ruining my language.
'New' Python modules of 2015
101–110 of 137 posts
Re: 'New' Python modules of 2015
#102Re: 'New' Python modules of 2015
#103Earlier quoted context omitted.
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/
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
#104This is a tangent, but the most annoying change in the latest Python versions is you can no longer write print "foo". Now it has to be print("foo"). Damn kids ruining my language.
The statement-to-function migration for print is, IMO, generally an improvement, but in any case its not a change in the latest versions of python, except with an unusually broad interpretation of latest; its a change in Python 3.0, which was released a little over 7 years ago.
Re: 'New' Python modules of 2015
#105Are there any ruby alternatives to tqdm?
Re: 'New' Python modules of 2015
#106Earlier quoted context omitted.
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/
Re: 'New' Python modules of 2015
#107Re: 'New' Python modules of 2015
#108Hands down, my favorite new library is schema: 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.
Re: 'New' Python modules of 2015
#109I am using Scrapy a lot. http://scrapy.org/ It is very well designed web crawling library.