Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

langchain-section-anything

Latest version: v0.1.2

Overview

Last scanned
29 Nov 2026
Published
29 Nov 2026
PyPI package Publisher: omniwot
0 Stars
0 Forks
3 Versions
268 Downloads
Python Repo language

Scan summary

langchain-section-anything was last scanned on 29 Nov 2026 at version 0.1.2. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 3 versions; the latest was published on 29 Nov 2026.
  • Findings: No rules fired in version 0.1.2.
  • Downloads: 268 downloads.

Versions

3 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.1.2 LATEST 29 Nov 2026 No rules fired
0.1.1 11 Nov 2026 No rules fired
0.1.0 27 Oct 2026 No rules fired

No rules fired in 0.1.2

Findings

Findings for v0.1.2. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.1.2; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

langchain-section-anything

A LangChain document loader for Section Anything: it finds the sections of a PDF (every heading, its level, its pages and its exact text) and returns one Document per section, with the heading path in the metadata. The default mode runs locally with rules only, calls no model and costs nothing.

Install

pip install langchain-section-anything
# latest from GitHub:
pip install "git+https://github.com/Omniwot/section-anything#subdirectory=packages/langchain-section-anything"

Python 3.11+. Depends on section-anything and langchain-core only.

Example

from langchain_section_anything import SectionAnythingLoader

loader = SectionAnythingLoader("paper.pdf")  # mode="free": rules only, no model, $0
docs = loader.load()  # or loader.lazy_load(), await loader.aload()

doc = docs[2]
print(doc.page_content[:59])         # '### 1.1 Scope\n\nSectioning splits a long document into parts'
print(doc.metadata["heading_path"])  # ['1 Introduction', '1.1 Scope']
print(doc.metadata["page_start"], doc.metadata["page_end"])  # 1 1

Sections vary in length; to cap chunk size, pass chunk=True (or a dict of SectionTree.chunks options, see below), or split the Documents further (for example with RecursiveCharacterTextSplitter.split_documents), which keeps the metadata on every chunk.

Options

SectionAnythingLoader(file_path, mode="free", *, include_heading=True, chunk=False, **opts)

  • file_path: a path, or a list of paths.
  • mode: free (bookmarks, table of contents and typography rules; nothing leaves the machine), quick (a small model reviews candidate heading lines, about $0.07 per 1,000 pages), standard (a model reads every line) or local:<ollama model>. Over the per-document cost cap (default $0.50) a run is downgraded (standard → quick → free) or refused.
  • include_heading: start each Document with its heading as a Markdown line (## 1 Introduction). With False, sections with no text of their own (a heading directly followed by a subheading) are skipped.
  • chunk: size-capped chunks instead of whole sections (SectionTree.chunks): True for its defaults (at most 2,000 characters, sibling sections under 200 merged), or a dict of its options (max_chars, min_chars, overlap_chars, length, prefix, lead_in). Each Document's text then starts with the chunk's heading path (3 Method > 3.1 Data) unless prefix is False, and its metadata adds chunk_index and lead_in. lead_in is off by default; with True (needs section-anything 0.1.13 or newer) a chunk that starts inside a list carries the line that introduces the list, for example "Apply the following changes to Method 2:", in its lead_in metadata and, with prefix, in its text under the heading path.
  • **opts go to section_anything.section: api_key, base_url, model, max_usd, prices, over_budget, max_pages, extract_timeout, progress, settings. Anything not given falls back to the SECTIONANY_* environment variables; see the library README. Keys are never logged or put in metadata.

Text and metadata

A Document's text is the section's own text, from its heading to the next heading, reflowed into paragraphs with running headers and footers removed (the same text as section-anything --body). Text before the first heading is a Document of its own (flag front_matter).

Key Meaning
source the PDF path
section_index position in the document's section list (0-based)
title, number, level heading text, numbering as printed ("3.1" or ""), 1 = top level
heading_path list of headings from the outermost section down to this one
page_start, page_end 1-based pages
start, end character range in the library's extracted text
flags for example doc_title, front_matter, generated_title
document_title the document's title, if found
mode, model, document_cost_usd how the document was sectioned (after any downgrade) and what the whole document cost

heading_path and flags are lists. For a vector store that accepts only scalar metadata, join them (" > ".join(...)) or drop them with filter_complex_metadata from langchain_community.vectorstores.utils before indexing.

Licence

Apache-2.0. See LICENSE and NOTICE.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • pypi-releases langchain-section-anything

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Plug and Pray: Your AI Agents Are Taking Orders From Strangers
Research

Plug and Pray: Your AI Agents Are Taking Orders From Strangers

Copy of Template Design OX Blog (2)
Research

NGINX2Root: Five Critical NGINX Flaws Expose Web Servers to Remote Code Execution

Critical Apache HTTP Server Flaw Exposes Web Servers to RCE (1)
CVE

CVE-2026-119618: Critical Apache HTTP Server Flaw Exposes Web Servers to Remote Code Execution

Frame 2085668439 (1)
Group 1261154229