Posts with tag Python

Easy Python logging with daiquiri

Tuesday 04 July 2017 Python, daiquiri Comments

After more than 10 years of writing Python, there's something I always have been annoyed with: logging.

Read More

Python never gives up: the tenacity library

Thursday 02 March 2017 Python Comments

A couple of years ago, I wrote about the Python retrying library. This library was designed to retry the execution of a task when a failure occurred.

Read More

FOSDEM 2017, recap

Monday 06 February 2017 FOSDEM, Gnocchi, Python Comments

Last week-end, I was in Brussels, Belgium for the 2017 edition of the FOSDEM, one of the greatest open source developer conference.

Read More

Scaling Python is on its way

Monday 16 January 2017 Python, Books Comments

My day-to-day activities are still evolving around the Python programming language, as I continue working on the OpenStack project as part of my job at Red Hat. OpenStack is still the biggest Python project out there, and attract a lot of Python hackers.

Those last few years, however, things have taken a different turn for me when I made the choice with my team to rework the telemetry stack architecture. We decided to make a point of making it scale way beyond what has been done in the project so far.

Read More

Packaging Python software with pbr

Monday 02 January 2017 Python, pbr Comments

Packaging Python has been a painful experience for long. The history of the various distribution that Python offered along the years is really bumpy, and both the user and developer experience has been pretty bad.

Read More

From decimal to timestamp with MySQL

When working with timestamps, one question that often arises is the precision of those timestamps. Most software is good enough with a precision up to the second, and that's easy. But in some cases, like working on metering, a finer precision is required.

Read More

The definitive guide to Python exceptions

Thursday 11 August 2016 Python Comments

Three years after my definitive guide on Python classic, static, class and abstract methods, it seems to be time for a new one. Here, I would like to dissect and discuss Python exceptions.

Read More

The Hacker's Guide to Python 3rd edition is out

Wednesday 04 May 2016 Python, Books Comments

Exactly a year ago, I released the second edition of my book The Hacker's Guide to Python. One more time, it has been a wonderful release and I received a lot of amazing feedback from my readers all over this year.

Read More

Pifpaf, or how to run any daemon briefly

Friday 08 April 2016 OpenStack, Python, TDD, Pifpaf Comments

There's a lot of situation where you end up needing a software deployed temporarily. This can happen when testing something manually, when running a script or when launching a test suite.

Read More

Timeseries storage and data compression

Monday 15 February 2016 Python, Gnocchi, OpenStack Comments

The first major version of the scalable timeserie database I work on, Gnocchi was a released a few months ago. In this first iteration, it took a rather naive approach to data storage. We had little ideas about if and how our distributed back-ends were going to be heavily used, so we stuck to the code of the first proof-of-concept written a couple of years ago.

Recently we got more feedbacks from our users, ran a few benchmarks. That gave us enough feedback to start investigating in improving our storage strategy.

Read More

Profiling Python using cProfile: a concrete case

Monday 16 November 2015 Python, Gnocchi Comments

Writing programs is fun, but making them fast can be a pain. Python programs are no exception to that, but the basic profiling toolchain is actually not that complicated to use. Here, I would like to show you how you can quickly profile and analyze your Python code to find what part of the code you should optimize.

Read More

My interview in le Journal du Hacker

Thursday 17 September 2015 OpenStack, Books, Python, Work Comments

A few days ago, the French equivalent of Hacker News, called "Le Journal du Hacker", interviewed me about my work on OpenStack, my job at Red Hat and my self-published book The Hacker's Guide to Python. I've spent some time translating it into English so you can read it if you don't understand French! I hope you'll enjoy it.

Read More

Data validation in Python with voluptuous

Friday 04 September 2015 Python Comments

Continuing my post series on the tools I use these days in Python, this time I would like to talk about a library I really like, named voluptuous.

Read More

Reading LWN.net with Pocket

Thursday 13 August 2015 LWN, Pocket, Python Comments

I've started to use Pocket a few months ago to store my backlog of things to read. It's especially useful as I can use it to read content offline since we still don't have any Internet access in places such as airplanes or the Paris metro. It's only 2015 after all.

Read More

Timezones and Python

Tuesday 16 June 2015 Python, OpenStack Comments

Recently, I've been fighting with the never ending issue of timezones. I never thought I would have plunged into this rabbit hole, but hacking on OpenStack and Gnocchi I felt into that trap easily is, thanks to Python.

Read More

Get back up and try again: retrying in Python

Tuesday 02 June 2015 Python Comments

I don't often write about tools I use when for my daily software development tasks. I recently realized that I really should start to share more often my workflows and weapons of choice.

One thing that I have a hard time enduring while doing Python code reviews, is people writing utility code that is not directly tied to the core of their business. This looks to me as wasted time maintaining code that should be reused from elsewhere.

So today I'd like to start with retrying, a Python package that you can use to… retry anything.

Read More

My interview about software tests and Python

Monday 11 May 2015 Python, Books, TDD, OpenStack Comments

I've recently been contacted by Johannes Hubertz, who is writing a new book about Python in German called "Softwaretests mit Python" which will be published by Open Source Press, Munich this summer. His book will feature some interviews, and he was kind enough to let me write a bit about software testing. This is the interview that I gave for his book. Johannes translated to German and it will be included in Johannes' book, and I decided to publish it on my blog today. Following is the original version.

Read More

The Hacker's Guide to Python, 2nd edition!

Monday 04 May 2015 Python, Books Comments

A year passed since the first release of The Hacker's Guide to Python in March 2014. A few hundreds copies have been distributed so far, and the feedback is wonderful!

Read More

Hacking Python AST: checking methods declaration

Monday 16 February 2015 Python, OpenStack Comments

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

Distributed group management and locking in Python with tooz

Friday 21 November 2014 Python, Tooz, OpenStack Comments

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

Python bad practice, a concrete case

Monday 15 September 2014 Python, Whisper Comments

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

Making of The Hacker's Guide to Python

Wednesday 07 May 2014 Python, Books Comments

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

The Hacker's Guide to Python released!

Tuesday 25 March 2014 Python, Books Comments

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

Databases integration testing strategies with Python

Monday 06 January 2014 Python, Ceilometer, OpenStack Comments

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

Python 3.4 single dispatch, a step into generic functions

Tuesday 17 September 2013 Python, Lisp Comments

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

Announcing The Hacker's Guide to Python

Tuesday 03 September 2013 Python, Books Comments

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

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

Thursday 01 August 2013 Python Comments

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

Hy, Lisp in Python

Wednesday 03 April 2013 Python, Hy, Lisp Comments

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

OpenStack Swift eventual consistency analysis & bottlenecks

Monday 23 April 2012 OpenStack, Swift, Python Comments

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

First release of PyMuninCli

Tuesday 17 April 2012 Python, Munin Comments

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

Read More

xpyb 1.3 released

Thursday 22 March 2012 Python, XCB, xpyb, Freedesktop, X11 Comments

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

Google Calendar notifications using pynotify

Tuesday 03 January 2012 Python, GTK+, Google Calendar Comments

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

Using GTK+ stock icons with pynotify

Tuesday 27 December 2011 Python, GTK+ Comments
Read More

New job, new blog

Wednesday 07 December 2011 Work, OpenStack, Python, Debian Comments

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

Read More

Python sets comparisons

Tuesday 17 May 2011 Python Comments

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

Read More

Python cairo and XCB support

Tuesday 22 December 2009 Python, Cairo, XCB, xpyb Comments

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

Teething troubles

Sunday 20 December 2009 Python, Cython Comments

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