arabic-reshaper
Reconstruct Arabic sentences to be used in applications that do not support Arabic
Decision gist · record as of 2026-08-14
Yes. The package solves a real, narrow problem with no runtime dependencies, active maintenance, and permissive licensing. Install it if you need to display Arabic, Farsi, or Urdu text in an application or library that doesn't natively support Arabic script shaping. Skip it if your rendering stack already handles Arabic natively.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- Optional: fonttools library needed only if using config_for_true_type_font feature.
- Low friction: pure Python wheel with no runtime dependencies.
License · maintenance · safety
MIT (permissive) — MIT license permits unrestricted use, modification, and distribution with minimal attribution requirements.
last release 2026-04-28 (108 days) · last repo commit 2026-04-28 · 443 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 5,495,226 downloads/mo, #2,089 on PyPI
Alternatives
Verify before relying
pip install arabic-reshaper
import arabic_reshaper
text_to_be_reshaped = 'اللغة العربية رائعة'
reshaped_text = arabic_reshaper.reshape(text_to_be_reshaped)- Whether harakat (diacritical marks) handling is correct in all edge cases when combined with bidi reversal.
- Performance characteristics with very large text volumes or real-time rendering scenarios.
- Compatibility with all Arabic script variants (Farsi, Urdu) claimed in documentation.
What it is and what it does
Arabic Reshaper solves a core rendering problem: Arabic script characters change shape based on their position in a word (initial, medial, final, or isolated), but many applications and libraries don't handle this automatically. This library takes Arabic text and replaces each character with its correct contextual form, making it displayable in systems without native Arabic support.
The package works alongside the Unicode bidirectional algorithm (typically via python-bidi) to handle both character shaping and text direction. It offers fine-grained configuration for ligature support, diacritical mark handling, and font-specific behavior, making it suitable for diverse use cases from simple text processing to image rendering with PIL.
Use it for
- Render Arabic text on images using PIL when the font doesn't handle shaping automatically.
- Prepare Arabic text for display in web frameworks or libraries that lack right-to-left and shaping support.
- Process Arabic user input for storage or display in legacy systems without Arabic rendering capability.
- Generate correctly shaped Arabic text for PDF generation or document export.
- Support Farsi or Urdu text in applications originally designed for left-to-right scripts.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package solves a real, narrow problem with no runtime dependencies, active maintenance, and permissive licensing. Install it if you need to display Arabic, Farsi, or Urdu text in an application or library that doesn't natively support Arabic script shaping. Skip it if your rendering stack already handles Arabic natively.
Install
arabic-reshaper on PyPI
Before you install
Low friction: pure Python wheel with no runtime dependencies. Actively maintained with recent releases; last commit 2026-04-28 and repository not archived.
Requires Python 3.10 or later. Optional: fonttools library needed only if using config_for_true_type_font feature.
License in practice
MIT license permits unrestricted use, modification, and distribution with minimal attribution requirements.
Quickstart
pip install arabic-reshaper
import arabic_reshaper
text_to_be_reshaped = 'اللغة العربية رائعة'
reshaped_text = arabic_reshaper.reshape(text_to_be_reshaped)
Verify before relying
- Whether harakat (diacritical marks) handling is correct in all edge cases when combined with bidi reversal.
- Performance characteristics with very large text volumes or real-time rendering scenarios.
- Compatibility with all Arabic script variants (Farsi, Urdu) claimed in documentation.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 108 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 5,495,226 / month, #2,089 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Natural Language :: ArabicOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Software Development :: Libraries :: Python Modules |
Evidence: arabic_reshaper-3.0.1-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “arabic text reshaping”
- arabic-reshaperReshapes Arabic text characters into their correct contextual forms…
- PyArabicPyArabic provides functions to manipulate Arabic text and…
- python-bidiConverts bidirectional text (mixed left-to-right and right-to-left…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also PyArabic · python-bidi · anyascii · uharfbuzz · Unidecode · cn2an · art · epitran · roman · grapheme