Validate And Generate Iran National ID
Project description
pyINID
Iran National ID Tools
-
Check validity of Iran National ID as the following algorithm:
(
checksum
will be the rightmost digit of National ID code ) -
Generate a random valid Iran National ID prefixed with desired numbers
Installation
[sudo -H ]pip(3) install pyinid
Using as a library
Check validity
import inid
if inid.check_id('0123456789'):
print("Correct")
else:
print("Incorrect")
Generate
import inid
print(inid.generate_id()) # Completely Random
print(inid.generate_id('12345')) # With Desired Prefix
print(inid.generate_id('123456789')) # Only generate checksum
Using as a cli tool
$ python3 -m inid
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyinid-0.4.1.tar.gz
(2.6 kB
view details)
File details
Details for the file pyinid-0.4.1.tar.gz
.
File metadata
- Download URL: pyinid-0.4.1.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.9.0 requests-toolbelt/0.8.0 tqdm/4.40.2 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f806c68b9ef7e5d4594b835b6d764e3d93febe6ed554be05a3e0af14f8ec5bf |
|
MD5 | 8fc654c10a8dab78492a79d8d592cf18 |
|
BLAKE2b-256 | b0ba3afc3376632aac9614200f3e66fbfc2c306af8f8cc88c923e748a97652de |