Python SDK for WideTorah — Torah, Talmud, Rashi commentary, parashot, Jewish holidays
Project description
widetorah
Python SDK for WideTorah — access Torah verses, Talmud daf pages, Rashi commentary, weekly parashot, Jewish holidays, biblical figures, and glossary terms through a clean Python API. Built on httpx with full type hints and a rich CLI.
WideTorah provides structured access to the Jewish scriptural canon: 24 books of the Tanakh with 69,616 verses across 3 translations (Masoretic Hebrew, JPS-1917, Koren), 54 weekly parashot, 2,121 Talmud daf pages across 63 tractates, 3,901 Rashi commentary entries, and 10 Jewish holidays — all from the widetorah.com REST API.
Explore the Torah online at widetorah.com — verse-by-verse reading, Talmud daf browser, parashah calendar, and Jewish encyclopedia.
Table of Contents
- Install
- Quick Start
- What You'll Find on WideTorah
- Command-Line Interface
- API Reference
- API Endpoints
- Learn More About the Torah
- WideHoly Developer Tools
- License
Install
# Core SDK (httpx)
pip install widetorah
# With CLI (rich tables in your terminal)
pip install widetorah[cli]
# Everything
pip install widetorah[all]
Quick Start
from widetorah import WideTorah
with WideTorah() as client:
# Get Genesis 1:1 in JPS-1917 translation
verse = client.get_verse("genesis", 1, 1)
print(verse)
# {'results': [{'reference': 'Genesis 1:1', 'text': 'In the beginning God created...', 'text_hebrew': 'בְּרֵאשִׁית בָּרָא אֱלֹהִים...'}]}
# Browse weekly Torah portions
parashot = client.list_parashot(book="genesis")
print(parashot)
# {'results': [{'name': 'Bereshit', 'hebrew_name': 'בראשית', 'reference': 'Genesis 1:1–6:8'}, ...]}
# Study Talmud — Berakhot 2a
daf = client.get_talmud_daf("berakhot", 2, side="a")
print(daf)
# {'results': [{'tractate_slug': 'berakhot', 'number': 2, 'side': 'a', 'text_hebrew': '...', 'text_english': '...'}]}
# Search for verses about covenant
results = client.search("covenant", limit=5)
for v in results.get("results", []):
print(f"{v['reference']}: {v['text'][:80]}...")
What You'll Find on WideTorah
Tanakh Structure
The Hebrew Bible (Tanakh) is organized into three divisions containing 24 books:
| Division | Hebrew | Books | Description |
|---|---|---|---|
| Torah | תורה | 5 | The Five Books of Moses — Genesis through Deuteronomy |
| Nevi'im | נביאים | 8 | The Prophets — Joshua, Judges, Samuel, Kings, Isaiah, Jeremiah, Ezekiel, Twelve |
| Ketuvim | כתובים | 11 | The Writings — Psalms, Proverbs, Job, Song of Songs, Ruth, Lamentations, Ecclesiastes, Esther, Daniel, Ezra-Nehemiah, Chronicles |
WideTorah serves 69,616 verses across 3 translations:
| Translation | Code | Language | Notes |
|---|---|---|---|
| Masoretic Hebrew | masoretic |
Hebrew | Original consonantal text with vowel pointing (nikkud) |
| JPS 1917 | jps-1917 |
English | Jewish Publication Society classic English translation |
| Koren | koren |
English | Modern Koren Publishers Jerusalem translation |
# List all books in the Torah (Pentateuch)
torah_books = client.list_books(section="torah")
for book in torah_books["results"]:
print(f"{book['name']} ({book['hebrew_name']}) — {book['chapter_count']} chapters, {book['verse_count']} verses")
# Genesis (בראשית) — 50 chapters, 1533 verses
# Exodus (שמות) — 40 chapters, 1213 verses
# ...
Weekly Parashot
The Torah is divided into 54 weekly reading portions (parashot, singular parashah), completing the entire Torah in an annual cycle. Each Shabbat, a designated portion is read publicly in synagogue from the Torah scroll.
The annual reading cycle begins and ends on Simchat Torah. In leap years all 54 portions are read individually; in regular years some portions are combined (doubled) to fit the shorter calendar.
| Book | Parashot | Example |
|---|---|---|
| Genesis | 12 portions | Bereshit, Noach, Lech Lecha, Vayera... |
| Exodus | 11 portions | Shemot, Va'era, Bo, Beshalach... |
| Leviticus | 10 portions | Vayikra, Tzav, Shemini... |
| Numbers | 10 portions | Bamidbar, Naso, Beha'alotcha... |
| Deuteronomy | 11 portions | Devarim, Va'etchanan, Eikev... |
# Get details of the first parashah — Bereshit (Genesis 1:1–6:8)
bereshit = client.get_parashah("bereshit")
print(f"{bereshit['name']} ({bereshit['hebrew_name']})")
print(f"Reference: {bereshit['reference']}")
# Bereshit (בראשית)
# Reference: Genesis 1:1–6:8
Talmud & Mishnah
The Talmud (Babylonian Talmud, Talmud Bavli) is the central text of Rabbinic Judaism, consisting of the Mishnah (oral law codified c. 200 CE) and the Gemara (rabbinical analysis and commentary, c. 500 CE). It is organized into 6 orders (sedarim) containing 63 tractates.
| Seder | Hebrew | Tractates | Subject |
|---|---|---|---|
| Zeraim | זרעים | 11 | Agriculture, blessings, tithes |
| Moed | מועד | 12 | Shabbat, festivals, fast days |
| Nashim | נשים | 7 | Marriage, divorce, vows |
| Nezikin | נזיקין | 10 | Civil/criminal law, ethics (Avot) |
| Kodashim | קדשים | 11 | Temple service, sacrifices, kashrut |
| Tohorot | טהרות | 12 | Ritual purity and impurity |
The Talmud is studied page by page — each folio (daf) has two sides (amud aleph/bet, or a/b). The worldwide Daf Yomi program completes the entire Talmud in a 7.5-year cycle, studying one daf per day (2,711 pages total).
# Browse tractates in Seder Moed (Festivals)
moed = client.list_tractates(seder="moed")
for t in moed["results"]:
print(f"{t['name']} ({t['hebrew_name']}) — {t['daf_count']} daf")
# Shabbat (שבת) — 157 daf
# Eruvin (עירובין) — 105 daf
# ...
# Read Talmud Berakhot 2a — the very first page of the Talmud
daf = client.get_talmud_daf("berakhot", 2, side="a")
# Contains text_hebrew, text_english, text_aramaic
# List Mishnah chapters for a tractate
mishnah = client.list_mishnah(tractate="berakhot")
Rashi Commentary
Rashi (Rabbi Shlomo Yitzchaki, 1040–1105 CE, Troyes, France) wrote the most widely studied commentary on the Torah and Talmud. His Torah commentary is printed alongside the biblical text in virtually every edition of the Chumash.
Rashi's commentary is known for its conciseness, drawing on Midrash and Talmud to explain the plain meaning (peshat) of the text. WideTorah provides 3,901 Rashi commentary entries covering the Five Books of Moses, with both the original Hebrew and English translation.
# Get Rashi's commentary on Genesis chapter 1
rashi_gen1 = client.list_rashi(book="genesis", chapter=1)
for entry in rashi_gen1["results"]:
print(f" Verses {entry['verse_start']}–{entry['verse_end']}: {entry['text_english'][:100]}...")
Jewish Holidays & Biblical Figures
WideTorah covers the major Jewish holidays with their Torah readings, haftarah portions, and Hebrew calendar dates:
| Holiday | Hebrew | Category | Torah Reading |
|---|---|---|---|
| Rosh Hashanah | ראש השנה | Biblical | Genesis 21–22 |
| Yom Kippur | יום כיפור | Biblical | Leviticus 16 |
| Sukkot | סוכות | Biblical | Leviticus 22:26–23:44 |
| Pesach | פסח | Biblical | Exodus 12:21–51 |
| Shavuot | שבועות | Biblical | Exodus 19–20 |
| Hanukkah | חנוכה | Rabbinic | Numbers 7 |
| Purim | פורים | Rabbinic | Exodus 17:8–16 |
| Tisha B'Av | תשעה באב | Rabbinic | Deuteronomy 4:25–40 |
Biblical figures span the entire narrative from the Patriarchs through the Second Temple period — Abraham, Moses, David, Solomon, Elijah, Isaiah, Esther, Daniel, and more.
# List biblical holidays
holidays = client.list_holidays(category="biblical")
# Explore the patriarchs
patriarchs = client.list_figures(era="patriarchs")
for f in patriarchs["results"]:
print(f"{f['name']} ({f['hebrew_name']}) — {f['era']}")
# Get details of a specific figure
moses = client.get_figure("moses")
print(f"{moses['name']}: {moses['description']}")
Command-Line Interface
Install with CLI extras: pip install widetorah[cli]
# Look up a specific verse
widetorah verse genesis 1 1
# Genesis 1:1
# בְּרֵאשִׁית בָּרָא אֱלֹהִים אֵת הַשָּׁמַיִם וְאֵת הָאָרֶץ
# In the beginning God created the heaven and the earth.
# Get parashah details
widetorah parashah bereshit
# Read Talmud daf
widetorah daf berakhot 2 a
# Search Torah verses
widetorah search "covenant" --limit 10
# List Tanakh books (filter by section)
widetorah books --section torah
# List Talmud tractates (filter by seder)
widetorah tractates --seder moed
# List Jewish holidays
widetorah holidays --category biblical
# List biblical figures
widetorah figures --era patriarchs
API Reference
Client Methods
| Method | Description | Returns |
|---|---|---|
list_books(section=) |
List 24 Tanakh books, filter by section | Paginated list |
get_book(slug) |
Book details (name, hebrew_name, chapter/verse counts) | Single book |
list_translations() |
Available translations (JPS-1917, Koren, Masoretic) | Paginated list |
list_chapters(book=) |
Chapters, filter by book slug | Paginated list |
get_verse(book, chapter, verse, translation=) |
Specific verse with Hebrew and translation | Verse result |
search(query, limit=) |
Full-text search across Torah verses | Paginated list |
list_parashot(book=) |
54 weekly Torah portions, filter by book | Paginated list |
get_parashah(slug) |
Parashah details with reference range | Single parashah |
list_tractates(seder=) |
63 Talmud tractates, filter by seder | Paginated list |
get_talmud_daf(tractate, daf, side=) |
Talmud folio page (Hebrew, English, Aramaic) | Daf result |
list_mishnah(tractate=) |
Mishnah chapters, filter by tractate | Paginated list |
list_rashi(book=, chapter=) |
3,901 Rashi commentaries, filter by book/chapter | Paginated list |
list_holidays(category=) |
Jewish holidays, filter by category | Paginated list |
list_figures(era=) |
Biblical figures, filter by era | Paginated list |
get_figure(slug) |
Figure details (name, hebrew_name, era, is_prophet) | Single figure |
list_topics() |
Thematic topics (covenant, creation, law) | Paginated list |
list_glossary() |
Hebrew/Aramaic glossary terms | Paginated list |
API Endpoints
All endpoints are under https://widetorah.com/api/v1/torah/:
| Method | Endpoint | Description |
|---|---|---|
| GET | /books/ |
List Tanakh books (filter: section) |
| GET | /books/{slug}/ |
Book details |
| GET | /translations/ |
List translations |
| GET | /translations/{code}/ |
Translation details |
| GET | /chapters/ |
List chapters (filter: book__slug) |
| GET | /verses/ |
List/search verses (filter: chapter__book__slug, translation__code, search) |
| GET | /parashot/ |
List parashot (filter: book__slug) |
| GET | /parashot/{slug}/ |
Parashah details |
| GET | /tractates/ |
List tractates (filter: seder) |
| GET | /tractates/{slug}/ |
Tractate details |
| GET | /dapim/ |
List Talmud daf (filter: tractate__slug, number, side) |
| GET | /mishnah/ |
List Mishnah chapters (filter: tractate__slug) |
| GET | /rashi/ |
List Rashi commentary (filter: book__slug, chapter) |
| GET | /holidays/ |
List holidays (filter: category) |
| GET | /holidays/{slug}/ |
Holiday details |
| GET | /figures/ |
List biblical figures (filter: era, is_prophet) |
| GET | /figures/{slug}/ |
Figure details |
| GET | /topics/ |
List topics |
| GET | /topics/{slug}/ |
Topic details |
| GET | /glossary/ |
List glossary terms |
| GET | /glossary/{slug}/ |
Glossary term details |
Example
curl -s "https://widetorah.com/api/v1/torah/books/genesis/"
{
"id": 1,
"name": "Genesis",
"slug": "genesis",
"hebrew_name": "בראשית",
"number": 1,
"section": "torah",
"chapter_count": 50,
"verse_count": 1533,
"description": "The first book of the Torah...",
"url": "/torah/genesis/"
}
Full API documentation at widetorah.com/developers/. OpenAPI 3.1.0 spec: widetorah.com/api/schema/.
Learn More About the Torah
- Scripture: Torah Books · Parashot · Translations
- Talmud: Tractates · Rashi Commentary
- Reference: Figures · Holidays · Glossary
- Tools: Developers
- API: OpenAPI Spec
WideHoly Developer Tools
| Package | PyPI | Description |
|---|---|---|
| widetorah | PyPI | Torah, Talmud, Rashi commentary — widetorah.com |
| widebible | PyPI | Bible verses, cross-references, study tools — widebible.com |
| widequran | PyPI | Quran, Hadith, Tafsir commentary — widequran.com |
| widesutra | PyPI | Buddhist sutras, Tipitaka, Pali Canon — widesutra.com |
| widegita | PyPI | Bhagavad Gita, Vedic philosophy — widegita.com |
| wideholy | PyPI | Unified multi-religion scripture SDK — wideholy.com |
Part of the WideHoly open-source scripture tools ecosystem.
License
MIT License — see LICENSE for details.
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 widetorah-0.1.1.tar.gz.
File metadata
- Download URL: widetorah-0.1.1.tar.gz
- Upload date:
- Size: 75.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
21b46fdc3b1c0f3a7f6d8824f0803a4e4901f7d11267a65a91a2deac70f43c2f
|
|
| MD5 |
00a9b89e899b63529ddc9d0c52bdab7b
|
|
| BLAKE2b-256 |
626d640e8ab062cc5d7afc71fd4ba10bf295f01415b9e63fe7d44b3aa7fdea59
|
File details
Details for the file widetorah-0.1.1-py3-none-any.whl.
File metadata
- Download URL: widetorah-0.1.1-py3-none-any.whl
- Upload date:
- Size: 12.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a843fb73ef28857f5cd8f4541c7ef1fc70e7cd4aad5bfbecf7917d674ed60c42
|
|
| MD5 |
aff8de71cdb5e1f7d4d559d58381518b
|
|
| BLAKE2b-256 |
2016dac617d0bef85232346b1a02e33f1fb6a3c91e60024d60be37138a59cef9
|