polyapi-python 0.2.5.dev12__py3-none-any.whl → 0.2.6.dev0__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
@@ -27,6 +27,7 @@ def execute_from_cli() -> None:
27
27
  parser.add_argument("--client", action="store_true", help="Pass --client when adding function to add a client function.")
28
28
  parser.add_argument("--server", action="store_true", help="Pass --server when adding function to add a server function.")
29
29
  parser.add_argument("--logs", action="store_true", help="Pass --logs when adding function if you want to store and see the function logs.")
30
+ parser.add_argument("--skip-generate", action="store_true", help="Pass --skip-generate to skip generating the library after adding a function.")
30
31
  parser.add_argument("command", choices=CLI_COMMANDS)
31
32
  parser.add_argument("subcommands", nargs="*")
32
33
  args = parser.parse_args()
@@ -55,4 +56,4 @@ def execute_from_cli() -> None:
55
56
  print("Clearing the generated library...")
56
57
  clear()
57
58
  elif command == "function":
58
- function_add_or_update(args.context, args.description, args.client, args.server, args.logs, args.subcommands)
59
+ function_add_or_update(args.context, args.description, args.client, args.server, args.logs, args.subcommands, not args.skip_generate)
polyapi/function_cli.py CHANGED
@@ -207,6 +207,7 @@ def function_add_or_update(
207
207
  server: bool,
208
208
  logs_enabled: bool,
209
209
  subcommands: List,
210
+ generate: bool = True,
210
211
  ):
211
212
  parser = argparse.ArgumentParser()
212
213
  parser.add_argument("subcommand", choices=["add"])
@@ -268,10 +269,11 @@ def function_add_or_update(
268
269
  print_green("DEPLOYED")
269
270
  function_id = resp.json()["id"]
270
271
  print(f"Function ID: {function_id}")
271
- print("Generating new custom function...", end="")
272
- functions = get_functions_and_parse(limit_ids=[function_id])
273
- generate_functions(functions)
274
- print_green("DONE")
272
+ if generate:
273
+ print("Generating new custom function...", end="")
274
+ functions = get_functions_and_parse(limit_ids=[function_id])
275
+ generate_functions(functions)
276
+ print_green("DONE")
275
277
  else:
276
278
  print("Error adding function.")
277
279
  print(resp.status_code)
polyapi/schema.py CHANGED
@@ -64,6 +64,7 @@ def generate_schema_types(input_data: Dict, root=None):
64
64
  "source": tmp_input,
65
65
  "destination": tmp_output,
66
66
  "root_name": root,
67
+ "api_arguments": {"get_name_properties": "UpperFirst"},
67
68
  }
68
69
  ],
69
70
  }
@@ -71,7 +72,7 @@ def generate_schema_types(input_data: Dict, root=None):
71
72
  # jsonschema_gentypes prints source to stdout
72
73
  # no option to surpress so we do this
73
74
  with contextlib.redirect_stdout(None):
74
- process_config(config)
75
+ process_config(config, [tmp_input])
75
76
 
76
77
  with open(tmp_output) as f:
77
78
  output = f.read()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: polyapi-python
3
- Version: 0.2.5.dev12
3
+ Version: 0.2.6.dev0
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
@@ -30,7 +30,7 @@ Description-Content-Type: text/markdown
30
30
  License-File: LICENSE
31
31
  Requires-Dist: requests ==2.31.0
32
32
  Requires-Dist: typing-extensions ==4.10.0
33
- Requires-Dist: jsonschema-gentypes ==2.4.0
33
+ Requires-Dist: jsonschema-gentypes ==2.6.0
34
34
  Requires-Dist: pydantic ==2.6.4
35
35
  Requires-Dist: stdlib-list ==0.10.0
36
36
  Requires-Dist: colorama ==0.4.4
@@ -2,25 +2,25 @@ polyapi/__init__.py,sha256=5iujRodfgRyLxT-zY0L3xax3rKRvfSt4NZlZYKOz03w,608
2
2
  polyapi/__main__.py,sha256=V4zhAh_YGxno5f_KSrlkELxcuDh9bR3WSd0n-2r-qQQ,93
3
3
  polyapi/api.py,sha256=bE651P47RuhqNYkVyvTH_pA44JypRZED_2M5UG_qzDI,1863
4
4
  polyapi/auth.py,sha256=zrIGatjba5GwUTNjKj1GHQWTEDP9B-HrSzCKbLFoqvc,5336
5
- polyapi/cli.py,sha256=QYsZmsnVLsf4LgE4iN7Tse1rrlTpycgG9nuL3Uoq9HU,2484
5
+ polyapi/cli.py,sha256=ZiOkD9DmlixxPvxfk1JQGoQwXv9Zf2cxk-J1ZMZN6IA,2657
6
6
  polyapi/client.py,sha256=w15XOABkwdL4V4r2iWY_nypzLjvoKVuux8jUKbA16pQ,1329
7
7
  polyapi/config.py,sha256=S8TU10upy5OW1_vX-CqQTJD-ZOB6329aMjiUCmukfUI,2292
8
8
  polyapi/constants.py,sha256=sc-FnS0SngBLvSu1ZWMs0UCf9EYD1u1Yhfr-sZXGLns,607
9
9
  polyapi/error_handler.py,sha256=I_e0iz6VM23FLVQWJljxs2NGcl_OODbi43OcbnqBlp8,2398
10
10
  polyapi/exceptions.py,sha256=Zh7i7eCUhDuXEdUYjatkLFTeZkrx1BJ1P5ePgbJ9eIY,89
11
11
  polyapi/execute.py,sha256=kXnvlNQ7nz9cRlV2_5gXH09UCmyiDP5zi3wiAw0uDuk,1943
12
- polyapi/function_cli.py,sha256=F0cb5MGcmFvspgwxptWq_2e50X5NNno0B0p8Vgu_oNI,9129
12
+ polyapi/function_cli.py,sha256=NE8CT1E22PC5DorVWJefXsBBGUnpSIsUyhHla02SV4k,9193
13
13
  polyapi/generate.py,sha256=dtS6Wyb_lq9FrOs7NA_ceKCX9rogx2_3Fp57_hGwdDc,7957
14
14
  polyapi/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
15
  polyapi/rendered_spec.py,sha256=JIsFkqAhYEtKa3-ToTli_th_wLbJpxgr_eYOMz4Z7yY,2345
16
- polyapi/schema.py,sha256=K7ayGu6K5vBTTvqr-Iqhf1QttqRFaXoJmtmGJRuDSTI,3577
16
+ polyapi/schema.py,sha256=qxzuWhpDLyO4eGutiaWHGVL9sT46-kVE3r4xByIwGVI,3662
17
17
  polyapi/server.py,sha256=n-nMGjXoq9T9ZwE2EBDkAaxJ7UytConGaHthkjbkCXA,1894
18
18
  polyapi/typedefs.py,sha256=mRqwd2LKofxNn_VSKxBzixni2j-tai8mfTQ0Wi2aLNM,1487
19
19
  polyapi/utils.py,sha256=f003Y5qP1uuyMKrvvaIUYS1TSGfSZjLnwPiXR5o4eA8,6530
20
20
  polyapi/variables.py,sha256=d36-trnfTL_8m2NkorMiImb4O3UrJbiFV38CHxV5i0A,4200
21
21
  polyapi/webhook.py,sha256=GvnS49Vl4k5STTvv4KKUnUAyn27OhIHHXChFmiI53Cs,4849
22
- polyapi_python-0.2.5.dev12.dist-info/LICENSE,sha256=Hi0kDr56Dsy0uYIwNt4r9G7tI8x8miXRTlyvbeplCP8,1068
23
- polyapi_python-0.2.5.dev12.dist-info/METADATA,sha256=n0tSre7-Lox50K8i3e6GKzbx_8XcHJpGLsozAXhpjjM,4868
24
- polyapi_python-0.2.5.dev12.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
25
- polyapi_python-0.2.5.dev12.dist-info/top_level.txt,sha256=CEFllOnzowci_50RYJac-M54KD2IdAptFsayVVF_f04,8
26
- polyapi_python-0.2.5.dev12.dist-info/RECORD,,
22
+ polyapi_python-0.2.6.dev0.dist-info/LICENSE,sha256=Hi0kDr56Dsy0uYIwNt4r9G7tI8x8miXRTlyvbeplCP8,1068
23
+ polyapi_python-0.2.6.dev0.dist-info/METADATA,sha256=4Al4mg3it6jQgGojXuS-h1qTdPL9lG_lHexuM-P5rw0,4867
24
+ polyapi_python-0.2.6.dev0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
25
+ polyapi_python-0.2.6.dev0.dist-info/top_level.txt,sha256=CEFllOnzowci_50RYJac-M54KD2IdAptFsayVVF_f04,8
26
+ polyapi_python-0.2.6.dev0.dist-info/RECORD,,