parshios module¶
This module has functions to find the weekly parasha for a given Shabbos.
-
pyluach.parshios.
PARSHIOS
¶ A list of all of the parsha names starting with Beraishis through V’zos Habrocha.
- Type
list of str
Notes
The algorithm is based on Dr. Irv Bromberg’s, University of Toronto at http://individual.utoronto.ca/kalendis/hebrew/parshah.htm
All parsha names are transliterated into the American Ashkenazik pronunciation.
-
pyluach.parshios.
getparsha
(date, israel=False)[source]¶ Return the parsha for a given date.
Returns the parsha for the Shabbos on or following the given date.
- Parameters
date (
HebrewDate
,GregorianDate
, orJulianDay
) – This date does not have to be a Shabbos.israel (bool, optional) –
True
if you want the parsha according to the Israel schedule (with only one day of Yom Tov). Defaults toFalse
.
- Returns
A list of the numbers of the parshios for the Shabbos of the given date, beginning with 0 for Beraishis, or
None
if the Shabbos doesn’t have a parsha (i.e. it’s on Yom Tov).- Return type
list of ints or
None
-
pyluach.parshios.
getparsha_string
(date, israel=False)[source]¶ Return the parsha as a string for the given date.
This function wraps
getparsha
returning a the parsha name transliterated into English.- Parameters
date (
HebrewDate
,GregorianDate
, orJulianDay
) – This date does not have to be a Shabbos.israel (bool, optional) –
True
if you want the parsha according to the Israel schedule (with only one day of Yom Tov). Defaults toFalse
.
- Returns
The name of the parsha seperated by a comma and space if it is a double parsha or
None
if there is no parsha that Shabbos (ie. it’s yom tov).- Return type
str or
None
-
pyluach.parshios.
iterparshios
(year, israel=False)[source]¶ Generate all the parshios in the year.
- Parameters
year (int) – The Hebrew year to get the parshios for.
israel (bool, optional) –
True
if you want the parsha according to the Israel schedule (with only one day of Yom Tov). Defaults toFalse
- Yields
list of ints or
None
– A list of the numbers of the parshios for the next Shabbos in the given year. YieldsNone
for a Shabbos that doesn’t have its own parsha (i.e. it occurs on a yom tov).
-
pyluach.parshios.
parshatable
(year, israel=False)[source]¶ Return a table of all the Shabbosos in the year
- Parameters
year (int) – The Hebrew year to get the parshios for.
israel (bool, optional) –
True
if you want the parshios according to the Israel schedule (with only one day of Yom Tov). Defaults toFalse
.
- Returns
An ordered dictionary with the date of each Shabbos as the key mapped to the parsha as a list of ints, or
None
for a Shabbos with no parsha.- Return type
OrderedDict