modos.remote#
Functions related to server storage handling
Classes#
Handle modos server endpoints. |
Functions#
|
|
|
Function to access metadata from one specific or all modos on a remote server |
|
Check if a path is an S3 path |
|
Request public S3 path of a specific modo or all modos matching the query string |
Module Contents#
- class modos.remote.EndpointManager[source]#
Handle modos server endpoints. If a modos server url is provided, it is used to detect available service urls. Alternatively, service urls can be provided explicitely if no modos server is available.
- Parameters:
modos – URL to the modos server.
services – Mapping of services to their urls.
Examples
>>> ex = EndpointManager(modos="http://modos.example.org") >>> ex.list() { 's3: Url('http://s3.example.org/'), 'htsget': Url('http://htsget.example.org/') } >>> ex.htsget Url('http://htsget.example.org/') >>> ex = EndpointManager(services={"s3": "http://s3.example.org"}) >>> ex.s3 Url('http://s3.example.org/')
- modos.remote.list_remote_items(url)[source]#
- Parameters:
url (pydantic.HttpUrl)
- Return type:
list[pydantic.HttpUrl]
- modos.remote.get_metadata_from_remote(url, modo_id=None)[source]#
Function to access metadata from one specific or all modos on a remote server
- Parameters:
server_url – Url to the remote modo server
id – id of the modo to retrieve metadata from. Will return all if not specified (default).
url (pydantic.HttpUrl)
modo_id (Optional[str])
- Return type:
Mapping
- modos.remote.get_s3_path(url, query, exact_match=False)[source]#
Request public S3 path of a specific modo or all modos matching the query string :param remote_url: Url to the remote modo server :param query: query string to specify the modo of interest :param exact_match: if True only modos with exactly that id will be returned, otherwise (default) all matching modos