Skip to main content

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

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

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

visa_clearing_file_parser-0.0.1.tar.gz (14.9 kB view details)

Uploaded Source

Built Distribution

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

visa_clearing_file_parser-0.0.1-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file visa_clearing_file_parser-0.0.1.tar.gz.

File metadata

File hashes

Hashes for visa_clearing_file_parser-0.0.1.tar.gz
Algorithm Hash digest
SHA256 439bcf322dbffa25192f3f69e85a2827304eeb14da60567f94378f3ff21285c7
MD5 a0f9b1a9e6436b825d1ee4c131ebd4ee
BLAKE2b-256 094645fe16e9d4c70d8e4682ae1587033fb36b7e6a981f0e61e88d7044de1e57

See more details on using hashes here.

File details

Details for the file visa_clearing_file_parser-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for visa_clearing_file_parser-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 eada08573cea9d18399717948516714276049e6bfafe5a0b66ff00ea6cea29cb
MD5 b9a24fb59480b934770b64b4243d1fdd
BLAKE2b-256 6d3f0bf1efbc7e50af351854d945776208868747ce4a348ffb490a3db75a26e3

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