Skip to content

brett-patterson/coupon_codes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

An implementation of the Algorithm::CouponCode for Python.

Usage

from coupon_codes import cc_generate, cc_validate

cc_generate()
=> 'XHGH-AMYT-3E9J'

cc_generate(n_parts=4)
=> 'EJM0-5P1U-QBVV-VQGA'

cc_generate(part_len=6)
=> 'A7QR3V-E06M8X-LWQN22'

cc_validate('xhgh-amyt-3e9j')
=> 'XHGH-AMYT-3E9J'

cc_validate('ejmo-spIu-qbvv-vqga', n_parts=4)
=> 'EJM0-5P1U-QBVV-VQGA'

cc_validate('a7qr3v-eo6m8x-lwqn22', part_len=6)
=> 'A7QR3V-E06M8X-LWQN22'

cc_validate('abcd-efgh-ijkl')
=> ''

About

Coupon code generation for Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages