afgutils 1.3.3__tar.gz → 1.4.2__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.
- {afgutils-1.3.3 → afgutils-1.4.2}/PKG-INFO +10 -3
- {afgutils-1.3.3 → afgutils-1.4.2}/afgutils/db.py +1 -1
- {afgutils-1.3.3 → afgutils-1.4.2}/afgutils/utils.py +21 -1
- {afgutils-1.3.3 → afgutils-1.4.2}/afgutils.egg-info/PKG-INFO +10 -3
- {afgutils-1.3.3 → afgutils-1.4.2}/afgutils.egg-info/requires.txt +1 -1
- {afgutils-1.3.3 → afgutils-1.4.2}/setup.py +2 -2
- {afgutils-1.3.3 → afgutils-1.4.2}/afgutils/__init__.py +0 -0
- {afgutils-1.3.3 → afgutils-1.4.2}/afgutils/advanceai_util.py +0 -0
- {afgutils-1.3.3 → afgutils-1.4.2}/afgutils/cgi.py +0 -0
- {afgutils-1.3.3 → afgutils-1.4.2}/afgutils/credolab.py +0 -0
- {afgutils-1.3.3 → afgutils-1.4.2}/afgutils/email.py +0 -0
- {afgutils-1.3.3 → afgutils-1.4.2}/afgutils/s3.py +0 -0
- {afgutils-1.3.3 → afgutils-1.4.2}/afgutils/trandata.py +0 -0
- {afgutils-1.3.3 → afgutils-1.4.2}/afgutils.egg-info/SOURCES.txt +0 -0
- {afgutils-1.3.3 → afgutils-1.4.2}/afgutils.egg-info/dependency_links.txt +0 -0
- {afgutils-1.3.3 → afgutils-1.4.2}/afgutils.egg-info/top_level.txt +0 -0
- {afgutils-1.3.3 → afgutils-1.4.2}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: afgutils
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.4.2
|
|
4
4
|
Summary: Shared support functions
|
|
5
5
|
Author: Araz Heydarov
|
|
6
6
|
Author-email: araz.heydarov@asiafinancegroup.com
|
|
@@ -11,7 +11,14 @@ Requires-Dist: pyodbc>=4.0.39
|
|
|
11
11
|
Requires-Dist: pywin32>=306
|
|
12
12
|
Requires-Dist: python-dotenv>=1.0.0
|
|
13
13
|
Requires-Dist: boto3>=1.27.0
|
|
14
|
-
Requires-Dist: pandas>=2.
|
|
14
|
+
Requires-Dist: pandas>=2.1.4
|
|
15
15
|
Requires-Dist: xmltodict>=0.13.0
|
|
16
|
+
Dynamic: author
|
|
17
|
+
Dynamic: author-email
|
|
18
|
+
Dynamic: description
|
|
19
|
+
Dynamic: license
|
|
20
|
+
Dynamic: requires-dist
|
|
21
|
+
Dynamic: requires-python
|
|
22
|
+
Dynamic: summary
|
|
16
23
|
|
|
17
24
|
Shared support functions
|
|
@@ -33,7 +33,7 @@ class DB:
|
|
|
33
33
|
|
|
34
34
|
if dsn:
|
|
35
35
|
conn_str = f"DSN={dsn}"
|
|
36
|
-
elif prefix and driver and
|
|
36
|
+
elif prefix and driver and user and password and server and port:
|
|
37
37
|
conn_str = (
|
|
38
38
|
f"DRIVER={driver};"
|
|
39
39
|
f"DATABASE={database};"
|
|
@@ -95,6 +95,26 @@ def clear_mfv(mfv: dict) -> dict:
|
|
|
95
95
|
return mfv
|
|
96
96
|
|
|
97
97
|
|
|
98
|
+
def http_print(content: str | None = None, content_type: str = "text/plain; charset=utf-8", headers: dict[str, str] | None = None) -> \
|
|
99
|
+
None:
|
|
100
|
+
headers_actual={
|
|
101
|
+
"Status": "200 OK"
|
|
102
|
+
,"Content-Type": content_type
|
|
103
|
+
,"Cache-Control": "no-store"
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
if headers is not None:
|
|
107
|
+
for key in headers:
|
|
108
|
+
headers_actual[key] = headers[key]
|
|
109
|
+
# Overwrite any default headers if provided in headers dict
|
|
110
|
+
|
|
111
|
+
for key in headers_actual:
|
|
112
|
+
print(key + ": " + headers_actual[key])
|
|
113
|
+
|
|
114
|
+
print("")
|
|
115
|
+
if content is not None: print(content)
|
|
116
|
+
|
|
117
|
+
|
|
98
118
|
# def get_username()-> str:
|
|
99
119
|
# conn_repserv = DB.get_connection('repserv')
|
|
100
120
|
# cursor_repserv = conn_repserv.cursor()
|
|
@@ -232,7 +252,7 @@ parse_row_into_object = parse_dict_into_object # added for legacy compatibility
|
|
|
232
252
|
|
|
233
253
|
class AfgBaseMixin:
|
|
234
254
|
"""
|
|
235
|
-
Base extension for all AFG objects; restricts operations on private and
|
|
255
|
+
Base extension for all AFG objects; restricts operations on private and callable attributes.
|
|
236
256
|
|
|
237
257
|
__str__ ommits private and callable attributes
|
|
238
258
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: afgutils
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.4.2
|
|
4
4
|
Summary: Shared support functions
|
|
5
5
|
Author: Araz Heydarov
|
|
6
6
|
Author-email: araz.heydarov@asiafinancegroup.com
|
|
@@ -11,7 +11,14 @@ Requires-Dist: pyodbc>=4.0.39
|
|
|
11
11
|
Requires-Dist: pywin32>=306
|
|
12
12
|
Requires-Dist: python-dotenv>=1.0.0
|
|
13
13
|
Requires-Dist: boto3>=1.27.0
|
|
14
|
-
Requires-Dist: pandas>=2.
|
|
14
|
+
Requires-Dist: pandas>=2.1.4
|
|
15
15
|
Requires-Dist: xmltodict>=0.13.0
|
|
16
|
+
Dynamic: author
|
|
17
|
+
Dynamic: author-email
|
|
18
|
+
Dynamic: description
|
|
19
|
+
Dynamic: license
|
|
20
|
+
Dynamic: requires-dist
|
|
21
|
+
Dynamic: requires-python
|
|
22
|
+
Dynamic: summary
|
|
16
23
|
|
|
17
24
|
Shared support functions
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from setuptools import find_packages, setup
|
|
2
2
|
|
|
3
|
-
VERSION = "1.
|
|
3
|
+
VERSION = "1.4.2"
|
|
4
4
|
DESCRIPTION = "Shared support functions"
|
|
5
5
|
LONG_DESCRIPTION = "Shared support functions"
|
|
6
6
|
|
|
@@ -20,7 +20,7 @@ setup(
|
|
|
20
20
|
"pywin32>=306",
|
|
21
21
|
"python-dotenv>=1.0.0",
|
|
22
22
|
"boto3>=1.27.0",
|
|
23
|
-
"pandas>=2.
|
|
23
|
+
"pandas>=2.1.4",
|
|
24
24
|
"xmltodict>=0.13.0",
|
|
25
25
|
],
|
|
26
26
|
)
|
|
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
|