polyapi-python 0.3.10.dev4__py3-none-any.whl → 0.3.10.dev6__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/cli.py CHANGED
@@ -113,7 +113,7 @@ def execute_from_cli():
113
113
  fn_add_parser.add_argument("--execution-api-key", required=False, default="", help="API key for execution (for server functions only).")
114
114
  fn_add_parser.add_argument("--disable-ai", "--skip-generate", action="store_true", help="Pass --disable-ai skip AI generation of missing descriptions")
115
115
  fn_add_parser.add_argument("--generate-contexts", type=str, help="Server function only – only include certain contexts to speed up function execution")
116
- fn_add_parser.add_argument("--visiblity", type=str, help="Specifies the visibility of a function. Options: PUBLIC, TENANT, ENVIRONMENT. Case insensitive")
116
+ fn_add_parser.add_argument("--visibility", type=str, default="environment", help="Specifies the visibility of a function. Options: PUBLIC, TENANT, ENVIRONMENT. Case insensitive")
117
117
 
118
118
  def add_function(args):
119
119
  initialize_config()
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
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: polyapi-python
3
- Version: 0.3.10.dev4
3
+ Version: 0.3.10.dev6
4
4
  Summary: The Python Client for PolyAPI, the IPaaS by Developers for Developers
5
5
  Author-email: Dan Fellin <dan@polyapi.io>
6
6
  License: MIT License
@@ -2,7 +2,7 @@ polyapi/__init__.py,sha256=hw7x4j9JNJfPdkIOZqV0X9pbYcw3_5AH1iQFdSogH-c,3235
2
2
  polyapi/__main__.py,sha256=V4zhAh_YGxno5f_KSrlkELxcuDh9bR3WSd0n-2r-qQQ,93
3
3
  polyapi/api.py,sha256=2nds6ZdNe9OHvCba4IjOPga0CAYIsib2SbhEyDDCmd8,2188
4
4
  polyapi/auth.py,sha256=EGstBjTSdAydI5hGAHeRRc1GcmHshogudb3sxCgO6zA,5341
5
- polyapi/cli.py,sha256=jYZJk5Uslpn00BMRaskmCqI9xDYs4CRuk4XrEIrLT-g,11076
5
+ polyapi/cli.py,sha256=lsF9xgSGeten0sBRPPBV0c7z8QIy4stSybGTQKggPjQ,11100
6
6
  polyapi/client.py,sha256=DW6ljG_xCwAo2yz23A9QfLooE6ZUDvSpdA4e_dCQjiQ,1418
7
7
  polyapi/config.py,sha256=cAMv2n9tGN_BTvqt7V32o5F86qRhxAKyey_PoId2D8s,7638
8
8
  polyapi/constants.py,sha256=sc-FnS0SngBLvSu1ZWMs0UCf9EYD1u1Yhfr-sZXGLns,607
@@ -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=adftBHGncvxpPchpjfFwDjQncVn9lZTrRHNroei4Nw0,15897
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.dev4.dist-info/licenses/LICENSE,sha256=6b_I7aPVp8JXhqQwdw7_B84Ca0S4JGjHj0sr_1VOdB4,1068
29
- polyapi_python-0.3.10.dev4.dist-info/METADATA,sha256=6fELLYAh0QKPsf3ag88SlOFTCpnkardiRz1Af2TJmaQ,5318
30
- polyapi_python-0.3.10.dev4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
31
- polyapi_python-0.3.10.dev4.dist-info/top_level.txt,sha256=CEFllOnzowci_50RYJac-M54KD2IdAptFsayVVF_f04,8
32
- polyapi_python-0.3.10.dev4.dist-info/RECORD,,
28
+ polyapi_python-0.3.10.dev6.dist-info/licenses/LICENSE,sha256=6b_I7aPVp8JXhqQwdw7_B84Ca0S4JGjHj0sr_1VOdB4,1068
29
+ polyapi_python-0.3.10.dev6.dist-info/METADATA,sha256=Y6eWcEvxBbJ2-t-570Ic77bj4Ed-LtPhOc4v0XBF6yI,5318
30
+ polyapi_python-0.3.10.dev6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
31
+ polyapi_python-0.3.10.dev6.dist-info/top_level.txt,sha256=CEFllOnzowci_50RYJac-M54KD2IdAptFsayVVF_f04,8
32
+ polyapi_python-0.3.10.dev6.dist-info/RECORD,,