Skip to main content

faiss-vector-store faiss-vector-store faiss-vector-store python

faiss-vector-store is a standalone FAISS-backed vector store: Document, FAISSIndex, and FAISSVectorStore for embedding, storing, and similarity-searching text documents. It has no dependency on llmfy or any other LLM framework — pass it an embedding client matching the EmbeddingClient protocol (provider, model, encode_batch(...)), such as one of llmfy's BedrockEmbedding/OpenAIEmbedding/GoogleAIEmbedding, or your own.

How to install

# Using UV
uv add faiss-vector-store

# Using pip
pip install faiss-vector-store

Installing faiss-vector-store pulls in pydantic (used by Document) automatically — nothing else.

FAISS / NumPy — required for actual vector store use

faiss/numpy are optional extras: importing faiss_vector_store never fails, but constructing a FAISSIndex or FAISSVectorStore raises FAISSVectorStoreException with an install hint if either is missing.

# Using UV
uv add "faiss-vector-store[all]"
# or individually
uv add "faiss-vector-store[faiss-cpu]"
uv add "faiss-vector-store[numpy]"

# Using pip
pip install "faiss-vector-store[all]"

How to use

Any embedding client matching the EmbeddingClient protocol works — this example uses llmfy's BedrockEmbedding (pip install "llmfy[boto3]"), but a custom class with provider/model/encode_batch(...) works just as well.

from llmfy import BedrockEmbedding
from faiss_vector_store import Document, FAISSVectorStore

texts = [
    "The cat sits on the mat",
    "Dogs are loyal animals",
    "Artificial intelligence is transforming the world",
    "Quantum computing is the future of technology",
    "The sun rises in the east",
]

docs = [
    Document(id=str(i), text=text, author="irufano")
    for i, text in enumerate(texts)
]

embedding = BedrockEmbedding(model="amazon.titan-embed-text-v1")
store = FAISSVectorStore(embedding)
store.encode_documents(docs)
store.save_to_path("./kb/test_kb")

# --- Load it back and search ---
new_store = FAISSVectorStore(embedding)
new_store.load_from_path("./kb/test_kb")

results = new_store.search("Machine learning and AI", k=2)
for doc, score, idx in results:
    print(f"- Match: {doc.text}, Index: {idx}, score: {score:.4f}, author: {doc.author}")

See faiss_vector_store/example/faiss_store_example.py for a full walkthrough of saving/loading both to a local path and to in-memory buffers (for S3/Redis-style storage), and docs/ for the complete guide.

Contributing

See CONTRIBUTING.md for commit message format, the automatic version-bump/release process, and local package development commands.

Metadata

Release files for faiss-vector-store 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for faiss-vector-store 0.1.0
File Size Uploaded Provenance Actions
faiss_vector_store-0.1.0.tar.gz 11.3 kB Without provenance Details for faiss_vector_store-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for faiss-vector-store 0.1.0
File Interpreter ABI Platform Actions
faiss_vector_store-0.1.0-py3-none-any.whl Python 3 none any Details for faiss_vector_store-0.1.0-py3-none-any.whl

Total release size: 25.7 kB

Release files / faiss_vector_store-0.1.0.tar.gz

Download URL faiss_vector_store-0.1.0.tar.gz
Size 11.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e94ee361e756c6c09356a689ae96af85b5e49123132374f18a9fa5de7746aae6
BLAKE2b-256 checksum
How to use checksums
c740557acf3ebb1444833d2576af9ad0e9e1e2a19762a627890a95da7608487e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / faiss_vector_store-0.1.0-py3-none-any.whl

Download URL faiss_vector_store-0.1.0-py3-none-any.whl
Size 14.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a5dd1146d56572ef83111dfef5756f0b3d65e021fddb1a83616fbae918b26295
BLAKE2b-256 checksum
How to use checksums
ffe25c7c5ff383cc304df1d5bb412f79af90cc080ffd0208068715f279d2d014
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for faiss-vector-store 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page