off the stack

import sh

2014-06-02 | python

A small python library which seems to work rather well when it comes to shelling out is sh. It provides a handy and lightweight abstraction above the means already available within python.

The features I found most useful:

read more

builder for docker images

2014-03-21 | docker, python

Docker provides a facility to easily create images based on a recipe-like "Dockerfile". After the image is built using the docker build command, it can be run as a container and also be distributed using the public or a private docker registry.

While using the build command is easy enough ...

read more

Gather metrics using psutil

2013-09-28 | python

Psutil is a nice python module, providing an interface for gathering system and process related metrics.

It can be easily installed from pypi using pip for example. After that, a straightforward import psutil is enough to load the library.

Then one can get CPU metrics:

In [2]: psutil.cpu_percent()
Out ...

read more

Keep in touch with your servers using XMPP

2012-10-10 | xmpp, monitoring, python

Why

My first contact with XMPP was some years ago. Back then I had to glue together the facebook.com and hyves.nl instant messaging features in one application providing an improved social experience while shopping over the internet.

Time has gone by and I still have Psi installed on ...

read more

A python can bite you too

2012-09-15 | django, python

While doing maintenance/bug fixing work on a website built with Django, a came across an issue with the commenting system. The problem was, that the order of the comments was not right sometimes. Comments which were placed as a comment on another comment were occasionally even displayed before their ...

read more

Piping hosts to Fabric

2012-09-11 | fabric, python

based on fabric version 0.9.1 and python 2.6

Fabric is a command-line tool and library which can be used to streamline various system administration and application deployment tasks providing facilities to run commands locally and remotely (through SSH).

Why

For remote commands, you can specify the hosts ...

read more