Skip to main content
Rokh Logo

Rokh: Iranian Calendar Events Collection


PyPI version built with Python3 GitHub repo size Discord Channel

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 CodeFactor

Installation

PyPI

Source code

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'
# }

Is holiday

Use is_holiday to see if a day is holiday.

>>> from rokh import is_holiday, DateSystem
>>> is_holiday(day=13, month=1, year=1450, event_date_system=DateSystem.JALALI)
True

Is today holiday

Use is_today_holiday to see if today is a holiday.

>>> from rokh import is_today_holiday
>>> is_today_holiday()
True

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

Discord Channel

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 ;-) .

Rokh Donation

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.5 - 2026-10-06

Added

  • RokhError class
  • is_holiday function
  • is_today_holiday function
  • _validate_date function
  • _has_holiday function

Changed

  • get_events function modified
  • Typing modified
  • Dependencies structure modified
  • Test system modified
  • Jalali events updated
  • README.md updated
  • Validation system modified

0.4 - 2026-04-29

Added

  • Bahesab calendar events

Changed

  • README.md updated

0.3 - 2025-12-21

Added

  • United nations list of international days and weeks

Changed

  • README.md updated
  • Gregorian events typo fixed

0.2 - 2025-11-20

Added

  • Logo
  • get_today_events function
  • Event issue template

Changed

  • README.md updated
  • get_events function current year bug fixed

0.1 - 2025-10-25

Added

  • get_events function
  • DateSystem enum
  • Jalali events
  • Gregorian events
  • Hijri events

Metadata

Release files for rokh 0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rokh 0.5
File Size Uploaded
rokh-0.5.tar.gz 47.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rokh 0.5
File Interpreter ABI Platform
rokh-0.5-py3-none-any.whl Python 3 none any Details

Total release size: 92.1 kB

Release files / rokh-0.5.tar.gz

Download URL rokh-0.5.tar.gz
Size 47.9 kB
Tags Source
SHA-256 checksum
How to use checksums
69d2c255313c493feef7f15bae14f458a2089b7511a8d6c938d552cc39e4105f
BLAKE2b-256 checksum
How to use checksums
35a19b422c80da7256a29380c12a8e3ddeede9cc56d1496171922be77a00801c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / rokh-0.5-py3-none-any.whl

Download URL rokh-0.5-py3-none-any.whl
Size 44.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b230ab4a5822b23feaafea5b38140838230c20a12c2b94029811f790c3d36756
BLAKE2b-256 checksum
How to use checksums
930c15e0c459501fd31e95cb8c3cdb8ab4a33908ee7162c721e1b210d4488f50
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

This release

0.5 This release

2 release files

0.4

2 release files

0.3

2 release files

0.2

2 release files

0.1

2 release files

0.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page