Skip to main content

sirdas (Python)

Local document parsing for AI agents and machine learning. PDF (including scans), Word, Excel, PowerPoint, OpenDocument, EPUB, HTML, CSV, email and images become Markdown, fields cited with page and position, tables, form fields, cited chunks and training datasets. Nothing is uploaded: it runs on your machine.

pip install sirdas          # needs Node.js 20+ (the engine is shared with the CLI and MCP server)
import sirdas

doc = sirdas.read("factura.pdf")                 # one call does it all
doc["document_type"]                             # "factura"
{f["name"]: f["value"] for f in doc["fields"]}   # número, CUFE, NIT, IVA, total… each with page, evidence and bbox
doc["next_steps"]                                # what to do next

sirdas.convert("informe.docx")["markdown"]
sirdas.split_documents("lote-escaneado.pdf", output_dir="separados/")
sirdas.forms("formulario.pdf")                   # filled fields and checkboxes
sirdas.dataset(["a.pdf", "b.docx"], "ds/", format="alpaca")   # + Hugging Face dataset card

LangChain and LlamaIndex:

from sirdas.integrations import SirdasLoader, SirdasReader
docs = SirdasLoader("contrato.pdf").load()              # langchain Documents, stable ids
nodes = SirdasReader().load_data("historia.pdf")        # llama_index Documents

KYB and lending (from 0.5.0): review a company's package and check whether a file changed. A failed check or a fingerprint that does not match is a result you read, not an exception.

r = sirdas.package("applications/acme", profile="lending")
r["summary"]                                     # {"pass": 7, "fail": 1, "missing": 0, "info": 2}
[c for c in r["checks"] if c["status"] == "fail"]  # each with file, page and the exact line
sirdas.fingerprint("statement.pdf", expected="9253ac6e…")["match"]   # same file, byte for byte?

CrewAI (pip install "sirdas[crewai]"): four tools that run locally and hand the agent cited, anonymized text.

from crewai import Agent
from sirdas.integrations import crewai_tools
underwriter = Agent(role="Underwriter", goal="Review loan packages", backstory="…",
                    tools=crewai_tools())   # read · ask a folder · extract a batch · review a KYB package

LangChain agents (langchain>=1): LangChain's PIIMiddleware keeps the strategy (redact, mask, hash, block); Sırdaş's detector adds SSNs, EINs, labelled names, MRNs, account and ID numbers. Checked against langchain==1.4.9: the model receives Patient Name: [REDACTED_PERSON], and an SSN raises PIIDetectionError before the call. Redaction there is one-way; for the round trip use the Gateway.

from langchain.agents import create_agent
from langchain.agents.middleware import PIIMiddleware
from sirdas.integrations import langchain_pii_detector

agent = create_agent("openai:gpt-5", middleware=[
    PIIMiddleware("ssn", detector=langchain_pii_detector(types=["SSN"]), strategy="block"),
    PIIMiddleware("sirdas", detector=langchain_pii_detector(), strategy="redact"),
])
sirdas.find_pii("SSN: 123-45-6789")   # [{"type": "SSN", "value": "123-45-6789", "start": 5, "end": 16}]

Personal data is anonymized by default (anonymize=False to keep it). Password-protected PDFs raise PasswordRequired; pass password=.

Docs: https://www.sirdaspdf.com/docs/agents/python.md

Metadata

Release files for sirdas 0.5.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 sirdas 0.5.1
File Size Uploaded Provenance Actions
sirdas-0.5.1.tar.gz 12.2 kB With provenance Details for sirdas-0.5.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sirdas 0.5.1
File Interpreter ABI Platform Actions
sirdas-0.5.1-py3-none-any.whl Python 3 none any Details for sirdas-0.5.1-py3-none-any.whl

Total release size: 22.8 kB

Release files / sirdas-0.5.1.tar.gz

Download URL sirdas-0.5.1.tar.gz
Size 12.2 kB
Tags Source
SHA-256 checksum
How to use checksums
a45d013f805c0a716e70550226917174b691d862482008e33d584f59b5a30708
BLAKE2b-256 checksum
How to use checksums
1ec814bb3bc7a41ccf32b3461ff2066cbbd4adb9fb37561cf785c3ff25f3e729
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 6, 2026.

Transparency log

Release files / sirdas-0.5.1-py3-none-any.whl

Download URL sirdas-0.5.1-py3-none-any.whl
Size 10.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
24148eb9765b59aeb22a95984de71b5ad81e351a8865263d04810af5a92baf0c
BLAKE2b-256 checksum
How to use checksums
93ddfbfc503ec9429b49ab7c3b6787207ee4ce610e812d8ef1d22ff03d89e56f
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 6, 2026.

Transparency log

Security for sirdas 0.5.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 sirdas-0.5.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 6, 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.

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