Skip to main content

Local SQLite BIN lookup with Stripe-shape JSON output, bank name, and card level.

Project description

bin6

Local SQLite BIN lookup. Returns Stripe-shape JSON plus bank name and specific card level for ~457k 6-digit BINs and ~2.5M account ranges.

Install

pip install bin6

The first call to BinDB() (or bin6 on the CLI) downloads bins.db (~385 MB) from the GitHub release and caches it locally. SHA-256 verified.

Library use

from bin6 import BinDB

with BinDB() as db:
    print(db.stripe_response("414943"))

CLI

bin6 414943 --pretty                      # Stripe-shape JSON + bank + card_level
bin6 4537909870000000 --pan               # filter to ranges containing this PAN
bin6 --file bins.txt --ndjson             # bulk lookup, one JSON per line
bin6 --search --bank "CHASE" --brand VISA --limit 20
bin6 --sql "SELECT BANK_NAME,COUNT(*) c FROM ranges_flat GROUP BY BANK_NAME ORDER BY c DESC LIMIT 10"

Custom DB location

Set BIN6_DB=/path/to/bins.db or pass BinDB(path=...).

Sources merged

  • Mastercard SBART
  • Visa simplified-bin-account-range
  • Elavon binrange_full_dump.sql (T + UnionPay enriched)
  • binlist.net export
  • bin_data_full / random_data_bin_meta

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

bin6-0.1.0-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file bin6-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: bin6-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for bin6-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 738a172e0616a35ad12088a04d11ea04b7ccb198e3803aa133217122212d7aa4
MD5 8db275423dabdd97bcab6487e4f21e0c
BLAKE2b-256 10c08a461b13f8141ac2d50ff3664d805fc85adf2b61fa4a598689212e70fbb0

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