Basic¶
basic.py¶
1from zcached import ZCached, Result
2
3client = ZCached(host="localhost", port=1234)
4client.run()
5
6result: Result[str] = client.ping()
7
8if not result:
9 print("Error!")
10 print(result.error)
11else:
12 print("Ok!")
13 print(result.value)