Reduce Arabic strings to their rasm, i.e. remove vocalization and other diacritics.
Usage
>>> from rasmipy import rasmify
>>> rasmify('الفَاتِحَة')
'الڡاٮحه'
Installation
From the Python Package Index:
$ pip install ramsipy
From the sources:
$ python setup.py install
With the optional REST interface:
$ pip install ramsipy[rest-api]
REST API
To run a REST service:
$ rasmify-rest-service
Or in a Docker container (with the HTTP port mapped to 8000):
$ docker run –rm -p 8000:80 telota/rasmify
Example GET request:
$ curl http://localhost:8000/?text=ءَاتَيۡنَا
Example POST request:
$ curl -H “Content-Type: text/plain” -d ‘ءَاتَيۡنَا’ -X POST http://localhost:8000/
There are two environment variables that can be used to configure the service:
PORT defines the port that the server listens, defaults to 8000. MAX_GET_PARAMETER_LENGTH defines the allowed maximum length of GET requests, defaults to 1024.
Resources
About the rasm writing script: https://en.wikipedia.org/wiki/Rasm
Code repository: https://github.com/telota/rasmipy
On the Python Package Index: https://pypi.python.org/pypi/rasmipy
On the Docker Hub: https://hub.docker.com/r/telota/rasmify
PHP implementation: https://packagist.org/packages/telota/rasmify
Javascript implementation: https://github.com/telota/rasmify.js
Javascript web demo: https://telota.github.io/rasmify.js/demo/
Contributing
In order to run the tests, you need to install pytest and related packages, preferably in a virtual environment:
$ pip install -r requirements-dev.txt
Install rasmipy in an editable mode:
$ python setup.py develop
Before committing changes, you should run the tests:
# in the project's root directory
$ pytest
Metadata
Release files for rasmipy 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| rasmipy-0.2.tar.gz | 3.6 kB | Without provenance | Details |
Release files / rasmipy-0.2.tar.gz
| Download URL | rasmipy-0.2.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
144f9d75e90c4284d613cfc5c2ca7ce368742aedc9b18f6d5682aadf9a7c6f82
|
|
BLAKE2b-256 checksum How to use checksums |
729a2d3a85e18221a10e5cc70c3dffcb4381a90c2c5a269124b30fc16d4fdc18
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for rasmipy 0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.