polyapi-python 0.3.10.dev4__py3-none-any.whl → 0.3.10.dev5__py3-none-any.whl
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.
- polyapi/poly_tables.py +16 -1
- {polyapi_python-0.3.10.dev4.dist-info → polyapi_python-0.3.10.dev5.dist-info}/METADATA +1 -1
- {polyapi_python-0.3.10.dev4.dist-info → polyapi_python-0.3.10.dev5.dist-info}/RECORD +6 -6
- {polyapi_python-0.3.10.dev4.dist-info → polyapi_python-0.3.10.dev5.dist-info}/WHEEL +0 -0
- {polyapi_python-0.3.10.dev4.dist-info → polyapi_python-0.3.10.dev5.dist-info}/licenses/LICENSE +0 -0
- {polyapi_python-0.3.10.dev4.dist-info → polyapi_python-0.3.10.dev5.dist-info}/top_level.txt +0 -0
polyapi/poly_tables.py
CHANGED
|
@@ -6,6 +6,21 @@ from polyapi.utils import add_import_to_init, init_the_init
|
|
|
6
6
|
from polyapi.typedefs import TableSpecDto
|
|
7
7
|
from polyapi.constants import JSONSCHEMA_TO_PYTHON_TYPE_MAP
|
|
8
8
|
|
|
9
|
+
def scrub(data) -> Dict[str, Any]:
|
|
10
|
+
if (not data or not isinstance(data, (Dict, List))): return data
|
|
11
|
+
if isinstance(data, List):
|
|
12
|
+
return [scrub(item) for item in data]
|
|
13
|
+
else:
|
|
14
|
+
temp = {}
|
|
15
|
+
secrets = ["x_api_key", "x-api-key", "access_token", "access-token", "authorization", "api_key", "api-key", "apikey", "accesstoken", "token", "password", "key"]
|
|
16
|
+
for key, value in data.items():
|
|
17
|
+
if isinstance(value, (Dict, List)):
|
|
18
|
+
temp[key] = scrub(data[key])
|
|
19
|
+
elif key.lower() in secrets:
|
|
20
|
+
temp[key] = '********'
|
|
21
|
+
else:
|
|
22
|
+
temp[key] = data[key]
|
|
23
|
+
return temp
|
|
9
24
|
|
|
10
25
|
def scrub_keys(e: Exception) -> Dict[str, Any]:
|
|
11
26
|
"""
|
|
@@ -16,7 +31,7 @@ def scrub_keys(e: Exception) -> Dict[str, Any]:
|
|
|
16
31
|
"error": str(e),
|
|
17
32
|
"type": type(e).__name__,
|
|
18
33
|
"message": str(e),
|
|
19
|
-
"args": getattr(e, 'args', None)
|
|
34
|
+
"args": scrub(getattr(e, 'args', None))
|
|
20
35
|
}
|
|
21
36
|
|
|
22
37
|
|
|
@@ -14,7 +14,7 @@ polyapi/function_cli.py,sha256=W30yL2i152iZCr6zAU1CHKlDp_tt7kB2cGIXIxmWumk,4302
|
|
|
14
14
|
polyapi/generate.py,sha256=W-6kSoP-nDRc85cSAkiFTwS99dF_H4Ded0mPHGNVy5w,21135
|
|
15
15
|
polyapi/parser.py,sha256=IVSJGT6wcxpXUHmhx4DVhOGL1XY_MBaf5aw3Pd2DVcI,20935
|
|
16
16
|
polyapi/poly_schemas.py,sha256=fZ6AGvHcOKQJtlrzSuzeBNed5DxPMA2dJGdJvuFCHWM,9066
|
|
17
|
-
polyapi/poly_tables.py,sha256=
|
|
17
|
+
polyapi/poly_tables.py,sha256=0wFZODu7ULWC4qwAiX6ffA0e5OrOcm6uodSwmMkTa_Q,16571
|
|
18
18
|
polyapi/prepare.py,sha256=NQzpMIoakNovStvOGOmqSYIpTwiWXaweNSE9se10A2E,7420
|
|
19
19
|
polyapi/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
20
20
|
polyapi/rendered_spec.py,sha256=nJEj2vRgG3N20fU4s-ThRtOIwAuTzXwXuOBIkXljDVc,2240
|
|
@@ -25,8 +25,8 @@ polyapi/typedefs.py,sha256=VEaYODLm-3a26_cK1uSRoYwenmprLOQQdoKFz4gqK_0,5587
|
|
|
25
25
|
polyapi/utils.py,sha256=Ca189i4PM4TpwvpzwF3T8MfQsOPD45b_falXjjgYCyI,12603
|
|
26
26
|
polyapi/variables.py,sha256=SJv106ePpQP5mx7Iiafl_shtFlE8FoaO9Q8lvw-3IRg,7270
|
|
27
27
|
polyapi/webhook.py,sha256=I3_uOl4f4L2-2WehzRLMVMRrB-76EiXCPA9Vzoaj30I,5326
|
|
28
|
-
polyapi_python-0.3.10.
|
|
29
|
-
polyapi_python-0.3.10.
|
|
30
|
-
polyapi_python-0.3.10.
|
|
31
|
-
polyapi_python-0.3.10.
|
|
32
|
-
polyapi_python-0.3.10.
|
|
28
|
+
polyapi_python-0.3.10.dev5.dist-info/licenses/LICENSE,sha256=6b_I7aPVp8JXhqQwdw7_B84Ca0S4JGjHj0sr_1VOdB4,1068
|
|
29
|
+
polyapi_python-0.3.10.dev5.dist-info/METADATA,sha256=Wr7swuP5ngqd9oHrEfGLlEQ-3Mp8qpABVeqHPCoIxPI,5318
|
|
30
|
+
polyapi_python-0.3.10.dev5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
31
|
+
polyapi_python-0.3.10.dev5.dist-info/top_level.txt,sha256=CEFllOnzowci_50RYJac-M54KD2IdAptFsayVVF_f04,8
|
|
32
|
+
polyapi_python-0.3.10.dev5.dist-info/RECORD,,
|
|
File without changes
|
{polyapi_python-0.3.10.dev4.dist-info → polyapi_python-0.3.10.dev5.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
|
File without changes
|