Metadata-Version: 2.4
Name: rokh
Version: 0.4
Summary: Rokh: Iranian Calendar Events Collection
Home-page: https://github.com/openscilab/rokh
Download-URL: https://github.com/openscilab/rokh/tarball/v0.4
Author: Rokh Development Team
Author-email: rokh@openscilab.com
License: MIT
Project-URL: Source, https://github.com/openscilab/rokh
Keywords: events date date-system calendar gregorian hijri jalali
Classifier: Development Status :: 3 - Alpha
Classifier: Natural Language :: English
Classifier: Natural Language :: Persian
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: End Users/Desktop
Classifier: Intended Audience :: Manufacturing
Classifier: Topic :: Education
Classifier: Topic :: Office/Business :: Scheduling
Classifier: Topic :: Utilities
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: AUTHORS.md
Requires-Dist: jdatetime>=3.8.2
Requires-Dist: hijridate>=2.3.0
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: download-url
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: project-url
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary


<div align="center">
    <img src="https://github.com/openscilab/rokh/raw/main/otherfiles/logo.png" alt="Rokh Logo" width="250">
    <h1>Rokh: Iranian Calendar Events Collection</h1>
    <br/>
    <a href="https://codecov.io/gh/openscilab/rokh"><img src="https://codecov.io/gh/openscilab/rokh/graph/badge.svg?token=9AH3WVVWF4"></a>
    <a href="https://badge.fury.io/py/rokh"><img src="https://badge.fury.io/py/rokh.svg" alt="PyPI version"></a>
    <a href="https://www.python.org/"><img src="https://img.shields.io/badge/built%20with-Python3-green.svg" alt="built with Python3"></a>
    <a href="https://github.com/openscilab/rokh"><img alt="GitHub repo size" src="https://img.shields.io/github/repo-size/openscilab/rokh"></a>
    <a href="https://discord.gg/G73QMkmVzg"><img src="https://img.shields.io/discord/1064533716615049236.svg" alt="Discord Channel"></a>
</div>

----------


## Overview
<p align="justify">
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.

</p>

<table>
    <tr>
        <td align="center">PyPI Counter</td>
        <td align="center">
            <a href="https://pepy.tech/projects/rokh">
                <img src="https://static.pepy.tech/badge/rokh">
            </a>
        </td>
    </tr>
    <tr>
        <td align="center">Github Stars</td>
        <td align="center">
            <a href="https://github.com/openscilab/rokh">
                <img src="https://img.shields.io/github/stars/openscilab/rokh.svg?style=social&label=Stars">
            </a>
        </td>
    </tr>
</table>
<table>
    <tr> 
        <td align="center">Branch</td>
        <td align="center">main</td>
        <td align="center">dev</td>
    </tr>
    <tr>
        <td align="center">CI</td>
        <td align="center">
            <img src="https://github.com/openscilab/rokh/actions/workflows/test.yml/badge.svg?branch=main">
        </td>
        <td align="center">
            <img src="https://github.com/openscilab/rokh/actions/workflows/test.yml/badge.svg?branch=dev">
        </td>
    </tr>
</table>
<table>
    <tr> 
        <td align="center">Code Quality</td>
        <td align="center"><a href="https://www.codefactor.io/repository/github/openscilab/rokh"><img src="https://www.codefactor.io/repository/github/openscilab/rokh/badge" alt="CodeFactor"></a></td>
        <td align="center"><a href="https://app.codacy.com/gh/openscilab/rokh/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade"><img src="https://app.codacy.com/project/badge/Grade/ea874378ce94451f81ef30732c68216c"></a></td>
    </tr>
</table>


## Installation

### PyPI
- Check [Python Packaging User Guide](https://packaging.python.org/installing/)
- Run `pip install rokh==0.4`
### Source code
- Download [Version 0.4](https://github.com/openscilab/rokh/archive/v0.4.zip) or [Latest Source](https://github.com/openscilab/rokh/archive/dev.zip)
- 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.

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

```pycon
>>> 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](mailto:rokh@openscilab.com "rokh@openscilab.com"). 

- Please complete the issue template

You can also join our discord server

<a href="https://discord.gg/G73QMkmVzg">
  <img src="https://img.shields.io/discord/1064533716615049236.svg?style=for-the-badge" alt="Discord Channel">
</a>


## References

<blockquote>1- <a href="https://www.time.ir/">ساعت و تقویم ایران | تاریخ امروز | Time.ir</a></blockquote>
<blockquote>2- <a href="https://holidayapi.ir/">Jalali Holiday API</a></blockquote>
<blockquote>3- <a href="https://www.un.org/en/observances/list-days-weeks">United Nations List of International Days and Weeks</a></blockquote>
<blockquote>4- <a href="https://www.bahesab.ir/time/calendar/">تقویم ایران | باحساب</a></blockquote>


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

<a href="https://openscilab.com/#donation" target="_blank"><img src="https://github.com/openscilab/rokh/raw/main/otherfiles/donation.png" width="270" alt="Rokh Donation"></a>
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [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


[Unreleased]: https://github.com/openscilab/rokh/compare/v0.4...dev
[0.4]: https://github.com/openscilab/rokh/compare/v0.3...v0.4
[0.3]: https://github.com/openscilab/rokh/compare/v0.2...v0.3
[0.2]: https://github.com/openscilab/rokh/compare/v0.1...v0.2
[0.1]: https://github.com/openscilab/rokh/compare/0397711...v0.1
