Hacking Python AST: checking methods declaration

A few months ago, I wrote the definitive guide about Python method declaration, which had quite a good success. I still fight every day in OpenStack to have the developers declare their methods correctly in the patches they submit.

Read more

16 Feb 2015 | Tags: python openstack

Distributed group management and locking in Python with tooz

With OpenStack embracing the Tooz library more and more over the past year, I think it's a good start to write a bit about it.

Read more

21 Nov 2014 | Tags: python tooz openstack

Python bad practice, a concrete case

A lot of people read up on good Python practice, and there's plenty of information about that on the Internet. Many tips are included in the book I wrote this year, The Hacker's Guide to Python. Today I'd like to show a concrete case of code that I don't consider being the state of the art.

Read more

15 Sep 2014 | Tags: python whisper

Making of The Hacker's Guide to Python

As promised, today I would like to write a bit about the making of The Hacker's Guide to Python. It has been a very interesting experimentation, and I think it is worth sharing it with you.

Read more

07 May 2014 | Tags: python books

The Hacker's Guide to Python released!

And done! It took me just 8 months to do this entire book project around Python. From the first day I started writing to today, where I finally publish and sell – almost entirely – myself this book. I'm really proud of what I've achieved so far, as this was something totally new to me.

Read more

25 Mar 2014 | Tags: python books

Databases integration testing strategies with Python

The Ceilometer project supports various database backend that can be used as storage. Among them are MongoDB, SQLite MySQL, PostgreSQL, HBase, DB2… All Ceilometer's code is unit tested, but when dealing with external storage services, one cannot be sure that the code is really working. You could be inserting data with an incorrect SQL statement, or in the wrong table. Only having the real database storage running and being used can tell you that.

Read more

06 Jan 2014 | Tags: python ceilometer openstack

Python 3.4 single dispatch, a step into generic functions

I love to say that Python is a nice subset of Lisp, and I discover that it's getting even more true as time passes. Recently, I've stumbled upon the PEP 443 that describes a way to dispatch generic functions, in a way that looks like what CLOS, the Common Lisp Object System, provides.

Read more

17 Sep 2013 | Tags: python lisp

Announcing The Hacker's Guide to Python

I've been hacking on Python for a lot of years now, on various project. For the last two years, I've been heavily involved in OpenStack, which makes an heavy usage of Python.

Once you start working with a hundred of hackers, on several software and libraries representing more than half a million source lines of Python, things change. The scalability, testing and deployment problems inherent to a cloud platform meddle with everything in designing components.

Read more

03 Sep 2013 | Tags: python books

The definitive guide on how to use static, class or abstract methods in Python

Doing code reviews is a great way to discover things that people might struggle to comprehend. While proof-reading OpenStack patches recently, I spotted that people were not using correctly the various decorators Python provides for methods. So here's my attempt at providing me a link to send them to in my next code reviews. :-)

Read more

01 Aug 2013 | Tags: python

Hy, Lisp in Python

I've meant to look at Hy since Paul Tagliamonte started to talk to me about it, but never took a chance until now. Yesterday, Paul indicated it was a good time for me to start looking at it, so I spent a few hours playing.

Read more

03 Apr 2013 | Tags: python hy lisp

OpenStack Swift eventual consistency analysis & bottlenecks

Swift is the software behind the OpenStack Object Storage service.

This service provides a simple storage service for applications using RESTful interfaces, providing maximum data availability and storage capacity.

I explain here how some parts of the storage and replication in Swift works, and show some of its current limitations.

If you don't know Swift and want to read a more "shallow" overview first, you can read John Dickinson's Swift Tech Overview.

Read more

23 Apr 2012 | Tags: openstack swift python

First release of PyMuninCli

Today I release a Python client library to query Munin servers.

Read more

17 Apr 2012 | Tags: python munin

xpyb 1.3 released

It took a while to get it out, but finally, 3 years after the latest release (1.2), the version of 1.3 of xpyb (the XCB Python bindngs) is out.

Read more

22 Mar 2012 | Tags: python xcb xpyb freedesktop x11

Google Calendar notifications using pynotify

I use Google Calendar to manage my calendars, and I really missed something to warn me whenever I have an appointment with an alert set.

Read more

03 Jan 2012 | Tags: python gtk notify googlecalendar gdata

New job, new blog

It has been a while since I blogged but I've been very busy, with my new job and this new blog!

Read more

07 Dec 2011 | Tags: work openstack python debian

Python sets comparisons

This week I lost some time playing with Python's sets.

Read more

17 May 2011 | Tags: python

Python cairo and XCB support

cairo has a Python binding (pycairo) since a long time, and some months ago a Python binding for XCB (xpyb) has been released.

Read more

22 Dec 2009 | Tags: python cairo xcb

Teething troubles

It's not that often that I start something from scratch. It's an amazing feeling to start a new project, to start writing something new. I like that. It's creation, it's an artistic part of our computing stuff. I feel like a code artist.

Read more

20 Dec 2009 | Tags: python cython