Metadata-Version: 2.4
Name: etc-lab-extension
Version: 1.0.4
Summary: ETC Classroom Lab Extension Suite: Terminal UI formatters, SQLite forensic evidence extractors, and concurrency supervision daemons.
Author-email: Dang Tuan Anh <tuandanga@etc-corp.internal>, Edutech Core JSC R&D <rnd@etc-corp.internal>
License-Expression: MIT
Project-URL: Homepage, https://github.com/etc-corp/etc-lab-extension
Project-URL: Documentation, https://github.com/etc-corp/etc-lab-extension#readme
Project-URL: Repository, https://github.com/etc-corp/etc-lab-extension.git
Project-URL: Bug Tracker, https://github.com/etc-corp/etc-lab-extension/issues
Keywords: education,classroom,terminal-ui,forensics,concurrency,python-education,edtech,etc-corp
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Developers
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
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: Topic :: Education
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Monitoring
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# etc-lab-extension

[![PyPI version](https://img.shields.io/badge/pypi-v1.0.4-blue.svg)](https://pypi.org/project/etc-lab-extension/)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)
[![Python: 3.8+](https://img.shields.io/badge/python-3.8%2B-blue.svg)](https://www.python.org/)

**ETC Classroom Lab Extension Suite** is an educational extension library developed by Edutech Core JSC (ETC Corp) for computer science workstations. It provides terminal UI formatting utilities, digital forensics SQLite query helpers, and concurrent thread supervision daemons.

---

## 📦 Features

### 1. Terminal UI & Frame Formatting (`etc_lab_extension.formatters`)
* **`TerminalFormatter`**: Render ASCII box frames and centered headers directly in console terminals without heavy GUI dependencies.
* **`LogParser`**: Parse workstation log entries, shift timestamps, and penalty audit events.

```python
from etc_lab_extension import TerminalFormatter

box = TerminalFormatter.render_box(
    title="WORKSTATION STATION-082",
    content="Module: Concurrency Supervisor\nStatus: Operational"
)
print(box)
```

Output:
```text
==================================================
|            WORKSTATION STATION-082             |
--------------------------------------------------
| Module: Concurrency Supervisor                 |
| Status: Operational                            |
==================================================
```

### 2. Digital Forensics SQLite Helpers (`etc_lab_extension.forensics`)
* **`BrowserHistoryForensics`**: Query and inspect SQLite browsing history and forensic evidence records.

```python
from etc_lab_extension import BrowserHistoryForensics

forensics = BrowserHistoryForensics("data/sandbox/browser_history.db")
records = forensics.query_visits(keyword="Vinmec")
for r in records:
    print(f"[{r['visit_time']}] {r['title']}")
```

### 3. Concurrency & Supervision Daemons (`etc_lab_extension.supervision`)
* **`KioskSecuritySupervisor`**: Window focus and kiosk interaction hooks.
* **`HeartbeatPulseMonitor`**: Periodic 500ms heartbeat daemon verifying workstation execution liveness.
* **`TelemetryNetworkClient`**: Telemetry packet serialization and gateway dispatcher.
* **`ExecutionBufferManager`**: Standard I/O memory buffer management with automatic heap purge.
* **`StudentThread`**: Isolated background worker executing submitted code safely.
* **`CorporateWatchdog`**: Proprietary resource lock monitor and deadlock guard.

```python
from etc_lab_extension.supervision import (
    student_thread,
    HeartbeatPulseMonitor,
    CorporateWatchdog
)

# Initialize heartbeat daemon
heartbeat = HeartbeatPulseMonitor(station_id="STATION-082")
heartbeat.start()

# Execute student thread
student_thread.run()
```

---

## 🚀 Installation

Install the package directly from PyPI via pip:

```bash
pip install etc-lab-extension
```

Or install from source:

```bash
git clone https://github.com/etc-corp/etc-lab-extension.git
cd etc-lab-extension
pip install .
```

---

## 📋 Requirements
* Python >= 3.8
* Standard CPython library (no third-party heavy dependencies required)

---

## ⚖️ License
This project is licensed under the terms of the [MIT License](LICENSE).

Copyright (c) 2021-2026 Edutech Core JSC (ETC Corp) & Dang Tuan Anh.
