{ "info": { "author": "Ariyan Eghbal (RYN)", "author_email": "ariyan.eghbal@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "\n# pyINID\nIran National ID Tools\n\n - Check validity of Iran National ID as the following algorithm:\n\n\t![ds = \\sum_{n=1}^{10} \\frac{1}{10^n}(x \\bmod 10^{n + 1} - x \\bmod 10^n) \\times (n+1) \\\\ \nm = ds \\bmod 11 \\\\\nchecksum = \\left(m \\lt 2 \\rightarrow m \\right)\\wedge\\left(m \\ge 2 \\rightarrow 11 - m\\right)](http://mathurl.com/render.cgi?%5Ctextmode%20ds%20%3D%20%5Csum_%7Bn%3D1%7D%5E%7B10%7D%20%5Cfrac%7B1%7D%7B%7B10%7D%5En%7D%28x%20%5Cbmod%20%7B10%7D%5E%7Bn%20+%201%7D%20-%20x%20%5Cbmod%20%7B10%7D%5En%29%20%5Ctimes%20%28n%20+%201%29%20%20%5C%5C%0A%5C%5C%0Am%20%3D%20ds%20%5Cbmod%2011%20%20%5C%5C%0A%5C%5C%0Achecksum%20%3D%20%5Cleft%28m%20%5Clt%202%20%5Crightarrow%20m%20%5Cright%29%5Cwedge%5Cleft%28m%20%5Cge%202%20%5Crightarrow%2011%20-%20m%5Cright%29%5Cnocache)\n\n\t (`checksum` will be the rightmost digit of National ID code )\n\n - Generate a random valid Iran National ID prefixed with desired numbers\n\n## Installation\n\n [sudo -H ]pip(3) install pyinid\n\n## Using as a library\n### Check validity\n```python\nimport inid\n\nif inid.check_id('0123456789'):\n\tprint(\"Correct\")\nelse: \n\tprint(\"Incorrect\")\n```\n### Generate\n```python\nimport inid\nprint(inid.generate_id())\t\t# Completely Random\nprint(inid.generate_id('12345'))\t# With Desired Prefix\nprint(inid.generate_id('123456789'))\t# Only generate checksum\n```\n## Using as a cli tool\n\n $ python3 -m inid\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/RYNEQ/pyINID", "keywords": "", "license": "GPLv2", "maintainer": "", "maintainer_email": "", "name": "pyinid", "package_url": "https://pypi.org/project/pyinid/", "platform": "", "project_url": "https://pypi.org/project/pyinid/", "project_urls": { "Homepage": "https://github.com/RYNEQ/pyINID" }, "release_url": "https://pypi.org/project/pyinid/0.3.1/", "requires_dist": null, "requires_python": "", "summary": "Validate And Generate Iran National ID", "version": "0.3.1" }, "last_serial": 4776736, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "c0094dfbc64062a1870d30f4a8712740", "sha256": "c266d0c4547855a0f090a385616e13d67d2ef96239fc1f8f8ec83e24f291333c" }, "downloads": -1, "filename": "pyinid-0.1.tar.gz", "has_sig": false, "md5_digest": "c0094dfbc64062a1870d30f4a8712740", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1338, "upload_time": "2019-01-30T23:35:05", "url": "https://files.pythonhosted.org/packages/1e/58/016a81182f5c363a4a5c08b651f404a99e0de11bbebdb6b75905ac21030f/pyinid-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "ee25a097c7a497c9e7f9e1ecf62d5f5f", "sha256": "ea33936a3d83881511288545d64a35addfc7838e6304d09ee6a90288c53f0cb3" }, "downloads": -1, "filename": "pyinid-0.2.tar.gz", "has_sig": false, "md5_digest": "ee25a097c7a497c9e7f9e1ecf62d5f5f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1998, "upload_time": "2019-02-04T07:52:31", "url": "https://files.pythonhosted.org/packages/9e/64/df4d675d108657cc356481c4368d0a4cf187ac52add7ff0053c55491ae80/pyinid-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "35a4848cd6dfd16bce98c68e54df3300", "sha256": "04d76196993a73571f3f83856f4be1d8e9aab50a3d8da3329c8d3b5deb3b7e44" }, "downloads": -1, "filename": "pyinid-0.3.tar.gz", "has_sig": false, "md5_digest": "35a4848cd6dfd16bce98c68e54df3300", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2261, "upload_time": "2019-02-04T08:00:31", "url": "https://files.pythonhosted.org/packages/3f/44/9db9a9c3bfec22aed2b515f8f4bd5b989175db33a02e635c9332fc3d5e83/pyinid-0.3.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "860695dad91c0f53551f4f0dfb548748", "sha256": "f6d57c1c60069d1bd941ec48488ec1622fec317bdbb9074284506a34b6470f13" }, "downloads": -1, "filename": "pyinid-0.3.1.tar.gz", "has_sig": false, "md5_digest": "860695dad91c0f53551f4f0dfb548748", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2308, "upload_time": "2019-02-04T08:02:49", "url": "https://files.pythonhosted.org/packages/bd/06/da15534d902d3fd2e6bb14206284dc019d41975a44d3e2db1d29b98f8afb/pyinid-0.3.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "860695dad91c0f53551f4f0dfb548748", "sha256": "f6d57c1c60069d1bd941ec48488ec1622fec317bdbb9074284506a34b6470f13" }, "downloads": -1, "filename": "pyinid-0.3.1.tar.gz", "has_sig": false, "md5_digest": "860695dad91c0f53551f4f0dfb548748", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2308, "upload_time": "2019-02-04T08:02:49", "url": "https://files.pythonhosted.org/packages/bd/06/da15534d902d3fd2e6bb14206284dc019d41975a44d3e2db1d29b98f8afb/pyinid-0.3.1.tar.gz" } ] }