A client library for connecting with Periplus.
Project description
Periplus Client Library
Introduction
The Periplus client library provides an interface to interact with a Periplus instance. Periplus is a remote vector database cache. This client library allows you to initialize, train, add data, load data, perform searches, and evict data within Periplus. For more information on Periplus, please refer to the README.md.
Installation
Prerequisites
- Python 3.8+
structandcollectionslibraries (included in the Python standard library)
Installation via pip
You can install the Periplus client library using pip:
pip install periplus-client
Quick Start
Here’s a quick example of how to use the Periplus client library to interact with the Periplus service:
from periplus_client import Periplus
# Initialize the Periplus client
client = Periplus(host='localhost', port=8080)
# Initialize the Periplus instance
await client.initialize(
d=128,
db_url='http://localhost:5000/proxy',
options={'n_records': 500000, 'use_flat': False}
)
# Train the instance with sample data
await client.train(training_data=[[0.1, 0.2, ..., 0.128]])
# Add data to the instance
await client.add(ids=['vec1', 'vec2'], embeddings=[[0.1, 0.2, ..., 0.128]])
# Perform a search
results = await client.search(k=5, xq=[[0.1, 0.2, ..., 0.128]])
print(results)
Documentation
API Reference
For a complete API reference, including details on all classes, methods, and their usage, please refer to the API Reference.
Contributing
Contributions are welcome! If you'd like to contribute to the project, please follow these steps:
- Fork the repository.
- Create a new branch:
git checkout -b feature/your-feature-name. - Make your changes.
- Commit your changes:
git commit -m 'Add some feature'. - Push to the branch:
git push origin feature/your-feature-name. - Open a pull request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file periplus_client-0.1.0a1.tar.gz.
File metadata
- Download URL: periplus_client-0.1.0a1.tar.gz
- Upload date:
- Size: 9.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c597ab04d04663269036d047c209146d2227fb858fb98ef0d332e5e4fae1ae6d
|
|
| MD5 |
184cc4037c1630c5e95e75943551c18b
|
|
| BLAKE2b-256 |
e1c15f848ab6a0b74aafc47ae496951562a5cfd3a30487129922428c5882de5e
|
File details
Details for the file periplus_client-0.1.0a1-py3-none-any.whl.
File metadata
- Download URL: periplus_client-0.1.0a1-py3-none-any.whl
- Upload date:
- Size: 15.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d79da3fdcb81419c42ba560473628ecf7158ec0caf38441f05afef2b1e055409
|
|
| MD5 |
30faa6a9f6457a8a5f6f4a78998293a4
|
|
| BLAKE2b-256 |
bb96289cb5e97f443e55a8cc3db34b88f039dd57e98dcb0614d274fb93311a63
|