Skip to main content

Abstraction layer for vector databases.

Project description

A pluggable vector database client system with backend support. Currently, the only supported backend is Qdrant. This project provides a unified client interface to interact with vector databases. It is designed to be easily extensible to support additional backends in the future.

Build Status Deploy Status Codecov Black code style License PyPi GitHub Pages

GitHub Repository:

Visit the official repository at: darca-vector-db on GitHub

Installation

The project uses Poetry for dependency management and virtual environment handling.

To set up the project locally, follow these steps:

  1. Clone the repository: .. code-block:: bash

    git clone https://github.com/roelkist/darca-vector-db.git cd darca-vector-db

  2. Install dependencies and set up the environment with a single command: .. code-block:: bash

    make install

This command will handle creating the virtual environment, installing Poetry, and installing dependencies.

Make Targets for Faster Iterations

You can use specific make targets for faster development cycles:

  • make format : Formats the codebase using black and isort.

  • make test : Runs the test suite with coverage reporting.

  • make docs : Builds the documentation using Sphinx.

  • make check : Runs all checks (formatting, testing, docs) before committing.

Always run make check before committing changes to ensure consistency and quality.

  1. Running tests: .. code-block:: bash

    make test

  2. Formatting the code: .. code-block:: bash

    make format

  3. Building the documentation: .. code-block:: bash

    make docs

Features

  • Unified client interface for vector databases

  • Qdrant support

  • Easy to extend for additional backends

  • Structured logging and error handling

  • Flexible CI and local environment support

  • Automated testing and code formatting

Usage

To use the client, instantiate it with the desired backend (currently only Qdrant is supported):

from darca_vector_db import DBClient

client = DBClient(backend="qdrant", host="localhost", port=6333)
client.connect()
client.create_collection(name="my_vectors", vector_size=128, distance_metric="cosine")
client.insert_vector("my_vectors", vector_id=1, vector=[0.1] * 128, metadata={"label": "example"})
results = client.search_vectors("my_vectors", query_vector=[0.1] * 128, top_k=5)
print(results)

Contributing

Contributions are welcome! Please refer to the CONTRIBUTING.rst for detailed guidelines.

License

MIT License

Author

Roel Kist

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

darca_vector_db-0.1.0.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

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

darca_vector_db-0.1.0-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file darca_vector_db-0.1.0.tar.gz.

File metadata

  • Download URL: darca_vector_db-0.1.0.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for darca_vector_db-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a6f8274f4808a03a26b9221644e0b5ca8c814c94155ddac680337dc44c45e6b8
MD5 08baebcdea35c82208ed10f3cf177a49
BLAKE2b-256 36e6b897e38f5247e0f3f74483f890343ff96f28908e81ccf909bfd3d65da114

See more details on using hashes here.

Provenance

The following attestation bundles were made for darca_vector_db-0.1.0.tar.gz:

Publisher: cd.yml on roelkist/darca-vector-db

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file darca_vector_db-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for darca_vector_db-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8cc9d9dc3d099e6cea934e6ee3e6e534ae17e6a39a483dd5dfe9bb65d39045dc
MD5 ba17426345e1010e0164a77196b102a2
BLAKE2b-256 9e06b1c05edc80a467620d31a3f198b47f01b7c711f7fa1a1480558369f5d82b

See more details on using hashes here.

Provenance

The following attestation bundles were made for darca_vector_db-0.1.0-py3-none-any.whl:

Publisher: cd.yml on roelkist/darca-vector-db

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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