项目作者: benyaminsalimi

项目描述 :
python script to generate all valid iranian national code by state or city name
高级语言: Python
项目地址: git://github.com/benyaminsalimi/Iranian-national-code-generator.git
创建时间: 2018-12-23T10:00:50Z
项目社区:https://github.com/benyaminsalimi/Iranian-national-code-generator

开源协议:GNU General Public License v3.0

下载


Iranian national code generator

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

how to use

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

use as module

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

  1. from ir_national_code import *
  2. result = ir_national_code() # create object
  3. result.return_all() #return list of all iranian national code
  4. result.by_state('فارس') #return list of all of 'فارس' valid national code
  5. 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