Skip to main content

LangChain document loader for the .cv open file format.

Project description

langchain-cvfile

LangChain document loader 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 loader pulls the embedded text payloads directly.

Install

pip install langchain-cvfile

Use

from langchain_cvfile import CVFileLoader

loader = CVFileLoader("resume.cv")
docs = loader.load()

for doc in docs:
    print(doc.metadata["payload"], doc.metadata["mime_type"], len(doc.page_content))

You get one Document per textual payload found in the file. The Markdown copy (typically resume.md) is the one flagged with metadata["primary"] = True.

Untrusted files

By default the loader runs cvfile.validate() 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 raise ValueError listing the issue codes. Resumes are classic untrusted input, so keep the default when loading files you did not produce yourself.

loader = CVFileLoader("resume.cv")               # verify=True (default)
loader = CVFileLoader("resume.cv", verify=False)  # trusted files only

Metadata fields

Key Description
source The file path you passed to the loader
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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

langchain_cvfile-0.3.2.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

langchain_cvfile-0.3.2-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file langchain_cvfile-0.3.2.tar.gz.

File metadata

  • Download URL: langchain_cvfile-0.3.2.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for langchain_cvfile-0.3.2.tar.gz
Algorithm Hash digest
SHA256 079f967cdaa0c0052a7066b175b7a79613bb6b23c81a48519507dc1a86a3721c
MD5 edaf12e37e083a2db5484be0029cb016
BLAKE2b-256 13ad06687dd72bbac5b658173ac4b6efe75568394e263d30e2bb65f12f9aa5a9

See more details on using hashes here.

Provenance

The following attestation bundles were made for langchain_cvfile-0.3.2.tar.gz:

Publisher: publish-langchain-cvfile.yml on cvfile/cv

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file langchain_cvfile-0.3.2-py3-none-any.whl.

File metadata

File hashes

Hashes for langchain_cvfile-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ae1b5fe7148ff500f10bd8ef6980dfa08e17d03aa038d8a11ac07195cf7a7e58
MD5 b589064005bc9924554429ef36cb9c7e
BLAKE2b-256 2958b0906b61f88aa60b6f714f840658cc3df59c5af35b6b1de07911511903ed

See more details on using hashes here.

Provenance

The following attestation bundles were made for langchain_cvfile-0.3.2-py3-none-any.whl:

Publisher: publish-langchain-cvfile.yml on cvfile/cv

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page