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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 2Python 3

File details

Details for the file codemelli-0.1.2.tar.gz.

File metadata

  • Download URL: codemelli-0.1.2.tar.gz
  • Upload date:
  • Size: 18.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.1

File hashes

Hashes for codemelli-0.1.2.tar.gz
Algorithm Hash digest
SHA256 4df99605fc64338c425ddf1c1a92817fc5fc8377cd7a89e4cf7565ae105f4a23
MD5 2a48e8c87d4f9de46fa5c2d3cebb9d22
BLAKE2b-256 1576c5e88ba4953ecac83c6fe987f713f7313efbc86c5bbe55b6817230bbfc8d

See more details on using hashes here.

File details

Details for the file codemelli-0.1.2-py2.py3-none-any.whl.

File metadata

  • Download URL: codemelli-0.1.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 10.9 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.1

File hashes

Hashes for codemelli-0.1.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 65eb43287a1e099adf9dfb302aaf164682ac32d62f6af61e4da10323ebb0a6ac
MD5 20d1c4110e704a6814cf28ad70c7c7c8
BLAKE2b-256 2c3225bf02b24b8bf49425e62ab60e169b419d7b3a4bb183b051f0a03e7365c3

See more details on using hashes here.

Supported by

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