Metadata-Version: 2.4
Name: smart-study
Version: 0.1.0
Summary: Webcam-based study distraction monitor
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Operating System :: Microsoft :: Windows
Classifier: Topic :: Education
Requires-Python: <3.13,>=3.9
Description-Content-Type: text/markdown
Requires-Dist: opencv-python>=4.8
Requires-Dist: cvzone>=1.6
Requires-Dist: ultralytics>=8.0
Requires-Dist: pygame>=2.5
Requires-Dist: mediapipe>=0.10

# smart-study

Webcam-based study distraction monitor. It watches for prolonged eye closure, a missing/covered face, and cell phones, then displays a warning and plays an alert.

## Install

Python 3.11 is recommended on Windows. The computer needs a webcam and audio output.

```bash
python -m pip install smart-study
```

## Use as a Python module

```python
from smart_study import study

study()  # Uses camera 0; press Q in the video window to stop.
```

Choose another camera by passing its index:

```python
study(camera_index=1)
```

Importing `smart_study` does not start the webcam. The monitor starts only when `study()` is called.

## Run from a source checkout

```bash
python -m pip install -e .
python app.py
```

The distribution includes the YOLO model and alert audio assets. Installation is relatively large because the computer-vision dependencies include PyTorch through Ultralytics. Python versions below 3.13 are currently declared because MediaPipe and the selected dependency set may not be available together on newer Python versions.

## Build and upload to PyPI

Update the version in `pyproject.toml` for each release, then:

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

PyPI distribution name: `smart-study`  
Python import name: `smart_study`
