Unpack container image using docker-py

This is just a quick blog post. I’ve seen a bunch of questions on docker-py’s issue tracker about how to extract a container image using docker-py and get_archive (a.k.a. docker export).

Keep reading

Non-blocking stdin with python using epoll

I was playing with epoll and was curious whether I can use it to monitor sys.stdin. The biggest issue was that sys.stdin.read() is blocking and I had no way to figure out whether I read the descriptor fully or not (making the epoll useless pretty much). Until I changed it to non-blocking with fcntl.

Keep reading

Installing python packages from git via pip

It may happen that you need to install a python project with pip from git(hub). That’s pretty easy:

Keep reading