Skip to main content

Rokh: Iranian Calendar Events Collection

Project description

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

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

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

rokh-0.4.tar.gz (46.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rokh-0.4-py3-none-any.whl (43.2 kB view details)

Uploaded Python 3

File details

Details for the file rokh-0.4.tar.gz.

File metadata

  • Download URL: rokh-0.4.tar.gz
  • Upload date:
  • Size: 46.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for rokh-0.4.tar.gz
Algorithm Hash digest
SHA256 d0da7653befaec1a65a140fc481d3a5b12cb35520e6a5bf4c51d01e35d9836c5
MD5 5d90f867abbc01cddb84b226fde8163d
BLAKE2b-256 914a1eb91a3d58cfcffd21bb5cc7d3c998bf55ef1e2d7235246abfc75cc49468

See more details on using hashes here.

File details

Details for the file rokh-0.4-py3-none-any.whl.

File metadata

  • Download URL: rokh-0.4-py3-none-any.whl
  • Upload date:
  • Size: 43.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for rokh-0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 9bf78b554c50bcdf19b6ad36481ad3c6c328f41633a541765188c024b7f823af
MD5 bb892debd6de3686c78514c860dba936
BLAKE2b-256 3df51c17418e6379fcd3222b34c85744bd6ba0ea43438857ec8eb1321036f283

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page