Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/benyaminsalimi/Iranian-national-code-generator
python script to generate all valid iranian national code by state or city name
https://github.com/benyaminsalimi/Iranian-national-code-generator
dataset dictionary iranian-national iranian-national-id performance-analysis python3
Last synced: 3 months ago
JSON representation
python script to generate all valid iranian national code by state or city name
- Host: GitHub
- URL: https://github.com/benyaminsalimi/Iranian-national-code-generator
- Owner: benyaminsalimi
- License: gpl-3.0
- Created: 2018-12-23T10:00:50.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2018-12-23T18:56:01.000Z (over 5 years ago)
- Last Synced: 2024-01-08T05:50:26.751Z (6 months ago)
- Topics: dataset, dictionary, iranian-national, iranian-national-id, performance-analysis, python3
- Language: Python
- Homepage:
- Size: 25.4 KB
- Stars: 13
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Lists
- awesome-Iran-datasets - کدهای شهرستانها
README
# Iranian national code generator
python script to generate all valid iranian national code by state or city name
## how to use
```bash
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.```python
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 codeTnx to [fandogh](https://github.com/fandogh/codemeli/docs) and [ebraminio](https://gist.github.com/ebraminio/5292017)