Skip to main content

biblia-ruf (Python)

Python port of biblia-ruf — the Hungarian RÚF Biblia (Revideált új fordítás). Passage lookup, full-text search, book metadata, and a deterministic daily verse.

The full Bible text is bundled inside the package, so it works completely offline — no filesystem layout or network access required. Output is byte-for-byte compatible with the JavaScript package (verified by parity tests), so a Python backend and a JS frontend return the same daily verse and search results for the same inputs.

Install

pip install biblia-ruf

Import name is biblia_ruf:

import biblia_ruf

Usage

from biblia_ruf import (
    get_bible_passage,
    search_bible,
    get_daily_verse,
    get_book_details,
    get_bible_books,
)

# Passage lookup — single verse, range, comma list, whole chapter, multi-passage.
get_bible_passage("Jn 3:16")
# [BibleVerse(verse="16", text="Mert úgy szerette Isten a világot…")]

get_bible_passage("Zsolt 139:23-24")
get_bible_passage("Zsolt 100")            # whole chapter

# Full-text search (query is a regular expression).
search_bible("szeretet", limit=10)
search_bible("Isten", testament="old", limit=5)
search_bible("kegyelem", book="Róm")

# Deterministic verse of the day (same date → same verse).
get_daily_verse()
from datetime import date
get_daily_verse(date(2025, 12, 25))

# Book metadata and lists.
get_book_details("Zsolt")                 # BookDetails(name="A Zsoltárok könyve", chapters=150, …)
len(get_bible_books())                    # 66

API

Function Returns Notes
get_bible_passage(passage) list[BibleVerse] Uses the first reference in the string.
search_bible(query, *, testament=None, book=None, case_sensitive=False, limit=100) list[SearchResult] query is a regex; results in canonical book order.
get_daily_verse(target=None) DailyVerseResult target is a date/datetime; defaults to today.
get_book_details(book) BookDetails book is a Hungarian abbreviation, e.g. "Zsolt".
get_bible_books() / _old_testament() / _new_testament() list[BibleBook] 66 / 39 / 27 books.
parse_passage(passage) list[ParsedPassage] Reference parser.
validate_book(abbr) / validate_all_books() list[ValidationError] Data-integrity checks.

All return types are frozen dataclasses exported from the package root. Book abbreviations are the Hungarian toc3 forms (1Móz, Zsolt, Jn, Róm, …) and are matched case-sensitively, matching the JS package.

Development

Requires Python 3.10+ and uv.

uv sync                        # create the venv and install dev deps
uv run ruff check .            # lint
uv run ruff format --check .   # format check
uv run pytest                  # run tests (incl. JS parity)

Refreshing the bundled data

When the upstream Hungarian text is corrected, re-vendor the JSON from the JS repo:

python scripts/sync_data.py --source ../biblia-ruf/json   # from a local checkout
python scripts/sync_data.py --from-github                 # or download from GitHub

Regenerating parity fixtures

tests/golden/ is produced by running the JS package over a fixed set of inputs. After an intentional behavior change, regenerate it against a local biblia-ruf checkout:

BIBLIA_JS_DIST=../biblia-ruf/dist/index.mjs node scripts/gen_golden.mjs

Releasing

Publishing to PyPI is automated via GitHub Actions trusted publishing (OIDC — no API tokens). One-time setup on pypi.org: add a pending publisher for project biblia-ruf pointing at repo kulcsarrudolf/biblia-ruf-py, workflow release.yml (leave the environment field blank). Then cut a release by pushing a tag:

git tag v0.1.0
git push origin v0.1.0

The release.yml workflow builds the sdist + wheel and publishes them to PyPI.

License

MIT — see LICENSE.

Metadata

Release files for biblia-ruf 0.1.0

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

Source distribution (sdist)

Source distribution for biblia-ruf 0.1.0
File Size Uploaded Provenance Actions
biblia_ruf-0.1.0.tar.gz 1.6 MB With provenance Details for biblia_ruf-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for biblia-ruf 0.1.0
File Interpreter ABI Platform Actions
biblia_ruf-0.1.0-py3-none-any.whl Python 3 none any Details for biblia_ruf-0.1.0-py3-none-any.whl

Total release size: 3.2 MB

Release files / biblia_ruf-0.1.0.tar.gz

Download URL biblia_ruf-0.1.0.tar.gz
Size 1.6 MB
Tags Source
SHA-256 checksum
How to use checksums
633f61eafd29197f8688109a5b164099500af969d752cd36b3e0d4dbd8b70330
BLAKE2b-256 checksum
How to use checksums
4091d8ee2476250246e73903bfe88f7d78f147fd80d084f06fa26137791c08d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 1, 2026.

Transparency log

Release files / biblia_ruf-0.1.0-py3-none-any.whl

Download URL biblia_ruf-0.1.0-py3-none-any.whl
Size 1.6 MB
Tags Python 3
SHA-256 checksum
How to use checksums
f06e61db2970128659e54812bb214e9d724f70a2135af750bff0fb07b1561907
BLAKE2b-256 checksum
How to use checksums
7bb21cf1519dd4369704ff6627e52b3ae2cbfabe9a53016a39bab8eda938a75c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 1, 2026.

Transparency log

Security for biblia-ruf 0.1.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for biblia_ruf-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 1, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

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