polyapi-python 0.2.1.dev2__py3-none-any.whl → 0.2.2__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/generate.py +8 -5
- polyapi/webhook.py +1 -1
- {polyapi_python-0.2.1.dev2.dist-info → polyapi_python-0.2.2.dist-info}/METADATA +1 -1
- {polyapi_python-0.2.1.dev2.dist-info → polyapi_python-0.2.2.dist-info}/RECORD +7 -7
- {polyapi_python-0.2.1.dev2.dist-info → polyapi_python-0.2.2.dist-info}/LICENSE +0 -0
- {polyapi_python-0.2.1.dev2.dist-info → polyapi_python-0.2.2.dist-info}/WHEEL +0 -0
- {polyapi_python-0.2.1.dev2.dist-info → polyapi_python-0.2.2.dist-info}/top_level.txt +0 -0
polyapi/generate.py
CHANGED
|
@@ -76,11 +76,14 @@ def cache_specs(specs: List[SpecificationDto]):
|
|
|
76
76
|
|
|
77
77
|
full_path = os.path.dirname(os.path.abspath(__file__))
|
|
78
78
|
full_path = os.path.join(full_path, "poly")
|
|
79
|
-
|
|
80
|
-
os.
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
79
|
+
try:
|
|
80
|
+
if not os.path.exists(full_path):
|
|
81
|
+
os.makedirs(full_path)
|
|
82
|
+
|
|
83
|
+
with open(os.path.join(full_path, "specs.json"), "w") as f:
|
|
84
|
+
f.write(json.dumps(supported))
|
|
85
|
+
except Exception as e:
|
|
86
|
+
print("Failed to cache specs", e)
|
|
84
87
|
|
|
85
88
|
|
|
86
89
|
def read_cached_specs() -> List[SpecificationDto]:
|
polyapi/webhook.py
CHANGED
|
@@ -34,7 +34,7 @@ def {function_name}(callback, options=None):
|
|
|
34
34
|
nonlocal options
|
|
35
35
|
polyCustom = {{}}
|
|
36
36
|
resp = await callback(data.get("body"), data.get("headers"), data.get("params"), polyCustom)
|
|
37
|
-
if
|
|
37
|
+
if options.get("waitForResponse"):
|
|
38
38
|
await socket.emit('setWebhookListenerResponse', {{
|
|
39
39
|
"webhookHandleID": function_id,
|
|
40
40
|
"apiKey": api_key,
|
|
@@ -8,16 +8,16 @@ polyapi/constants.py,sha256=NGjso6K5rGnE8TGdrXmdEfvvr-HI3DTVGwOYiWO68LM,511
|
|
|
8
8
|
polyapi/exceptions.py,sha256=Zh7i7eCUhDuXEdUYjatkLFTeZkrx1BJ1P5ePgbJ9eIY,89
|
|
9
9
|
polyapi/execute.py,sha256=06XWTxGJqtsDiLY10RjRebIMFRfhtAIMmBRbuWu3e8A,1873
|
|
10
10
|
polyapi/function_cli.py,sha256=5e6hJ3nitKxbQNSkp4jbuAzbJvykj3de1_aSsc1MBnY,7331
|
|
11
|
-
polyapi/generate.py,sha256=
|
|
11
|
+
polyapi/generate.py,sha256=XGhr0Re-Lwasvc309aYCGaD3V_0BgITmo4u9GQaCJOc,9064
|
|
12
12
|
polyapi/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
13
13
|
polyapi/schema.py,sha256=1a7nIO867Xy3bagmPUNdYMxtS5OoCAv8oKIbYgj55dk,2957
|
|
14
14
|
polyapi/server.py,sha256=mcbH8pG16fFMiFL52wdii0217ZLsznQnElAFEvXZ7IA,2211
|
|
15
15
|
polyapi/typedefs.py,sha256=RZ3I6sgJm_5MuuORG1QjUE-UJy_z2WRXNdiWjEdLvQg,1371
|
|
16
16
|
polyapi/utils.py,sha256=wZQrwSOst5wyoYYLoMk1DnAEbVsJ0-2YkmmDQ9gI3FY,5399
|
|
17
17
|
polyapi/variables.py,sha256=d36-trnfTL_8m2NkorMiImb4O3UrJbiFV38CHxV5i0A,4200
|
|
18
|
-
polyapi/webhook.py,sha256=
|
|
19
|
-
polyapi_python-0.2.
|
|
20
|
-
polyapi_python-0.2.
|
|
21
|
-
polyapi_python-0.2.
|
|
22
|
-
polyapi_python-0.2.
|
|
23
|
-
polyapi_python-0.2.
|
|
18
|
+
polyapi/webhook.py,sha256=A89eNnYcVpVe9doJPDLfscIhF-C7Q2AI3vu-SzGxMBg,2923
|
|
19
|
+
polyapi_python-0.2.2.dist-info/LICENSE,sha256=Hi0kDr56Dsy0uYIwNt4r9G7tI8x8miXRTlyvbeplCP8,1068
|
|
20
|
+
polyapi_python-0.2.2.dist-info/METADATA,sha256=VAxKcFB7eUp5MRe8O0sfpYVN-lXVNP82I4bBo5JbZuE,4818
|
|
21
|
+
polyapi_python-0.2.2.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
22
|
+
polyapi_python-0.2.2.dist-info/top_level.txt,sha256=CEFllOnzowci_50RYJac-M54KD2IdAptFsayVVF_f04,8
|
|
23
|
+
polyapi_python-0.2.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|