📖 Qurango -- Hadith Module
Qurango is a Python library that provides fast, structured, and
searchable access to authentic Hadith collections using JSON data
bundled directly inside the package.
It is optimized for research, data analysis, NLP, and educational
use.
This README explains how the Hadith system works internally and how to use it step by step.
✨ Key Highlights
- 📚 Loads Hadith data directly from packaged JSON files
- ⚡ Preprocessed and optimized for fast searching
- 🔍 Search Hadith by:
- Keyword
- Narrator
- Book name
- Hadith number
- 📊 Outputs results as Pandas DataFrames
- 🌐 Supports Urdu & English text normalization
- 🧠 Ideal for NLP, ML, and text analytics
📦 Installation
pip install Qurango
🚀 Quick Start
from Qurango.hadith import HadithLoader, HadithSearch
📘 Loading Hadith Data
The HadithLoader class automatically loads all Hadith JSON files
from the package data directory and preprocesses them.
loader = HadithLoader()
``>
### ✔ What happens internally?
- Loads JSON files from `qurango.data`
- Converts data to a Pandas DataFrame
- Normalizes Urdu & English text
- Maps Arabic book titles to English names
- Prepares searchable columns for fast queries
---
## 📊 Accessing the DataFrame
```python
df = loader.get_dataframe()
print(df.head())
Total Hadith & Books
loader.total_hadiths()
loader.total_books()
📚 Available Hadith Books
Get as List
books = loader.get_available_books()
print(books)
Get as DataFrame
books_df = loader.get_available_books(as_dataframe=True)
print(books_df)
Print Books Nicely
loader.show_available_books()
🔍 Searching Hadith
Create the search engine:
search = HadithSearch(df)
🔎 Search by Keyword
results = search.search_by_keyword("iman")
print(results)
Search works across: - Hadith title - Urdu translation - English translation
🧑 Search by Narrator
results = search.search_by_narrator("Abu Huraira")
print(results)
Language options: - "urdu" - "english" - "auto" (default)
📖 Search by Book
results = search.search_by_book("Sahih Bukhari")
print(results)
Search by book + hadith number:
results = search.search_by_book("Sahih Bukhari", hadith_number=1)
print(results)
🔢 Search by Hadith Number
results = search.search_by_hadith_number(5)
print(results)
📊 Output Format
All search methods return:
- ✅ Pandas DataFrame
- ✅ Easy export to CSV / JSON
- ✅ Ready for NLP pipelines
Example:
results.to_csv("hadith_results.csv", index=False)
🧠 Use Cases
- Islamic research & academia
- NLP on religious texts
- Machine learning datasets
- Search engines & chatbots
- Educational software
🛠 Requirements
- Python 3.8+
- pandas
📜 License
MIT License
🙏 Acknowledgment
This Hadith module is built to make authentic Islamic knowledge accessible for developers, researchers, and the global community using modern data tools.
Metadata
Release files for Qurango 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| qurango-1.0.0.tar.gz | 56.3 MB | Without provenance | Details for qurango-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| qurango-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for qurango-1.0.0-py3-none-any.whl |
Total release size: 113.8 MB
Release files / qurango-1.0.0.tar.gz
| Download URL | qurango-1.0.0.tar.gz |
|---|---|
| Size | 56.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d0de2926d8f8a9a598a76d31027d2eef402663a557d32c546e1de1584d848a91
|
|
BLAKE2b-256 checksum How to use checksums |
a73d6b634b61a8f8abd2a6a5917b1064d35c1e7288b75a4267015d34c203b25e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.0rc2
|
Release files / qurango-1.0.0-py3-none-any.whl
| Download URL | qurango-1.0.0-py3-none-any.whl |
|---|---|
| Size | 57.5 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c78d82f46ff616953c8fc7ada8fa8f32ee37b9e2ef6720d809fce441481d2c73
|
|
BLAKE2b-256 checksum How to use checksums |
24b741c100465de42a14180f700cfb92916c03ac95a3d80f24071d25a41a281d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.0rc2
|
Security for Qurango 1.0.0
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.