data-manipulation 0.44__tar.gz → 0.45__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {data_manipulation-0.44/data_manipulation.egg-info → data_manipulation-0.45}/PKG-INFO +1 -1
- {data_manipulation-0.44 → data_manipulation-0.45}/data_manipulation/_version.py +3 -3
- {data_manipulation-0.44 → data_manipulation-0.45}/data_manipulation/boto3_.py +41 -0
- {data_manipulation-0.44 → data_manipulation-0.45/data_manipulation.egg-info}/PKG-INFO +1 -1
- {data_manipulation-0.44 → data_manipulation-0.45}/LICENSE +0 -0
- {data_manipulation-0.44 → data_manipulation-0.45}/MANIFEST.in +0 -0
- {data_manipulation-0.44 → data_manipulation-0.45}/README.md +0 -0
- {data_manipulation-0.44 → data_manipulation-0.45}/data_manipulation/__init__.py +0 -0
- {data_manipulation-0.44 → data_manipulation-0.45}/data_manipulation/base.py +0 -0
- {data_manipulation-0.44 → data_manipulation-0.45}/data_manipulation/beautifulsoup_.py +0 -0
- {data_manipulation-0.44 → data_manipulation-0.45}/data_manipulation/cryptography_.py +0 -0
- {data_manipulation-0.44 → data_manipulation-0.45}/data_manipulation/django_.py +0 -0
- {data_manipulation-0.44 → data_manipulation-0.45}/data_manipulation/flask_.py +0 -0
- {data_manipulation-0.44 → data_manipulation-0.45}/data_manipulation/geopandas_.py +0 -0
- {data_manipulation-0.44 → data_manipulation-0.45}/data_manipulation/kerberos_.py +0 -0
- {data_manipulation-0.44 → data_manipulation-0.45}/data_manipulation/mysql_connector_python_.py +0 -0
- {data_manipulation-0.44 → data_manipulation-0.45}/data_manipulation/openldap_.py +0 -0
- {data_manipulation-0.44 → data_manipulation-0.45}/data_manipulation/pandas_.py +0 -0
- {data_manipulation-0.44 → data_manipulation-0.45}/data_manipulation/prometheus_.py +0 -0
- {data_manipulation-0.44 → data_manipulation-0.45}/data_manipulation/psycopg2_.py +0 -0
- {data_manipulation-0.44 → data_manipulation-0.45}/data_manipulation/psycopg_.py +0 -0
- {data_manipulation-0.44 → data_manipulation-0.45}/data_manipulation/pyspark_.py +0 -0
- {data_manipulation-0.44 → data_manipulation-0.45}/data_manipulation/smtplib_.py +0 -0
- {data_manipulation-0.44 → data_manipulation-0.45}/data_manipulation/sqlalchemy_.py +0 -0
- {data_manipulation-0.44 → data_manipulation-0.45}/data_manipulation.egg-info/SOURCES.txt +0 -0
- {data_manipulation-0.44 → data_manipulation-0.45}/data_manipulation.egg-info/dependency_links.txt +0 -0
- {data_manipulation-0.44 → data_manipulation-0.45}/data_manipulation.egg-info/requires.txt +0 -0
- {data_manipulation-0.44 → data_manipulation-0.45}/data_manipulation.egg-info/top_level.txt +0 -0
- {data_manipulation-0.44 → data_manipulation-0.45}/setup.cfg +0 -0
- {data_manipulation-0.44 → data_manipulation-0.45}/setup.py +0 -0
- {data_manipulation-0.44 → data_manipulation-0.45}/versioneer.py +0 -0
|
@@ -8,11 +8,11 @@ import json
|
|
|
8
8
|
|
|
9
9
|
version_json = '''
|
|
10
10
|
{
|
|
11
|
-
"date": "2024-09-
|
|
11
|
+
"date": "2024-09-08T09:24:53+0800",
|
|
12
12
|
"dirty": false,
|
|
13
13
|
"error": null,
|
|
14
|
-
"full-revisionid": "
|
|
15
|
-
"version": "0.
|
|
14
|
+
"full-revisionid": "60bea1e3117837fae0b5506910b8006d348b5b81",
|
|
15
|
+
"version": "0.45"
|
|
16
16
|
}
|
|
17
17
|
''' # END VERSION_JSON
|
|
18
18
|
|
|
@@ -83,6 +83,47 @@ def send_aws_ses_email(
|
|
|
83
83
|
return
|
|
84
84
|
|
|
85
85
|
|
|
86
|
+
def list_s3_bucket_files(
|
|
87
|
+
bucket: str,
|
|
88
|
+
to_dateframe: bool = False,
|
|
89
|
+
):
|
|
90
|
+
"""
|
|
91
|
+
List s3 bucket files
|
|
92
|
+
|
|
93
|
+
Parameters
|
|
94
|
+
----------
|
|
95
|
+
bucket : str
|
|
96
|
+
bucket name
|
|
97
|
+
to_dateframe : bool, optional
|
|
98
|
+
to convert to pandas dataframe, by default False
|
|
99
|
+
|
|
100
|
+
Returns
|
|
101
|
+
-------
|
|
102
|
+
list | pandas.DataFrame
|
|
103
|
+
default list, pandas.DataFrame if requested
|
|
104
|
+
"""
|
|
105
|
+
|
|
106
|
+
import boto3
|
|
107
|
+
|
|
108
|
+
s3_client = boto3.client("s3")
|
|
109
|
+
paginator = s3_client.get_paginator("list_objects_v2")
|
|
110
|
+
keys = list()
|
|
111
|
+
|
|
112
|
+
for page in paginator.paginate(Bucket=bucket):
|
|
113
|
+
for obj in page["Contents"]:
|
|
114
|
+
if obj["Key"].endswith("/"):
|
|
115
|
+
continue
|
|
116
|
+
keys.append(obj["Key"])
|
|
117
|
+
|
|
118
|
+
if to_dateframe:
|
|
119
|
+
import pandas as pd
|
|
120
|
+
|
|
121
|
+
df = pd.DataFrame(keys, columns=["key"])
|
|
122
|
+
return df
|
|
123
|
+
else:
|
|
124
|
+
return keys
|
|
125
|
+
|
|
126
|
+
|
|
86
127
|
if __name__ == "__main__":
|
|
87
128
|
import doctest
|
|
88
129
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{data_manipulation-0.44 → data_manipulation-0.45}/data_manipulation/mysql_connector_python_.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{data_manipulation-0.44 → data_manipulation-0.45}/data_manipulation.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|