Layout-faithful SEC EDGAR filing parser from the Stanford EDGAR Filings Dataset.
Project description
Stanford EDGAR Parser
Layout-faithful SEC filing parser used by the Stanford EDGAR Filings Dataset. It converts raw EDGAR TXT/HTML/SGML/XML submissions into Markdown or MultiMarkdown while preserving financial-table structure, indentation, links, inline formatting, and filing metadata where possible.
Install
From PyPI, after release:
pip install stanford-edgar-parser
Until then, install directly from GitHub:
pip install "stanford-edgar-parser @ git+https://github.com/Stanford-Advanced-FinTech-Lab-SAFTL/stanford-edgar-filings-dataset.git"
For local development from a clone:
pip install -e .
Layout
runtime.py: backward-compatible re-export shimorchestrator.py: local filing orchestration and final output cleanuputils/: imports, tokenizer helpers, parse statistics, and shared setupmultimarkdown/: MultiMarkdown table conversionparsers/html/: HTML preprocessing, table cleanup, parser, and postprocessingparsers/ocr/: Mistral OCR key rotation, PDF/image OCR, and OCR utilitiesparsers/plaintext/: plaintext and legacy text-form parsersparsers/sgml/: SGML document-block utilitiesparsers/xml/: XML filing-form parserssec_parser.py: compatibility shim for oldpython stanford_edgar_parser/sec_parser.pyusage__main__.py:python -m stanford_edgar_parsercommand-line entrypoint
The original implementation remains untouched at sec_parser/sec_parser.py.
The equivalence tests in tests/parser_equivalence/ verify the split-module
coverage and compare parser outputs bit-for-bit.
Usage
python -m stanford_edgar_parser path/to/filing.txt
python -m stanford_edgar_parser path/to/filing.txt --to_mmd
stanford-edgar-parser path/to/filing.txt --to_mmd
from stanford_edgar_parser import main_one, parse_html_filing
Agent Skill Install
Install bundled Codex and Claude skill files:
stanford-edgar-install-skill
Or from Python:
from stanford_edgar_parser.ai import install_skill
install_skill()
Use --overwrite if you want to replace an existing installed skill.
MCP
After package install, expose the parser as an MCP server with:
[mcp_servers.stanford_edgar_parser]
command = "uvx"
args = ["--from", "stanford-edgar-parser", "stanford-edgar-mcp"]
startup_timeout_sec = 120
Before the PyPI release, use the GitHub package source:
[mcp_servers.stanford_edgar_parser]
command = "uvx"
args = [
"--from",
"stanford-edgar-parser @ git+https://github.com/Stanford-Advanced-FinTech-Lab-SAFTL/stanford-edgar-filings-dataset.git",
"stanford-edgar-mcp"
]
startup_timeout_sec = 120
The package-installed MCP server always exposes parse_filing. Repo-local
rendering and review tools are exposed when the full clone includes
multimarkdown.js, html-to-pdf.mjs, and tools/.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file stanford_edgar_parser-0.1.0.tar.gz.
File metadata
- Download URL: stanford_edgar_parser-0.1.0.tar.gz
- Upload date:
- Size: 203.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dbf843eb513cd85144a05fe9051a2918320a77d59dc538705917669c018ae28e
|
|
| MD5 |
46300272393371da9ba864de98419d0f
|
|
| BLAKE2b-256 |
7a509ddf24be32e12262f989c1d1f61dfe6a0ab83aee70e29710f6f21a9afeeb
|
Provenance
The following attestation bundles were made for stanford_edgar_parser-0.1.0.tar.gz:
Publisher:
publish.yml on Stanford-Advanced-FinTech-Lab-SAFTL/stanford-edgar-filings-dataset
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
stanford_edgar_parser-0.1.0.tar.gz -
Subject digest:
dbf843eb513cd85144a05fe9051a2918320a77d59dc538705917669c018ae28e - Sigstore transparency entry: 1865240958
- Sigstore integration time:
-
Permalink:
Stanford-Advanced-FinTech-Lab-SAFTL/stanford-edgar-filings-dataset@3676fac25aa87a49f71c995f8693e759264cb527 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Stanford-Advanced-FinTech-Lab-SAFTL
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3676fac25aa87a49f71c995f8693e759264cb527 -
Trigger Event:
push
-
Statement type:
File details
Details for the file stanford_edgar_parser-0.1.0-py3-none-any.whl.
File metadata
- Download URL: stanford_edgar_parser-0.1.0-py3-none-any.whl
- Upload date:
- Size: 220.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7bc0eea0c34641bf8467f28f8efea8ab72184faf52f3af82178603b8d683e67f
|
|
| MD5 |
7b67c680dfab5b5fad73d6d205b952c5
|
|
| BLAKE2b-256 |
515446947a4e59eaafd10e2ca7187f7bd966a32438c4452729e9b794ebcc1cca
|
Provenance
The following attestation bundles were made for stanford_edgar_parser-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on Stanford-Advanced-FinTech-Lab-SAFTL/stanford-edgar-filings-dataset
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
stanford_edgar_parser-0.1.0-py3-none-any.whl -
Subject digest:
7bc0eea0c34641bf8467f28f8efea8ab72184faf52f3af82178603b8d683e67f - Sigstore transparency entry: 1865241183
- Sigstore integration time:
-
Permalink:
Stanford-Advanced-FinTech-Lab-SAFTL/stanford-edgar-filings-dataset@3676fac25aa87a49f71c995f8693e759264cb527 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Stanford-Advanced-FinTech-Lab-SAFTL
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3676fac25aa87a49f71c995f8693e759264cb527 -
Trigger Event:
push
-
Statement type: