Pyluach is a Python package for dealing with Hebrew (Jewish) calendar dates.
Features
Conversion between Hebrew and Gregorian dates
Finding the difference between two dates
Finding a date at a given duration from the given date
Rich comparisons between dates
Finding the weekday of a given date
Finding the weekly Parsha reading of a given date
Getting the holiday occuring on a given date
Generating html and text Hebrew calendars
Installation
Use pip install pyluach.
Documentation
Documentation for pyluach can be found at https://readthedocs.org/projects/pyluach/.
Examples
>>> from pyluach import dates, hebrewcal, parshios
>>> today = dates.HebrewDate.today()
>>> lastweek_gregorian = (today - 7).to_greg()
>>> lastweek_gregorian < today
True
>>> today - lastweek_gregorian
7
>>> greg = dates.GregorianDate(1986, 3, 21)
>>> heb = dates.HebrewDate(5746, 13, 10)
>>> greg == heb
True
>>> purim = dates.HebrewDate(5781, 12, 14)
>>> purim.hebrew_day()
'י״ד'
>>> purim.hebrew_date_string()
'י״ד אדר תשפ״א'
>>> purim.hebrew_date_string(True)
'י״ד אדר ה׳תשפ״א'
>>> rosh_hashana = dates.HebrewDate(5782, 7, 1)
>>> rosh_hashana.holiday()
'Rosh Hashana'
>>> rosh_hashana.holiday(hebrew=True)
'ראש השנה'
>>> (rosh_hashana + 3).holiday()
None
>>> month = hebrewcal.Month(5781, 10)
>>> month.month_name()
'Teves'
>>> month.month_name(True)
'טבת'
>>> month + 3
Month(5781, 1)
>>> for month in hebrewcal.Year(5774).itermonths():
... print(month.month_name())
Tishrei Cheshvan ...
>>> date = dates.GregorianDate(2010, 10, 6)
>>> parshios.getparsha(date)
[0]
>>> parshios.getparsha_string(date, israel=True)
'Beraishis'
>>> parshios.getparsha_string(date, hebrew=True)
'בראשית'
>>> new_date = dates.GregorianDate(2021, 3, 10)
>>> parshios.getparsha_string(new_date)
'Vayakhel, Pekudei'
>>> parshios.getparsha_string(new_date, hebrew=True)
'ויקהל, פקודי'
Contact
For questions and comments please raise an issue in github or contact me at simlist@gmail.com.
License
Pyluach is licensed under the MIT license.
Metadata
Release files for pyluach 2.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyluach-2.3.0.tar.gz | 26.9 kB | Without provenance | Details for pyluach-2.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyluach-2.3.0-py3-none-any.whl | Python 3 | none | any | Details for pyluach-2.3.0-py3-none-any.whl |
Total release size: 52.8 kB
Release files / pyluach-2.3.0.tar.gz
| Download URL | pyluach-2.3.0.tar.gz |
|---|---|
| Size | 26.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ec6e30669d1df50c9ca160486da44a8195bb4c7a5d3d533990d0c5b03accd281
|
|
BLAKE2b-256 checksum How to use checksums |
111142568c1568a75f8803c59f26d29af01a0890352b7a8e03d41ecda8bfb5dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.28.2
|
Release files / pyluach-2.3.0-py3-none-any.whl
| Download URL | pyluach-2.3.0-py3-none-any.whl |
|---|---|
| Size | 25.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4497b731aef59508b079dbf5f00bc5bf4329ac45090a6cd37b5a83756f0e69ab
|
|
BLAKE2b-256 checksum How to use checksums |
8ac8f96208ade3ca4c23b372497d0788bcf0f2e0ff4310e5ee693366bc33fdf0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.28.2
|
Security for pyluach 2.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.