-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
528 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import os | ||
|
||
from s3 import pyS3 | ||
|
||
BUCKET = os.environ["BUCKET"] | ||
PREFIX = os.environ["PREFIX"] | ||
|
||
is_empty = pyS3.s3.is_empty(bucket=BUCKET, prefix=PREFIX) | ||
|
||
print(f"Is prefix {PREFIX} empty: {is_empty}") | ||
|
||
modified = pyS3.s3.get_last_modified(bucket=BUCKET, prefix=PREFIX) | ||
|
||
print(f"Prefix {PREFIX} last modified: {modified}") | ||
|
||
files = pyS3.s3.get_filenames(bucket=BUCKET, prefix=PREFIX) | ||
|
||
print(f"Files: {files}") | ||
|
||
state = pyS3.s3.read("s3://rdw-za/mnch/mnch-turn/contacts/state.parquet") | ||
|
||
print(f"State: {state}") |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,6 @@ | |
|
||
|
||
class pyS3: | ||
"""A wrapper class for different s3 submodules.""" | ||
|
||
s3 = S3(session) |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters