chore: add initial package structure with core module and dependencies

This commit is contained in:
2024-12-02 11:28:53 +00:00
parent 914593689e
commit 0ba03a7b1c
9 changed files with 8 additions and 7 deletions
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
+1 -1
View File
@@ -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 -1
View File
@@ -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
View File
@@ -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