Skip to content

bgokden/veri-python-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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)

About

Python client for veri

Resources

License

Apache-2.0, Apache-2.0 licenses found

Licenses found

Apache-2.0
LICENSE
Apache-2.0
LICENSE.txt

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published