Skip to main content

Python Library for Persian

Project description

[![Coverage Status](](
[![python-ver]( )](

Python Library for Persian. Convert Arabic character to Persian

### Install Package
pip install persiantools

### How to use
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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for persiantools, version 0.0.6
Filename, size File type Python version Upload date Hashes
Filename, size persiantools-0.0.6.tar.gz (2.7 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page