temp_s3#
- temp_s3(endpoint=None, default_endpoint: str = None, requester_pays: bool = False, no_sign_request: bool = False, **kwargs) None [source]#
Initialize a temporary S3 environment as a context manager
- Parameters:
Example
>>> from sertit.s3 import temp_s3 >>> from sertit import AnyPath >>> def file_exists(path: str): >>> with temp_s3(endpoint="s3.unistra.fr"): >>> pth = AnyPath(path) >>> print(pth.exists()) >>> file_exists("s3://sertit-geodatastore/GLOBAL/COPDEM_30m/COPDEM_30m.vrt") True