# widetorah
[](https://crates.io/crates/widetorah)
[](https://docs.rs/widetorah)
[](https://opensource.org/licenses/MIT)
Async Rust SDK for the [WideTorah](https://widetorah.com) API. Access all 24 books of the Tanakh, 54 weekly parashot, Talmud tractates and daf pages, Mishnah chapters, Rashi commentary, Jewish holidays, biblical figures, topics, and Hebrew/Aramaic glossary terms.
Built on [widetorah.com](https://widetorah.com) -- a comprehensive Jewish scripture encyclopedia covering Torah, Nevi'im, Ketuvim, Talmud Bavli (63 tractates across 6 sedarim), and rabbinic commentary for scholars and developers.
## Install
```toml
[dependencies]
widetorah = "0.1"
tokio = { version = "1", features = ["full"] }
```
Or via the command line:
```bash
cargo add widetorah tokio --features tokio/full
```
## Quick Start
```rust
use widetorah::Client;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Client::new();
// List all 24 books of the Tanakh
let books = client.list_books().await?;
println!("Total books: {:?}", books.count);
// Get Genesis 1:1 in JPS-1917 translation
let verse = client.get_verse("genesis", 1, 1, "jps-1917").await?;
for v in &verse.results {
println!("{}: {}", v.reference.as_deref().unwrap_or(""), v.text.as_deref().unwrap_or(""));
}
// Search across Torah verses
let results = client.search("covenant").await?;
println!("Found {:?} results for 'covenant'", results.count);
Ok(())
}
```
## What You Can Do
### Tanakh Books and Verses
The Tanakh contains 24 books organized into three sections: Torah (Pentateuch, 5 books), Nevi'im (Prophets, 8 books), and Ketuvim (Writings, 11 books). Translations include JPS-1917, Koren, and Masoretic Hebrew text.
```rust
// List all books
let books = client.list_books().await?;
// Get a specific book
let genesis = client.get_book("genesis").await?;
// Get a verse with Hebrew parallel text
let verse = client.get_verse("psalms", 23, 1, "jps-1917").await?;
```
### Parashot (Weekly Torah Portions)
The Torah is divided into 54 parashot (weekly portions) read in synagogues throughout the year. Each parashah spans a defined range of chapters and verses, following the annual reading cycle.
```rust
// List all 54 parashot
let parashot = client.list_parashot().await?;
// Get a specific parashah
let bereshit = client.get_parashah("bereshit").await?;
```
### Talmud and Mishnah
The Babylonian Talmud comprises 63 tractates organized into 6 sedarim (orders). Each tractate is divided into daf (folio) pages with recto (a) and verso (b) sides, totaling approximately 2,711 folio pages.
| Zeraim | זרעים | 11 | Agricultural laws, blessings |
| Moed | מועד | 12 | Shabbat, festivals, fasts |
| Nashim | נשים | 7 | Marriage, divorce, vows |
| Nezikin | נזיקין | 10 | Civil law, damages, ethics |
| Kodashim | קודשים | 11 | Temple service, sacrifices |
| Tohorot | טהרות | 12 | Ritual purity |
```rust
// List tractates
let tractates = client.list_tractates().await?;
// Get a Talmud daf -- Berakhot 2a
let daf = client.get_talmud_daf("berakhot", 2, "a").await?;
// List Mishnah chapters
let mishnah = client.list_mishnah(Some("berakhot")).await?;
```
### Rashi Commentary and Biblical Figures
Rabbi Shlomo Yitzchaki (Rashi, 1040-1105) wrote the most widely studied Torah commentary. Biblical figures span the patriarchs (Abraham, Isaac, Jacob), prophets (Moses, Elijah, Isaiah), kings (David, Solomon), and judges.
```rust
// List Rashi commentaries for Genesis
let rashi = client.list_rashi(Some("genesis")).await?;
// List biblical figures
let figures = client.list_figures().await?;
let moses = client.get_figure("moses").await?;
```
### Holidays, Topics, and Glossary
Jewish holidays span three categories -- biblical holidays commanded in the Torah, rabbinic holidays instituted by the Sages, and modern holidays commemorating recent events in Jewish history.
| Shabbat | שבת | Biblical | Weekly |
| Pesach (Passover) | פסח | Biblical | Spring (Nisan) |
| Shavuot | שבועות | Biblical | Late Spring (Sivan) |
| Rosh Hashanah | ראש השנה | Biblical | Autumn (Tishrei) |
| Yom Kippur | יום כיפור | Biblical | Autumn (Tishrei) |
| Sukkot | סוכות | Biblical | Autumn (Tishrei) |
| Hanukkah | חנוכה | Rabbinic | Winter (Kislev) |
| Purim | פורים | Rabbinic | Late Winter (Adar) |
The glossary defines Hebrew and Aramaic terms with transliterations, covering words like Torah (instruction), mitzvah (commandment), teshuvah (repentance), tzedakah (justice/charity), and halakhah (Jewish law).
```rust
let holidays = client.list_holidays().await?;
let topics = client.list_topics().await?;
let glossary = client.list_glossary().await?;
```
## API Methods
| `list_books()` | List all 24 books of the Tanakh |
| `get_book(slug)` | Get book details |
| `list_translations()` | List available translations |
| `list_chapters(book)` | List chapters |
| `get_verse(book, chapter, verse, translation)` | Get a specific verse |
| `search(query)` | Search Torah verses |
| `list_parashot()` | List 54 weekly Torah portions |
| `get_parashah(slug)` | Get parashah details |
| `list_tractates()` | List Talmud tractates |
| `get_talmud_daf(tractate, daf, side)` | Get a Talmud daf page |
| `list_mishnah(tractate)` | List Mishnah chapters |
| `list_rashi(book)` | List Rashi commentaries |
| `list_holidays()` | List Jewish holidays |
| `list_figures()` | List biblical figures |
| `get_figure(slug)` | Get figure details |
| `list_topics()` | List thematic topics |
| `list_glossary()` | List Hebrew/Aramaic glossary |
All methods are async and return `Result<T, WideTorahError>`.
## Custom Base URL
```rust
let client = Client::with_base_url("http://localhost:8000/api/v1/torah");
```
## WideHoly Scripture Platform
Part of the [WideHoly](https://wideholy.com) multi-religion scripture platform.
| WideBible | [widebible.com](https://widebible.com) | 66 books, 4 translations, cross-references, study tools |
| WideQuran | [widequran.com](https://widequran.com) | 114 surahs, hadith, tafsir, Quranic people |
| **WideTorah** | [widetorah.com](https://widetorah.com) | **Tanakh, Talmud, Mishnah, Rashi, parashot** |
| WideGita | [widegita.com](https://widegita.com) | Bhagavad Gita, Upanishads, Yoga Sutras, deities |
| WideSutra | [widesutra.com](https://widesutra.com) | Tipitaka, Pali Canon, Buddhist concepts |
| WideHoly | [wideholy.com](https://wideholy.com) | Cross-religion hub, comparison, calendar |
## Also Available
| **Rust** | [widetorah](https://crates.io/crates/widetorah) | `cargo add widetorah` |
| Python | [widetorah](https://pypi.org/project/widetorah/) | `pip install widetorah` |
| TypeScript | [widetorah](https://www.npmjs.com/package/widetorah) | `npm install widetorah` |
## Learn More About Torah and Jewish Texts
- **Scripture**: [Parashot](https://widetorah.com/parashot/) · [Translations](https://widetorah.com/translations/)
- **Reference**: [Figures](https://widetorah.com/figures/) · [Holidays](https://widetorah.com/holidays/) · [Glossary](https://widetorah.com/glossary/)
- **Study**: [Talmud](https://widetorah.com/talmud/) · [Rashi Commentary](https://widetorah.com/developers/)
- **Tools**: [Search](https://widetorah.com/) · [Developer Docs](https://widetorah.com/developers/)
- **API**: [Developer Docs](https://widetorah.com/developers/) · [OpenAPI Spec](https://widetorah.com/api/schema/)
## License
MIT