IslamSDK Quran module with Quranic texts, utilities, and local database.
Project description
PyIslamSDK-Quran
🚀 هوية المشروع والإصدارات
| نوع الشارة | كود Markdown |
|---|---|
| إصدار PyPI | |
| إصدار GitHub | |
| وسم GitHub | |
| الرخصة | |
| حالة PyPI |
📊 الإحصائيات والتنزيلات
| نوع الشارة | كود Markdown |
|---|---|
| إجمالي التنزيلات (Pepy) | |
| التنزيلات الشهرية (Pepy) | |
| التنزيلات الأسبوعية (Pepy) | |
| تنزيلات PyPI (يومي) | |
| تنزيلات PyPI (أسبوعي) | |
| تنزيلات PyPI (شهري) |
🛠️ النشاط والتطوير
| نوع الشارة | كود Markdown |
|---|---|
| آخر تحديث | |
| نشاط الالتزامات (سنوي) | |
| المساهمون | |
| حجم المستودع | |
| حجم الكود | |
| اللغة الأساسية | |
| عدد اللغات |
✨ الجودة والاختبارات
| نوع الشارة | كود Markdown |
|---|---|
| حالة البناء | |
| تغطية الاختبارات | |
| جودة الكود | |
| الكتابة (Typing) | |
| أنواع PyPI |
🐍 البيئة والتوافق
| نوع الشارة | كود Markdown |
|---|---|
| إصدارات Python | |
| تطبيق PyPI | |
| عجلة PyPI | |
| تنسيق PyPI |
🤝 المجتمع والتواصل الاجتماعي
| نوع الشارة | كود Markdown |
|---|---|
| نجوم GitHub | |
| تفريعات GitHub | |
| متابعو GitHub | |
| متابعو المنظمة | |
| مناقشات GitHub |
🛠️ الدعم والصيانة
| نوع الشارة | كود Markdown |
|---|---|
| المشكلات المفتوحة | |
| المشكلات المغلقة | |
| طلبات السحب المفتوحة | |
| طلبات السحب المغلقة | |
| المعالم (Milestones) |
PyIslamSDK-Quran هي حزمة Python لتوفير وصول سهل إلى بيانات القرآن الصوتية والقراءات والمعلومات المرتبطة. تعتمد على المكتبة القياسية فقط ولا تحتاج إلى تبعيات خارجية.
✨ الإصدار الجديد v0.1.0 يقدم دعمًا كاملاً للاستعلام عن السور والآيات، وتحسينات كبيرة في أداء أوامر CLI.
التثبيت
pip install PyIslamSDK-Quran
بداية سريعة / أمثلة الاستخدام
وحدة الصوتيات (audios)
تتيح لك وحدة audios استرجاع معلومات عن القراء (الروايات) وخوادم الصوت.
الاستيراد والتهيئة
from pyislamsdk_quran.audios import AudioConfig
# إنشاء كائن لسورة الفاتحة (رقم ١) مع قارئ محدد باللغة العربية
audio = AudioConfig(surah_number=1, reciter_ar="عبدالباسط عبدالصمد")
الحصول على معلومات الرواية
# استرجاع تفاصيل الرواية (يمكن تحديد اللغة: 'ar' أو 'en')
rewaya_info = audio.get_rewaya(lang="ar")
print(rewaya_info)
# الناتج: {"status": True, "data": [...]} أو {"status": False, "error": ...}
الوصول إلى معلومات الخادم (السيرفر)
الصنف الداخلي Servers يوفر دوالاً للحصول على روابط الخوادم الصوتية.
# إنشاء كائن من الصنف Servers (مرتبط بنفس تهيئة الصوت)
servers = audio.Servers()
# الحصول على جميع الخوادم المتاحة (لكل السور/القراء)
all_servers = servers.get_all_servers()
print(all_servers)
# الحصول على الخادم الخاص بالسورة التي تم تهيئتها (سورة ١)
specific_server = servers.get_server()
print(specific_server)
وحدة السور (quran)
يمكنك استخدام الصنف SurahsConfig للوصول إلى معلومات السور والآيات.
الاستيراد والتهيئة
from pyislamsdk_quran.quran import SurahsConfig
# إنشاء كائن للتعامل مع السور (يمكن تمرير رقم سورة اختياري)
surahs = SurahsConfig()
الحصول على جميع السور
all_surahs = surahs.get_all_surahs()
print(all_surahs)
البحث عن سورة بالاسم
surah_info = surahs.get_surah(name="الفاتحة") # اسم افتراضي: الفاتحة
print(surah_info)
الحصول على آيات سورة معينة باستخدام رقم السورة
surah_verses = surahs.get_surah_verses(id=1) # سورة الفاتحة
print(surah_verses)
الحصول على السور حسب مكان النزول (مكية أو مدنية)
meccan_surahs = surahs.get_revelation_place(place="مكية")
print(meccan_surahs)
كل دالة ترجع قاموسًا يحتوي على مفتاح status (منطقي) وإما data (عند النجاح) أو error (عند الفشل).
المتطلبات
· Python 3.9 أو أحدث (يستخدم مكتبة zoneinfo القياسية؛ بالنسبة لـ Python 3.8 قد تحتاج إلى حزمة backports.zoneinfo).
الترخيص
MIT - شركة إينوسوفت (InnoSoft Company)
PyIslamSDK-Quran (English)
PyIslamSDK-Quran is a Python package that provides easy access to Quranic data (surahs, verses, revelation places) and audio resources (reciters and rewaya). It uses only the standard library and has no external dependencies.
✨ New version v0.1.0 introduces full support for querying surahs and verses, along with major performance improvements in CLI commands.
View on GitHub | View on PyPI
Installation
pip install PyIslamSDK-Quran
Quick Start / Usage Examples
Audio Module (audios)
The audios module allows you to retrieve information about Quran reciters (rewaya) and audio servers.
Import and initialize
from pyislamsdk_quran.audios import AudioConfig
# Create an instance for Surah Al-Fatiha (surah 1) with a specific reciter (Arabic name)
audio = AudioConfig(surah_number=1, reciter_ar="عبدالباسط عبدالصمد")
Get recitation (rewaya) information
# Retrieve rewaya details in Arabic (or specify 'en' for English)
rewaya_info = audio.get_rewaya(lang="ar")
print(rewaya_info)
# Expected output: {"status": True, "data": [...]} or {"status": False, "error": ...}
Access server information
The inner class Servers provides methods to get audio server URLs.
# Create an instance of the Servers class (attached to the same audio configuration)
servers = audio.Servers()
# Get all available servers (for all surahs/reciters)
all_servers = servers.get_all_servers()
print(all_servers)
# Get the specific server for the surah you initialized (surah 1)
specific_server = servers.get_server()
print(specific_server)
Surahs Module (quran)
Use the SurahsConfig class to access surah and verse information.
Import and initialize
from pyislamsdk_quran.quran import SurahsConfig
# Create an instance (optional surah number can be passed)
surahs = SurahsConfig()
Get all surahs
all_surahs = surahs.get_all_surahs()
print(all_surahs)
Get verses of a specific surah by its ID
surah_verses = surahs.get_surah_verses(id=1) # Surah Al-Fatiha
print(surah_verses)
Get surahs by revelation place (Meccan or Medinan)
meccan_surahs = surahs.get_revelation_place(place="مكية") # or "Meccan" if English support is added
print(meccan_surahs)
Each method returns a dictionary with a status key (boolean) and either data (on success) or error (on failure).
Requirements
· Python 3.9 or later (uses standard library zoneinfo; for Python 3.8 you may need the backports.zoneinfo package).
License
MIT - InnoSoft Company
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyislamsdk_quran-0.1.2.tar.gz.
File metadata
- Download URL: pyislamsdk_quran-0.1.2.tar.gz
- Upload date:
- Size: 817.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
372f2969684e00a265497c10b683812ae8742f1c60909613c0ada0ba1a1d1fde
|
|
| MD5 |
3dab19b27963ca3318a1e9a149cdeb6e
|
|
| BLAKE2b-256 |
b40e6f3b9dee8d183458f78e521b7a9acf9ee5632ffd65c9324fccf600111e0e
|
File details
Details for the file pyislamsdk_quran-0.1.2-py3-none-any.whl.
File metadata
- Download URL: pyislamsdk_quran-0.1.2-py3-none-any.whl
- Upload date:
- Size: 829.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
87a0b61dd547be023eb23d861c6448bc4f23146a475818e35d0ac181d80d4167
|
|
| MD5 |
4c7b873fc27917ae7d2d8be95cb5eeff
|
|
| BLAKE2b-256 |
1eacb525848ae1b6ffe1a5938490784762bd0d90fd48f17f86b94331583f7674
|