Metadata-Version: 2.4
Name: leave-utils
Version: 1.0.1
Summary: A Python library for leave management calculations, balance tracking and policy enforcement.
Author: Sowmya Hakkandi
Author-email: sowmyahakkandi@email.com
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: requires-python
Dynamic: summary

# leave-utils

A Python library for leave management applications. Provides business day calculations, leave balance management and policy enforcement.

## Installation

````pip install leave-utils```

## Classes

### LeaveCalculator
Calculates the number of working days between two dates, excluding weekends and Irish public holidays.

### LeaveBalanceManager
Manages and validates employee leave balances and entitlements for different leave types including annual, sick, maternity, paternity and unpaid leave.

### LeavePolicyEngine
Enforces organisational leave policies including minimum notice periods, maximum consecutive days and documentation requirements.

## Usage

```python
from leave_utils import LeaveCalculator, LeaveBalanceManager, LeavePolicyEngine
from datetime import date

# Calculate working days
calc = LeaveCalculator()
days = calc.count_working_days(date(2025, 1, 6), date(2025, 1, 10))
print(days)  # 5

# Check balance
manager = LeaveBalanceManager()
remaining = manager.calculate_remaining('annual', days_used=5)
print(remaining)  # 15

# Validate policy
policy = LeavePolicyEngine(min_notice_days=3)
result = policy.validate_request(date(2025, 2, 10), date(2025, 2, 14), 'annual', 5)
print(result)  # {'valid': True, 'errors': []}
```

## License

MIT
````
