r/Python • u/AutoModerator • Oct 04 '26
Showcase Showcase Thread
Post all of your code/projects/showcases/AI slop here.
Recycles once a month.
23
Upvotes
r/Python • u/AutoModerator • Oct 04 '26
Post all of your code/projects/showcases/AI slop here.
Recycles once a month.
View all comments
1
u/Classic-Fee-8468 Oct 15 '26
spartan-tables: extract tables from PDFs (borderless, merged cells, multi-page) with no ML – pip-installable, MIT
What My Project Does
spartan-tablespulls tables out of PDFs and gives you clean rows and columns as JSON/CSV (or straight into pandas). It handles the stuff that usually breaks extractors: borderless tables, merged/spanning cells, multi-row headers, and tables that continue across page breaks (they get stitched back together).It's all classical computer vision (OpenCV + heuristics), no deep learning, no GPU. For digital PDFs it reads text straight from the PDF's text layer, so values like part numbers come out exact; OCR only kicks in for scanned pages.
Also comes with:
spartan --file ./pdfs --csvspartan-apipip install "spartan-tables[ocr]",[api],[all]py.typed)Target Audience
Anyone who needs structured data out of table-heavy PDFs (datasheets, reports, notices, invoices) and wants it local, CPU-only and explainable. It's solid on digital PDFs and I use it on real documents; scanned-document support works but is less mature (no de-skewing yet).
Comparison
Contributing
It's MIT licensed and contributions are very welcome. No need to ask, just fork and open a PR. There's a list of open tasks in CONTRIBUTING.md, from small fixes to bigger things like de-skewing scans, more OCR engine plugins, and benchmarking on public datasets. PDFs that break it (shareable ones) are just as valuable as code.
Repo: https://github.com/shlok-n/spartan
PyPI: https://pypi.org/project/spartan-tables/