Python Library for Persian
Project description
PersianTools
===
[](https://pypi.python.org/pypi/persiantools)
[](https://pypi.python.org/pypi/persiantools)
[](https://travis-ci.org/mhajiloo/persiantools)
[](https://coveralls.io/github/mhajiloo/persiantools?branch=master)
[](https://pypi.python.org/pypi/persiantools)
Python Library for Persian. Convert Arabic character to Persian
### Install Package
```
pip install persiantools
```
### How to use
```python
from persiantools import characters
from persiantools import digits
digits.en_to_fa("0987654321") # return: ۰۹۸۷۶۵۴۳۲۱
digits.ar_to_fa("٠٩٨٧٦٥٤٣٢١") # return: ۰۹۸۷۶۵۴۳۲۱
digits.fa_to_en("۰۹۸۷۶۵۴۳۲۱") # return: 0987654321
digits.fa_to_ar("۰۹۸۷۶۵۴۳۲۱") # return: ٠٩٨٧٦٥٤٣٢١
characters.ar_to_fa("راك") # return: راک
characters.fa_to_ar("ای چرخ فلک خرابی از کینه تست") # return: اي چرخ فلك خرابي از كينه تست
```
===
[](https://pypi.python.org/pypi/persiantools)
[](https://pypi.python.org/pypi/persiantools)
[](https://travis-ci.org/mhajiloo/persiantools)
[](https://coveralls.io/github/mhajiloo/persiantools?branch=master)
[](https://pypi.python.org/pypi/persiantools)
Python Library for Persian. Convert Arabic character to Persian
### Install Package
```
pip install persiantools
```
### How to use
```python
from persiantools import characters
from persiantools import digits
digits.en_to_fa("0987654321") # return: ۰۹۸۷۶۵۴۳۲۱
digits.ar_to_fa("٠٩٨٧٦٥٤٣٢١") # return: ۰۹۸۷۶۵۴۳۲۱
digits.fa_to_en("۰۹۸۷۶۵۴۳۲۱") # return: 0987654321
digits.fa_to_ar("۰۹۸۷۶۵۴۳۲۱") # return: ٠٩٨٧٦٥٤٣٢١
characters.ar_to_fa("راك") # return: راک
characters.fa_to_ar("ای چرخ فلک خرابی از کینه تست") # return: اي چرخ فلك خرابي از كينه تست
```
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
persiantools-0.0.7.tar.gz
(2.8 kB
view details)
File details
Details for the file persiantools-0.0.7.tar.gz.
File metadata
- Download URL: persiantools-0.0.7.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
92425710c7bc77e0ec4ada40b7d2a2709baaeacc831c41207473f5e114a2842f
|
|
| MD5 |
c107d8eec26351fad1d46d7e71643b9f
|
|
| BLAKE2b-256 |
b4af374df0795454e87276a6e1f14cd5d5af6ff3d7d82bce294f22f6c552e519
|