swh.objstorage.api.client module

class swh.objstorage.api.client.RemoteObjStorage(**kwargs)[source]

Bases: object

Proxy to a remote object storage.

This class allows to connect to an object storage server via http protocol.

url

The url of the server to connect. Must end with a ‘/’

Type

string

session

The session to send requests.

check_config(*, check_write)[source]
add(content, obj_id=None, check_presence=True)[source]
add_batch(contents, check_presence=True)[source]
restore(content, obj_id=None, *args, **kwargs)[source]
get(obj_id)[source]
get_batch(obj_ids)[source]
check(obj_id)[source]
delete(obj_id)[source]
get_random(batch_size)[source]
add_stream(content_iter, obj_id, check_presence=True)[source]
get_stream(obj_id, chunk_size=2097152)[source]
list_content(last_obj_id=None, limit=10000)[source]