PDF to Excel converter, Excel report generator, and data utilities
Project description
PyVerix 🔧
A Python library for PDF extraction, Excel report generation, and data utilities.
Installation
pip install pyverix
Or from source:
git clone https://github.com/muhammadsubhan/pyverix
cd pyverix
pip install -e ".[dev]"
Features
| Module | Class | What it does |
|---|---|---|
converters |
PDFToExcel |
Extract tables & text from PDFs → styled .xlsx |
generators |
ExcelReportGenerator |
Build multi-sheet Excel reports from data |
generators |
SummaryReportGenerator |
Build KPI dashboard sheets |
utils |
format_currency |
Format numbers as currency strings |
utils |
format_percentage |
Format decimals as percentage strings |
utils |
auto_fit_columns |
Auto-fit column widths in openpyxl sheets |
Quick Start
PDF → Excel
from pyverix import PDFToExcel
converter = PDFToExcel("invoice.pdf")
converter.convert("invoice_tables.xlsx")
# Include raw text as an extra sheet
converter.convert("invoice_full.xlsx", include_text=True)
# Custom header color
converter.convert("invoice_styled.xlsx", header_color="375623")
Excel Report Generator
from pyverix import ExcelReportGenerator
gen = ExcelReportGenerator(title="Monthly Sales Report", theme="blue")
gen.add_cover(author="Muhammad Subhan", company="PyVerix Inc.")
gen.add_sheet("Sales", [
{"Product": "Widget A", "Units": 120, "Revenue": 2400},
{"Product": "Widget B", "Units": 85, "Revenue": 1700},
], add_totals=True, add_chart=True, chart_col="Revenue")
gen.add_sheet("Attendance", df_attendance)
gen.save("monthly_report.xlsx")
Themes: blue (default), green, red, purple
KPI Dashboard
from pyverix import SummaryReportGenerator
gen = SummaryReportGenerator("Q2 KPI Dashboard")
gen.add_kpi("Total Revenue", 125000, prefix="$", change=+8.3)
gen.add_kpi("Orders", 4321, change=-2.1)
gen.add_kpi("CSAT", 92, suffix="%", highlight="green")
gen.add_section_break("Staff Attendance")
gen.add_kpi("Present Today", 47)
gen.add_kpi("On Leave", 3, highlight="red")
gen.save("dashboard.xlsx")
Utility Functions
from pyverix import format_currency, format_percentage, auto_fit_columns
format_currency(1234.5) # "$1,234.50"
format_currency(9999, "£", 0) # "£9,999"
format_percentage(0.853) # "85.3%"
# Auto-fit all columns in an openpyxl sheet
from openpyxl import load_workbook
wb = load_workbook("report.xlsx")
auto_fit_columns(wb.active)
wb.save("report.xlsx")
Project Structure
pyverix/
├── pyverix/
│ ├── __init__.py ← public API
│ ├── converters/
│ │ └── pdf_to_excel.py ← PDFToExcel
│ ├── generators/
│ │ ├── excel_report.py ← ExcelReportGenerator
│ │ └── summary_report.py ← SummaryReportGenerator
│ └── utils/
│ └── formatter.py ← format_currency, format_percentage, auto_fit_columns
├── tests/
│ └── test_pyverix.py
├── pyproject.toml
└── README.md
Running Tests
pip install pytest
pytest tests/ -v
Publishing to PyPI
pip install build twine
python -m build
twine upload dist/*
Roadmap
-
CSVToExcelconverter -
WordToExcelconverter -
ExcelToJSONexporter - Conditional formatting rules helper
- Multi-page PDF with image extraction
- CLI tool (
pyverix convert report.pdf)
License
MIT License — free to use, modify, and distribute.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyverix-0.1.0.tar.gz
(11.9 kB
view details)
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
pyverix-0.1.0-py3-none-any.whl
(13.2 kB
view details)
File details
Details for the file pyverix-0.1.0.tar.gz.
File metadata
- Download URL: pyverix-0.1.0.tar.gz
- Upload date:
- Size: 11.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1cbec6b471d4ddf4f5140346c3927a62cb55406c986af1a3b36ecc3397bf9307
|
|
| MD5 |
9d6e0cd3fa01764d8206cde5ef8e3bfc
|
|
| BLAKE2b-256 |
3ab95429f92796c18b1cfe53207175d4102ede1b31adfbaf4a43ca256406f54c
|
File details
Details for the file pyverix-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pyverix-0.1.0-py3-none-any.whl
- Upload date:
- Size: 13.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3074956995f9649e9afbdcd1c56cee71341face28a3ecece03d705bf432bb7f4
|
|
| MD5 |
327136b7674d0d2caa02fa619c5aeb9e
|
|
| BLAKE2b-256 |
633885e738bf61036dd0df8c677ac817398bb3220571e8a5afa5935402fdf221
|