Skip to main content

VersiRef Bible

VersiRef is a Python package for sophisticated parsing, manipulation, and printing of references to the Bible.

versiref-bible provides access to Bibles in an SQLite-based format: ranges of verses can be retrieved by reference, and verse text can be searched with SQLite FTS5. VersiRef parses the references and handles versification.

The command-line interface is designed for use by an LLM: output is compact plain text, one verse per line as reference⇥text (TAB-separated).

Documentation

These files are bundled into the installed package; run versiref-bible docs to print the path to the bundled copy (or versiref-bible docs querying.md for a single file).

Installation

uv sync

This installs the versiref-bible command into the project environment (run it with uv run versiref-bible …).

Commands

build — create a database from a text file

Reads a CCAT-format .cat file where each line is Abbrev C:V text (the abbreviation is a BibleWorks-style book name) and writes an SQLite database. Each verse is stored as one row, keyed by an integer verse key computed under the chosen versification, plus an FTS5 index over the verse text. Recognized CCAT markup is stripped from the text, and translator's notes are stored for show --notes.

uv run versiref-bible build BIBLE.cat -o BIBLE.db --versification eng --title "My Bible"

Options:

  • -v, --versification (required) — named versification of the Bible (eng, lxx, cei, …).
  • -o, --output (required) — output database path.
  • --title — human-readable title stored in the database.
  • --book-style — reference style whose names map the file's abbreviations (default en-bibleworks), or the path of a style file (*.json).
  • --encoding — input text encoding (e.g., cp1252; default utf-8), or beta-code to convert Beta Code Greek to Unicode.
  • --literal-brackets — keep square brackets as printed characters instead of reading [word] as italics.

Lines whose book abbreviation is unrecognized (e.g. the Sirach prologue Sip), or whose book is absent from the chosen versification, are skipped with a warning on stderr.

The show, search, and info commands take a database either as a path to a .db file or as a bare name looked up on a search path. The search path comes from VERSIREF_BIBLE_PATH (os.pathsep-separated, like PATH); when unset, a per-user data directory is searched (e.g. ~/Library/Application Support/versiref-bible on macOS, ~/.local/share/versiref-bible on Linux). Drop your .db files there and refer to them by name from any directory. See Querying Databases for details.

show — print the verses of a reference

uv run versiref-bible show kjv "John 3:16-18"     # by name, or a path: kjv.db
  • --style — reference style for parsing the input and labelling output (default en-sbl).
  • --from-versification — interpret the reference in this versification and map it to the database's versification.
  • --notes — print each verse's translator's notes after it, as reference note label⇥text.

The reference is parsed in the style you choose, so use that style's conventions (e.g. --style it-cei expects Gen 1,1-3, not Gen 1:1-3).

search — full-text search verse text

uv run versiref-bible search BIBLE.db "living water" --limit 10

QUERY uses SQLite FTS5 syntax (e.g. light, "living water", love AND world). Results are in canonical verse order by default.

  • -p, --phrase — literal text to search for instead of QUERY, matched as its words in sequence (e.g. --phrase "God-ward", which is not a valid FTS5 query).
  • -n, --limit — maximum verses to return (default 20).
  • --in — restrict the search to a reference (e.g. --in "Gen 1", --in "John").
  • --order — canonical (default, verse order) or relevance (bm25 ranking).
  • --style — reference style for labelling output and parsing --in (default en-sbl).

info — show database metadata

uv run versiref-bible info BIBLE.db

Prints the stored metadata (title, versification, source, build time, …) and the verse count.

list — list available Bibles

uv run versiref-bible list

Lists the databases found on the search path, one per line as name⇥versification⇥verses⇥title. The first column is the name you can pass to show, search, and info.

Development

uv run pytest        # tests
uv run ruff check    # lint
uv run mypy src      # type-check

Metadata

Release files for versiref-bible 0.5.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for versiref-bible 0.5.1
File Size Uploaded Provenance Actions
versiref_bible-0.5.1.tar.gz 40.1 kB Without provenance Details for versiref_bible-0.5.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for versiref-bible 0.5.1
File Interpreter ABI Platform Actions
versiref_bible-0.5.1-py3-none-any.whl Python 3 none any Details for versiref_bible-0.5.1-py3-none-any.whl

Total release size: 86.3 kB

Release files / versiref_bible-0.5.1.tar.gz

Download URL versiref_bible-0.5.1.tar.gz
Size 40.1 kB
Tags Source
SHA-256 checksum
How to use checksums
2597562489e5a3b6fcdb0ec4332d41a42823bb19554690d2910ad893462a5bf2
BLAKE2b-256 checksum
How to use checksums
8a98708004e679fd6cedca222d6c71d81ce78b6ce1310d06a073c300b4288d90
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / versiref_bible-0.5.1-py3-none-any.whl

Download URL versiref_bible-0.5.1-py3-none-any.whl
Size 46.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f57e5470e27b63f90a2e2fedc73e061048e61e935a4831060612f666b5458dcb
BLAKE2b-256 checksum
How to use checksums
efecd318a7efa3aa41ffb1b4483b3459426383c0b79ec1ecb70a4bc49d083ce3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for versiref-bible 0.5.1

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page