Skip to main content

Python package to validate/generate iranian national ID

Project description

CodeMelli

pypi version build status docs code coverage 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': 'گلستان'}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

codemelli-0.1.2.tar.gz (18.0 kB view hashes)

Uploaded Source

Built Distribution

codemelli-0.1.2-py2.py3-none-any.whl (10.9 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page