Skip to main content

A library for storing and managing FAISS indexes on Google Cloud Storage. Fashionably serverless.

Project description

IndexBinder

A very small library to help you store and retrieve faiss indexes from cloud storage

Installation

You can install this library using pip:

pip install indexbinder

Usage

Here's a basic example of how to use the image search functionality:

from indexbinder import ImageSearch
from PIL import Image

# Create an ImageSearch instance
image_search = ImageSearch(
        "test_index", "google-project-name", "gcs-bucket", check_consistency=True
    )

image_search.add_image("path/to/your/image.jpg", {"example":  "metadata"})})


results = image_search.search(input_image, num_results=5)

# Process the results
for img, similarity in results:
    print(f"Similarity: {similarity}")
    img.show()  # Display the image

Development

To set up the development environment:

  1. Clone the repository
  2. Create a virtual environment
  3. Install the development dependencies:
    pip install -e ".[dev]"
    

Testing

To run the tests:

pytest

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

indexbinder-0.1.2.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

indexbinder-0.1.2-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file indexbinder-0.1.2.tar.gz.

File metadata

  • Download URL: indexbinder-0.1.2.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.2

File hashes

Hashes for indexbinder-0.1.2.tar.gz
Algorithm Hash digest
SHA256 193f91295f71a156a2281dd7aa16691e7394ebf7dfd52cc961d52d82711a22c6
MD5 969ea3ad14bfe0a6c667e78f97c948bc
BLAKE2b-256 02918a8685edcd595eb1fa0a88b8c8524c2c76239b28298802039d7045c869df

See more details on using hashes here.

File details

Details for the file indexbinder-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: indexbinder-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.2

File hashes

Hashes for indexbinder-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 01d9b0b68cc923adea335103744259e6c2be0dfd8ca8f38d0f3126bd872c7b3a
MD5 bd14fa65282fbfd2be5d4cbd0d3383a4
BLAKE2b-256 aacbb2a065eef64c7257ba285354f6d196d1d4984c9ca1745d13eb6a494a18a6

See more details on using hashes here.

Supported by

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