polyapi-python 0.3.1.dev5__py3-none-any.whl → 0.3.1.dev7__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/sync.py +4 -4
- {polyapi_python-0.3.1.dev5.dist-info → polyapi_python-0.3.1.dev7.dist-info}/METADATA +1 -1
- {polyapi_python-0.3.1.dev5.dist-info → polyapi_python-0.3.1.dev7.dist-info}/RECORD +6 -6
- {polyapi_python-0.3.1.dev5.dist-info → polyapi_python-0.3.1.dev7.dist-info}/LICENSE +0 -0
- {polyapi_python-0.3.1.dev5.dist-info → polyapi_python-0.3.1.dev7.dist-info}/WHEEL +0 -0
- {polyapi_python-0.3.1.dev5.dist-info → polyapi_python-0.3.1.dev7.dist-info}/top_level.txt +0 -0
polyapi/sync.py
CHANGED
|
@@ -27,7 +27,7 @@ def group_by(items: List[Dict], key: str) -> Dict[str, List[Dict]]:
|
|
|
27
27
|
return grouped
|
|
28
28
|
|
|
29
29
|
def remove_deployable_function(deployable: SyncDeployment) -> bool:
|
|
30
|
-
url = f
|
|
30
|
+
url = f'{deployable["instance"]}/functions/{deployable["type"].replace("-function", "")}/{deployable["id"]}'
|
|
31
31
|
response = requests.get(url)
|
|
32
32
|
if response.status_code != 200:
|
|
33
33
|
return False
|
|
@@ -39,10 +39,10 @@ def remove_deployable(deployable: SyncDeployment) -> bool:
|
|
|
39
39
|
if deployable["type"] == 'client-function' or deployable["type"] == 'server-function':
|
|
40
40
|
return remove_deployable_function(deployable)
|
|
41
41
|
|
|
42
|
-
raise Exception(f"Unsupported deployable type '{deployable[
|
|
42
|
+
raise Exception(f"Unsupported deployable type '{deployable['type']}'")
|
|
43
43
|
|
|
44
44
|
def sync_function_and_get_id(deployable: SyncDeployment, code: str) -> str:
|
|
45
|
-
url = f
|
|
45
|
+
url = f'{deployable["instance"]}/functions/{deployable["type"].replace("-function", "")}'
|
|
46
46
|
payload = {
|
|
47
47
|
"context": deployable["context"],
|
|
48
48
|
"name": deployable["name"],
|
|
@@ -61,7 +61,7 @@ def sync_deployable_and_get_id(deployable: SyncDeployment, code: str) -> str:
|
|
|
61
61
|
if deployable["type"] == 'client-function' or deployable["type"] == 'server-function':
|
|
62
62
|
return sync_function_and_get_id(deployable, code)
|
|
63
63
|
|
|
64
|
-
raise Exception(f"Unsupported deployable type '{deployable[
|
|
64
|
+
raise Exception(f"Unsupported deployable type '{deployable['type']}'")
|
|
65
65
|
|
|
66
66
|
def sync_deployable(deployable: SyncDeployment) -> Deployment:
|
|
67
67
|
code = read_file(deployable['file'])
|
|
@@ -18,13 +18,13 @@ polyapi/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
18
18
|
polyapi/rendered_spec.py,sha256=uaNzBhP4cX7iGfKwzZv0dxMagWzsGeDr0cQYx_AyIhQ,2153
|
|
19
19
|
polyapi/schema.py,sha256=VVMHAT5yU47cRC7xF44BrmUSemlk5oIKSxH2HTVPaQ8,3169
|
|
20
20
|
polyapi/server.py,sha256=NzQCZFSAJK7XiRw1kiU_i9uMvgYK7i8qh7UX2xjytJU,1908
|
|
21
|
-
polyapi/sync.py,sha256=
|
|
21
|
+
polyapi/sync.py,sha256=mH5MJORnCOZfsRktfluu-AuUd7vMUj4za2DPkX1DCHY,5879
|
|
22
22
|
polyapi/typedefs.py,sha256=jmKprGFQSxmJXvwV53p-MFMcStmTp-tsgsynWjoVmU0,1986
|
|
23
23
|
polyapi/utils.py,sha256=jzCh-ivKMcgp5fIXynhYmP9UyzsISr9bGGEzdPP8n3w,7644
|
|
24
24
|
polyapi/variables.py,sha256=d36-trnfTL_8m2NkorMiImb4O3UrJbiFV38CHxV5i0A,4200
|
|
25
25
|
polyapi/webhook.py,sha256=LWv28c2MLz_OKBI_Nn7WR4C-gs1SWgbdXsoxIIf-9UI,4886
|
|
26
|
-
polyapi_python-0.3.1.
|
|
27
|
-
polyapi_python-0.3.1.
|
|
28
|
-
polyapi_python-0.3.1.
|
|
29
|
-
polyapi_python-0.3.1.
|
|
30
|
-
polyapi_python-0.3.1.
|
|
26
|
+
polyapi_python-0.3.1.dev7.dist-info/LICENSE,sha256=Hi0kDr56Dsy0uYIwNt4r9G7tI8x8miXRTlyvbeplCP8,1068
|
|
27
|
+
polyapi_python-0.3.1.dev7.dist-info/METADATA,sha256=06tVm37czXvuRSjbHPBiiFGDiE2OEpV6hkP1kahYkSU,5326
|
|
28
|
+
polyapi_python-0.3.1.dev7.dist-info/WHEEL,sha256=R06PA3UVYHThwHvxuRWMqaGcr-PuniXahwjmQRFMEkY,91
|
|
29
|
+
polyapi_python-0.3.1.dev7.dist-info/top_level.txt,sha256=CEFllOnzowci_50RYJac-M54KD2IdAptFsayVVF_f04,8
|
|
30
|
+
polyapi_python-0.3.1.dev7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|