whylogs.api.reader.s3
#
Module Contents#
Classes#
A WhyLogs reader to fetch written profiles from an Amazon S3 bucket. |
- class whylogs.api.reader.s3.S3Reader(object_name: Optional[str] = None, bucket_name: Optional[str] = None, s3_client: Optional[botocore.client.BaseClient] = None)#
Bases:
whylogs.api.reader.reader.Reader
A WhyLogs reader to fetch written profiles from an Amazon S3 bucket.
>**IMPORTANT**: In order to correctly connect to your Amazon S3 bucket, make sure you have the following environment variables set: [AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY].
- Parameters
bucket_name (str, optional) – The name of the bucket to connect to. Made optional so the user can also access it via the option method
object_name (str, optional) – The s3’s object name. It basically states the location where the file goes to. Also made optional, so it can be defined through the option method
s3_client (Optional[botocore.client.BaseClient]) –
Examples
An example usage of this method can be represented with the simple code below.
```python import whylogs as why
profile = why.reader(“s3”).option(bucket_name=”my_bucket”, object_name=”my/object.bin”).read() ```
- read(**kwargs) whylogs.ResultSet #
- Return type