Use any remote web server FileSystem with pyfilesystem
Author : julien@revolunet.com
example
from fs.httpapifs import HttpApiFS
remoteConfig = {
'url':'http://server.com/api.php'
,'username':'admin'
,'password':'verysecretone9'
}
# open a connection
myremotefs = HttpApiFs(**remoteConfig)
# list a dir
myremotefs.listdir('/')
# read a file
print myremotefs.open('README.txt','r').read()
# write to a file
myremotefs.open('writeTest.txt', 'w').write('hello, world')
Links
- our FileBrowser with PyFS backend demo
- the PyFileSystem google group
- the PHP backend fot this API
- the Django backend for this API