peter277 / python-iso18245

Python implementation of the ISO 18245 Merchant Category Codes database ⛺

Home Page:https://pypi.org/project/iso18245/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

python-iso18245

A Python implementation of the ISO 18245 Merchant Category Codes database.

Installation

  • pip install iso18245

Usage

>>> import iso18245
>>> iso18245.get_mcc("5542")
MCC(range=MCCRange(start='5000', end='5599', description='Retail outlets', reserved=False), iso_description='Automated fuel dispensers', usda_description='Automated Fuel Dispensers', stripe_description='Automated Fuel Dispensers', stripe_code='automated_fuel_dispensers')
>>> iso18245.get_mcc("3000")
MCC(range=MCCRange(start='3000', end='3999', description='Reserved for private use', reserved=True), iso_description='', usda_description='UNITED AIRLINES', stripe_description='', stripe_code='')
>>> iso18245.get_mcc("3000").usda_description
'UNITED AIRLINES'
>>> iso18245.get_mcc("3000").range
MCCRange(start='3000', end='3999', description='Reserved for private use', reserved=True)
>>> iso18245.get_mcc("999999")
Traceback (most recent call last):
  …
iso18245.InvalidMCC: 999999

External links

About

Python implementation of the ISO 18245 Merchant Category Codes database ⛺

https://pypi.org/project/iso18245/

License:MIT License


Languages

Language:Python 100.0%