Python package to validate/generate iranian national ID
>>> import codemelli
# Validate a real codemelli
>>> codemelli.validator(2833411839)
True
# Validate a fake codemelli
>>> codemelli.validator(3235632189)
False
# Generate a random valid codemelli
>>> codemelli.generator()
6615365987
# Generate a random codemelli with a defined city code
>>> codemelli.generator(223)
2239832630
# Lookup city and state of a valid codemelli
>>> codemelli.lookup(2239832630)
{'city': 'بندرترکمن', 'state': 'گلستان'}
- Free software: MIT license
- Documentation: https://codemelli.readthedocs.io.