s3_env#
- s3_env(*args, **kwargs)[source]#
Create S3 compatible storage environment You must export the variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY in your environement.
- Returns:
decorated function
- Return type:
Callable
Example
>>> from sertit.s3 import s3_env >>> from sertit import AnyPath >>> @s3_env(endpoint="s3.unistra.fr") >>> def file_exists(path: str): >>> pth = AnyPath(path) >>> print(pth.exists()) >>> file_exists("s3://sertit-geodatastore/GLOBAL/COPDEM_30m/COPDEM_30m.vrt") True