xyberos-documents
Filesystem + document loaders plugin — RFC-0019, M1. Turns plain-text-only ingestion into real document ingestion.
Loaders return text chunks consumed by
IngestingKnowledge.ingest:
| Loader | Formats | Dependency |
|---|---|---|
FileLoader |
.md .txt .json .py .rst … + directory walks |
stdlib only |
HtmlLoader |
.html .htm (tag stripping) |
stdlib only |
CsvLoader |
.csv |
stdlib only |
PdfLoader |
.pdf |
lazy pypdf / PyPDF2 / pymupdf |
DocxLoader |
.docx |
lazy python-docx |
XlsxLoader |
.xlsx .xlsm |
lazy openpyxl |
The stdlib loaders keep the zero-dependency core sacred; the binary loaders
import their backend lazily and raise a clear ProviderError when missing.
Install
pip install xyberos-documents # from PyPI
pip install "xyberos-documents[documents]" # PDF/DOCX/XLSX backends: pypdf, python-docx, openpyxl
# development (editable, from this repo):
pip install -e ./documents
# PDF/DOCX/XLSX backends (also available as the core extra):
pip install xyberos[documents]
Usage
Load a document as text chunks, then feed IngestingKnowledge:
from xyberos import create_app
from xyberos.knowledge import IngestingKnowledge
from xyberos.llm import HashEmbedder
from xyberos.vector import SqliteVectorStore
from xyberos_documents import DocumentsPlugin, load_document
app = create_app(
knowledge=IngestingKnowledge(SqliteVectorStore("learning.db"), embedder=HashEmbedder())
)
app.load_plugin(DocumentsPlugin())
app.tools.execute("ingest_document", None, path="report.pdf", chunk_size=512)
app.tools.execute("ingest_directory", None, path="docs/", extensions=[".pdf", ".docx"])
Each loader can also be used standalone (no app required):
from xyberos_documents import PdfLoader, DocxLoader, HtmlLoader, load_document
for doc in PdfLoader().load("report.pdf"):
print(doc.text)
Tools registered
ingest_document(path, chunk_size=512, loader=None)— auto-detect by extension (loadercan forcetext/html/pdf/docx/csv/xlsx).ingest_directory(path, extensions=None, chunk_size=512, recursive=True)— walk a folder and route each file to the right loader.
Both require the registered knowledge provider to support ingest() (an
IngestingKnowledge); otherwise a clear ProviderError is raised.
Examples
examples/ingest_documents.py— generates a sample PDF + DOCX and ingests both, then queries the knowledge base.
Tests
pip install pytest
pytest tests/
Optional-dep tests (pdf, docx, xlsx) skip cleanly when their library is
not installed — the same pattern as the core's test_sentence_embedder.py.
Contract & ship location
- Contract:
Knowledge(viaIngestingKnowledge), plusToolfor the two ingest tools. - Ship:
FileLoader/HtmlLoader/CsvLoaderare stdlib (would be Core);PdfLoader/DocxLoader/XlsxLoadermap to the[documents]extra. - Dependencies:
xyberos>=1.0; optional[documents]for binary formats.
Typing
This package is fully inline-annotated and ships a PEP 561 py.typed
marker, so Pylance/Pyright and mypy analyze it as a typed package. The marker is
also declared under [tool.setuptools.package-data] to keep the intent
explicit. Strict-mode consumers do not need reportMissingTypeStubs
suppressions or python.analysis.useLibraryCodeForTypes overrides for
from xyberos_documents import DocumentsPlugin.
Metadata
Release files for xyberos-documents 0.1.1
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 |
|---|---|---|---|---|
| xyberos_documents-0.1.1.tar.gz | 15.2 kB | With provenance | Details for xyberos_documents-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| xyberos_documents-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for xyberos_documents-0.1.1-py3-none-any.whl |
Total release size: 30.3 kB
Release files / xyberos_documents-0.1.1.tar.gz
| Download URL | xyberos_documents-0.1.1.tar.gz |
|---|---|
| Size | 15.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2fbbfc6ab78a13a91cd2aedbd865ab171a9d5d46943dc7333f6f8980041b0bf8
|
|
BLAKE2b-256 checksum How to use checksums |
57d53e8799b5b32b9e3cdd2f0d5b5ca601fb4aa8f0a469b4621bcbfa5957b13a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 16, 2026.
Transparency logRelease files / xyberos_documents-0.1.1-py3-none-any.whl
| Download URL | xyberos_documents-0.1.1-py3-none-any.whl |
|---|---|
| Size | 15.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
93f591447f2b43b6fd4820c8ede01f4a38afdc5823c766c4e836acefb3af5eac
|
|
BLAKE2b-256 checksum How to use checksums |
fda18652ae24095b69cd581a5766df4e16ecb8f27c8082b384019d348a48200d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 16, 2026.
Transparency logSecurity for xyberos-documents 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
All 2 files in this release have been uploaded with provenance metadata.
Attestation for xyberos_documents-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 Sep 16, 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.