arche.tools.s3 module¶
AWS methods. Credentials are expected to be set in environment
-
arche.tools.s3.get_contents_as_string(bucket: str, filepath: str) → str¶ Fetch file contents as a utf-8 decoded string.
- Parameters
bucket – bucket name
filepath – a relevant path to file
- Returns
File contents
-
arche.tools.s3.upload_str_stream(bucket: str, key: str, stream: _io.StringIO) → str¶ Upload a whole StringIO to S3 bucket as file.
- Parameters
bucket – bucket name
key – destination path
stream – stream object
- Returns
public url to uploaded file