RÚF Biblia — Revideált új fordítás (Hungarian Reformed Bible) library
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file biblia_ruf-0.1.0.tar.gz.
File metadata
- Download URL: biblia_ruf-0.1.0.tar.gz
- Upload date:
- Size: 1.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
633f61eafd29197f8688109a5b164099500af969d752cd36b3e0d4dbd8b70330
|
|
| MD5 |
16f05133a82a9b00d86c82f5d975e058
|
|
| BLAKE2b-256 |
4091d8ee2476250246e73903bfe88f7d78f147fd80d084f06fa26137791c08d6
|
Provenance
The following attestation bundles were made for biblia_ruf-0.1.0.tar.gz:
Publisher:
release.yml on kulcsarrudolf/biblia-ruf-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
biblia_ruf-0.1.0.tar.gz -
Subject digest:
633f61eafd29197f8688109a5b164099500af969d752cd36b3e0d4dbd8b70330 - Sigstore transparency entry: 2033140488
- Sigstore integration time:
-
Permalink:
kulcsarrudolf/biblia-ruf-py@f9d74cebb7b58884e12b9800d9c1dc06a5b40de0 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/kulcsarrudolf
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@f9d74cebb7b58884e12b9800d9c1dc06a5b40de0 -
Trigger Event:
push
-
Statement type:
File details
Details for the file biblia_ruf-0.1.0-py3-none-any.whl.
File metadata
- Download URL: biblia_ruf-0.1.0-py3-none-any.whl
- Upload date:
- Size: 1.6 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f06e61db2970128659e54812bb214e9d724f70a2135af750bff0fb07b1561907
|
|
| MD5 |
2deaecb9770360bc53fcdff6f3b1a9b5
|
|
| BLAKE2b-256 |
7bb21cf1519dd4369704ff6627e52b3ae2cbfabe9a53016a39bab8eda938a75c
|
Provenance
The following attestation bundles were made for biblia_ruf-0.1.0-py3-none-any.whl:
Publisher:
release.yml on kulcsarrudolf/biblia-ruf-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
biblia_ruf-0.1.0-py3-none-any.whl -
Subject digest:
f06e61db2970128659e54812bb214e9d724f70a2135af750bff0fb07b1561907 - Sigstore transparency entry: 2033140618
- Sigstore integration time:
-
Permalink:
kulcsarrudolf/biblia-ruf-py@f9d74cebb7b58884e12b9800d9c1dc06a5b40de0 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/kulcsarrudolf
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@f9d74cebb7b58884e12b9800d9c1dc06a5b40de0 -
Trigger Event:
push
-
Statement type: