Ordered Dictionaries with Python 2.4-2.6

OrderedDict is a super handy data structure. An OrderedDict is a dict that remembers the order that keys were first inserted. If a new entry overwrites an existing entry, the original insertion position is left unchanged. Deleting an entry and reinserting it will move it to the end. Problem is, this stuff is only available in the standard library since Python 2.7 while my project also needs to support Python 2.6. Fortunately there’s a back-port available and it is only a pip install away: # make OrderedDict available on Python 2.6-2.4 $ pip install ordereddict ordereddict is based on the awesome recipe by Raymond Hettinger, works with Python 2.4-2.6 and, most importantly, is a drop-in replacement for OrderedDict. However if you want your code to run seamlessly on all Pythons there’s still some work to be done. First of all you want to make sure that the appropriate OrderedDict is imported, either the standard library version (for Python 2.7 and above) or the back-port release. ...

September 16, 2014 · Nicola Iarocci

Eve 0.4 and Cerberus 0.7 Released

Eve 0.4 adds cool features like Document Versioning and Coherence Mode. Cerberus 0.7 allows regex validation amongst other niceties. Make sure to check the official v0.4 announcement for all the details.

July 10, 2014 · Nicola Iarocci

10 Most Common Python Mistakes

Python’s simple, easy-to-learn syntax can mislead Python developers – especially those who are newer to the language – into missing some of its subtleties and underestimating the power of the language. With that in mind, this article presents a “top 10” list of somewhat subtle, harder-to-catch mistakes that can bite even the most advanced Python developer in the rear. via 10 Most Common Python Mistakes.

June 4, 2014 · Nicola Iarocci

Eve 0.3 Released

Today we released Eve v0.3. It includes customizable Files Storage support (on GridFS by default), a lot of fixes, several breaking changes and a lot of love. Head over to relevant blog post and/or to changelog to know more about it.

February 14, 2014 · Nicola Iarocci

REST APIs for Humans at FOSDEM

Yesterday I gave a talk at FOSDEM 2014 in Brussels. The conference itself was amazing, with over 5000 attendees literally swarming and taking over the ULB Campus. I was stoked at how smoothly everything was going on despite the incredible number of simultaneous sessions and the number of attendees continuously flowing between buildings and conference rooms. Everybody involved, volunteers and attendees, has been very welcoming, charming and helpful. In short, I had a blast....

February 3, 2014 · Nicola Iarocci

Python and Flask Are Ridiculously Powerful

As a developer, I sometimes forget the power I yield. It’s easy to forget that, when something doesn’t work the way I’d like, I have the power to change it. via Python and Flask Are Ridiculously Powerful.

January 22, 2014 · Nicola Iarocci

Python is the Language of the Year

We shouldn’t really trust this kind of statistics, I know, but when my favorite language comes out as a clear winner, I can’t resist and take them for good. Python is the “language of the year” according to the PYPL index : it had the biggest increase in popularity share in 2013. PHP had the biggest decline. Meanwhile, Java continues to have the highest popularity share among the programming languages....

January 2, 2014 · Nicola Iarocci

Alex Gaynor — About Python 3

A very interesting read if you’re into Python. Eve has been Python 3 compatible for a while and honestl, I would be surprised to find that somebody is running it in production under Python 3. Why aren’t people using Python 3? First, I think it’s because of a lack of urgency. Many years ago, before I knew how to program, the decision to have Python 3 releases live in parallel to Python 2 releases was made....

December 30, 2013 · Nicola Iarocci

You Should Change Your Python Shell

If you write Python code, switching to IPython is the number one thing you can do to immediately improve your productivity. Bold words, I know. Let’s look at how IPython can make you a more productive programmer. via You Should Change Your Python Shell | GrokCode.

December 29, 2013 · Nicola Iarocci

Eve v0.0.8 has been released

Most significant features are probably the native support for MongoDB write concern settings, new event hooks allowing for transformation of documents before they are sent to clients, increased handling of both pagination and CORS, and the native validation of float data types. Get it on PyPI, go straight to the source code or more likely, visit the project homepage.

July 25, 2013 · Nicola Iarocci