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_TOKENenvironment 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
You need ruby to run rake tasks. Rake tasks are just helper functions for
automation. You don’t need to install anything to proceed. If you are on
macOS, you’ll already have ruby installed.
If you are on Ubuntu:
# install ruby on Ubuntu
$ sudo apt-get update -y
$ sudo apt-get install -y ruby-full
You need bumpversion to manage package versioning. If you are on
macOS:
$ brew install bumpversion
If you are on Ubuntu:
# install bumpversion on Ubuntu
$ sudo apt-get update -y
$ sudo apt-get -y bumpversion
To install and test package locally, just call rake or rake install.
Tests are available under tests/ folder. Run rake test to run tests.
To continue without ruby or rake:
- Install package locally:
pip install -e .[development] - Build package:
python setup.py sdist bdist_wheel - Install
bumpversion:pip install bumpversion
For uploading package to pypi registry you need to install:
$ pip install -U wheel setuptools
You need to put pypi credentials to ~/.pypirc:
[distutils]
index-servers=
pypi-promptapi
testpypi-promptapi
[pypi-promptapi]
repository = https://upload.pypi.org/legacy/
username: __token__
password: TOKEN
[testpypi-promptapi]
repository: https://test.pypi.org/legacy/
username: __token__
password: TOKEN
- Upload to main registry:
twine upload --repository pypi-promptapi dist/* - Upload to test repository:
twine upload --repository testpypi-promptapi dist/*
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) commityours (git commit -am 'Add awesome features...')pushyourbranch(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.
Metadata
Release files for pa-bin-checker 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pa-bin-checker-0.1.0.tar.gz | 4.4 kB | Without provenance | Details for pa-bin-checker-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pa_bin_checker-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for pa_bin_checker-0.1.0-py3-none-any.whl |
Total release size: 9.3 kB
Release files / pa-bin-checker-0.1.0.tar.gz
| Download URL | pa-bin-checker-0.1.0.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9333526f0c6ece9b2aaba7e54abdcf245dfa7d45f005db675bbd978baf8d8cba
|
|
BLAKE2b-256 checksum How to use checksums |
65edf88197436a3fce13a511eb5b102042930c4e285cf38219700521d844f6a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.0.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.4
|
Release files / pa_bin_checker-0.1.0-py3-none-any.whl
| Download URL | pa_bin_checker-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
03ff045e1cd14eac7b6d5fd753f6ffc22f674a719f7fac94f2f1f7af79e2f222
|
|
BLAKE2b-256 checksum How to use checksums |
f89fc22730d5e0c7a18b38e418b087645ac591e57eb60ee15788183409e98e52
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.0.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.4
|
Security for pa-bin-checker 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.