Metadata-Version: 2.4
Name: sverification
Version: 0.1.0
Summary: A tool for verifying PDF statements from Tanzanian and beyond institutions
Home-page: https://github.com/Tausi-Africa/statement-verification
Author: Alex Mkwizu @ Black Swan AI
Author-email: alex@bsa.ai
Project-URL: Bug Tracker, https://github.com/Tausi-Africa/statement-verification/issues
Project-URL: Repository, https://github.com/Tausi-Africa/statement-verification
Keywords: pdf verification statements metadata financial
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: License :: Other/Proprietary License
Classifier: Operating System :: MacOS
Classifier: Operating System :: POSIX :: Linux
Classifier: Topic :: Office/Business :: Financial
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pdforensic>=0.1.0
Requires-Dist: pdfplumber>=0.6.0
Provides-Extra: test
Requires-Dist: pytest>=7.0.0; extra == "test"
Requires-Dist: pytest-cov>=4.0.0; extra == "test"
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
Requires-Dist: black; extra == "dev"
Requires-Dist: flake8; extra == "dev"
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license-file
Dynamic: project-url
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# Statement Verification

A Python package for verifying PDF statements from financial institutions. Extracts metadata, detects the issuing institution, and provides verification scores.

## Installation

```bash
# From PyPI (recommended)
pip install sverification

# Or from source
git clone https://github.com/Tausi-Africa/statement-verification.git
cd statement-verification
pip install -e .
```

## Usage

### Command Line

```bash
# Verify a PDF statement
verify-statement path/to/statement.pdf --brands statements_metadata.json
```

### Python API

```python
import sverification

# Simple verification
result = sverification.verify_statement_verbose("statement.pdf")
print(f"Brand: {result['detected_brand']}")
print(f"Score: {result['verification_score']:.1f}%")

# Print detailed report
sverification.print_verification_report(result)
```

### Step-by-Step Analysis

```python
import sverification

# Extract metadata
metadata = sverification.extract_all("statement.pdf")

# Detect company
company = sverification.get_company_name("statement.pdf")

# Compare with templates
brands = sverification.load_brands("statements_metadata.json")
expected = brands.get(company.lower(), [{}])[0]
results, score = sverification.compare_fields(metadata, expected)

print(f"Verification Score: {score:.1f}%")
```

## Supported Institutions

Banks: ABSA, CRDB, DTB, Exim, NMB, NBC, TCB, UBA  
Mobile Money: Airtel, Tigo, Vodacom, Halotel, Selcom  
Others: Azam Pesa, PayMaart, and more...

## Testing

```bash
# Run tests
pytest

# Run with coverage
pytest --cov=sverification
```

## License

Proprietary software licensed under Black Swan AI Global. See [LICENSE](LICENSE) for details.
