Skip to content

Latest commit

 

History

19 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages