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") f.write('bar!') f.close() 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() l.setLevel(logging.DEBUG) l.addHandler(logging.StreamHandler(sys.stdout)) ... your Python code using TahoeLAFS ...
- unicode support
- try network errors / bad happiness
- 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)
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.