lattica 1.0.7__cp311-abi3-macosx_11_0_arm64.whl → 1.0.9__cp311-abi3-macosx_11_0_arm64.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.
Potentially problematic release.
This version of lattica might be problematic. Click here for more details.
lattica/client.py
CHANGED
|
@@ -241,9 +241,27 @@ class Lattica:
|
|
|
241
241
|
except Exception as e:
|
|
242
242
|
raise RuntimeError(f"Failed to stop providing: {e}")
|
|
243
243
|
|
|
244
|
+
def close(self):
|
|
245
|
+
try:
|
|
246
|
+
self._lattica_instance.close()
|
|
247
|
+
except Exception as e:
|
|
248
|
+
raise RuntimeError(f"Failed to close client: {e}")
|
|
249
|
+
def is_symmetric_nat(self, timeout=8000):
|
|
250
|
+
try:
|
|
251
|
+
return self._lattica_instance.is_symmetric_nat(timeout)
|
|
252
|
+
except Exception as e:
|
|
253
|
+
raise RuntimeError(f"Failed to check is_symmetric_nat error: {e}")
|
|
254
|
+
|
|
244
255
|
def __enter__(self):
|
|
245
256
|
self._ensure_initialized()
|
|
246
257
|
return self
|
|
247
258
|
|
|
248
259
|
def __exit__(self, exc_type, exc_val, exc_tb):
|
|
249
|
-
pass
|
|
260
|
+
pass
|
|
261
|
+
|
|
262
|
+
def __del__(self):
|
|
263
|
+
if self._lattica_instance is not None:
|
|
264
|
+
try:
|
|
265
|
+
self._lattica_instance.close()
|
|
266
|
+
except Exception as e:
|
|
267
|
+
print(f"Warning: Failed to shutdown Lattica: {e}")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: lattica
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.9
|
|
4
4
|
Requires-Dist: asyncio ; python_full_version >= '3.11'
|
|
5
5
|
Requires-Dist: typing-extensions ; python_full_version < '3.12'
|
|
6
6
|
Requires-Dist: nest-asyncio ; python_full_version >= '3.11'
|
|
@@ -47,7 +47,7 @@ pip install lattica
|
|
|
47
47
|
```
|
|
48
48
|
Or you can install from source using:
|
|
49
49
|
```bash
|
|
50
|
-
pip install git+https://
|
|
50
|
+
pip install git+https://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@github.com/OpenEdgeHQ/p2p-lattica.git#subdirectory=bindings/python --force-reinstall
|
|
51
51
|
```
|
|
52
52
|
|
|
53
53
|
## Quick Start
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
lattica-1.0.9.dist-info/METADATA,sha256=ioX04RrVuSWwyZrHX9KI4QW6nzKS7gtVBV6z_7qRuD8,5997
|
|
2
|
+
lattica-1.0.9.dist-info/WHEEL,sha256=kelVgS1CONjYuT6OEIC92ofaP9Aiw74EQCpLzMjs2Gg,103
|
|
3
|
+
lattica/__init__.py,sha256=8YITlLnp2HwFscCFPXoydAQlZfWQbWMIhESS26GovPI,295
|
|
4
|
+
lattica/client.py,sha256=-AY9QhM7T4AfOkjPEPxw0TnzkoxKoMGbR571oXXYCP8,9091
|
|
5
|
+
lattica/connection_handler.py,sha256=w8D4hG7KsXfbDdzSmZjn9cOfl8n-HCDEf91b6rElP_4,15749
|
|
6
|
+
lattica_python_core/__init__.py,sha256=uXPn47KzWKWEomcCmXdktHbovVOR38Cbsv8Vu8IrTPQ,159
|
|
7
|
+
lattica_python_core/lattica_python_core.abi3.so,sha256=Zb47GCs2wkL6R2vXSLEAJ2NREJoxs5B0Oa2QtY__q54,18862320
|
|
8
|
+
lattica-1.0.9.dist-info/RECORD,,
|
|
Binary file
|
lattica-1.0.7.dist-info/RECORD
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
lattica-1.0.7.dist-info/METADATA,sha256=SPdIj4g82bvqC1EiAGqq9cHeosvQaspyodZiCh4SMvA,5997
|
|
2
|
-
lattica-1.0.7.dist-info/WHEEL,sha256=kelVgS1CONjYuT6OEIC92ofaP9Aiw74EQCpLzMjs2Gg,103
|
|
3
|
-
lattica/__init__.py,sha256=8YITlLnp2HwFscCFPXoydAQlZfWQbWMIhESS26GovPI,295
|
|
4
|
-
lattica/client.py,sha256=-wxEgMW-c_MA8Vc-I5PB34878xVvlP2aNYZIHrdRKy8,8437
|
|
5
|
-
lattica/connection_handler.py,sha256=w8D4hG7KsXfbDdzSmZjn9cOfl8n-HCDEf91b6rElP_4,15749
|
|
6
|
-
lattica_python_core/__init__.py,sha256=uXPn47KzWKWEomcCmXdktHbovVOR38Cbsv8Vu8IrTPQ,159
|
|
7
|
-
lattica_python_core/lattica_python_core.abi3.so,sha256=9Zc0F9R8g1KvLKYw8NahKFW6FlugKAZ32ELC_eSR68Q,17520960
|
|
8
|
-
lattica-1.0.7.dist-info/RECORD,,
|
|
File without changes
|