llama-index-readers-sugo
A LlamaIndex reader for Sugo. Sugo converts PDF, Word, Excel, PowerPoint, images and XML into compact Markdown on your own computer, and splits it into chunks along headings and pages.
It needs sugo-cli 0.2 or later, which pip installs with it.
pip install llama-index-readers-sugo
Read documents
from llama_index.readers.sugo import SugoReader
documents = SugoReader().load_data(["handbook.pdf", "prices.xlsx"])
Or let SimpleDirectoryReader walk a folder and hand Sugo the files it reads:
from llama_index.core import SimpleDirectoryReader
sugo_reader = SugoReader()
reader = SimpleDirectoryReader(
"documents/",
file_extractor={
suffix: sugo_reader for suffix in (".pdf", ".docx", ".xlsx", ".pptx", ".png", ".jpg")
},
)
documents = reader.load_data()
Each document is one Sugo chunk, already split along headings and pages. Its id_ is Sugo's chunk id, which stays the same when you load the same file again, so an index can update instead of storing duplicates. SugoReader(mode="document") gives one document per file, for when you split text yourself.
Metadata
Every value Sugo adds is a string, an integer or a boolean.
| Key | Value |
|---|---|
source |
The path as given |
document_id, chunk_id |
Sugo's ids (chunk_id in chunk mode only) |
page_start, page_end |
First and last page, counted from 1 |
heading_path |
Headings above the chunk, joined with > |
tokens |
Tokens of the text |
source_sha256, sugo_version, config_hash |
Where the text came from and what produced it |
partial |
True when some pages of the file could not be read |
Ids, digests, versions and counts are excluded from the text sent to the embedding model and to the LLM, so they cost no tokens. Metadata passed by SimpleDirectoryReader (file_name, file_path, …) is kept; Sugo's keys win where names clash.
Options
| Option | Default | Meaning |
|---|---|---|
mode |
"chunks" |
"chunks" or "document" |
max_tokens |
your Sugo chunk size | Chunk size in tokens |
on_error |
"raise" |
"skip" leaves out files Sugo refuses and lists them in reader.skipped |
on_secret |
"skip" |
Files with credentials (passwords, keys in XML): "skip", "include" or "raise" |
cache |
"ephemeral" |
"user" keeps Sugo's page cache, much faster when you reload files |
Files that hold credentials are skipped by default: a RAG pipeline usually sends text to an embedding service and stores it where other people and agents can read it. reader.skipped lists every file left out, with a code such as CONTENT_EXCLUDED.
Sugo reads local files only: passing a remote fs raises an error.
Privacy and network
The reader and Sugo open no network connection, and Sugo sends nothing anywhere. LlamaIndex itself can: for example its default LLM and embedding settings call online services, and some features download data. The tests of this package build an index with network access blocked. Once you have the documents, where your pipeline sends them is your choice.
Log messages never contain file names or document text. SimpleDirectoryReader prints the name of a file it fails to load; that message comes from LlamaIndex.
Licence
AGPL-3.0-or-later, like Sugo, which this reader runs. LlamaIndex itself is MIT. This is not legal advice: if you build a service on it, read the licence. See the licence decision record.
Metadata
Release files for llama-index-readers-sugo 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_sugo-0.1.0.tar.gz | 19.8 kB | With provenance | Details for llama_index_readers_sugo-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| llama_index_readers_sugo-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for llama_index_readers_sugo-0.1.0-py3-none-any.whl |
Total release size: 38.8 kB
Release files / llama_index_readers_sugo-0.1.0.tar.gz
| Download URL | llama_index_readers_sugo-0.1.0.tar.gz |
|---|---|
| Size | 19.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cf189135d32c89814b75191c2bf03b74cdb51cb0a03c32c53eb47362c2758d82
|
|
BLAKE2b-256 checksum How to use checksums |
7d2c882a9bb26c09994c47282db2f50a06c4555a90791225f034fce9e1a56259
|
| 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 13, 2026.
Transparency logRelease files / llama_index_readers_sugo-0.1.0-py3-none-any.whl
| Download URL | llama_index_readers_sugo-0.1.0-py3-none-any.whl |
|---|---|
| Size | 19.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
58fc579b153595f471abf5f4e20c2660d3d678f7db0a9cbf81989afece86d82b
|
|
BLAKE2b-256 checksum How to use checksums |
a6a263509809b811143d26fe399649fea0020b291899e8bab1bc7ee349dd10ca
|
| 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 13, 2026.
Transparency logSecurity for llama-index-readers-sugo 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_sugo-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 13, 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.