Metadata-Version: 2.4
Name: gradelytics
Version: 0.1.0
Summary: A simple Python utility library for grade calculation, GPA/CGPA conversion, and attendance eligibility checks.
Author-email: Amna Khurram <Amnakh1020@gmail.com>
Project-URL: Homepage, https://github.com/amnadev-ds/gradelytics
Project-URL: Repository, https://github.com/amnadev-ds/gradelytics
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# gradelytics

A simple Python utility library for grade calculation, GPA/CGPA conversion, and attendance eligibility checks — built for students who want to track their academic performance programmatically.

## Installation

```bash
pip install gradelytics
```

## Usage

```python
from gradelytics import calculate_grade, marks_to_gpa, calculate_cgpa, check_attendance_eligibility

# Convert marks to letter grade
grade = calculate_grade(78)
print(grade)  # "B+"

# Convert marks to GPA (4.0 scale)
gpa = marks_to_gpa(78)
print(gpa)  # 3.3

# Calculate CGPA across semesters
semester_gpas = [3.7, 4.0, 3.0]
credit_hours = [3, 4, 3]
cgpa = calculate_cgpa(semester_gpas, credit_hours)
print(cgpa)  # 3.57

# Check attendance eligibility (75% threshold)
eligible, percentage = check_attendance_eligibility(40, 32)
print(eligible, percentage)  # True 80.0
```

## Functions

- `calculate_grade(marks)` — Returns letter grade (A, A-, B+, B, C+, C, D, F) based on marks.
- `marks_to_gpa(marks)` — Converts marks into an individual 4.0-scale GPA.
- `calculate_cgpa(gpa_list, credit_hours_list)` — Calculates weighted CGPA across multiple semesters.
- `check_attendance_eligibility(total_classes, attended_classes)` — Checks if attendance meets the 75% exam eligibility threshold.

## License

MIT License

## Author

Amna Khurram
