Celtic Tree Calendar¶
A Celtic tree calendar (Ogham tree zodiac) engine that deterministically classifies a birth date into one of thirteen tree signs by fixed date ranges. The scheme is Robert Graves' 20th-century reconstruction, not an attested ancient calendar; Graves' nameless day (23 December) is folded into Ruis (Elder).
from fortune_telling_core import Querent, ReadingRequest
from fortune_telling_core.traditions.celtic_tree import (
CELTIC_TREE_DECK,
CELTIC_TREE_SPREAD,
build_engine,
)
request = ReadingRequest(
deck_id=CELTIC_TREE_DECK.id,
spread_id=CELTIC_TREE_SPREAD.id,
querent=Querent(
id="sample",
display_name="Sample",
attributes={"birth_datetime": "1990-07-01T00:00:00+00:00"},
),
)
reading = build_engine().cast(request)
celtic_tree ¶
CELTIC_TREE_DECK
module-attribute
¶
CELTIC_TREE_DECK = Deck(
id="celtic_tree.deck.signs.v1",
symbols=tuple(
(
Symbol(
id=sign.symbol_id,
name=sign.tree,
attributes={
"slug": sign.slug,
"ogham": sign.ogham,
"tree": sign.tree,
"cycle_index": str(sign.index),
"date_range": sign.date_range,
},
)
)
for sign in SIGNS
),
)
CELTIC_TREE_SPREAD
module-attribute
¶
CELTIC_TREE_SPREAD = Spread(
id="celtic_tree.spread.birth.v1",
name="Celtic Tree",
positions=(
Position(
"tree_sign",
"Tree Sign",
"Ogham tree sign for the birth date.",
),
),
)
CelticTreeEngine ¶
Bases: AbstractEngine
Celtic tree calendar (Ogham tree zodiac) engine.
The engine deterministically classifies a querent's birth date into one of
thirteen Ogham tree signs by fixed (month, day) date ranges. The scheme
is Robert Graves' 20th-century reconstruction; 23 December (Graves' nameless
day) is folded into Ruis (Elder) so every date classifies.
deck ¶
Return the Celtic tree deck.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
ReadingRequest
|
Reading request whose |
required |
Returns:
| Type | Description |
|---|---|
Deck
|
The bundled Celtic tree deck. |
Raises:
| Type | Description |
|---|---|
ValidationError
|
If the requested deck is unsupported. |
Source code in src/fortune_telling_core/traditions/celtic_tree/engine.py
spread ¶
Return the Celtic tree spread.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
ReadingRequest
|
Reading request whose |
required |
Returns:
| Type | Description |
|---|---|
Spread
|
The bundled Celtic tree spread. |
Raises:
| Type | Description |
|---|---|
ValidationError
|
If the requested spread is unsupported. |
Source code in src/fortune_telling_core/traditions/celtic_tree/engine.py
draw ¶
Classify the birth date into a tree sign as a deterministic draw.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
ReadingRequest
|
Reading request with |
required |
rng
|
Rng
|
Ignored. The argument is present for |
required |
Returns:
| Type | Description |
|---|---|
Draw
|
A draw with the single tree-sign selection. |
Raises:
| Type | Description |
|---|---|
ValidationError
|
If required birth data is invalid. |
Source code in src/fortune_telling_core/traditions/celtic_tree/engine.py
cast ¶
Compute a Celtic tree reading without a caller RNG.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
ReadingRequest
|
Reading request containing birth data. |
required |
Returns:
| Type | Description |
|---|---|
Reading
|
A reading with the tree-sign placement and summary. |
Raises:
| Type | Description |
|---|---|
ValidationError
|
If required birth data is invalid. |
Source code in src/fortune_telling_core/traditions/celtic_tree/engine.py
build_engine ¶
Create a Celtic tree engine.
Returns:
| Type | Description |
|---|---|
CelticTreeEngine
|
A new |