Overview
Rokh provides a unified interface for accessing Iranian calendar events across Jalali, Gregorian, and Hijri date systems. It lets you easily retrieve national holidays, cultural events, and religious occasions by simply passing a date. It automatically converts between calendars and return event's description. You can use it in your apps, bots, and research tools that rely on Iranian date conversions, holidays, and cultural event data.
In Farsi, Rokh is derived from Rokhdad, meaning "event." Rokh itself also means "face" and even refers to the "rook" piece in chess.
| PyPI Counter |
|
| Github Stars |
|
| Branch | main | dev |
| CI |
|
|
| Code Quality |
Installation
PyPI
- Check Python Packaging User Guide
- Run
pip install rokh==0.4
Source code
- Download Version 0.4 or Latest Source
- Run
pip install .
Usage
Get events
Use get_events to retrieve all Iranian calendar events for a given date.
Simply specify the date (in Jalali, Gregorian, or Hijri format), and the function returns corresponding events.
>>> from rokh import get_events, DateSystem
>>> get_events(day=1, month=1, year=1403, input_date_system=DateSystem.JALALI)
# {
# 'events': {
# 'gregorian': [
# {
# 'description': 'روز جهانی شادی',
# 'is_holiday': False
# }
# ],
# 'hijri': [],
# 'jalali': [
# {
# 'description': 'جشن نوروز/جشن سال نو',
# 'is_holiday': True
# }
# ]
# },
# 'gregorian_date': {'day': 20, 'month': 3, 'year': 2024},
# 'hijri_date': {'day': 10, 'month': 9, 'year': 1445},
# 'jalali_date': {'day': 1, 'month': 1, 'year': 1403},
# 'is_holiday': True,
# 'input_date_system': 'jalali',
# 'event_date_system': 'all'
# }
Get today events
Use get_today_events to retrieve today events.
>>> from rokh import get_today_events, DateSystem
>>> get_today_events()
# {
# 'events': {
# 'gregorian': [
# {
# 'description': 'روز جهانی شادی',
# 'is_holiday': False
# }
# ],
# 'hijri': [],
# 'jalali': [
# {
# 'description': 'جشن نوروز/جشن سال نو',
# 'is_holiday': True
# }
# ]
# },
# 'gregorian_date': {'day': 20, 'month': 3, 'year': 2024},
# 'hijri_date': {'day': 10, 'month': 9, 'year': 1445},
# 'jalali_date': {'day': 1, 'month': 1, 'year': 1403},
# 'is_holiday': True,
# 'input_date_system': 'gregorian',
# 'event_date_system': 'all'
# }
Issues & bug reports
Just fill an issue and describe it. We'll check it ASAP! or send an email to rokh@openscilab.com.
- Please complete the issue template
You can also join our discord server
References
1- ساعت و تقویم ایران | تاریخ امروز | Time.ir
2- Jalali Holiday API
3- United Nations List of International Days and Weeks
4- تقویم ایران | باحساب
Show your support
Star this repo
Give a ⭐️ if this project helped you!
Donate to our project
If you do like our project and we hope that you do, can you please support us? Our project is not and is never going to be working for profit. We need the money just so we can continue doing what we do ;-) .
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
Unreleased
0.4 - 2026-04-29
Added
- Bahesab calendar events
Changed
README.mdupdated
0.3 - 2025-12-21
Added
- United nations list of international days and weeks
Changed
README.mdupdated- Gregorian events typo fixed
0.2 - 2025-11-20
Added
- Logo
get_today_eventsfunction- Event issue template
Changed
README.mdupdatedget_eventsfunction current year bug fixed
0.1 - 2025-10-25
Added
get_eventsfunctionDateSystemenum- Jalali events
- Gregorian events
- Hijri events
Metadata
Release files for rokh 0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| rokh-0.4.tar.gz | 46.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| rokh-0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 89.8 kB
Release files / rokh-0.4.tar.gz
| Download URL | rokh-0.4.tar.gz |
|---|---|
| Size | 46.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d0da7653befaec1a65a140fc481d3a5b12cb35520e6a5bf4c51d01e35d9836c5
|
|
BLAKE2b-256 checksum How to use checksums |
914a1eb91a3d58cfcffd21bb5cc7d3c998bf55ef1e2d7235246abfc75cc49468
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Release files / rokh-0.4-py3-none-any.whl
| Download URL | rokh-0.4-py3-none-any.whl |
|---|---|
| Size | 43.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9bf78b554c50bcdf19b6ad36481ad3c6c328f41633a541765188c024b7f823af
|
|
BLAKE2b-256 checksum How to use checksums |
3df51c17418e6379fcd3222b34c85744bd6ba0ea43438857ec8eb1321036f283
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|