Category: python

Connecting to Eucalyptus Walrus (S3) with Boto and socket.gaierror

If you are trying to perform any bucket operations on Eucalyptus Walrus (S3) service from boto and are getting “socket.gaierror: [Errno -2] Name or service not known”, it’s because you did not specify the proper calling_format when creating your S3Connection object. Default calling format is SubdomainCallingFormat which will attempt to...

Read more...

Extending EC2 API - ec2-describe-ipaddress-ranges

Do you remember how we used to programmatically consume services on the web before proliferation of APIs? That’s right - scraping! And do you know what prevents us from using this technique now, when some piece of data you need for your application, is not available via API? That’s right...

Read more...

Parallelize Your EC2 API Calls with Python, Boto and Threading

I started a small new project on Github - http://github.com/somic/ec2-multiregion. It includes several small tools that facilitate EC2 API operations that involve multiple regions at the same time. If I were to query each endpoint one after another, I quickly discovered it would take too long. Therefore, I created a...

Read more...

Why I Sometimes Prefer Shell To Ruby or Python

Shell was among the first things I got familiar with when I was introduced to Linux. It’s not a typical programming language, primarily due to lack of easy-to-use high-level data structures such as hashes and arrays (anticipating your objection to this - note I said “easy-to-use”). This may explain why...

Read more...

Graphite RabbitMQ Integration

I started a new project on github - http://github.com/somic/graphite-rabbitmq. It currently includes a couple of tools written in Python which facilitate sending data to Graphite via RabbitMQ instead of connecting directly to the service using TCP. Graphite is a flexible and powerful tool to build charts. It’s also a data...

Read more...

Google App Engine

Google released their App Engine yesterday. Very cool python goodness, supposedly with access to their BigTable and GFS and supposedly free for use up to a certain limit. In the meantime, Google engineers (or was it designers?) came up with a new type of aircraft. You probably have heard about...

Read more...

Python AMQP client and non-blocking sockets

We put together an add-on for py-amqplib that implements AMQP client with non-blocking sockets in python. There are at least 2 scenarios where non-blocking sockets help, and both are applicable to consumers: 1) when you want to be able to interrupt consumer’s event loop without waiting for a next incoming...

Read more...