This modules provides a PyFilesystem interface to the Tahoe Least Authority File System. Tahoe-LAFS is a distributed, encrypted, fault-tolerant storage system:

You will need access to a Tahoe-LAFS “web api” service.

Example (it will use publicly available (but slow) Tahoe-LAFS cloud):

from fs.contrib.tahoelafs import TahoeLAFS, Connection
dircap = TahoeLAFS.createdircap(webapi='http://insecure.tahoe-lafs.org')
print "Your dircap (unique key to your storage directory) is", dircap
print "Keep it safe!"
fs = TahoeLAFS(dircap, autorun=False, webapi='http://insecure.tahoe-lafs.org')
f = fs.open("foo.txt", "a")
print "Now visit %s and enjoy :-)" % fs.getpathurl('foo.txt')

When any problem occurred, you can turn on internal debugging messages:

import logging
l = logging.getLogger()

... your Python code using TahoeLAFS ...


  • unicode support
  • try network errors / bad happiness
  • exceptions
  • tests
  • sanitize all path types (., /)
  • support for extra large file uploads (poster module)
  • Possibility to block write until upload done (Tahoe mailing list)
  • Report something sane when Tahoe crashed/unavailable
  • solve failed unit tests (makedir_winner, ...)
  • file times
  • docs & author
  • python3 support
  • remove creating blank files (depends on FileUploadManager)
TODO (Not TahoeLAFS specific tasks):
  • RemoteFileBuffer on the fly buffering support
  • RemoteFileBuffer unit tests
  • RemoteFileBuffer submit to trunk
  • Implement FileUploadManager + faking isfile/exists of just processing file
  • pyfilesystem docs is outdated (rename, movedir, ...)
class fs.contrib.tahoelafs.TahoeLAFS(*args, **kwds)

FS providing cached access to a Tahoe Filesystem.

This class is the preferred means to access a Tahoe filesystem. It maintains an internal cache of recently-accessed metadata to speed up operations.