A Python library for parsing Visa BASE II Clearing Transaction Files
Project description
Visa Clearing File Parser
A Python library for parsing Visa BASE II Clearing Transaction Files (.ctf).
📥 Installation
From PyPI
pip install visa-clearing-file-parser
From Source
git clone https://github.com/makafanpeter/visa-clearing-file-parser.git
cd visa-clearing-file-parser
pip install -e .
🔧 Quick Start
from visa_clearing import VisaBaseIIParser
# Initialize parser
parser = VisaBaseIIParser()
# Parse file and iterate through transactions
for transaction in parser.parse_file('transactions.ctf'):
print(f"Transaction: {transaction['Transaction Description']}")
print(f"Amount: {transaction.get('Source Amount', 'N/A')}")
print(f"Merchant: {transaction.get('Merchant Name', 'N/A')}")
print("-" * 40)
💻 CLI Usage
# Parse a file and display summary
visa-clearing-parser parse transactions.ctf --format summary
# Output as JSON
visa-clearing-parser parse transactions.ctf --format json --output results.json
# Show parser information
visa-clearing-parser info --verbose
📋 Supported Transaction Types
- Sales Draft
- Credit Voucher
- Cash Disbursement
- Chargeback, Sales Draft
- Chargeback, Credit Voucher
- Reversal, Sales Draft
🛠️ Development
# Clone the repository
git clone https://github.com/makafanpeter/visa-clearing-file-parser.git
cd visa-clearing-file-parser
# Install in development mode
pip install -e ".[dev]"
# Run tests
pytest tests/
# Run linting
black src/ tests/
flake8 src/ tests/
🤝 Contributing
- Fork the repository
- Create a feature branch (git checkout -b feature/amazing-feature)
- Commit your changes (git commit -m 'Add amazing feature')
- Push to the branch (git push origin feature/amazing-feature)
- Open a Pull Request
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
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
File details
Details for the file visa_clearing_file_parser-0.0.1.tar.gz.
File metadata
- Download URL: visa_clearing_file_parser-0.0.1.tar.gz
- Upload date:
- Size: 14.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
439bcf322dbffa25192f3f69e85a2827304eeb14da60567f94378f3ff21285c7
|
|
| MD5 |
a0f9b1a9e6436b825d1ee4c131ebd4ee
|
|
| BLAKE2b-256 |
094645fe16e9d4c70d8e4682ae1587033fb36b7e6a981f0e61e88d7044de1e57
|
File details
Details for the file visa_clearing_file_parser-0.0.1-py3-none-any.whl.
File metadata
- Download URL: visa_clearing_file_parser-0.0.1-py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eada08573cea9d18399717948516714276049e6bfafe5a0b66ff00ea6cea29cb
|
|
| MD5 |
b9a24fb59480b934770b64b4243d1fdd
|
|
| BLAKE2b-256 |
6d3f0bf1efbc7e50af351854d945776208868747ce4a348ffb490a3db75a26e3
|