Skip to main content

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 or keys in XML, a private key written in the text): "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, the same files the Sugo MCP server never sends to an agent: 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.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for llama-index-readers-sugo 0.1.1
File Size Uploaded Provenance Actions
llama_index_readers_sugo-0.1.1.tar.gz 19.9 kB With provenance Details for llama_index_readers_sugo-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for llama-index-readers-sugo 0.1.1
File Interpreter ABI Platform Actions
llama_index_readers_sugo-0.1.1-py3-none-any.whl Python 3 none any Details for llama_index_readers_sugo-0.1.1-py3-none-any.whl

Total release size: 39.0 kB

Release files / llama_index_readers_sugo-0.1.1.tar.gz

Download URL llama_index_readers_sugo-0.1.1.tar.gz
Size 19.9 kB
Tags Source
SHA-256 checksum
How to use checksums
e406a4f918bf7501c4c6fa7e3743f6ec6111bec0fce464e8a5fc646413cb7c72
BLAKE2b-256 checksum
How to use checksums
cc8b17a85a88c53c3dc55eedcba0505d36bf60df184b3727c93d62c9571a406c
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 log

Release files / llama_index_readers_sugo-0.1.1-py3-none-any.whl

Download URL llama_index_readers_sugo-0.1.1-py3-none-any.whl
Size 19.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2eac8665c8f864771e5eaeac826d8e6ccc603da6032e1b8c62e861f0b373a775
BLAKE2b-256 checksum
How to use checksums
ccb540ce4a08b54fdcd7d479d74c69493b17027dcd082e37292010462227c06d
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 log

Security for llama-index-readers-sugo 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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for llama_index_readers_sugo-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 Nov 13, 2026.

Transparency log

A 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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page