File size: 1,840 Bytes
a475b1f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
"""
Image Search SDK - Pure Python Integration Package

This SDK provides image search capabilities as a pure Python library.
It uses the same services as the REST API (from app/services/) but 
runs everything locally without any HTTP calls.

Customers can choose:
1. Use this SDK - Integrate directly into their Python backend
2. Use Docker API - Deploy the dockerized API and call it via HTTP

Example:
    from image_search_sdk import ImageSearchClient
    
    # Initialize the SDK (uses services directly)
    client = ImageSearchClient(
        data_dir="./my_data",
        model_name="clip-ViT-L-14"
    )
    
    # Connect your existing product database
    client.connect_database(
        connection_string="sqlite:///your_products.db",
        id_column="product_id",
        title_column="name",
        image_url_column="image"
    )
    
    # Index your products (one-time setup)
    client.index_all_products()
    
    # Search by image
    results = client.search_by_image("product_photo.jpg")
    
    # Search by text
    results = client.search_by_text("wireless headphones")
"""

from .client import ImageSearchClient
from .models import Product, SearchResult, SearchOptions
from .exceptions import ImageSearchError, ValidationError, DatabaseError
from .database_adapters import DatabaseAdapter, SQLiteAdapter, PostgreSQLAdapter, MySQLAdapter
from .schema_mapper import SchemaMappingBuilder, CommonSchemas, TransformFunctions

__version__ = "1.0.0"
__author__ = "Image Search Solutions"

__all__ = [
    'ImageSearchClient',
    'Product', 
    'SearchResult',
    'SearchOptions',
    'ImageSearchError',
    'ValidationError',
    'DatabaseError',
    'DatabaseAdapter',
    'SQLiteAdapter',
    'PostgreSQLAdapter', 
    'MySQLAdapter',
    'SchemaMappingBuilder',
    'CommonSchemas',
    'TransformFunctions'
]