Welcome to darca-embeddings’s documentation!

Project Overview

darca-vector-db

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

  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

Getting Started

Community & Contribution

Contributing to darca-vector-db

Thank you for considering contributing to darca-vector-db! Your contributions help make this project better.

Getting Started

To set up your local environment for development, follow these steps:

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

  2. Create a virtual environment and install dependencies: .. code-block:: bash

    make venv make poetry make install

  3. Run the tests to ensure your setup is correct: .. code-block:: bash

    make test

Creating Pull Requests (PRs)

All contributions should be made by directly creating a new branch in the main repository (no forking is needed).

  1. Create a new branch: .. code-block:: bash

    git checkout -b feature/my-awesome-feature

  2. Make your changes, following the project’s coding standards and guidelines.

  3. Run the complete check to ensure that your changes comply: .. code-block:: bash

    make check

  4. Commit your changes with a descriptive message: .. code-block:: bash

    git commit -m “Add feature: My awesome feature”

  5. Push your branch: .. code-block:: bash

    git push origin feature/my-awesome-feature

  6. Open a Pull Request (PR) against the main branch.

Issues and Feature Requests

To report a bug or request a new feature, please open an issue on the GitHub repository: Issues on GitHub

Before submitting, ensure that the issue or request does not already exist.

Guidelines

  • Make sure to run make check before committing changes.

  • Use separate make targets (like make test, make format) instead of running everything at once.

  • Include tests for new features or bug fixes.

  • Write clear and concise commit messages.

  • Keep your code consistent with existing code style.

Code of Conduct

We are committed to providing a welcoming and inclusive environment. Please be respectful and considerate in your interactions.

License

By contributing, you agree that your contributions will be licensed under the MIT License.