Print Arabic
A Python library to print Arabic text with proper bidirectional support in terminals and consoles.
Overview
print-arabic is a simple yet powerful utility that handles the complexity of displaying Arabic text correctly in Python applications. It combines Arabic text reshaping and bidirectional text rendering to ensure Arabic characters are displayed properly.
Features
- Automatic Arabic text reshaping
- Bidirectional text support
- Simple, easy-to-use API
- Works in terminals and consoles
Installation
Install using pip:
pip install print-arabic
Usage
import print_arabic
# Print Arabic text - direct usage
print_arabic("مرحبا بالعالم")
# Print mixed Arabic and English text
print_arabic("Hello مرحبا")
# Print Arabic with numbers
print_arabic("العدد ١٢٣٤٥")
# Alternative: use the function explicitly
print_arabic.print_arabic("النص العربي")
How It Works
The library uses two key components:
- arabic-reshaper: Reshapes Arabic text to connect letters properly
- python-bidi: Applies the bidirectional algorithm for correct text direction
Requirements
- Python 3.6 or higher
- python-bidi >= 0.4.2
- arabic-reshaper >= 2.1.3
License
This project is licensed under the MIT License - see the LICENSE file for details.
Author
Azwri (aazwri@gmail.com)
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Repository
Metadata
Release files for print-arabic 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| print_arabic-0.1.tar.gz | 3.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| print_arabic-0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.3 kB
Release files / print_arabic-0.1.tar.gz
| Download URL | print_arabic-0.1.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0475be1db8f5d1dbc2eebdef65aeac4ce182e8e0d0182a77f3096c495687240d
|
|
BLAKE2b-256 checksum How to use checksums |
7dd5a10cd669cce6a6f02a0fc50b879808ae141074369b7de8fc57c9b381e02c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Release files / print_arabic-0.1-py3-none-any.whl
| Download URL | print_arabic-0.1-py3-none-any.whl |
|---|---|
| Size | 3.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e0be90f27447840784a6485656726db4ab6cac67af06d5d0015ba55d1d56f92b
|
|
BLAKE2b-256 checksum How to use checksums |
db9d8951d105357c342c06ad794f22caf37018a34a3590d017cc984da156c0ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|