LokiDB python client SDK
Project description
py-client
LokiDB python client SDK
Example
from random import randrange
from lokidb_sdk import Client
c = Client(
[
("localhost", 50051),
("localhost", 50052),
("localhost", 50053),
("localhost", 50054),
("localhost", 50055),
]
)
for _ in range(1000):
key = f'{randrange(-99999999, 99999999)}'
value = f'{randrange(-99999999, 99999999)}'*10
c.set(key, value)
print(c.get(key))
# Get all keys from all nodes
print(c.keys())
# Close connection to all nodes
c.close()
API
Method | Input | Output |
---|---|---|
Get | key (str) | value (str) |
Set | key (str), value (str) | |
Del | key(str) | |
Keys | list of keys (list[str]) | |
Flush |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
lokidb_sdk-0.1.0.tar.gz
(4.9 kB
view details)
Built Distribution
File details
Details for the file lokidb_sdk-0.1.0.tar.gz
.
File metadata
- Download URL: lokidb_sdk-0.1.0.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.0 CPython/3.8.10 Linux/5.15.0-46-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62b66f2cd253486e325dbeb50c74d1b7031c8fd8b4164d6d0886bea56a90b124 |
|
MD5 | 31238397d5661a66fd79e13b5a7242e8 |
|
BLAKE2b-256 | 780a76a672b6125a3d3491092eda419805be2f8aa43e912eb532ae243603a19b |
File details
Details for the file lokidb_sdk-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: lokidb_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.0 CPython/3.8.10 Linux/5.15.0-46-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f322493e6fd5988820de0db533a1f45eaacaf494404b0a1e9ef2f85fece17b41 |
|
MD5 | e93b6f11d7c5a07317d78af97300dea7 |
|
BLAKE2b-256 | 2578c37b3866f41bb2c138b1b6c6a03a1052eac3e7ffde99ec38640d430473ff |