Python Library for Receipt Verification
Free Python library for verifying Ethiopian bank receipts.
View library on GitHubPython library overview
The cheki Python library provides a clean Pythonic interface for verifying Ethiopian bank receipts. It supports direct endpoint access (bypassing the API), PDF parsing for CBE, JSON parsing for BOA and M-Pesa, and HTML parsing for Telebirr.
Quick start
Install the library from the cheki monorepo, import the ChekiAPI class, and call verify with the bank code and reference number. The library returns a Python dict with all receipt fields. For direct endpoint access (without the API), use the DirectVerifier class.
Direct verification vs API verification
The library supports two modes:
- API mode: calls cheki's REST API (requires internet access to chekiapp.vercel.app)
- Direct mode: fetches receipts directly from bank endpoints (bypasses cheki's API)
- Direct mode is useful for self-hosting on an Ethiopian IP to bypass geo-blocking
- Both modes return the same structured data format
Frequently asked questions
How do I install the cheki Python library?
Install it with pip install cheki. It uses the requests library for HTTP calls.
Does the Python library support PDF parsing?
Yes. The Python library includes PDF text extraction for CBE receipts using pdfminer.six or unpdf. It handles the full pipeline: fetch the PDF from CBE's endpoint, extract text, parse fields, and return structured data.
Can I use the Python library without the API?
Yes. The Python library can fetch receipts directly from bank endpoints without going through cheki's API. This is useful for self-hosting or for running verification on an Ethiopian server to bypass geo-blocking.
View library on GitHub
Open cheki