haystack-pixeltable
Haystack Document Store and Retriever backed by Pixeltable — persistent, versioned, multimodal data infrastructure for AI applications.
Requires Pixeltable >= 0.6.8 and Haystack 2.x.
Installation
pip install haystack-pixeltable
Quick Start
Document Store
from haystack import Document
from haystack_pixeltable import PixeltableDocumentStore
store = PixeltableDocumentStore(
table_name="myproject.docs",
embedding_dimension=1536,
)
# Write documents
store.write_documents(
[
Document(content="Pixeltable is multimodal data infrastructure.", embedding=[...]),
Document(content="Haystack is a framework for building RAG pipelines.", embedding=[...]),
]
)
# Filter documents
results = store.filter_documents(filters={"field": "meta.category", "operator": "==", "value": "docs"})
# Count
print(store.count_documents())
Retriever (Similarity Search)
from haystack_pixeltable import PixeltableDocumentStore, PixeltableRetriever
store = PixeltableDocumentStore(
table_name="myproject.docs",
embedding_dimension=1536,
)
retriever = PixeltableRetriever(document_store=store, top_k=5)
# Search by embedding vector
result = retriever.run(query_embedding=[0.1, 0.2, ...])
for doc in result["documents"]:
print(f"{doc.content} (score: {doc.score:.3f})")
In a Haystack Pipeline
from haystack import Pipeline
from haystack.components.embedders import SentenceTransformersTextEmbedder, SentenceTransformersDocumentEmbedder
from haystack.components.writers import DocumentWriter
from haystack_pixeltable import PixeltableDocumentStore, PixeltableRetriever
store = PixeltableDocumentStore(
table_name="rag.knowledge",
embedding_dimension=384,
)
# Indexing pipeline
indexing = Pipeline()
indexing.add_component("embedder", SentenceTransformersDocumentEmbedder())
indexing.add_component("writer", DocumentWriter(document_store=store))
indexing.connect("embedder", "writer")
# Query pipeline
query = Pipeline()
query.add_component("embedder", SentenceTransformersTextEmbedder())
query.add_component("retriever", PixeltableRetriever(document_store=store, top_k=5))
query.connect("embedder.embedding", "retriever.query_embedding")
Filtering
The Document Store supports the Haystack filter specification:
# Simple equality
store.filter_documents(filters={"field": "meta.category", "operator": "==", "value": "science"})
# Comparison operators: ==, !=, >, >=, <, <=
store.filter_documents(filters={"field": "meta.score", "operator": ">", "value": 0.8})
# Compound AND
store.filter_documents(
filters={
"operator": "AND",
"conditions": [
{"field": "meta.category", "operator": "==", "value": "science"},
{"field": "meta.score", "operator": ">", "value": 0.5},
],
}
)
# Compound OR
store.filter_documents(
filters={
"operator": "OR",
"conditions": [
{"field": "meta.source", "operator": "==", "value": "arxiv"},
{"field": "meta.source", "operator": "==", "value": "pubmed"},
],
}
)
Pixeltable Escape Hatch: .table
The .table property gives direct access to the underlying Pixeltable table for operations beyond the Haystack interface:
store = PixeltableDocumentStore(table_name="myproject.docs", embedding_dimension=1536)
t = store.table
# Add a computed column that summarizes each document on insert
import pixeltable.functions.openai as openai
t.add_computed_column(
summary=openai.chat_completions(
messages=[{"role": "user", "content": t.content}],
model="gpt-4o-mini",
)
.choices[0]
.message.content,
if_exists="ignore",
)
# Use arbitrary Pixeltable queries
results = t.where(t.meta["category"] == "science").select(t.content, t.summary).collect()
# Version history
print(t.history(n=5))
Features
- Persistent storage via Pixeltable's embedded PostgreSQL
- Embedding index with cosine / IP / L2 metrics
- Haystack metadata filtering (
AND/OR/ comparisons) .tableescape hatch for computed columns, version history, and multimodal types
Development
pip install -e ".[dev]"
pytest tests/ -v
ruff check . && ruff format --check .
License
Apache 2.0
Metadata
Release files for haystack-pixeltable 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| haystack_pixeltable-0.1.1.tar.gz | 12.2 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| haystack_pixeltable-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 22.4 kB
Release files / haystack_pixeltable-0.1.1.tar.gz
| Download URL | haystack_pixeltable-0.1.1.tar.gz |
|---|---|
| Size | 12.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8abb9b346428707c500f018fe42acff49e24eb1fe3a462fbe725a34089dfe82e
|
|
BLAKE2b-256 checksum How to use checksums |
d8be8c92ed720c2755515422eb596c2f34fecbebac3a00f2d8bf29f7284c79c1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 4, 2026.
Transparency logRelease files / haystack_pixeltable-0.1.1-py3-none-any.whl
| Download URL | haystack_pixeltable-0.1.1-py3-none-any.whl |
|---|---|
| Size | 10.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c22aca760b49448cf398b30eb77b465022a19360f86e60d1b223b32be3be859c
|
|
BLAKE2b-256 checksum How to use checksums |
f30a90dee17a5695b7bd5dbb158109616ad754d0994437c33fe36c1717053450
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 4, 2026.
Transparency logSecurity for haystack-pixeltable 0.1.1
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for haystack_pixeltable-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 4, 2026.
Transparency logA 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.