Metadata-Version: 2.5
Name: pystudentkit
Version: 0.1.0
Summary: A lightweight student productivity toolkit for grades, deadlines, and study planning.
Author: Jaspreet Singh
License-Expression: MIT
License-File: LICENSE
Keywords: education,grades,productivity,students,study-planner
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Education
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
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: Topic :: Education
Classifier: Topic :: Utilities
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# 🎓 PyStudentKit

**A lightweight Python toolkit for student productivity.**

PyStudentKit provides simple, reusable functions for calculating marks, estimating grades, tracking assignment deadlines, and creating practical study plans — all with Python's standard library.

> **Student project**
> - **Author:** Jaspreet Singh
> - **Roll number:** 2432727
> - **Programme:** B.Tech CSE (AI & ML)

## ✨ Features

- 📊 Calculate percentage from obtained and maximum marks
- 🏅 Convert percentage into a configurable letter grade
- ⏳ Find the number of days until a deadline
- 📚 Split study time across a list of subjects
- 🧮 Calculate a weighted average
- 💻 Optional command-line interface
- 🪶 No third-party runtime dependencies

## 📦 Installation

Once published on the official Python Package Index (PyPI):

```bash
python -m pip install PyStudentKit
```

Python package names are case-insensitive for installation; the canonical distribution name is `pystudentkit`.

Until publication, install from a local checkout:

```bash
python -m pip install .
```

## 🚀 Quick start

```python
from pystudentkit import (
    calculate_percentage,
    grade_from_percentage,
    days_until,
    create_study_plan,
    weighted_average,
)

print(calculate_percentage(435, 500))       # 87.0
print(grade_from_percentage(87))             # A
print(days_until("2030-01-01"))              # Days until the date
print(create_study_plan(["Python", "DBMS", "AI"], 6))
# {'Python': 2.0, 'DBMS': 2.0, 'AI': 2.0}
print(weighted_average([80, 90, 70], [0.2, 0.5, 0.3]))  # 82.0
```

## 🧰 Command line

After installation:

```bash
pystudentkit percentage 435 500
pystudentkit grade 87
pystudentkit deadline 2030-01-01
pystudentkit plan 6 Python DBMS AI
```

## 📚 API reference

### `calculate_percentage(obtained, maximum)`

Returns the percentage. Raises `ValueError` if `maximum` is not positive or obtained marks are outside `0..maximum`.

### `grade_from_percentage(percentage, thresholds=None)`

Default thresholds:
- A: 90 and above
- B: 80–89.99
- C: 70–79.99
- D: 60–69.99
- F: below 60

These are example thresholds, not an official university grading policy. Pass your own mapping to customise them.

### `days_until(date_string, from_date=None)`

Returns days from `from_date` (or today) to an ISO date such as `2030-01-01`. Negative means the date has passed.

### `create_study_plan(subjects, total_hours)`

Splits total study hours equally across unique subject names. Returns a dictionary mapping each subject to its allocated hours.

### `weighted_average(values, weights)`

Returns the weighted average. Values and weights must have equal non-zero lengths; weights must be non-negative and have a positive total.

## 🧪 Run tests

From the project directory:

```bash
python -m unittest discover -s tests -v
```

## 🛠️ Build the distribution

```bash
python -m pip install --upgrade build twine
python -m build
python -m twine check dist/*
```

This creates a source distribution (`.tar.gz`) and a wheel (`.whl`) in `dist/`.

## 🚢 Publish safely

1. Create an account at [PyPI](https://pypi.org/account/register/).
2. First create a test account at [TestPyPI](https://test.pypi.org/account/register/) and upload there to practise.
3. Configure a PyPI API token. Keep the token private; never commit it to GitHub or share it in screenshots.
4. Upload to TestPyPI first, then upload to official PyPI when ready.
5. Distribution names must be available. If `pystudentkit` is already taken, choose a distinctive alternative and update `pyproject.toml` before building.

For current instructions, follow the official [Packaging Python Projects guide](https://packaging.python.org/en/latest/tutorials/packaging-projects/) and [PyPI help](https://pypi.org/help/).

## 📁 Project structure

```text
pystudentkit/
├── pyproject.toml
├── README.md
├── LICENSE
├── CHANGELOG.md
├── src/
│   └── pystudentkit/
│       ├── __init__.py
│       ├── academics.py
│       ├── planning.py
│       └── cli.py
└── tests/
    └── test_pystudentkit.py
```

## 📄 License

MIT License — see `LICENSE`.

---
Made with Python by **Jaspreet Singh** · Roll No. **2432727**
