Module Index

Module: mogilelocal

This is a local filesystem implementation of the same API that the Python MogileFS client supplies. It allows us to transparently swap the local implementation and the full MogileFS in when we need it, without paying the deployment and configuration price of installing the full MogileFS or the single-server performance cost of running it.

In general, this tries to be faithful to the semantics of the API, but if you dig deep enough there are bound to be differences. For example, MogileFS stores its actual files with a .fid extension, always, while this stores them under whatever key you supply. If you depend on the extension of the URL, they probably won't match up.

Similarly, exact error messages are unlikely to be consistent, though I've tried to use the same class names so you can just catch MogileFSError instead of the specific IOExceptions raised by the filesystem. And public fields like domain and trackers will be accessible but have empty values.

Classes

Admin

Mock implementation of the Admin interface. Nearly all of these methods do nothing, since MogileLocal doesn't have the concept of devices or classes and assumes that you'll use a different directory for each separate instantiation of MogileLocal. It's provided so that client code that relies upon the admin class won't break.

Client

The main MogileFS client. This is the interface to the filestore.

MogileFSError

Exception class for all MogileFS errors.