Metadata-Version: 2.4
Name: visa-clearing-file-parser
Version: 0.0.1
Summary: A Python library for parsing Visa BASE II Clearing Transaction Files
Home-page: https://github.com/makafanpeter/visa-clearing-file-parser
Author: Peter Dev
Author-email: Peter Dev <706435+makafanpeter@users.noreply.github.com>
License: MIT
Project-URL: Homepage, https://github.com/makafanpeter/visa-clearing-file-parser
Project-URL: Repository, https://github.com/makafanpeter/visa-clearing-file-parser.git
Project-URL: Bug Tracker, https://github.com/makafanpeter/visa-clearing-file-parser/issues
Keywords: visa,clearing,payment,transaction,finance,baseii
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: Topic :: Office/Business :: Financial
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
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: Programming Language :: Python :: 3.13
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Provides-Extra: test
Requires-Dist: pytest>=7.0; extra == "test"
Requires-Dist: pytest-cov>=4.0; extra == "test"
Requires-Dist: coverage>=7.0; extra == "test"
Requires-Dist: flake8>=6.0; extra == "test"
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0; extra == "dev"
Requires-Dist: coverage>=7.0; extra == "dev"
Requires-Dist: black>=23.0; extra == "dev"
Requires-Dist: flake8>=6.0; extra == "dev"
Requires-Dist: mypy>=1.0; extra == "dev"
Requires-Dist: build>=0.10.0; extra == "dev"
Requires-Dist: twine>=4.0.0; extra == "dev"
Dynamic: author
Dynamic: home-page
Dynamic: requires-python

# Visa Clearing File Parser

A Python library for parsing Visa BASE II Clearing Transaction Files (.ctf).




## 📥 Installation

### From PyPI
```bash
pip install visa-clearing-file-parser
```

### From Source
```bash
git clone https://github.com/makafanpeter/visa-clearing-file-parser.git
cd visa-clearing-file-parser
pip install -e .
```

### 🔧 Quick Start
```python
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
```bash
# 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
```bash
# 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
