Skip to main content

qran

Quran structured text API.

Python package to extract Quranic text in graphemic and archigraphemic representations, different Quranic encodings and Latin transliteration. The package works as a an API for the stuctured Quran.

This package can be very helpful for semiautomating the transcription of old Quranic manuscripts or fast lookups of script and typographic analysis.

Installation

pip install qran

Usage

As a python library

from qran import get_text, Index

>>> text = get_text(
...     ini_index=Index(sura=1, verse=1, word=4, block=2),
...     end_index=Index(sura=1, verse=2, word=2, block=-1),
...     args={"blocks": True},
... )
... 
>>> for grapheme_ar, grapheme, lt, archigrapheme_ar, arhigrapheme_lt in text:
...     print(grapheme_ar, grapheme, lt, archigrapheme_ar, arhigrapheme_lt)
...     
لرَّ LRᵚᵃ لر LR 1:1:4:2
حِيمِ GᵢB₂Mᵢ حٮم GBM 1:1:4:3
ا A ا A 1:2:1:1
لْحَمْدُ LᵒGᵃMᵒDᵘ لحمد LGMD 1:2:1:2
لِلَّهِ LᵢLᵚᵃHᵢ لله LLH 1:2:2:1

Alternatively, you can use a tuple of integers instead of an Index object:

>>> text = get_text(
...     ini_index=(1, 1, 4, 2),
...     end_index=(1, 2, 2, -1),
...     args={"blocks": True},
... )

As a unix-like command:

$ qran 1:1:4:2-1:2:2 --blocks
لرَّ	LRᵚᵃ	لر	LR	1:1:4:2
حِيمِ	GᵢB₂Mᵢ	حٮم	GBM	1:1:4:3
ا	A	ا	A	1:2:1:1
لْحَمْدُ	LᵒGᵃMᵒDᵘ	لحمد	LGMD	1:2:1:2
لِلَّهِ	LᵢLᵚᵃHᵢ	لله	LLH	1:2:2:1

License

This project is licensed under the MIT License for its source code.

It includes Quran text from the Tanzil Project, which is licensed under the Creative Commons Attribution 3.0 License.

© 2007–2021 Tanzil Project. The text is unmodified and used under Tanzil's terms of use: http://tanzil.net/docs/license

Author

Alicia González Martínez

Metadata

Release files for qran 1.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 qran 1.0.1
File Size Uploaded Provenance Actions
qran-1.0.1.tar.gz 943.2 kB Without provenance Details for qran-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for qran 1.0.1
File Interpreter ABI Platform Actions
qran-1.0.1-py3-none-any.whl Python 3 none any Details for qran-1.0.1-py3-none-any.whl

Total release size: 1.9 MB

Release files / qran-1.0.1.tar.gz

Download URL qran-1.0.1.tar.gz
Size 943.2 kB
Tags Source
SHA-256 checksum
How to use checksums
368ae050dd744048166a3e750997c52372184840bdb4f7402c87f236da6bd320
BLAKE2b-256 checksum
How to use checksums
762452a8e4c90d2a67687179aeaa34f86ac5422c804da582202b82df005d0923
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / qran-1.0.1-py3-none-any.whl

Download URL qran-1.0.1-py3-none-any.whl
Size 1.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
ea3e9b6db0146b777f5dff53825dffa521c93480ff4afc607d626bbfb2b93e85
BLAKE2b-256 checksum
How to use checksums
c5a047af97c2670fb822d58745263fac01585889833de5d38dc01c50bc2b8c8c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Security for qran 1.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

1.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