citadeldb-llamaindex
A LlamaIndex vector store backed by Citadel. Encrypted at rest, embedded in your process, and deletes that destroy the key, not just the row.
pip install citadeldb-llamaindex
from llama_index.core import Document, StorageContext, VectorStoreIndex
from citadeldb_llamaindex import CitadelVectorStore
store = CitadelVectorStore("corpus.cdl", key="your-passphrase", dim=1536)
documents = [Document(text="the deployment failed because the disk was full")]
index = VectorStoreIndex.from_documents(
documents,
storage_context=StorageContext.from_defaults(vector_store=store),
)
index.as_query_engine().query("why did the release break?")
dim must match your embedding model: 1536 for OpenAI text-embedding-3-small, 3072 for
text-embedding-3-large, 1024 for e5-large.
Deletes destroy the key
Every node is sealed under its own key. Deleting destroys that key and then removes the row, so any ciphertext surviving elsewhere stays unreadable.
index.delete_ref_doc("doc-42") # every node from that document
store.forget_document("doc-42") # the same, returning a count for the record
store.clear() # the whole corpus
The node's key is gone, not just its entry in an index.
Filters
Filtering matches LlamaIndex's own evaluator, and similarity_top_k is honoured: a filter
matching only distant nodes still returns them, however many others outrank them. The same
holds for node_ids and doc_ids, which name nodes exactly.
String equality under a top-level AND is pushed into the scan so it narrows candidates
before top-k. Everything else is evaluated afterwards, so the two agree: numbers are not
pushed, because EQ here is Python's == (1 == 1.0) where the stored comparison is
JSON-type exact.
from llama_index.core.vector_stores.types import (
FilterOperator, MetadataFilter, MetadataFilters,
)
index.as_retriever(
filters=MetadataFilters(filters=[
MetadataFilter(key="year", value=2026, operator=FilterOperator.EQ),
])
).retrieve("...")
Filter semantics come from LlamaIndex's own evaluator, so every operator behaves exactly
as it does with the reference store. Under OR or NOT nothing is pushed, because a
pushed leaf would drop rows the filter keeps.
Notes
LlamaIndex embeds before it calls a store, so a node arrives with its vector already computed and that vector is written straight onto the atom. Nothing here re-embeds, so writes and queries stay in one vector space.
The node is stored whole, minus its text, which is kept once as the atom's searchable content and restored on read. Metadata, relationships and node type all round-trip.
Citadel is embedded and one process owns the file. A path already open on this thread, under the same passphrase, is shared, so this can sit on the same database as another Citadel adapter; construct them on the same thread.
License
Apache-2.0
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file citadeldb_llamaindex-2.0.0.tar.gz.
File metadata
- Download URL: citadeldb_llamaindex-2.0.0.tar.gz
- Upload date:
- Size: 11.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
59d603cbda1944cab2c99d14e6f46fa7cd4999d31914428214940fb4c12585d0
|
|
| MD5 |
adac3943be8f5458c957961f54b1011b
|
|
| BLAKE2b-256 |
c15f926701c6f1efd159a311916ed90d5181e8dd8e5a72ee833da5b890b86b2a
|
Provenance
The following attestation bundles were made for citadeldb_llamaindex-2.0.0.tar.gz:
Publisher:
release-llamaindex.yml on yp3y5akh0v/citadel
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
citadeldb_llamaindex-2.0.0.tar.gz -
Subject digest:
59d603cbda1944cab2c99d14e6f46fa7cd4999d31914428214940fb4c12585d0 - Sigstore transparency entry: 2516466095
- Sigstore integration time:
-
Permalink:
yp3y5akh0v/citadel@f616907085e6f66daed0d67f020bc729cb49d2c4 -
Branch / Tag:
refs/tags/v2.0.0 - Owner: https://github.com/yp3y5akh0v
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-llamaindex.yml@f616907085e6f66daed0d67f020bc729cb49d2c4 -
Trigger Event:
push
-
Statement type:
File details
Details for the file citadeldb_llamaindex-2.0.0-py3-none-any.whl.
File metadata
- Download URL: citadeldb_llamaindex-2.0.0-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
82e9a1a0ccc99598ee7bc24c55489fa26386531ef60d7dcce2c00c7206b1ff0a
|
|
| MD5 |
d40cee4ff0ce7d90f0a39446d0a99e35
|
|
| BLAKE2b-256 |
8a141c418da4d661141add8ee4f8e09d2edccbc394c58c0fe0c956dfa68ac019
|
Provenance
The following attestation bundles were made for citadeldb_llamaindex-2.0.0-py3-none-any.whl:
Publisher:
release-llamaindex.yml on yp3y5akh0v/citadel
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
citadeldb_llamaindex-2.0.0-py3-none-any.whl -
Subject digest:
82e9a1a0ccc99598ee7bc24c55489fa26386531ef60d7dcce2c00c7206b1ff0a - Sigstore transparency entry: 2516466151
- Sigstore integration time:
-
Permalink:
yp3y5akh0v/citadel@f616907085e6f66daed0d67f020bc729cb49d2c4 -
Branch / Tag:
refs/tags/v2.0.0 - Owner: https://github.com/yp3y5akh0v
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-llamaindex.yml@f616907085e6f66daed0d67f020bc729cb49d2c4 -
Trigger Event:
push
-
Statement type: