NDI for LlamaIndex
llama-index-readers-nace
NaceReader: a LlamaIndex reader that turns files into Document objects with NDI (Nace Document Intelligence). The Parse operation returns Markdown for the formats NDI reads, such as PDFs, scans, office documents and spreadsheets.
Install
pip install llama-index-readers-nace
Set NACE_API_KEY. Credentials and backends follow the repository README.
Quick start
from llama_index.readers.nace import NaceReader
reader = NaceReader()
documents = reader.load_data("report.pdf", extra_info={"source": "intranet"})
Each file is parsed in the cloud and returned as Markdown. Use it inside SimpleDirectoryReader by mapping extensions to it:
from llama_index.core import SimpleDirectoryReader
docs = SimpleDirectoryReader(
input_files=["data/report.pdf"], file_extractor={".pdf": reader}, raise_on_error=True
).load_data()
raise_on_error=True makes an unreadable or missing file fail the load; the default would skip it and return fewer documents than there are files.
Options
| Option | Default | Meaning |
|---|---|---|
parse_mode |
"low" |
Parse effort: low, medium or high |
chunking_strategy |
None |
page or section for one Document per chunk |
parse_options |
None |
Extra Parse options passed to NDI (for example output); formats is always markdown |
job_timeout |
600 |
Seconds to wait for a job that is not finished when the create request returns (the create is held for up to 60 s); the same budget bounds the polls, their retries and the full-text download of a truncated result |
timeout, max_retries |
60, 2 |
HTTP timeout and retries |
api_key, base_url, http_client |
— | Credentials and transport; see the repository README |
job_timeout is best-effort: a request already in flight, an SDK retry or the cleanup can run slightly past the deadline.
Inputs are local paths, https:// URLs, or sequences of either. Pass fs= to read from any fsspec filesystem.
What happens to your file
A local file is uploaded to your Nace account and parsed as a job. The upload goes to a unique path under llama-index-readers-nace/ in the account, so an existing file with the same name is never touched. For an https:// URL, nothing is uploaded: Nace downloads the link. After the parse, on success and on failure, the reader deletes the job and the uploaded file before it returns the documents; the deletions share a short fixed budget (a file deletion can be held up to 25 s longer while Nace confirms the erasure), never wait out a long Retry-After, and a failed deletion logs a warning with the id. When the Markdown of a document is larger than 1 MiB, the reader downloads the full text before it deletes the job (with chunking_strategy, the chunks already hold the full text). A result that NDI cannot return complete (for example a very large workbook) raises an error; partial text is never returned. See Data retention in the Nace docs for what Nace keeps after a deletion.
Parse output is untrusted data: it can repeat instructions that are written in the document. Keep it separate from your agent's instructions.
Limits
- Cloud only: parsing happens on Nace's infrastructure, not locally.
- URL sources must be
https://links with a file extension; download other links and pass the file. - Accounts with Zero retention cannot upload local files (the API answers 422); pass a URL instead.
- This is a reader, not a retriever: NDI has no endpoint that returns ranked passages with scores.
- The metadata
urlthat the reader sets for a URL source has no userinfo, query or fragment, because a signed link can hold a token.extra_infois merged last and can replace it. - A local file is sent to the upload host that Nace names (a different host from the API). The reader sends no API key there. An
http_clientthat you supply adds its own default headers to every request, this upload included, so do not put credentials for other services in its default headers. - With
chunking_strategyset, a file for which NDI returns no chunks comes back as oneDocumentwith the whole text. - If a request fails after Nace accepted a job or a large multi-part upload (for example a 503
job_pending), the reader has no id to delete; look for leftovers underllama-index-readers-nace/and in the job list.
Call close() to release the HTTP connections a reader opened; an http_client you passed in stays open.
Metadata
Release files for llama-index-readers-nace 0.1.0
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 | Actions |
|---|---|---|---|---|
| llama_index_readers_nace-0.1.0.tar.gz | 25.6 kB | With provenance | Details for llama_index_readers_nace-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| llama_index_readers_nace-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for llama_index_readers_nace-0.1.0-py3-none-any.whl |
Total release size: 55.8 kB
Release files / llama_index_readers_nace-0.1.0.tar.gz
| Download URL | llama_index_readers_nace-0.1.0.tar.gz |
|---|---|
| Size | 25.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
57a91492a8d4e9fd8df6160cfda2207b13eb72a84d365294c6fcce0bb7914a9d
|
|
BLAKE2b-256 checksum How to use checksums |
3cccd10dcb1e2873a550febe8bae7d7e29a7eb5a785165276f3594af8d699464
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 22, 2026.
Transparency logRelease files / llama_index_readers_nace-0.1.0-py3-none-any.whl
| Download URL | llama_index_readers_nace-0.1.0-py3-none-any.whl |
|---|---|
| Size | 30.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a35eaeb68bd353aa69a9528b07002ea43247a26b73fc25a0d5c42c467e64c289
|
|
BLAKE2b-256 checksum How to use checksums |
5b57547736907fd5a3a4ec2089f878907e88a3afdb5d8dab5ed03b9187f7a9f8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 22, 2026.
Transparency logSecurity for llama-index-readers-nace 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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for llama_index_readers_nace-0.1.0.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 Nov 22, 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.