Skip to main content

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

Metadata

Release files for bin6 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for bin6 0.1.0
File Interpreter ABI Platform Actions
bin6-0.1.0-py3-none-any.whl Python 3 none any Details for bin6-0.1.0-py3-none-any.whl

Release files / bin6-0.1.0-py3-none-any.whl

Download URL bin6-0.1.0-py3-none-any.whl
Size 7.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
738a172e0616a35ad12088a04d11ea04b7ccb198e3803aa133217122212d7aa4
BLAKE2b-256 checksum
How to use checksums
10c08a461b13f8141ac2d50ff3664d805fc85adf2b61fa4a598689212e70fbb0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.9

Security for bin6 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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page