Bolacha, httplib2 wrapper with cookie handling and file upload.
I really like httplib2, but unfortunately it does not oficially support sending multipart/form-data.
So last Monday I was at work, and realized that I was needing exactly to make a http upload from within a python program, and also needed to make a session login right before.
I remember that I needed that before, but I could not find something simple and concise, yet pythonic and well tested.
So I decided to work on a proof of concept, 2 days after that, at last wednesday, I got really sick. I thought was just a simple flu, but I got even worst. Going to hospital, doctors found out I have sinusitis.
So since wednesday I am at home, having lots of damn medicines.
But the good thing is that I got time enough to hack
So I would like to introduce you Bolacha.
You can see de docs here
There is a debian package available here
The code is available at my github page: http://github.com/gabrielfalcao/bolacha/tree/master

I was reading the code of Bolacha and I think there’s an error on line 66 in multipart.py. The code in the IF will never be executed.
if x == 1:
‘ok’
else:
if x == 1:
‘Am I useless?’
else
…
I hope httplib2 will be updated so we can send files. Maybe you could get in touch with them and ask if they are interested to include your work in httplib2.
Anyway, thanks for the good work!