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.1.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

indexbinder-0.1.1-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: indexbinder-0.1.1.tar.gz
  • Upload date:
  • Size: 5.8 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.1.tar.gz
Algorithm Hash digest
SHA256 0a200b9d7f581ce72dad81fb2f2dcc77c1eea5516ecebc8a0da6faa0d5bfa46c
MD5 199e564c27e91f304df09ff660dce74a
BLAKE2b-256 135dd3022523b76d20bd7106ec567890e153b89d0c03cef293ea6cabb210e82e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: indexbinder-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.6 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 00ead1353c7e526b0c2c63729fb4804c7c80da35dc44698a0ca35e22ab99ee09
MD5 75206cf61842592ad8217cfe80a74799
BLAKE2b-256 0262bee1ffe95d3a719e91fba236b2b335b86f05c4bd6402508de9bc01aac485

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