:py:mod:`store.backends.http_simple_store` ========================================== .. py:module:: store.backends.http_simple_store .. autoapi-nested-parse:: HTTP-based simple store backend. Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: store.backends.http_simple_store.HTTPSimpleStoreResourceInfo store.backends.http_simple_store.HTTPSimpleStore Attributes ~~~~~~~~~~ .. autoapisummary:: store.backends.http_simple_store.logger .. py:data:: logger .. py:class:: HTTPSimpleStoreResourceInfo(url: str, sha: str) Bases: :py:obj:`e3.store.backends.base.ResourceInfo` Resource information for HTTP simple store. :ivar url: URL of the resource :ivar sha: SHA1 hash of the resource .. py:property:: uid :type: str Return unique identifier. .. py:method:: verify(resource_path: str) -> bool Verify the integrity of a resource. :param resource_path: path to the resource to verify :return: True if the resource SHA1 matches, False otherwise .. py:class:: HTTPSimpleStore(store_configuration: Any, cache_backend: e3.store.cache.backends.base.Cache) Bases: :py:obj:`e3.store.backends.base.Store` Simple HTTP-based store for downloading resources from URLs. .. py:method:: get_resource_metadata(query: dict[str, str]) -> HTTPSimpleStoreResourceInfo Return resource metadata directly computed from the query. There is no remote server involved here. :param query: a dict containing two keys 'sha' and 'url'. sha is the sha1sum of the resource and url is the remote url .. py:method:: download_resource_content(metadata: e3.store.backends.base.ResourceInfo, dest: str) -> str | None Download a resource. :param metadata: metadata associated with the resource to download :param dest: where to download the resource :return: the path to the downloaded resource