Skip to main content

A client library for connecting with Periplus.

Project description

Periplus Client Library

License: MIT

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+
  • struct and collections libraries (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:

  1. Fork the repository.
  2. Create a new branch: git checkout -b feature/your-feature-name.
  3. Make your changes.
  4. Commit your changes: git commit -m 'Add some feature'.
  5. Push to the branch: git push origin feature/your-feature-name.
  6. Open a pull request.

License

This project is licensed under the MIT License - see the LICENSE file for details.


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

periplus_client-0.1.0a1.tar.gz (9.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

periplus_client-0.1.0a1-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

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

Hashes for periplus_client-0.1.0a1.tar.gz
Algorithm Hash digest
SHA256 c597ab04d04663269036d047c209146d2227fb858fb98ef0d332e5e4fae1ae6d
MD5 184cc4037c1630c5e95e75943551c18b
BLAKE2b-256 e1c15f848ab6a0b74aafc47ae496951562a5cfd3a30487129922428c5882de5e

See more details on using hashes here.

File details

Details for the file periplus_client-0.1.0a1-py3-none-any.whl.

File metadata

File hashes

Hashes for periplus_client-0.1.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 d79da3fdcb81419c42ba560473628ecf7158ec0caf38441f05afef2b1e055409
MD5 30faa6a9f6457a8a5f6f4a78998293a4
BLAKE2b-256 bb96289cb5e97f443e55a8cc3db34b88f039dd57e98dcb0614d274fb93311a63

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page