unistra_s3

Contents

unistra_s3#

unistra_s3() None[source]#

Initialize a temporary S3 environment as a context manager, with Unistra endpoint

Parameters:

default_endpoint (str) – Default Endpoint to look for

Example

>>> from sertit.unistra import unistra_s3
>>> from sertit import AnyPath
>>> def file_exists(path: str):
>>>     with unistra_s3():
>>>         pth = AnyPath(path)
>>>         print(pth.exists())
>>> file_exists("s3://sertit-geodatastore/GLOBAL/COPDEM_30m/COPDEM_30m.vrt")
True