Skip to main content

IslamSDK Quran module with Quranic texts, utilities, and local database.

Project description

PyIslamSDK-Quran


🚀 هوية المشروع والإصدارات

نوع الشارة كود Markdown
إصدار PyPI PyPI Version
إصدار GitHub GitHub Release
وسم GitHub GitHub Tag
الرخصة License: MIT
حالة PyPI PyPI Status

📊 الإحصائيات والتنزيلات

نوع الشارة كود Markdown
إجمالي التنزيلات (Pepy) Total Downloads
التنزيلات الشهرية (Pepy) Monthly Downloads
التنزيلات الأسبوعية (Pepy) Weekly Downloads
تنزيلات PyPI (يومي) PyPI Downloads
تنزيلات PyPI (أسبوعي) PyPI Downloads
تنزيلات PyPI (شهري) PyPI Downloads

🛠️ النشاط والتطوير

نوع الشارة كود Markdown
آخر تحديث GitHub last commit
نشاط الالتزامات (سنوي) GitHub commit activity
المساهمون GitHub contributors
حجم المستودع GitHub repo size
حجم الكود GitHub code size in bytes
اللغة الأساسية GitHub top language
عدد اللغات GitHub language count

✨ الجودة والاختبارات

نوع الشارة كود Markdown
حالة البناء Build Status
تغطية الاختبارات Coverage
جودة الكود Code Quality
الكتابة (Typing) Typing
أنواع PyPI PyPI - Types

🐍 البيئة والتوافق

نوع الشارة كود Markdown
إصدارات Python Python Versions
تطبيق PyPI PyPI Implementation
عجلة PyPI PyPI Wheel
تنسيق PyPI PyPI Format

🤝 المجتمع والتواصل الاجتماعي

نوع الشارة كود Markdown
نجوم GitHub GitHub stars
تفريعات GitHub GitHub forks
متابعو GitHub GitHub watchers
متابعو المنظمة GitHub followers
مناقشات GitHub GitHub Discussions

🛠️ الدعم والصيانة

نوع الشارة كود Markdown
المشكلات المفتوحة GitHub issues
المشكلات المغلقة GitHub issues-closed
طلبات السحب المفتوحة GitHub pull requests
طلبات السحب المغلقة GitHub pull requests-closed
المعالم (Milestones) GitHub milestones

PyIslamSDK-Quran هي حزمة Python لتوفير وصول سهل إلى بيانات القرآن الصوتية والقراءات والمعلومات المرتبطة. تعتمد على المكتبة القياسية فقط ولا تحتاج إلى تبعيات خارجية.

عرض على GitHub | عرض على PyPI


✨ الإصدار الجديد 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

pyislamsdk_quran-0.1.1.tar.gz (817.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyislamsdk_quran-0.1.1-py3-none-any.whl (829.5 kB view details)

Uploaded Python 3

File details

Details for the file pyislamsdk_quran-0.1.1.tar.gz.

File metadata

  • Download URL: pyislamsdk_quran-0.1.1.tar.gz
  • Upload date:
  • Size: 817.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for pyislamsdk_quran-0.1.1.tar.gz
Algorithm Hash digest
SHA256 e1b748d3b2b86e4cfa27d258663f2769e87a4014c711c0e85d12b393adb15fd4
MD5 57537b2b7eda749cf1c6f4b2fd2b7d92
BLAKE2b-256 b13bfe757a2d1839285a6e13dfebc4fd62e1a490ddda68cf7891d2aab3b36778

See more details on using hashes here.

File details

Details for the file pyislamsdk_quran-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for pyislamsdk_quran-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 582c92ef6926729a63f4513664f1895f745a70a2e4286e7c14ea5ab14f34819d
MD5 351c1362b93a1e6f47adbd000b98f509
BLAKE2b-256 8616f535890c8a538b21eef25842062f7f47767f2bd66e16b83c86eb9faf529e

See more details on using hashes here.

Supported by

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