NjProVk/CreditsCardTools ? reverse-engineered prompt
Reverse engineered prompt
Build me a small Python library that can generate and validate credit card numbers for test data. It should make valid numbers for common card types like Visa, MasterCard, Amex, and Discover, and the numbers need to pass the usual checksum check. I also want a simple way to validate a card number and get basic details from the BIN, like brand, country, bank, and card type.
Please keep it dependency free and make sure everything works offline with a local BIN database, so there’s no need for API keys or internet access. A clean, easy to use API would be great, with good type hints and a few examples in the README. Also include tests so I can trust the generator and validator work correctly. If you need to check current docs for any Python packaging or best practices, go ahead and look them up online.