polyapi-python 0.3.19.dev2__py3-none-any.whl → 0.3.19.dev4__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
@@ -127,7 +127,7 @@ def execute_from_cli():
127
127
  fn_add_parser.add_argument("--logs", choices=["enabled", "disabled"], default=None, help="Enable or disable logs for the function.")
128
128
  fn_add_parser.add_argument("--execution-api-key", required=False, default="", help="API key for execution (for server functions only).")
129
129
  fn_add_parser.add_argument("--skip-generate", action="store_true", help="Skip running generate after function add command, especially useful if you are deploying a bunch of functions at once. Run generate manually at the end!")
130
- fn_add_parser.add_argument("--skip-toolkit-build", action="store_true", help="Skip rebuilding the toolkit after adding/updating the function")
130
+ fn_add_parser.add_argument("--image", type=str, default=None, help="Docker image to use when deploying a server function")
131
131
  fn_add_parser.add_argument("--generate-contexts", type=str, help="Server function only – only include certain contexts to speed up function execution")
132
132
  fn_add_parser.add_argument("--visibility", type=str, default="environment", help="Specifies the visibility of a function. Options: PUBLIC, TENANT, ENVIRONMENT. Case insensitive")
133
133
 
@@ -142,6 +142,8 @@ def execute_from_cli():
142
142
  err = "You must specify `--server` or `--client`."
143
143
  elif logs_enabled and not args.server:
144
144
  err = "Option `logs` is only for server functions (--server)."
145
+ elif args.image and not args.server:
146
+ err = "Option `image` is only for server functions (--server)."
145
147
  elif args.generate_contexts and not args.server:
146
148
  err = "Option `generate-contexts` is only for server functions (--server)."
147
149
  elif visibility not in ["PUBLIC", "TENANT", "ENVIRONMENT"]:
@@ -164,7 +166,7 @@ def execute_from_cli():
164
166
  execution_api_key=args.execution_api_key,
165
167
  generate_contexts=args.generate_contexts,
166
168
  visibility=visibility,
167
- skip_toolkit_build=args.skip_toolkit_build
169
+ image=args.image,
168
170
  )
169
171
 
170
172
  fn_add_parser.set_defaults(command=add_function)
polyapi/function_cli.py CHANGED
@@ -25,9 +25,9 @@ def function_add_or_update(
25
25
  logs_enabled: Optional[bool],
26
26
  generate_contexts: Optional[str],
27
27
  visibility: Optional[str],
28
+ image: Optional[str],
28
29
  generate: bool = True,
29
30
  execution_api_key: str = "",
30
- skip_toolkit_build: bool = False,
31
31
  ):
32
32
  verb = "Updating" if _func_already_exists(context, name) else "Adding"
33
33
  ftype = "server" if server else "client"
@@ -69,8 +69,8 @@ def function_add_or_update(
69
69
  if generate_contexts:
70
70
  data["generateContexts"] = generate_contexts.split(",")
71
71
 
72
- if server:
73
- data["skipToolkitBuild"] = skip_toolkit_build
72
+ if server and image:
73
+ data["image"] = image
74
74
 
75
75
  if server and parsed["dependencies"]:
76
76
  print_yellow(
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: polyapi-python
3
- Version: 0.3.19.dev2
4
- Summary: The Python Client for PolyAPI, the IPaaS by Developers for Developers
3
+ Version: 0.3.19.dev4
4
+ Summary: The Python SDK for the integration platform PolyAPI
5
5
  Author-email: PolyAPI <support@polyapi.io>
6
6
  License: MIT License
7
7
 
@@ -99,7 +99,7 @@ print(poly.polyapi.function.api.list(my_server, my_api_key))
99
99
  To add a new server function, please follow the quickstart. Then you can add a server function like so:
100
100
 
101
101
  ```bash
102
- python -m polyapi --context mycontext --description mydesc --server function add <function_name> foo.py
102
+ python -m polyapi function add <function_name> foo.py --server --context mycontext --description mydesc
103
103
  ```
104
104
 
105
105
  The code in `foo.py` should contain a single defined function named the same as your `<function_name>` variable.
@@ -2,7 +2,7 @@ polyapi/__init__.py,sha256=vV1N9xtIMtpi4o-2jAI3775LkzRbC9JUo87MAnW9zgo,5201
2
2
  polyapi/__main__.py,sha256=V4zhAh_YGxno5f_KSrlkELxcuDh9bR3WSd0n-2r-qQQ,93
3
3
  polyapi/api.py,sha256=CzqX99GekhQJVqAAWlL03hUenIi_5iTln9cWgQzz6Ko,2784
4
4
  polyapi/auth.py,sha256=l0pGAoYvEWqa2TMsrM9GS8imXu3GsWvpn4eFPy1vksI,6195
5
- polyapi/cli.py,sha256=6MESQO33HUTZWdUndjM4cDEyiF6Of0Zs1dtGL3vFTzQ,11842
5
+ polyapi/cli.py,sha256=V3586ElV1927u2AhQZAo_4UYKoJPqE8lz6b3_gJfMj0,11918
6
6
  polyapi/cli_constants.py,sha256=eZnAqAo8HLxHH3cdAoGWbrsALAtEWJFXRdSS2lvQvzE,144
7
7
  polyapi/client.py,sha256=DW6ljG_xCwAo2yz23A9QfLooE6ZUDvSpdA4e_dCQjiQ,1418
8
8
  polyapi/config.py,sha256=HArQg9BtZQxUCbi4OHLqvkwvjnnnDTJsuJW7niLo_5k,7328
@@ -11,7 +11,7 @@ polyapi/deployables.py,sha256=njmqTU0W7d3JdDWhjjjr2UOghEv4bTKUN-3ztJvcC7o,12233
11
11
  polyapi/error_handler.py,sha256=I_e0iz6VM23FLVQWJljxs2NGcl_OODbi43OcbnqBlp8,2398
12
12
  polyapi/exceptions.py,sha256=Zh7i7eCUhDuXEdUYjatkLFTeZkrx1BJ1P5ePgbJ9eIY,89
13
13
  polyapi/execute.py,sha256=4jLkQely6cM7pNN9pYpGZTbEis-DfwENi5Fl07xSiig,8966
14
- polyapi/function_cli.py,sha256=oCWvSDmi8Ic3x_vi_HPJd59gl4Kxdoa_JrjTSn4ihxg,4519
14
+ polyapi/function_cli.py,sha256=gJE72lRvuWnGl6CG9GpqL78TOnUzxVe4kJMvg0PQixw,4493
15
15
  polyapi/generate.py,sha256=9B6DbrkBAPWpMVD92ifFYV2JaKNCduMQhqJ4Gm48qq0,22051
16
16
  polyapi/http_client.py,sha256=TcoFsIvRcNB9wWJT4YePPWFFY6lX90cdqi7C4jKbqqk,2259
17
17
  polyapi/parser.py,sha256=t3jJI6g5F7Qg_tirPOzSkQ02VLkSVhnqs9YGapyHx2k,21901
@@ -27,8 +27,8 @@ polyapi/typedefs.py,sha256=mfll-KrngOW0wzbvDNiIDaDkFMwbsT-MY5y5hzWj9RE,5642
27
27
  polyapi/utils.py,sha256=dIkuIlGNsg1USiXNNkUnOtLVzie4mxBCBlTc0YsaXao,15594
28
28
  polyapi/variables.py,sha256=hfSDPGQK6YphNCa9MqE0W88WIFfqCQWgpBDWkExMq-A,7582
29
29
  polyapi/webhook.py,sha256=0ceLwHNjNd2Yx_8MX5jOIxiQ5Lwhy2pe81ProAuKon0,5108
30
- polyapi_python-0.3.19.dev2.dist-info/licenses/LICENSE,sha256=6b_I7aPVp8JXhqQwdw7_B84Ca0S4JGjHj0sr_1VOdB4,1068
31
- polyapi_python-0.3.19.dev2.dist-info/METADATA,sha256=rYXOQH9EWEJDyqnXIrqQU7tSJe-MtVRqy7m1rr9IHe0,5916
32
- polyapi_python-0.3.19.dev2.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
33
- polyapi_python-0.3.19.dev2.dist-info/top_level.txt,sha256=CEFllOnzowci_50RYJac-M54KD2IdAptFsayVVF_f04,8
34
- polyapi_python-0.3.19.dev2.dist-info/RECORD,,
30
+ polyapi_python-0.3.19.dev4.dist-info/licenses/LICENSE,sha256=6b_I7aPVp8JXhqQwdw7_B84Ca0S4JGjHj0sr_1VOdB4,1068
31
+ polyapi_python-0.3.19.dev4.dist-info/METADATA,sha256=E2Ot99-wAaduZDv9OUFxzH7cFH3m020ZGT3OcNXj9iM,5898
32
+ polyapi_python-0.3.19.dev4.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
33
+ polyapi_python-0.3.19.dev4.dist-info/top_level.txt,sha256=CEFllOnzowci_50RYJac-M54KD2IdAptFsayVVF_f04,8
34
+ polyapi_python-0.3.19.dev4.dist-info/RECORD,,