polyapi-python 0.2.4.dev1__py3-none-any.whl → 0.2.4.dev2__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/server.py CHANGED
@@ -18,7 +18,10 @@ def {function_name}(
18
18
  Function ID: {function_id}
19
19
  \"""
20
20
  resp = execute("{function_type}", "{function_id}", {data})
21
- return {return_action}
21
+ try:
22
+ return {return_action}
23
+ except:
24
+ return resp.text
22
25
  """
23
26
 
24
27
 
@@ -54,14 +57,6 @@ def render_server_function(
54
57
  def _get_server_return_action(return_type_name: str) -> str:
55
58
  if return_type_name == "str":
56
59
  return_action = "resp.text"
57
- elif return_type_name == "Any":
58
- return_action = "resp.text"
59
- elif return_type_name == "int":
60
- return_action = "int(resp.text.replace('(int) ', ''))"
61
- elif return_type_name == "float":
62
- return_action = "float(resp.text.replace('(float) ', ''))"
63
- elif return_type_name == "bool":
64
- return_action = "False if resp.text == 'False' else True"
65
60
  else:
66
61
  return_action = "resp.json()"
67
62
  return return_action
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: polyapi-python
3
- Version: 0.2.4.dev1
3
+ Version: 0.2.4.dev2
4
4
  Summary: The PolyAPI Python Client
5
5
  Author-email: Dan Fellin <dan@polyapi.io>
6
6
  License: MIT License
@@ -36,7 +36,6 @@ Requires-Dist: stdlib-list ==0.10.0
36
36
  Requires-Dist: colorama ==0.4.4
37
37
  Requires-Dist: python-socketio[asyncio_client] ==5.11.1
38
38
  Requires-Dist: truststore ==0.8.0
39
- Requires-Dist: pyjwt ==2.3.0
40
39
 
41
40
  # PolyAPI Python Library
42
41
 
@@ -13,13 +13,13 @@ polyapi/function_cli.py,sha256=KkFvnGSSCwYPMV4cX4yMQmXKyLtgYR64Fz5BfjGv3qY,8230
13
13
  polyapi/generate.py,sha256=O1lb7rLsce7tItIrMx1EbWzRlAKKOp-7upNM80cMmMw,8499
14
14
  polyapi/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
15
  polyapi/schema.py,sha256=1a7nIO867Xy3bagmPUNdYMxtS5OoCAv8oKIbYgj55dk,2957
16
- polyapi/server.py,sha256=mcbH8pG16fFMiFL52wdii0217ZLsznQnElAFEvXZ7IA,2211
16
+ polyapi/server.py,sha256=iXUR1Kd5TnWK-V5qHhvFvQuHx-3IcTv8WChXVY5Mbog,1882
17
17
  polyapi/typedefs.py,sha256=a5WfHaAvjeql3y1iA3_SkpUztTbKvS5bPqkVxkCvr9E,1459
18
18
  polyapi/utils.py,sha256=UD3uV3kzt2w23zxAdHCUROhdvtdO44KCJIpqnFwEhqE,5937
19
19
  polyapi/variables.py,sha256=d36-trnfTL_8m2NkorMiImb4O3UrJbiFV38CHxV5i0A,4200
20
20
  polyapi/webhook.py,sha256=A89eNnYcVpVe9doJPDLfscIhF-C7Q2AI3vu-SzGxMBg,2923
21
- polyapi_python-0.2.4.dev1.dist-info/LICENSE,sha256=Hi0kDr56Dsy0uYIwNt4r9G7tI8x8miXRTlyvbeplCP8,1068
22
- polyapi_python-0.2.4.dev1.dist-info/METADATA,sha256=nxu9RxaO-TN60gINVtxyGPqVVLGGSiV_MHGeNPGt190,4852
23
- polyapi_python-0.2.4.dev1.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
24
- polyapi_python-0.2.4.dev1.dist-info/top_level.txt,sha256=CEFllOnzowci_50RYJac-M54KD2IdAptFsayVVF_f04,8
25
- polyapi_python-0.2.4.dev1.dist-info/RECORD,,
21
+ polyapi_python-0.2.4.dev2.dist-info/LICENSE,sha256=Hi0kDr56Dsy0uYIwNt4r9G7tI8x8miXRTlyvbeplCP8,1068
22
+ polyapi_python-0.2.4.dev2.dist-info/METADATA,sha256=rqisf041u3SL5f87CuxkwJi564KBlM4Qx102MB7z3mk,4823
23
+ polyapi_python-0.2.4.dev2.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
24
+ polyapi_python-0.2.4.dev2.dist-info/top_level.txt,sha256=CEFllOnzowci_50RYJac-M54KD2IdAptFsayVVF_f04,8
25
+ polyapi_python-0.2.4.dev2.dist-info/RECORD,,