parshios module

The parshios module has functions to find the weekly parasha.

Examples

>>> from pyluach import dates, parshios
>>> date = dates.HebrewDate(5781, 10, 5)
>>> parshios.getparsha(date)
'Vayigash'
>>> parshios.getparsha_string(date, hebrew=True)
'ויגש'
>>> parshios.getparsha_string(dates.GregorianDate(2021, 3, 7), hebrew=True)
'ויקהל, פקודי'

Note

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.PARSHIOS

A list of the parshios transliterated into English.

Type

list of str

pyluach.parshios.PARSHIOS_HEBREW

A list of the parshios in Hebrew.

Type

list of str

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, or JulianDay) – 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 to False.

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, hebrew=False)[source]

Return the parsha as a string for the given date.

This function wraps getparsha returning the parsha name.

Parameters
  • date (HebrewDate, GregorianDate, or JulianDay) – 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 to False.

  • hebrew (bool, optional) – True if you want the name of the parsha in Hebrew. Defaults to False.

Returns

The name of the parsha separated 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 to False

Yields

list of ints or None – A list of the numbers of the parshios for the next Shabbos in the given year. Yields None 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 to False.

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