chore: add initial package structure with core module and dependencies
This commit is contained in:
Vendored
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
@@ -1,6 +1,6 @@
|
|||||||
[metadata]
|
[metadata]
|
||||||
name = yura
|
name = yura
|
||||||
version = 14.4.4
|
version = 14.4.5
|
||||||
description = Yura async AI client
|
description = Yura async AI client
|
||||||
author = retoor
|
author = retoor
|
||||||
author_email = retoor@retoor.io
|
author_email = retoor@retoor.io
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
Metadata-Version: 2.1
|
Metadata-Version: 2.1
|
||||||
Name: yura
|
Name: yura
|
||||||
Version: 14.4.4
|
Version: 14.4.5
|
||||||
Summary: Yura async AI client
|
Summary: Yura async AI client
|
||||||
Author: retoor
|
Author: retoor
|
||||||
Author-email: retoor@retoor.io
|
Author-email: retoor@retoor.io
|
||||||
|
|||||||
+6
-5
@@ -53,14 +53,14 @@ class AsyncRPCClient:
|
|||||||
|
|
||||||
return call
|
return call
|
||||||
|
|
||||||
def close(self):
|
async def close(self):
|
||||||
if self._ws:
|
if self._ws:
|
||||||
self._ws.close()
|
await self._ws.close()
|
||||||
self._ws = None
|
self._ws = None
|
||||||
|
|
||||||
def __del__(self):
|
def __del__(self):
|
||||||
self.close()
|
if self._ws:
|
||||||
|
raise Exception("ASyncRPCClient destructed without closing connection properly.")
|
||||||
|
|
||||||
class AsyncClient:
|
class AsyncClient:
|
||||||
|
|
||||||
@@ -92,7 +92,8 @@ class AsyncClient:
|
|||||||
async def connect(self, name):
|
async def connect(self, name):
|
||||||
return await self.client.connect(name)
|
return await self.client.connect(name)
|
||||||
|
|
||||||
def __del__(self):
|
async def close(self):
|
||||||
|
await self.client.close()
|
||||||
self.client = None
|
self.client = None
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user