Python wrapper for Prompt API's BIN Checker API
Project description
Prompt API - BIN Checker - Python Package
pa-bin-checker
is a simple python wrapper for bincheck-api.
Requirements
- You need to signup for Prompt API
- You need to subscribe bincheck-api, test drive is free!!!
- You need to set
PROMPTAPI_TOKEN
environment variable after subscription.
then;
$ pip install pa-bin-checker
Example Usage
from bin_checker import get_bin
bin_information = get_bin('302596') # example BIN
if bin_information.get('error', False):
print(bin_information['bank_name']) # you have a dict!
You’ll have a dict of data:
{
'bank_name': 'Diners Club International',
'country': 'United States Of America',
'url': 'www.dinersclub.com',
'type': 'Credit',
'scheme': 'Discover',
'bin': '302596',
}
If you receive an error, payload will contain error
key. Example error
response:
{
'error': 'You need to set PROMPTAPI_TOKEN environment variable',
}
Development
Create your virtual environment, then use rake
tasks:
$ rake -T
rake build # Build package
rake bump[revision] # Bump version
rake clean # Remove/Delete build..
rake default # Default task => :install
rake install # Install package for local development purpose
rake test # Run test
rake upload:main # Upload package to main distro (release)
rake upload:test # Upload package to test distro
To install and test package locally, just call rake
or rake install
.
Tests are available under tests/
folder. Run rake test
to run tests.
License
This project is licensed under MIT
Contributer(s)
- Prompt API - Creator, maintainer
Contribute
All PR’s are welcome!
fork
(https://github.com/promptapi/bin-checker-py/fork)- Create your
branch
(git checkout -b my-feature
) commit
yours (git commit -am 'Add awesome features...'
)push
yourbranch
(git push origin my-feature
)- Than create a new Pull Request!
This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.
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
pa-bin-checker-0.0.4.tar.gz
(3.7 kB
view hashes)
Built Distribution
Close
Hashes for pa_bin_checker-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37e92f1c0127317422ca5101ff1e5ddcf0d2fd431c4d10cc134c830eeba4632e |
|
MD5 | ba355790347635c04c34ec99c9fa0627 |
|
BLAKE2b-256 | 43775c9b248e8b7fae75fba241388d2d527362b12e7486c5514db1939bd604a5 |