data-manipulation 0.42__tar.gz → 0.44__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.42/data_manipulation.egg-info → data_manipulation-0.44}/PKG-INFO +3 -1
- {data_manipulation-0.42 → data_manipulation-0.44}/data_manipulation/_version.py +3 -3
- {data_manipulation-0.42 → data_manipulation-0.44}/data_manipulation/base.py +9 -3
- {data_manipulation-0.42 → data_manipulation-0.44}/data_manipulation/boto3_.py +3 -3
- {data_manipulation-0.42 → data_manipulation-0.44}/data_manipulation/pyspark_.py +5 -1
- {data_manipulation-0.42 → data_manipulation-0.44/data_manipulation.egg-info}/PKG-INFO +3 -1
- {data_manipulation-0.42 → data_manipulation-0.44}/data_manipulation.egg-info/requires.txt +2 -0
- {data_manipulation-0.42 → data_manipulation-0.44}/setup.py +2 -0
- {data_manipulation-0.42 → data_manipulation-0.44}/LICENSE +0 -0
- {data_manipulation-0.42 → data_manipulation-0.44}/MANIFEST.in +0 -0
- {data_manipulation-0.42 → data_manipulation-0.44}/README.md +0 -0
- {data_manipulation-0.42 → data_manipulation-0.44}/data_manipulation/__init__.py +0 -0
- {data_manipulation-0.42 → data_manipulation-0.44}/data_manipulation/beautifulsoup_.py +0 -0
- {data_manipulation-0.42 → data_manipulation-0.44}/data_manipulation/cryptography_.py +0 -0
- {data_manipulation-0.42 → data_manipulation-0.44}/data_manipulation/django_.py +0 -0
- {data_manipulation-0.42 → data_manipulation-0.44}/data_manipulation/flask_.py +0 -0
- {data_manipulation-0.42 → data_manipulation-0.44}/data_manipulation/geopandas_.py +0 -0
- {data_manipulation-0.42 → data_manipulation-0.44}/data_manipulation/kerberos_.py +0 -0
- {data_manipulation-0.42 → data_manipulation-0.44}/data_manipulation/mysql_connector_python_.py +0 -0
- {data_manipulation-0.42 → data_manipulation-0.44}/data_manipulation/openldap_.py +0 -0
- {data_manipulation-0.42 → data_manipulation-0.44}/data_manipulation/pandas_.py +0 -0
- {data_manipulation-0.42 → data_manipulation-0.44}/data_manipulation/prometheus_.py +0 -0
- {data_manipulation-0.42 → data_manipulation-0.44}/data_manipulation/psycopg2_.py +0 -0
- {data_manipulation-0.42 → data_manipulation-0.44}/data_manipulation/psycopg_.py +0 -0
- {data_manipulation-0.42 → data_manipulation-0.44}/data_manipulation/smtplib_.py +0 -0
- {data_manipulation-0.42 → data_manipulation-0.44}/data_manipulation/sqlalchemy_.py +0 -0
- {data_manipulation-0.42 → data_manipulation-0.44}/data_manipulation.egg-info/SOURCES.txt +0 -0
- {data_manipulation-0.42 → data_manipulation-0.44}/data_manipulation.egg-info/dependency_links.txt +0 -0
- {data_manipulation-0.42 → data_manipulation-0.44}/data_manipulation.egg-info/top_level.txt +0 -0
- {data_manipulation-0.42 → data_manipulation-0.44}/setup.cfg +0 -0
- {data_manipulation-0.42 → data_manipulation-0.44}/versioneer.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: data_manipulation
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.44
|
|
4
4
|
Summary: Powerful data manipulation
|
|
5
5
|
Home-page: https://github.com/shawnngtq/data-manipulation
|
|
6
6
|
Author: Shawn Ng
|
|
@@ -21,6 +21,7 @@ Classifier: Topic :: Scientific/Engineering
|
|
|
21
21
|
License-File: LICENSE
|
|
22
22
|
Requires-Dist: beautifulsoup4
|
|
23
23
|
Requires-Dist: boto3
|
|
24
|
+
Requires-Dist: cryptography
|
|
24
25
|
Requires-Dist: django
|
|
25
26
|
Requires-Dist: flask
|
|
26
27
|
Requires-Dist: geopandas
|
|
@@ -32,6 +33,7 @@ Requires-Dist: pandas
|
|
|
32
33
|
Requires-Dist: psycopg
|
|
33
34
|
Requires-Dist: psycopg2
|
|
34
35
|
Requires-Dist: pyspark
|
|
36
|
+
Requires-Dist: python-dotenv
|
|
35
37
|
Requires-Dist: sqlalchemy
|
|
36
38
|
|
|
37
39
|
|
|
@@ -8,11 +8,11 @@ import json
|
|
|
8
8
|
|
|
9
9
|
version_json = '''
|
|
10
10
|
{
|
|
11
|
-
"date": "2024-
|
|
11
|
+
"date": "2024-09-02T21:47:40+0800",
|
|
12
12
|
"dirty": false,
|
|
13
13
|
"error": null,
|
|
14
|
-
"full-revisionid": "
|
|
15
|
-
"version": "0.
|
|
14
|
+
"full-revisionid": "6ce922114b89e597c23442b0ca84c66273572f4f",
|
|
15
|
+
"version": "0.44"
|
|
16
16
|
}
|
|
17
17
|
''' # END VERSION_JSON
|
|
18
18
|
|
|
@@ -2,10 +2,7 @@ import itertools
|
|
|
2
2
|
import os
|
|
3
3
|
import re
|
|
4
4
|
import subprocess
|
|
5
|
-
from ast import literal_eval
|
|
6
|
-
from distutils.util import strtobool
|
|
7
5
|
from typing import List
|
|
8
|
-
from urllib.parse import urlencode
|
|
9
6
|
|
|
10
7
|
from loguru import logger
|
|
11
8
|
|
|
@@ -181,6 +178,8 @@ def list_tuple_without_none(list_tuple: list | tuple) -> list | tuple:
|
|
|
181
178
|
|
|
182
179
|
def string_boolean_to_int(boolean_str_rep: str) -> int:
|
|
183
180
|
"""
|
|
181
|
+
DEPRECATED from python 3.12 onwards
|
|
182
|
+
|
|
184
183
|
Return integer from given string boolean. 1 instead of "true"/"True"/"1". Reference from https://docs.python.org/3/distutils/apiref.html#distutils.util.strtobool
|
|
185
184
|
|
|
186
185
|
Parameters
|
|
@@ -205,7 +204,12 @@ def string_boolean_to_int(boolean_str_rep: str) -> int:
|
|
|
205
204
|
-------
|
|
206
205
|
int
|
|
207
206
|
_description_
|
|
207
|
+
|
|
208
|
+
Reference
|
|
209
|
+
---------
|
|
210
|
+
- https://docs.python.org/3.10/library/distutils.html
|
|
208
211
|
"""
|
|
212
|
+
from distutils.util import strtobool
|
|
209
213
|
|
|
210
214
|
int_ = strtobool(string_str_to_str(boolean_str_rep))
|
|
211
215
|
return int_
|
|
@@ -240,6 +244,7 @@ def string_dlt_to_dlt(dlt_str_rep: str) -> dict | list | tuple:
|
|
|
240
244
|
dict | list | tuple
|
|
241
245
|
_description_
|
|
242
246
|
"""
|
|
247
|
+
from ast import literal_eval
|
|
243
248
|
|
|
244
249
|
dlt = literal_eval(dlt_str_rep)
|
|
245
250
|
return dlt
|
|
@@ -399,6 +404,7 @@ def create_encode_url(url: str, query_params: dict = {}) -> str:
|
|
|
399
404
|
str
|
|
400
405
|
encoded url
|
|
401
406
|
"""
|
|
407
|
+
from urllib.parse import urlencode
|
|
402
408
|
|
|
403
409
|
return f"{url}{urlencode(query_params)}"
|
|
404
410
|
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import os
|
|
2
|
-
from email.mime.application import MIMEApplication
|
|
3
|
-
from email.mime.multipart import MIMEMultipart
|
|
4
|
-
from email.mime.text import MIMEText
|
|
5
2
|
|
|
6
3
|
from loguru import logger
|
|
7
4
|
|
|
@@ -44,6 +41,9 @@ def send_aws_ses_email(
|
|
|
44
41
|
---------
|
|
45
42
|
- https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ses/client/send_raw_email.html
|
|
46
43
|
"""
|
|
44
|
+
from email.mime.application import MIMEApplication
|
|
45
|
+
from email.mime.multipart import MIMEMultipart
|
|
46
|
+
from email.mime.text import MIMEText
|
|
47
47
|
|
|
48
48
|
from botocore.exceptions import BotoCoreError, ClientError
|
|
49
49
|
|
|
@@ -3,7 +3,6 @@ import multiprocessing
|
|
|
3
3
|
import os
|
|
4
4
|
|
|
5
5
|
import pyspark
|
|
6
|
-
import pyspark.sql.functions as F
|
|
7
6
|
|
|
8
7
|
|
|
9
8
|
# CONFIG
|
|
@@ -135,6 +134,8 @@ def add_dummy_columns(dataframe, columns, value):
|
|
|
135
134
|
-------
|
|
136
135
|
df : pyspark.sql.dataframe.DataFrame
|
|
137
136
|
"""
|
|
137
|
+
import pyspark.sql.functions as F
|
|
138
|
+
|
|
138
139
|
if not isinstance(dataframe, pyspark.sql.dataframe.DataFrame):
|
|
139
140
|
raise TypeError("Argument must be a Pyspark dataframe ...")
|
|
140
141
|
if not isinstance(columns, list):
|
|
@@ -312,6 +313,8 @@ def rename(dataframe, columns):
|
|
|
312
313
|
-------
|
|
313
314
|
df : pyspark.sql.dataframe.DataFrame
|
|
314
315
|
"""
|
|
316
|
+
import pyspark.sql.functions as F
|
|
317
|
+
|
|
315
318
|
if not isinstance(dataframe, pyspark.sql.dataframe.DataFrame):
|
|
316
319
|
raise TypeError("Argument must be a Pyspark dataframe ...")
|
|
317
320
|
if not isinstance(columns, dict):
|
|
@@ -388,6 +391,7 @@ def group_count(dataframe, columns, n=10):
|
|
|
388
391
|
-------
|
|
389
392
|
df : pyspark.sql.dataframe.DataFrame
|
|
390
393
|
"""
|
|
394
|
+
import pyspark.sql.functions as F
|
|
391
395
|
|
|
392
396
|
if not isinstance(dataframe, pyspark.sql.dataframe.DataFrame):
|
|
393
397
|
raise TypeError("Argument must be a Pyspark dataframe ...")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: data_manipulation
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.44
|
|
4
4
|
Summary: Powerful data manipulation
|
|
5
5
|
Home-page: https://github.com/shawnngtq/data-manipulation
|
|
6
6
|
Author: Shawn Ng
|
|
@@ -21,6 +21,7 @@ Classifier: Topic :: Scientific/Engineering
|
|
|
21
21
|
License-File: LICENSE
|
|
22
22
|
Requires-Dist: beautifulsoup4
|
|
23
23
|
Requires-Dist: boto3
|
|
24
|
+
Requires-Dist: cryptography
|
|
24
25
|
Requires-Dist: django
|
|
25
26
|
Requires-Dist: flask
|
|
26
27
|
Requires-Dist: geopandas
|
|
@@ -32,6 +33,7 @@ Requires-Dist: pandas
|
|
|
32
33
|
Requires-Dist: psycopg
|
|
33
34
|
Requires-Dist: psycopg2
|
|
34
35
|
Requires-Dist: pyspark
|
|
36
|
+
Requires-Dist: python-dotenv
|
|
35
37
|
Requires-Dist: sqlalchemy
|
|
36
38
|
|
|
37
39
|
|
|
@@ -24,6 +24,7 @@ CLASSIFIERS = [
|
|
|
24
24
|
DEPENDENCIES = [
|
|
25
25
|
"beautifulsoup4",
|
|
26
26
|
"boto3",
|
|
27
|
+
"cryptography",
|
|
27
28
|
"django",
|
|
28
29
|
"flask",
|
|
29
30
|
"geopandas",
|
|
@@ -35,6 +36,7 @@ DEPENDENCIES = [
|
|
|
35
36
|
"psycopg",
|
|
36
37
|
"psycopg2",
|
|
37
38
|
"pyspark",
|
|
39
|
+
"python-dotenv",
|
|
38
40
|
"sqlalchemy",
|
|
39
41
|
]
|
|
40
42
|
|
|
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.42 → data_manipulation-0.44}/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
|
{data_manipulation-0.42 → data_manipulation-0.44}/data_manipulation.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|