Metadata-Version: 2.4
Name: part-of-day
Version: 0.3.5
Summary: This is an astral wrapper, that adds functionality for getting the part of day for a spesific datetime.
Author: mkomser
Author-email: mkomser@gmail.com
Requires-Python: >=3.9,<4.0
Classifier: Programming Language :: Python :: 3
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
Requires-Dist: astral (>=3.2,<4.0)
Description-Content-Type: text/markdown

# Part of Day

This is an astral package wrapper, that uses it's calculations to give the part of day, instead of giving time intervals for spesific parts.

## Installation
To install, run the following command

```
pip install part-of-day
```

## Usage
```python
from part_of_day import PartOfDayCalculator

from datetime import datetime, timezone

pod = PartOfDayCalculator(latitude=15.33, longitude=-7)

# following methods gives results related to now, if a datetime is not given
pod.is_it_day()
# True
pod.is_it_night()
# False
pod.get_part_of_day()
# <PartOfDay.DAY: 'Day'>

# or they can be used with a datetime
dt = datetime(2025, 3, 12, 6, 13, 25, 0, timezone.utc)

pod.is_it_day(dt)
# False
pod.is_it_night(dt)
# True
pod.get_part_of_day(dt)
# <PartOfDay.NIGHT: 'Night'>
```
