https://github.com/kourva/chnumber
Python module that formats Persian number to Latin
https://github.com/kourva/chnumber
number-format python python-module python3
Last synced: about 1 year ago
JSON representation
Python module that formats Persian number to Latin
- Host: GitHub
- URL: https://github.com/kourva/chnumber
- Owner: Kourva
- Created: 2022-12-22T20:03:29.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-08-28T15:54:26.000Z (over 1 year ago)
- Last Synced: 2025-03-18T22:27:55.867Z (about 1 year ago)
- Topics: number-format, python, python-module, python3
- Language: Python
- Homepage:
- Size: 16.6 KB
- Stars: 10
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ChNumber
Python module that formats Persian number to Latin
# clone
```bash
git clone https://github.com/Kourva/ChNumber
```
# Usage
```python
from ChNumber import ChNumber
print(ChNumber.format("۰۹۱۴۴۱۲۳۵۱۲"))
# Output:
09144123512
help(ChNumber)
# Output:
Help on class ChNumber in module ChNumber:
class ChNumber(builtins.object)
| :: Converts Farsi numbers to Latin"
|
| Methods defined here:
|
| format(number)
| :: format method:
| -> Usage:
| ChNumber.format(number)
| -> Example:
| ChNumber.format("۰۹۱۴۶۵۷۹۸۱۴")
| -> Result:
| "09146579814"
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables (if defined)
|
| __weakref__
| list of weak references to the object (if defined)
# You need to put this module to your working directory
```
> This is my first module! Hope you enjoy :)