swh.objstorage.backends.seaweedfs.http module#

class swh.objstorage.backends.seaweedfs.http.HttpFiler(url, pool_maxsize=100)[source]#

Bases: object

Simple class that encapsulates access to a seaweedfs filer service.

TODO: handle errors

build_url(path)[source]#
get(remote_path)[source]#
exists(remote_path)[source]#
put(fp, remote_path)[source]#
delete(remote_path)[source]#
iterfiles(dir: str, last_file_name: str = '') Iterator[str][source]#

Recursively yield absolute file names

Parameters:
  • dir – retrieve file names starting from this directory; must be an absolute path.

  • last_file_name – if given, starts from the file just after; must be basename.

Yields:

absolute file names