Skip to main content

A bible processing toolkit with free bible data for Python

Project description

freebible library

Free holy bibles data and toolkit for Python developers

Project Home Page


freebible package is available on PyPI, so it can be installed via pip by using

pip install freebible
# or even better
python3 -m pip install freebible

Please note that freebible requires Python 3. It does not work on Python 2 anymore.

Sample code

Easy access

>>> from freebible import bibles

# Quote everything
>>> bibles.print("Gen")
[1] 創世記
[1] Genesis
>>> bibles.print("Gen", 1, 1)
[Ge 1:1] 元始に神天地を創造たまへり 
[Gen 1:1] In the beginning God created the heavens and the earth.

# Quote from a specific bible
>>> bibles.kougo.quote("John")  # this returns a book object
Book(ID='104', title='ヨハネ傳福音書', filename='John', title_eng='John', short_name='John')
>>> bibles.kougo.quote("John", 1)  # this returns a chapter object
>>> bibles.kougo.quote("John", 1, 1)  # this returns a verse object
John 1:1 太初に言あり言は神と偕にあり言は神なりき 

>>> bibles.web.quote("John")
Book(ID='43', title='John', filename='', title_eng='John', short_name='John')
>>> bibles.web.quote("John", 1)
>>> bibles.web.quote("John", 1, 1)
John 1:1 In the beginning was the Word, and the Word was with God, and the Word was God.

Accessing Kougo

>>> from freebible import read_kougo
>>> kougo = read_kougo()
>>> print(len(kougo))
>>> print(kougo['John'])
[104] ヨハネ傳福音書
>>> print(len(kougo['John']))
>>> print(kougo['John'][1])
>>> print(kougo['John'][1][1])
[John 1:1] 太初に言あり言は神と偕にあり言は神なりき

Accessing World English Bible (WEB)

>>> from freebible import read_web
>>> web = read_web()
>>> print(len(web))
>>> print(web['John'])
[43] John
>>> print(len(web['John']))
>>> print(web['John'][1])
>>> print(len(web['John'][1]))
>>> print(web['John'][1][1])
[John 1:1] In the beginning was the Word, and the Word was with God, and the Word was God.

Developer setup

If you want to contribute to the source code, you can setup the development environment like this

# Create a virtual environment to install packages
python3 -venv ~/.envfreebible
# Activate the virtual environment
. ~/.envfreebible/bin/activate

# Check out the source code to your machine
git clone freebible-project
cd freebible-project
# Install required packages
python3 -m pip install -r requirements.txt

# Run the demo to make sure that this source code work

Bible sources:

Japanese Colloquial 口語訳:

World English Bible:

Project details

Download files

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

Files for freebible, version 0.1a8
Filename, size File type Python version Upload date Hashes
Filename, size freebible-0.1a8.tar.gz (3.0 MB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page