Python Package to interact with the glorious Qu'ran
Project description
quranpy
Python Package to interact with the Glorious Qur'an!
This package uses the Al Quran Cloud API to bring you verses and surahs of the Qur'an.
Start by importing the package:
import quranpy
Features:
Get verses of the Qur'an on demand
verses = quranpy.show_verses(
ayah="112:2-4",
edition=quranpy.Editions.sahih_international
)
print(verses)
# will show Surah Ikhlas verses 2, 3 and 4 with Sahih International translation
['Allah, the Eternal Refuge.', 'He neither begets nor is born,', 'Nor is there to Him any equivalent."']
Easy info on Surahs of the Qur'an
al_lail = quranpy.Surah(
chapter=quranpy.Chapters.layl,
edition=quranpy.Editions.pickthall # will show the Pickthall translations
)
print(str(al_lail))
print(al_lail.number)
print(al_lail.arabic_name)
print(al_lail.name)
print(al_lail.translation)
print(al_lail.period)
print(al_lail.show_verses("1-3"))
Surah Al-Lail - The Night
92
سورة الليل
Al-Lail
The Night
Meccan
[By the night enshrouding, And the day resplendent, And Him Who hath created male and female,]
Search for terms which appear in the Qur'an
results = quranpy.Search(
term="Moses",
edition=quranpy.Editions.yusufali,
surah=quranpy.Chapters.anbiya
)
print(results)
print(results.verses)
2 count(s) of "Moses" in Surah Al-Anbiyaa (in this edition)
[In the past We granted to Moses and Aaron the criterion (for judgment), and a Light and a Message for those who would do right,-, Before this We wrote in the Psalms, after the Message (given to Moses): My servants the righteous, shall inherit the earth."]
For more information, read the documentation.
See test.py for more in depth examples and ways to use the lib.
Assalamwalaikum warahmatullahi wa barakatuhu!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
quranpy-1.1.tar.gz
(9.2 kB
view details)
File details
Details for the file quranpy-1.1.tar.gz
.
File metadata
- Download URL: quranpy-1.1.tar.gz
- Upload date:
- Size: 9.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.0 pkginfo/1.5.0.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3rc1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d97073e627814b657b3ad0c5936cfa99f2cc5e38e041930f72600a2deafc1c90 |
|
MD5 | df20d2ed0c8b7bb33110065778fa08c7 |
|
BLAKE2b-256 | 20e78541733216dcd7971e5098c0beecfdc47fd7c471d0850cb16bef4ca206e5 |