Metadata-Version: 2.4
Name: bin6
Version: 0.1.0
Summary: Local SQLite BIN lookup with Stripe-shape JSON output, bank name, and card level.
Project-URL: Homepage, https://github.com/OZyeeZ/bin6
Project-URL: Issues, https://github.com/OZyeeZ/bin6/issues
Author: OZyeeZ
License: MIT
License-File: LICENSE
Keywords: bin,card,iin,lookup,payment,stripe
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Office/Business :: Financial
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# 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

```bash
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

```python
from bin6 import BinDB

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

## CLI

```bash
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
