xtrace_sdk.integrations package¶
Subpackages¶
Submodules¶
xtrace_sdk.integrations.compute_base module¶
- class xtrace_sdk.integrations.compute_base.ComputeIntegrationBase(**kwargs)¶
Bases:
ABC
Interface for compute integrations to be used by retrievers.
- Parameters:
ABC (class) – Abstract Base Class
- abstractmethod compute_hamming_distances(query, pk, **kwargs)¶
given a query and key, compute the hamming distances between the query and the data in the database
- Parameters:
query (ciphertext) – user query encrypted by specific cryptography scheme
pk (key) – key used by specific cryptography scheme
- Returns:
list of tuples with the id and the encrypted hamming distance
- abstractmethod get_chunk_by_id(chunk_id, **kwargs)¶
get a encrypted chunk by its id
- Parameters:
chunk_id (str) – the id of the chunk
return: the encrypted chunk
xtrace_sdk.integrations.storage_base module¶
- class xtrace_sdk.integrations.storage_base.StorageIntegrationBase(**kwargs)¶
Bases:
ABC
Interface for storage integrations to be used by data loaders and indexers.
- Parameters:
ABC (class) – Abstract Base Class
- abstractmethod load_db(**kwargs)¶
Load the database from the storage.
- abstractmethod load_index(**kwargs)¶
Load the index from the storage.
- abstractmethod store_db(**kwargs)¶
Store the database in the storage.
- abstractmethod store_index(**kwargs)¶
Store the index in the storage.