Python SDK
Getting started with HelixDBs Python SDK.
helix-py
helix-py is a python library for interacting with helix-db a graph-vector database written in rust. With a pytorch-like query interface, it supports vector operations and custom queries, ideal for tasks like similarity search and knowledge graph construction. This library is meant to extend helix-db to be more easily used in machine learning applications.
helix-py will soon be built to become a full knowledge graph framework. (this will most likely be v0.3.0)
Installation
Install helix-py
or
Features
Queries
helix-py using a pytorch like front-end to creating queries. Like you would define a neural network
forward pass, you can do the same thing for a helix-db query. We provide some default queries in
helix/client.py
to get started with inserting and search vectors, but you can also define you’re
own queries if you plan on doing more complex things. For example, for this hql query
you would write
for your python script. Make sure that the Query.query method returns a list of objects.
Client
To setup a simple Client
to interface with a running helix instance:
Instance
To setup a simple Instance
that automatically starts and stops a helix instance with respect
to the lifetime of the program, to interface with a helixdb-cfg
directory you have:
and from there you can interact with it like you would with the Client
Providers
We also provide an ollama interface. This will be expanded to include many other providers in the future.
Loader
The loader (helix/loader.py
) currently supports .parquet
, .fvecs
, and .csv
data. Simply pass in the path to your
file or files and the columns you want to process and the loader does the rest for you and is easy to integrate with
your queries
More Information
For more information, check out our examples!