polyapi-python 0.3.19.dev1__py3-none-any.whl → 0.3.19.dev3__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 +4 -2
- polyapi/function_cli.py +3 -3
- polyapi/poly_tables.py +1 -1
- {polyapi_python-0.3.19.dev1.dist-info → polyapi_python-0.3.19.dev3.dist-info}/METADATA +2 -2
- {polyapi_python-0.3.19.dev1.dist-info → polyapi_python-0.3.19.dev3.dist-info}/RECORD +8 -8
- {polyapi_python-0.3.19.dev1.dist-info → polyapi_python-0.3.19.dev3.dist-info}/WHEEL +0 -0
- {polyapi_python-0.3.19.dev1.dist-info → polyapi_python-0.3.19.dev3.dist-info}/licenses/LICENSE +0 -0
- {polyapi_python-0.3.19.dev1.dist-info → polyapi_python-0.3.19.dev3.dist-info}/top_level.txt +0 -0
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("--
|
|
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
|
-
|
|
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["
|
|
72
|
+
if server and image:
|
|
73
|
+
data["image"] = image
|
|
74
74
|
|
|
75
75
|
if server and parsed["dependencies"]:
|
|
76
76
|
print_yellow(
|
polyapi/poly_tables.py
CHANGED
|
@@ -85,7 +85,7 @@ def execute_query(table_id, method, query):
|
|
|
85
85
|
|
|
86
86
|
auth_key = polyCustom.get("executionApiKey") or api_key
|
|
87
87
|
url = f"{base_url.rstrip('/')}/tables/{table_id}/{method}?clientId={client_id}"
|
|
88
|
-
headers = {"x-poly-execution-id": polyCustom.get("executionId")}
|
|
88
|
+
headers = {"x-poly-execution-id": polyCustom.get("executionId") or ""}
|
|
89
89
|
if auth_key:
|
|
90
90
|
headers["Authorization"] = f"Bearer {auth_key}"
|
|
91
91
|
response = http_client.post(url, json=query, headers=headers)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: polyapi-python
|
|
3
|
-
Version: 0.3.19.
|
|
3
|
+
Version: 0.3.19.dev3
|
|
4
4
|
Summary: The Python Client for PolyAPI, the IPaaS by Developers for Developers
|
|
5
5
|
Author-email: PolyAPI <support@polyapi.io>
|
|
6
6
|
License: MIT License
|
|
@@ -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
|
|
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=
|
|
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,12 +11,12 @@ 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=
|
|
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
|
|
18
18
|
polyapi/poly_schemas.py,sha256=JGMQbELPFw4V_0nA0o71WJKFTdxjCGoKqJvIid_Y-a4,10759
|
|
19
|
-
polyapi/poly_tables.py,sha256=
|
|
19
|
+
polyapi/poly_tables.py,sha256=SlP7ZwqS3nIji2uGR2VJQH6IdddZ832rRItcmoYdIBc,20293
|
|
20
20
|
polyapi/prepare.py,sha256=DBlrQu_A0PqdaQ3KlMs-C6PkV3qncatkAiBlC7j2hnk,7441
|
|
21
21
|
polyapi/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
22
22
|
polyapi/rendered_spec.py,sha256=J2Num7MXnW_mKAe2MSVIL1coWopNYZ-6nNNwQRfseV0,2262
|
|
@@ -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.
|
|
31
|
-
polyapi_python-0.3.19.
|
|
32
|
-
polyapi_python-0.3.19.
|
|
33
|
-
polyapi_python-0.3.19.
|
|
34
|
-
polyapi_python-0.3.19.
|
|
30
|
+
polyapi_python-0.3.19.dev3.dist-info/licenses/LICENSE,sha256=6b_I7aPVp8JXhqQwdw7_B84Ca0S4JGjHj0sr_1VOdB4,1068
|
|
31
|
+
polyapi_python-0.3.19.dev3.dist-info/METADATA,sha256=jTKpId4dLWQJsghiT8KVO9Khx42-DMuq8Xup5smilco,5916
|
|
32
|
+
polyapi_python-0.3.19.dev3.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
33
|
+
polyapi_python-0.3.19.dev3.dist-info/top_level.txt,sha256=CEFllOnzowci_50RYJac-M54KD2IdAptFsayVVF_f04,8
|
|
34
|
+
polyapi_python-0.3.19.dev3.dist-info/RECORD,,
|
|
File without changes
|
{polyapi_python-0.3.19.dev1.dist-info → polyapi_python-0.3.19.dev3.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
|
File without changes
|