cvfile-haystack
Haystack 2.x converter component for the .cv open file format.
A .cv file is a PDF/A-3u file carrying a Markdown copy of the same content
(plus optional HTML and JSON Resume) as PDF Associated Files. Instead of OCR
ing the PDF, this component reads the embedded text payloads directly and
emits Haystack Document objects ready for indexing.
Install
pip install cvfile-haystack
Use
from haystack_integrations.components.converters.cvfile import CVFileToDocument
converter = CVFileToDocument()
result = converter.run(sources=["resume.cv"])
documents = result["documents"]
for doc in documents:
print(doc.meta["payload"], doc.meta["mime_type"], len(doc.content))
You get one Document per textual payload found in the file. The Markdown
copy (typically resume.md) is the one flagged with meta["primary"] = True.
Primary only
If you only want the canonical Markdown copy and want to skip language alternates and supplements:
converter = CVFileToDocument(primary_only=True)
Untrusted files
By default the converter runs cvfile.validate() on every source before
extracting anything. Files carrying forbidden active content (JavaScript,
launch or submit actions, external references), encryption, integrity digest
mismatches, or payloads over the spec size cap make run() raise
ValueError listing the issue codes. Resumes are classic untrusted input,
so keep the default when converting files you did not produce yourself.
converter = CVFileToDocument() # verify=True (default)
converter = CVFileToDocument(verify=False) # trusted files only
Pipeline use
from haystack import Pipeline
from haystack.components.embedders import SentenceTransformersDocumentEmbedder
from haystack.components.writers import DocumentWriter
from haystack.document_stores.in_memory import InMemoryDocumentStore
from haystack_integrations.components.converters.cvfile import CVFileToDocument
store = InMemoryDocumentStore()
pipe = Pipeline()
pipe.add_component("read", CVFileToDocument(primary_only=True))
pipe.add_component("embed", SentenceTransformersDocumentEmbedder(model="BAAI/bge-m3"))
pipe.add_component("write", DocumentWriter(document_store=store))
pipe.connect("read.documents", "embed.documents")
pipe.connect("embed.documents", "write.documents")
pipe.run({"read": {"sources": ["resumes/jane.cv", "resumes/john.cv"]}})
Metadata fields
| Key | Description |
|---|---|
source |
The file path (or stream name) the document came from |
payload |
Name of the embedded file (e.g. resume.md) |
mime_type |
MIME of the payload (text/markdown, text/html, application/json) |
relationship |
PDF Associated Files relationship (Alternative for primary alternates) |
language |
BCP 47 language tag for this payload |
primary |
True for the payload declared as primary in the file's XMP metadata |
cv_version |
Version of the .cv spec the file conforms to |
cv_generator |
Tool that produced the file, if recorded |
License
Apache-2.0.
Metadata
Release files for cvfile-haystack 0.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cvfile_haystack-0.3.2.tar.gz | 7.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cvfile_haystack-0.3.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.3 kB
Release files / cvfile_haystack-0.3.2.tar.gz
| Download URL | cvfile_haystack-0.3.2.tar.gz |
|---|---|
| Size | 7.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
687e68af34623b4c005bffda3fb016859b5bf63f00c2bf524ddf9968ce565c5b
|
|
BLAKE2b-256 checksum How to use checksums |
1d376a2521936e7378c5a62f5316971f58b3988a891707729726c5643f2289da
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 2, 2026.
Transparency logRelease files / cvfile_haystack-0.3.2-py3-none-any.whl
| Download URL | cvfile_haystack-0.3.2-py3-none-any.whl |
|---|---|
| Size | 6.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2f82416b298a87eba08a8b5f4d27de965ef92dd43dce1bf8c6cc643139e02b20
|
|
BLAKE2b-256 checksum How to use checksums |
7a557d1c5c9cdffdedbb853c1e7cc33a6fc2c505251bdc281585a4da2abc735b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 2, 2026.
Transparency log