From 462df492ad5fd308eb0871e633e3c42375b94d7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=9A=D1=83=D1=82?= =?UTF-8?q?=D0=BB=D0=B0=D1=85=D0=BC=D0=B5=D1=82=D0=BE=D0=B2?= Date: Tue, 26 May 2026 14:46:56 +0000 Subject: [PATCH] add memory_client.py --- memory_client.py | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/memory_client.py b/memory_client.py index 42f2473..f2dac7d 100644 --- a/memory_client.py +++ b/memory_client.py @@ -1,28 +1,3 @@ -from fastmcp import Client import asyncio - -async def main(): - client = Client("python memory_server.py") - await client.connect() - try: - result = await client.call_tool( - "save_with_namespace", - {"key": "username", "value": "Алексей", "namespace": "default"} - ) - print(f"Сохранено: {result}") - - result = await client.call_tool( - "get_by_namespace", - {"namespace": "default"} - ) - print("Данные namespace 'default':") - for item in result: - print(f" {item['key']}: {item['value']}") - - keys = await client.call_tool("list_keys", {"pattern": "*name"}) - print(f"Ключи с 'name': {keys}") - finally: - await client.close() - -if __name__ == "__main__": - asyncio.run(main()) \ No newline at end of file +from fastmcp import Client +async def main():c? \ No newline at end of file