Skip to main content

Verbum is a Rich-powered command-line and API tool for reading, searching, and exploring the Bible interactively.

Project description

Verbum 0.3.0

Python Version License: MIT

Verbum is a Rich-powered Bible companion that now ships with both a colorful terminal experience and a lightweight JSON API. Version 0.3.0 introduces full-text search, consistent pagination, and a shared service layer between the CLI and FastAPI app.

Features

  • Instant lookups for single verses, verse ranges, or entire chapters.
  • Keyword search via the :search CLI command and the /lookup API endpoint.
  • Sequential navigation with :next / :prev, backed by navigation history.
  • Typo-tolerant book resolution (GenesissGenesis).
  • JSON responses modeled with Pydantic, including pagination metadata and optional book filtering.
  • Swappable Bible dataset (defaults to verbum/data/KJV.json).

Installation

Requires Python 3.10 or newer.

pip install -e .
# Once published to PyPI:
# pip install verbum

Run the CLI

verbum
# or
python -m verbum.cli.main

Run the API

uvicorn api.main:app --reload

The server starts at http://127.0.0.1:8000 by default.

Quick Start (CLI)

Supported inputs:

  • Book Chapter → entire chapter (e.g., Genesis 1).
  • Book Chapter:Verse → single verse (e.g., John 3:16).
  • Book Chapter:Start-End → verse range (e.g., Psalm 23:1-4).
  • :search grace → keyword search across the dataset.
  • :next / :prev → navigate relative to your last passage.
  • :help → list available commands.
  • :quit, exit, or q → exit the CLI.

Using the API

GET /lookup accepts a free-form query and optional pagination parameters:

  • GET /lookup?q=grace
  • GET /lookup?q=faith&book=Romans
  • GET /lookup?q=love&page_size=10&page=2

Passing page_size=0 disables pagination and streams the full result set in a single response. When book is provided, results are restricted to that book and total_results reflects the filtered count.

Example Output

CLI (:search grace)

🔍 Search results for 'grace'
Romans 3:24 - Being justified freely by his grace through the redemption that is in Christ Jesus:
Romans 4:4 - Now to him that worketh is the reward not reckoned of grace, but of debt.
...

CLI search screenshot

API (GET /lookup?q=faith&book=Romans&page_size=5)

{
  "query": "faith",
  "page": 1,
  "page_size": 5,
  "total_pages": 10,
  "total_results": 50,
  "results": [
    {
      "book": "Romans",
      "chapter": 1,
      "verse": 8,
      "text": "First, I thank my God through Jesus Christ for you all, that your faith is spoken of throughout the whole world."
    }
  ]
}

API lookup screenshot

The FastAPI startup banner can be captured for documentation at docs/images/api-startup.png.

Bible Data & Configuration

  • The bundled dataset lives at verbum/data/KJV.json.

  • To use another translation, point BIBLE_PATH to a compatible JSON file:

    export BIBLE_PATH=/path/to/another_bible.json
    verbum
    

Development

pytest -v
uvicorn api.main:app --reload

Pull requests are welcome. Please include tests for new features or fixes.

License

MIT

Project details


Download files

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

Source Distribution

verbum_cli-0.3.0.tar.gz (2.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

verbum_cli-0.3.0-py3-none-any.whl (2.9 MB view details)

Uploaded Python 3

File details

Details for the file verbum_cli-0.3.0.tar.gz.

File metadata

  • Download URL: verbum_cli-0.3.0.tar.gz
  • Upload date:
  • Size: 2.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for verbum_cli-0.3.0.tar.gz
Algorithm Hash digest
SHA256 55583b6e0892c7e3646e755dd60047e72a746bbbc99dab88db0abf3cb47273db
MD5 16ed9b5c84190fd0c994e199fc2cce5e
BLAKE2b-256 0bd7988374f3929e6c4cb34c97839bb988bac3824c9f8ce272685b085826cd75

See more details on using hashes here.

File details

Details for the file verbum_cli-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: verbum_cli-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 2.9 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for verbum_cli-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 754998b40d0cab88d9e28021919cee6f831db9ac44dfe448216a19c45cbbdc18
MD5 28e5812a66034abf62dd7bd3e4ec1724
BLAKE2b-256 a789b6426692821e1edada80ef86fc47f6425a4493bc3093bf39e2a5b5bf70b6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page