xnum


Namexnum JSON
Version 0.1 PyPI version JSON
download
home_pagehttps://github.com/openscilab/xnum
SummaryXNum: Universal Numeral System Converter
upload_time2025-07-20 14:57:02
maintainerNone
docs_urlNone
authorXNum Development Team
requires_python>=3.7
licenseMIT
keywords convert numeral number numeral-system digits
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            
<div align="center">
    <h1>XNum: Universal Numeral System Converter</h1>
    <br/>
    <a href="https://badge.fury.io/py/xnum"><img src="https://badge.fury.io/py/xnum.svg" alt="PyPI version"></a>
    <a href="https://www.python.org/"><img src="https://img.shields.io/badge/built%20with-Python3-green.svg" alt="built with Python3"></a>
    <a href="https://github.com/openscilab/xnum"><img alt="GitHub repo size" src="https://img.shields.io/github/repo-size/openscilab/xnum"></a>
</div>

----------


## Overview
<p align="justify">
<b>XNum</b> is a simple and lightweight Python library that helps you convert digits between different numeral systems — like English, Persian, Hindi, Arabic-Indic, Bengali, and more.
It can automatically detect mixed numeral formats in a piece of text and convert only the numbers, leaving the rest untouched. Whether you're building multilingual apps or processing localized data, <b>XNum</b> makes it easy to handle numbers across different languages with a clean and easy-to-use API.
</p>

<table>
    <tr>
        <td align="center">PyPI Counter</td>
        <td align="center">
            <a href="https://pepy.tech/projects/xnum">
                <img src="https://static.pepy.tech/badge/xnum">
            </a>
        </td>
    </tr>
    <tr>
        <td align="center">Github Stars</td>
        <td align="center">
            <a href="https://github.com/openscilab/xnum">
                <img src="https://img.shields.io/github/stars/openscilab/xnum.svg?style=social&label=Stars">
            </a>
        </td>
    </tr>
</table>
<table>
    <tr> 
        <td align="center">Branch</td>
        <td align="center">main</td>
        <td align="center">dev</td>
    </tr>
    <tr>
        <td align="center">CI</td>
        <td align="center">
            <img src="https://github.com/openscilab/xnum/actions/workflows/test.yml/badge.svg?branch=main">
        </td>
        <td align="center">
            <img src="https://github.com/openscilab/xnum/actions/workflows/test.yml/badge.svg?branch=dev">
            </td>
    </tr>
</table>


## Installation

### PyPI
- Check [Python Packaging User Guide](https://packaging.python.org/installing/)
- Run `pip install xnum==0.1`
### Source code
- Download [Version 0.1](https://github.com/openscilab/xnum/archive/v0.1.zip) or [Latest Source](https://github.com/openscilab/xnum/archive/dev.zip)
- Run `pip install .`

## Usage

```pycon
>>> from xnum import convert, NumeralSystem
>>> print(convert("۱۲۳ apples & ٤٥۶ cars", target=NumeralSystem.ENGLISH))
123 apples & 456 cars
>>> print(convert("۱۲۳ and ٤٥٦", source=NumeralSystem.PERSIAN, target=NumeralSystem.HINDI))
१२३ and ٤٥۶
```

## Supported numeral systems

- English
- Persian
- Hindi
- Arabic-Indic
- Bengali

## Issues & bug reports

Just fill an issue and describe it. We'll check it ASAP! or send an email to [xnum@openscilab.com](mailto:xnum@openscilab.com "xnum@openscilab.com"). 

- Please complete the issue template


## Show your support


### Star this repo

Give a ⭐️ if this project helped you!

### Donate to our project
If you do like our project and we hope that you do, can you please support us? Our project is not and is never going to be working for profit. We need the money just so we can continue doing what we do ;-) .			

<a href="https://openscilab.com/#donation" target="_blank"><img src="https://github.com/openscilab/xnum/raw/main/otherfiles/donation.png" width="270" alt="XNum Donation"></a>
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]
## [0.1] - 2025-07-20
### Added
- English numeral system
- Persian numeral system
- Hindi numeral system
- Arabic-Indic numeral system
- Bengali numeral system


[Unreleased]: https://github.com/openscilab/xnum/compare/v0.1...dev
[0.1]: https://github.com/openscilab/xnum/compare/2ed44ad...v0.1

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/openscilab/xnum",
    "name": "xnum",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "convert numeral number numeral-system digits",
    "author": "XNum Development Team",
    "author_email": "xnum@openscilab.com",
    "download_url": "https://files.pythonhosted.org/packages/64/a7/195aaca690532de7031ac704bb3af7cfe9375e3bc6147ced8a581397ada8/xnum-0.1.tar.gz",
    "platform": null,
    "description": "\n<div align=\"center\">\n    <h1>XNum: Universal Numeral System Converter</h1>\n    <br/>\n    <a href=\"https://badge.fury.io/py/xnum\"><img src=\"https://badge.fury.io/py/xnum.svg\" alt=\"PyPI version\"></a>\n    <a href=\"https://www.python.org/\"><img src=\"https://img.shields.io/badge/built%20with-Python3-green.svg\" alt=\"built with Python3\"></a>\n    <a href=\"https://github.com/openscilab/xnum\"><img alt=\"GitHub repo size\" src=\"https://img.shields.io/github/repo-size/openscilab/xnum\"></a>\n</div>\n\n----------\n\n\n## Overview\n<p align=\"justify\">\n<b>XNum</b> is a simple and lightweight Python library that helps you convert digits between different numeral systems \u2014 like English, Persian, Hindi, Arabic-Indic, Bengali, and more.\nIt can automatically detect mixed numeral formats in a piece of text and convert only the numbers, leaving the rest untouched. Whether you're building multilingual apps or processing localized data, <b>XNum</b> makes it easy to handle numbers across different languages with a clean and easy-to-use API.\n</p>\n\n<table>\n    <tr>\n        <td align=\"center\">PyPI Counter</td>\n        <td align=\"center\">\n            <a href=\"https://pepy.tech/projects/xnum\">\n                <img src=\"https://static.pepy.tech/badge/xnum\">\n            </a>\n        </td>\n    </tr>\n    <tr>\n        <td align=\"center\">Github Stars</td>\n        <td align=\"center\">\n            <a href=\"https://github.com/openscilab/xnum\">\n                <img src=\"https://img.shields.io/github/stars/openscilab/xnum.svg?style=social&label=Stars\">\n            </a>\n        </td>\n    </tr>\n</table>\n<table>\n    <tr> \n        <td align=\"center\">Branch</td>\n        <td align=\"center\">main</td>\n        <td align=\"center\">dev</td>\n    </tr>\n    <tr>\n        <td align=\"center\">CI</td>\n        <td align=\"center\">\n            <img src=\"https://github.com/openscilab/xnum/actions/workflows/test.yml/badge.svg?branch=main\">\n        </td>\n        <td align=\"center\">\n            <img src=\"https://github.com/openscilab/xnum/actions/workflows/test.yml/badge.svg?branch=dev\">\n            </td>\n    </tr>\n</table>\n\n\n## Installation\n\n### PyPI\n- Check [Python Packaging User Guide](https://packaging.python.org/installing/)\n- Run `pip install xnum==0.1`\n### Source code\n- Download [Version 0.1](https://github.com/openscilab/xnum/archive/v0.1.zip) or [Latest Source](https://github.com/openscilab/xnum/archive/dev.zip)\n- Run `pip install .`\n\n## Usage\n\n```pycon\n>>> from xnum import convert, NumeralSystem\n>>> print(convert(\"\u06f1\u06f2\u06f3 apples & \u0664\u0665\u06f6 cars\", target=NumeralSystem.ENGLISH))\n123 apples & 456 cars\n>>> print(convert(\"\u06f1\u06f2\u06f3 and \u0664\u0665\u0666\", source=NumeralSystem.PERSIAN, target=NumeralSystem.HINDI))\n\u0967\u0968\u0969 and \u0664\u0665\u06f6\n```\n\n## Supported numeral systems\n\n- English\n- Persian\n- Hindi\n- Arabic-Indic\n- Bengali\n\n## Issues & bug reports\n\nJust fill an issue and describe it. We'll check it ASAP! or send an email to [xnum@openscilab.com](mailto:xnum@openscilab.com \"xnum@openscilab.com\"). \n\n- Please complete the issue template\n\n\n## Show your support\n\n\n### Star this repo\n\nGive a \u2b50\ufe0f if this project helped you!\n\n### Donate to our project\nIf you do like our project and we hope that you do, can you please support us? Our project is not and is never going to be working for profit. We need the money just so we can continue doing what we do ;-) .\t\t\t\n\n<a href=\"https://openscilab.com/#donation\" target=\"_blank\"><img src=\"https://github.com/openscilab/xnum/raw/main/otherfiles/donation.png\" width=\"270\" alt=\"XNum Donation\"></a>\n# Changelog\nAll notable changes to this project will be documented in this file.\n\nThe format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)\nand this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).\n\n## [Unreleased]\n## [0.1] - 2025-07-20\n### Added\n- English numeral system\n- Persian numeral system\n- Hindi numeral system\n- Arabic-Indic numeral system\n- Bengali numeral system\n\n\n[Unreleased]: https://github.com/openscilab/xnum/compare/v0.1...dev\n[0.1]: https://github.com/openscilab/xnum/compare/2ed44ad...v0.1\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "XNum: Universal Numeral System Converter",
    "version": "0.1",
    "project_urls": {
        "Download": "https://github.com/openscilab/xnum/tarball/v0.1",
        "Homepage": "https://github.com/openscilab/xnum",
        "Source": "https://github.com/openscilab/xnum"
    },
    "split_keywords": [
        "convert",
        "numeral",
        "number",
        "numeral-system",
        "digits"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "17feb5240399f87fff545cee1cf5c23869204ba238399aea7369445478af0b15",
                "md5": "6b4f68aa20cd4dc62d2837e80685b1d9",
                "sha256": "e3fe61ec9d91fb0904d79b0fdbd1c53aaed78822c9c6d699274f9adbd4589f6c"
            },
            "downloads": -1,
            "filename": "xnum-0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6b4f68aa20cd4dc62d2837e80685b1d9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 6072,
            "upload_time": "2025-07-20T14:57:03",
            "upload_time_iso_8601": "2025-07-20T14:57:03.535027Z",
            "url": "https://files.pythonhosted.org/packages/17/fe/b5240399f87fff545cee1cf5c23869204ba238399aea7369445478af0b15/xnum-0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "64a7195aaca690532de7031ac704bb3af7cfe9375e3bc6147ced8a581397ada8",
                "md5": "e76345a356a08be68c69374713a20fcd",
                "sha256": "0c28603831244c774e83b9409fbaf71d9456b8a810b4b42986ebace5cd3b5560"
            },
            "downloads": -1,
            "filename": "xnum-0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "e76345a356a08be68c69374713a20fcd",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 8858,
            "upload_time": "2025-07-20T14:57:02",
            "upload_time_iso_8601": "2025-07-20T14:57:02.259142Z",
            "url": "https://files.pythonhosted.org/packages/64/a7/195aaca690532de7031ac704bb3af7cfe9375e3bc6147ced8a581397ada8/xnum-0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-20 14:57:02",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "openscilab",
    "github_project": "xnum",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "requirements": [],
    "lcname": "xnum"
}
        
Elapsed time: 1.88196s