s3_env

Contents

s3_env#

s3_env(*args, **kwargs)[source]#

Create Unistra’s S3 compatible storage environment. You must export the variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY in your environement. Y ou can use ready-to-use environements provided by the Sertit or asks for s3 credentials.

Parameters:

function (Callable) – Function to decorate

Returns:

decorated function

Return type:

Callable

Example

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