API Reference

Dbt

Wrapper implementation of Dbt API.

Usage:

>>> from versify import Dbt
>>> dbt = Dbt(config_path="/path/to/config.ini")
>>> print(dbt.find_verse("DBY", "1 Timothée", 2, 1))
class versify.util.Dbt.Dbt(config_path)[source]

This class implement a wrapper on API Dbt

find_book(vers, book_name)[source]

Find a book in bible :param vers: bible version instance :param book_name: name of book in string :return: Instance of book

find_chapter(version, book, chapter_number)[source]

Find a chapter object in book :param version: bible version instance :param book: book instance :param chapter_number: number of chapter :return: Instance of chapter

get_osis_code()[source]

Get the list of osis codes on Dbt :return: list of osis code on Dbt

get_random_verse(version)[source]

Get a random verse on bible :param version: text version of bible (DBY, etc.) :return: instance of Verse object

get_request(url, attempt=0)[source]

This function make get request on url with some attemps :param url: url to make your get request :param attempt: number of the current attempt :return: response object of get request

versify.util.Dbt.get_config(config_path)[source]

Get config data :param config_path: filepath of config ini file :return: instance of ini config file

versify.util.Dbt.levenshtein_distance(a, b)[source]

Return the Levenshtein edit distance between two strings a and b.