Skip to content

python script to generate all valid iranian national code by state or city name

License

Notifications You must be signed in to change notification settings

benyaminsalimi/Iranian-national-code-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Iranian national code generator

python script to generate all valid iranian national code by state or city name

how to use

python3 main.py -h #for help
python3 main.py -s تهران -o tehran.text
python3 main.py -s فارس

use as module

you can use ir_national_code.py as module in your python program.

 from ir_national_code import *
 result = ir_national_code() # create object
 result.return_all() #return list of all iranian national code
 result.by_state('فارس') #return list of all of 'فارس' valid national code
 result.by_citycode('001') #return list of all valid nation code start with '001' (choose code from city_codes.json file)

also you can change #DO SOMETHING line in ir_national_code.py file to do somthing with the generated national code

Tnx to fandogh and ebraminio

About

python script to generate all valid iranian national code by state or city name

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages