swh.objstorage.api.server module

swh.objstorage.api.server.timed(f)[source]
async swh.objstorage.api.server.index(*a, **kw)[source]
async swh.objstorage.api.server.check_config(*a, **kw)[source]
async swh.objstorage.api.server.contains(*a, **kw)[source]
async swh.objstorage.api.server.add_bytes(*a, **kw)[source]
async swh.objstorage.api.server.add_batch(*a, **kw)[source]
async swh.objstorage.api.server.get_bytes(*a, **kw)[source]
async swh.objstorage.api.server.get_batch(*a, **kw)[source]
async swh.objstorage.api.server.check(*a, **kw)[source]
async swh.objstorage.api.server.delete(*a, **kw)[source]
async swh.objstorage.api.server.get_random_contents(*a, **kw)[source]
async swh.objstorage.api.server.add_stream(*a, **kw)[source]
async swh.objstorage.api.server.get_stream(*a, **kw)[source]
async swh.objstorage.api.server.list_content(*a, **kw)[source]
swh.objstorage.api.server.make_app(config)[source]

Initialize the remote api application.

swh.objstorage.api.server.load_and_check_config(config_file)[source]
Check the minimal configuration is set to run the api or raise an

error explanation.

Parameters

config_file (str) – Path to the configuration file to load

Raises

Error if the setup is not as expected

Returns

configuration as a dict

swh.objstorage.api.server.validate_config(cfg)[source]
Check the minimal configuration is set to run the api or raise an

explanatory error.

Parameters

cfg (dict) – Loaded configuration.

Raises

Error if the setup is not as expected

Returns

configuration as a dict

swh.objstorage.api.server.make_app_from_configfile()[source]

Load configuration and then build application to run