A comprehensive library for Persian and international holidays.
Project description
X-Holidays
A comprehensive Python library for managing Persian (Jalali), International, and Islamic holidays, as well as famous birthdays.
Features
- Jalali Date Support
- National & Seasonal Holidays
- International Observances
- Famous Birthdays
- Islamic Holidays
Files
X-Holidays/
├── LICENSE
├── MANIFEST.in
├── README.md
├── requirements.txt
├── setup.py
├── test_app.py
└── x_holidays/
---->├── init.py
---->├── utils.py
---->├── seasons.py
---->├── global_events.py
---->├── birthdays.py
---->└── islamic.py
Installation
pip install git+https://github.com/Amir-X/X-Holidays.git
- Or:
pip install X-Holidays
- Or clone and install locally:
git clone https://github.com/Amir-X/X-Holidays.git
cd X-Holidays
pip install -e .
Usage
from x_holidays import Holiday
manager = Holiday()
# Get all holidays for Jalali Year 1403
holidays = manager.get_all_holidays(1403)
for h in holidays[:5]:
print(h)
# Search for a keyword
results = manager.search_by_keyword("nowruz")
print(results)
# Check if a specific date is a holiday
import jdatetime
date_to_check = jdatetime.date(1403, 1, 1)
if manager.is_holiday(date_to_check):
print(f"{date_to_check} is a holiday!")
Author
Amir-X
Requirements
jdatetime>=4.1.0 hijri-converter>=2.2.0
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file x_holidays-1.0.2.tar.gz.
File metadata
- Download URL: x_holidays-1.0.2.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1dfd97cd72b9e58df3b0fe987dcee1d1435dff51a62926dd25c575e2069c33a5
|
|
| MD5 |
efac70f90627273c28ed386cd39d6523
|
|
| BLAKE2b-256 |
917e103257d82676e92debed922815bc93e095e416378ee4aeb5054071129bf3
|
File details
Details for the file x_holidays-1.0.2-py3-none-any.whl.
File metadata
- Download URL: x_holidays-1.0.2-py3-none-any.whl
- Upload date:
- Size: 9.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2db6514f984382ad0fb598124f28c59da7ae453c401ab6ea569ded57985dbb78
|
|
| MD5 |
cdd0db4089a669fd9a526e2ee29bad91
|
|
| BLAKE2b-256 |
6ce6323607ebddb4bfab648a67fcbde597840787a195c34b0294b5307b42fbeb
|