Skip to content

Python package to validate/generate iranian national ID

License

Notifications You must be signed in to change notification settings

hanifbirgani/codemelli

Repository files navigation

CodeMelli

pypi version build status docs code coverage Python versions MIT License

Python package to validate/generate iranian national ID

Usage

>>> 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': 'گلستان'}

About

Python package to validate/generate iranian national ID

Resources

License

Stars

Watchers

Forks

Packages

No packages published