Python client for Veri
Project description
Veri Python Client
Python client for veri
pip install veriservice
import veriservice
service = "localhost:5678"
veriservice.init_service(service, "./tmp")
client = veriservice.VeriClient(service, "example_data")
data_conf = {}
client.create_data_if_not_exists(data_conf)
data = [
{
'label': 'a',
'feature': [0.5, 0.1, 0.2]
},
{
'label': 'b',
'feature': [0.5, 0.1, 0.3]
},
{
'label': 'c',
'feature': [0.5, 0.1, 1.4]
},
]
for d in data:
client.insert(d['feature'], d['label'].encode())
result = client.search([[0.1, 0.1, 0.1]])
for i in result:
print(i)
result = client.data()
for i in result:
print(i)
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
veriservice-0.0.31.tar.gz
(13.6 kB
view hashes)
Built Distribution
Close
Hashes for veriservice-0.0.31-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e9e03fad2f2345f39acaf852632ac762b48f73769773c801b83ae7afc55af55 |
|
MD5 | e7c8efa4f9d63a1410fd55e846f2b1e9 |
|
BLAKE2b-256 | 98573adbbe0f7d45a7d72a60e5e6d62e7f608cd4efc7965ff0e9a089a08f3c92 |