Skip to main content

A tool for verifying PDF statements from Tanzanian and beyond institutions

Project description

Statement Verification

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

Installation

# 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

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

Python API

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

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

# Run tests
pytest

# Run with coverage
pytest --cov=sverification

License

Proprietary software licensed under Black Swan AI Global. See LICENSE for details.

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

sverification-0.1.0.tar.gz (16.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sverification-0.1.0-py3-none-any.whl (18.5 kB view details)

Uploaded Python 3

File details

Details for the file sverification-0.1.0.tar.gz.

File metadata

  • Download URL: sverification-0.1.0.tar.gz
  • Upload date:
  • Size: 16.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for sverification-0.1.0.tar.gz
Algorithm Hash digest
SHA256 18af812ea173fd8fab70a256ef99831d4b3a3ce2c2723aa4cbf8b806f6398a31
MD5 3badeebc0bfc93e56e75856e32de47d7
BLAKE2b-256 a72fa941bad1069c959eb68a0ea0a66cb78fa6107e9f4e28b3f6192c0d533a72

See more details on using hashes here.

File details

Details for the file sverification-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: sverification-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 18.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for sverification-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b309079263a92a3584cffa1fb38f67a171e6eed82bdb0d8e6b9ec2ab5207b067
MD5 59af304db39cba109eed40d3b903014d
BLAKE2b-256 2d250650da2c3eaa0026f9064563360bedbb8a4eadbbfc5bef440e0b36566895

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page