polyapi-python 0.2.4.dev7__tar.gz → 0.2.4.dev9__tar.gz
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_python-0.2.4.dev7/polyapi_python.egg-info → polyapi_python-0.2.4.dev9}/PKG-INFO +1 -1
- {polyapi_python-0.2.4.dev7 → polyapi_python-0.2.4.dev9}/polyapi/webhook.py +8 -3
- {polyapi_python-0.2.4.dev7 → polyapi_python-0.2.4.dev9/polyapi_python.egg-info}/PKG-INFO +1 -1
- {polyapi_python-0.2.4.dev7 → polyapi_python-0.2.4.dev9}/pyproject.toml +1 -1
- {polyapi_python-0.2.4.dev7 → polyapi_python-0.2.4.dev9}/LICENSE +0 -0
- {polyapi_python-0.2.4.dev7 → polyapi_python-0.2.4.dev9}/README.md +0 -0
- {polyapi_python-0.2.4.dev7 → polyapi_python-0.2.4.dev9}/polyapi/__init__.py +0 -0
- {polyapi_python-0.2.4.dev7 → polyapi_python-0.2.4.dev9}/polyapi/__main__.py +0 -0
- {polyapi_python-0.2.4.dev7 → polyapi_python-0.2.4.dev9}/polyapi/api.py +0 -0
- {polyapi_python-0.2.4.dev7 → polyapi_python-0.2.4.dev9}/polyapi/auth.py +0 -0
- {polyapi_python-0.2.4.dev7 → polyapi_python-0.2.4.dev9}/polyapi/cli.py +0 -0
- {polyapi_python-0.2.4.dev7 → polyapi_python-0.2.4.dev9}/polyapi/client.py +0 -0
- {polyapi_python-0.2.4.dev7 → polyapi_python-0.2.4.dev9}/polyapi/config.py +0 -0
- {polyapi_python-0.2.4.dev7 → polyapi_python-0.2.4.dev9}/polyapi/constants.py +0 -0
- {polyapi_python-0.2.4.dev7 → polyapi_python-0.2.4.dev9}/polyapi/error_handler.py +0 -0
- {polyapi_python-0.2.4.dev7 → polyapi_python-0.2.4.dev9}/polyapi/exceptions.py +0 -0
- {polyapi_python-0.2.4.dev7 → polyapi_python-0.2.4.dev9}/polyapi/execute.py +0 -0
- {polyapi_python-0.2.4.dev7 → polyapi_python-0.2.4.dev9}/polyapi/function_cli.py +0 -0
- {polyapi_python-0.2.4.dev7 → polyapi_python-0.2.4.dev9}/polyapi/generate.py +0 -0
- {polyapi_python-0.2.4.dev7 → polyapi_python-0.2.4.dev9}/polyapi/poly_custom.py +0 -0
- {polyapi_python-0.2.4.dev7 → polyapi_python-0.2.4.dev9}/polyapi/py.typed +0 -0
- {polyapi_python-0.2.4.dev7 → polyapi_python-0.2.4.dev9}/polyapi/schema.py +0 -0
- {polyapi_python-0.2.4.dev7 → polyapi_python-0.2.4.dev9}/polyapi/server.py +0 -0
- {polyapi_python-0.2.4.dev7 → polyapi_python-0.2.4.dev9}/polyapi/typedefs.py +0 -0
- {polyapi_python-0.2.4.dev7 → polyapi_python-0.2.4.dev9}/polyapi/utils.py +0 -0
- {polyapi_python-0.2.4.dev7 → polyapi_python-0.2.4.dev9}/polyapi/variables.py +0 -0
- {polyapi_python-0.2.4.dev7 → polyapi_python-0.2.4.dev9}/polyapi_python.egg-info/SOURCES.txt +0 -0
- {polyapi_python-0.2.4.dev7 → polyapi_python-0.2.4.dev9}/polyapi_python.egg-info/dependency_links.txt +0 -0
- {polyapi_python-0.2.4.dev7 → polyapi_python-0.2.4.dev9}/polyapi_python.egg-info/requires.txt +0 -0
- {polyapi_python-0.2.4.dev7 → polyapi_python-0.2.4.dev9}/polyapi_python.egg-info/top_level.txt +0 -0
- {polyapi_python-0.2.4.dev7 → polyapi_python-0.2.4.dev9}/setup.cfg +0 -0
- {polyapi_python-0.2.4.dev7 → polyapi_python-0.2.4.dev9}/tests/test_api.py +0 -0
- {polyapi_python-0.2.4.dev7 → polyapi_python-0.2.4.dev9}/tests/test_auth.py +0 -0
- {polyapi_python-0.2.4.dev7 → polyapi_python-0.2.4.dev9}/tests/test_function_cli.py +0 -0
- {polyapi_python-0.2.4.dev7 → polyapi_python-0.2.4.dev9}/tests/test_server.py +0 -0
- {polyapi_python-0.2.4.dev7 → polyapi_python-0.2.4.dev9}/tests/test_utils.py +0 -0
- {polyapi_python-0.2.4.dev7 → polyapi_python-0.2.4.dev9}/tests/test_variables.py +0 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import asyncio
|
|
2
2
|
import socketio # type: ignore
|
|
3
|
+
from socketio.exceptions import ConnectionError # type: ignore
|
|
3
4
|
import uuid
|
|
4
5
|
from typing import Any, Dict, List, Tuple
|
|
5
6
|
|
|
@@ -77,7 +78,7 @@ async def get_client_and_connect():
|
|
|
77
78
|
|
|
78
79
|
|
|
79
80
|
async def unregister(data: Dict[str, Any]):
|
|
80
|
-
print(f"stopping
|
|
81
|
+
print(f"stopping webhook handler for '{data['webhookHandleID']}'...")
|
|
81
82
|
assert client
|
|
82
83
|
await client.emit(
|
|
83
84
|
"unregisterWebhookEventHandler",
|
|
@@ -92,8 +93,12 @@ async def unregister(data: Dict[str, Any]):
|
|
|
92
93
|
|
|
93
94
|
async def unregister_all():
|
|
94
95
|
_, base_url = get_api_key_and_url()
|
|
95
|
-
# need to reconnect because maybe socketio client disconnected after Ctrl+C?
|
|
96
|
-
|
|
96
|
+
# maybe need to reconnect because maybe socketio client disconnected after Ctrl+C?
|
|
97
|
+
# feels like Linux disconnects but Windows stays connected
|
|
98
|
+
try:
|
|
99
|
+
await client.connect(base_url, transports=["websocket"], namespaces=["/events"])
|
|
100
|
+
except ConnectionError:
|
|
101
|
+
pass
|
|
97
102
|
await asyncio.gather(*[unregister(handler) for handler in active_handlers])
|
|
98
103
|
|
|
99
104
|
|
|
@@ -3,7 +3,7 @@ requires = ["setuptools>=61.2", "wheel"]
|
|
|
3
3
|
|
|
4
4
|
[project]
|
|
5
5
|
name = "polyapi-python"
|
|
6
|
-
version = "0.2.4.
|
|
6
|
+
version = "0.2.4.dev9"
|
|
7
7
|
description = "The Python Client for PolyAPI, the IPaaS by Developers for Developers"
|
|
8
8
|
authors = [{ name = "Dan Fellin", email = "dan@polyapi.io" }]
|
|
9
9
|
dependencies = [
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{polyapi_python-0.2.4.dev7 → polyapi_python-0.2.4.dev9}/polyapi_python.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{polyapi_python-0.2.4.dev7 → polyapi_python-0.2.4.dev9}/polyapi_python.egg-info/requires.txt
RENAMED
|
File without changes
|
{polyapi_python-0.2.4.dev7 → polyapi_python-0.2.4.dev9}/polyapi_python.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|