Python client for MogileFS

Jonathan Share jshare at opera.com
Fri Sep 7 11:25:36 UTC 2007


Justin Azoff wrote:
> Jonathan Share wrote:
>> Hi,
>>
>> In the archives I found the link to this
>>
>> http://www.albany.edu/~ja6447/mogilefs.py
>>
>> Just a couple of points of feedback for anyone searching.
>>
>> 1) Would it be possible to have the dependency of pycurl listed at the
>> top of the file (no big deal really)
> 
> Using pycurl might even be overkill... may be worthwhile to benchmark
> pycurl vs. urllib and see if it is even faster.
> 

Actually doing this could be worthwhile for other reasons.

I just tried installing on a debian etch system (current stable) and it 
seems that libcurl, upon which pycurl depends, is currently at an 
unsupported version and not present in backports either :-(

Just looking into the code I can see that it appears the reasoning for 
using pycurl is for easy access to setting the timeouts, a quick google 
search reveals that this is definitely not trivial in the context of 
urllib(2) so I'm going to stick with pycurl for the short term. If, by 
some miracle, I have some spare time at the end of my current project 
I'll spend some more time looking into the other options available.

>> 2) When importing in Python 2.5 I get the following error
>>
>> mogilefs.py:83: DeprecationWarning: The sre module is deprecated, please
>> import re.
> 
> Fixed :-)

Thanks

> 
>> Off to go and see if it actually works now, you'll hear from me if there
>> are any problems ;-)
>>
>> Jon
> 
> It should work!  Let me know if it doesn't :)
> It could definitely use some cleanups, and I believe there are a ton of
> methods that need to be added to the Admin class.
> 

Seems to work fine on my workstation although current use-cases are very 
simple, hadn't thought of admin functions, will look into integrating 
those for a later iteration.

/me off to go building libcurl from source


More information about the mogilefs mailing list