Skip to main content

Print Arabic

Twitter Follow Downloads PyPI - Python Version PyPI version

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:

  1. arabic-reshaper: Reshapes Arabic text to connect letters properly
  2. 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

https://github.com/azwri/print_arabic

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)

Source distribution for print-arabic 0.1
File Size Uploaded Provenance Actions
print_arabic-0.1.tar.gz 3.5 kB Without provenance Details for print_arabic-0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for print-arabic 0.1
File Interpreter ABI Platform Actions
print_arabic-0.1-py3-none-any.whl Python 3 none any Details for print_arabic-0.1-py3-none-any.whl

Total release size: 7.3 kB

Security for print-arabic 0.1

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.

Release history Release notifications | RSS feed

This release

0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page