Registry / data / sec-parser

sec-parser

JSON →
library0.58.1pypypi✓ verified 79d ago

Parse SEC EDGAR HTML documents into a tree of elements that correspond to the visual structure of the document. Version 0.58.1, active development.

pip install sec-parser
INSTALL
IMPORT
SIG · SEC-PARSER
S
sec-parser
datapythonv0.58.1
Install
10.2s avg
Import
Disk
192MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.58.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 187.1MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 10.2s · import 0.000s · 181MB
192MB installed
● package 192MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Edgar10QParser
from sec_parser import Edgar10QParser
from sec_parser import SECParser

Parse SEC EDGAR HTML into a tree of semantic elements, then iterate over them.

from sec_parser import SECParser from sec_parser.semantic_elements import TextElement html = "<html><body><p>Revenue: $100</p></body></html>" parser = SECParser() tree = parser.parse(html) # Print top-level elements for element in tree: if isinstance(element, TextElement): print(element.text)
Debug
Known issues
breakingIn v0.50+, the output tree structure changed: flat list replaced nested tree. Code relying on parent-child traversal will break.
fix
Use iteration over flat list instead of recursive traversal.
affects: >=0.50.0
deprecatedSECParser.parse_html() removed in v0.40. Use SECParser.parse() instead.
fix
Replace parse_html() with parse()
affects: >=0.40.0
gotchaInput HTML must be valid EDGAR document. Non-standard HTML may cause empty tree.
fix
Ensure HTML is from SEC EDGAR, not scraped with missing elements.
affects: all
Upgrade
Version history
0.58.1latest on PyPI · released Jun 9, 2024
Audit
Dependencies
beautifulsoup4requiredHTML parsing
lxmlrequiredXML parser for BeautifulSoup
Agent activity
3 hits · last 30 days
node
2
OpenAI (training)
1
Resources
sec-parser — pip install sec-parser · libregistry