Skip to content
This repository has been archived by the owner on Jun 8, 2018. It is now read-only.
/ PyGQ Public archive

A python module to get Quran verses using GlobalQuran API

Notifications You must be signed in to change notification settings

farooqkz/PyGQ

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyGQ

A python module to get Quran verses using GlobalQuran API

PyGQ uses GlobalQuran API to get Quran verses in multiple translations. It was a part of KoranFinder after I decided to re-write this part and now it can be used as an independent module.

Usage

This is a sample code with PyGQ which gets the first ayah of the first surah:

import pygq
Q = pygq.PyGQ()
print(Q.getAyah(1, 1, "en.sahih")["verse"])

You could use it as a command line tool, too:

pygq.py surah:ayah [language code]

language code is en.sahih by default.

Note that getAyah() returns a dictionary containing the ayah text, number, surah number and id.

Licence

see ISC.