Skip to main content

Access Quran in Python with as little as three lines of code. With Both English and Arabic Support.

Project description

Header

Quran Module

Using this Module, you can access all verses of Quran in Arabic and their Translations. You can Also search the Quran both in Arabic and English, with as little as 3 lines of Code

Installation

Clone the repo and run pip install:

pip install TheQuranModule

Or pip install directly from the repo:

pip install git+https://github.com/UBISOFT-1/Quran_Module.git

Make .py files in the cloned folders for this Module to work.

Usage

To use this Module, the Documentation is Straight Forward. All of the Code below is super easy and all the documentation you need to know. Make Sure you have your .py file in the Github Folder that you will clone.

from Quran_Module import Project_Quran

Quran = Project_Quran()
# Call the Get Ayah Function for English Text, use 59 before the Surah, Verse for English.
Quran.Get_Ayah_English('59,2,20')
# Now Get the Ayah that you called for by using the Print Function to print it.
print(Quran.Ayah_English)
# You can also call the Get Ayah Function for Arabic, use 1 before the Surah and Verse for Arabic.
Quran.Get_Ayah_Arabic('1,2,20')
# Now Print the Arabic Text to see the Output
print(Quran.Ayah_Arabic)

# You can also check if an Ayah is there that you are calling for by using the following Function

Quran.Check_Ayah('59,2,20')
# It would Return as True if the Ayah is there and False if the Ayah is not there
print(Quran.Check_Ayah_Results)
if Quran.Check_Ayah_Results == True:
    print('Ayah is there! ;)')

# If you want all of the Quran as a List you can do
Quran.Get_Quran()
# This will print all of the Quran as Arabic or as English as a List
print(Quran.All_Quran_Arabic)
print(Quran.All_Quran_English)

# If you want a .txt with A range of Arabic and their Translations you can call another method
# Here there is no need to add 59, first for English and 1, first for Arabic. It is there as we add more translations.
Ayah_to_Get = ['1,2', '5,5', '6,8']
# Format <Ayah_Range>, <filename>
# Default filename = 'Quran_text.txt'
Quran.Get_Custom_Quran_text(Ayah_to_Get, filename= 'Quran_Ayah_to_read.txt')

# You can also find text in Quran and show their Results as Output by using the following method
# You can Search in English or Arabic as you like

Quran.Find_Text_English('Muhammad')
Quran.Find_Text_Arabic('إِن')
# Outputs are saved as a List
print(Quran.Search_Results_Arabic)
print(Quran.Search_Results_English)

# Remember The 59, Translation is for Abdullah Yusuf Ali (English) Widely accepted and most used
# And 1, is for the Original Arabic Text.
# That was all you are set to go, tell me what else should I add to this.

Dependancies

None, Only from the Standard Library:

  • os module
  • csv module

Qur'an Source

See http://www.qurandatabase.org/ All the text and Databases are theirs.

License

See LICENSE.txt Also, when used in any Commercial Application, Permission must be taken. And for modifiying the code, permission must also be granted. And for Private use, feel free to enjoy.

Special Thanks

Special Thanks to God Almighty who helped me make this module in less than an Hour Practically.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

TheQuranModule-0.1.3.tar.gz (620.4 kB view details)

Uploaded Source

File details

Details for the file TheQuranModule-0.1.3.tar.gz.

File metadata

  • Download URL: TheQuranModule-0.1.3.tar.gz
  • Upload date:
  • Size: 620.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for TheQuranModule-0.1.3.tar.gz
Algorithm Hash digest
SHA256 ad44ae4aedf72771faea448943c347c9116d7f426c0893cb561defa0a6b37a0c
MD5 13529ecd08382aba5c955bbe73aaa456
BLAKE2b-256 98b0a60ee267a6bcc2b38a8d54b9836821ca1e83e05a828e19e200ce2aeb61e8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page