Metadata-Version: 2.4
Name: nu_lpw_final
Version: 0.0.1
Summary: MLOps Lab Practical Work scenario file generator and reference package.
Author-email: Samarth <userzeroonetwo091@gmail.com>
Keywords: mlops,docker,git-restore,deployment,nirma,lpw
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

# nu_lpw_final

MLOps Lab Practical Work scenario file generator and reference package.

Generate complete, runnable source code, Dockerfiles, docker-compose setups, configs, and models for any MLOps practical scenario directly into your working directory with a single function call.

---

## Installation

```bash
pip install nu_lpw_final
```

---

## Quick Start

```python
from nu_lpw_final import mlops as numpy

# View all practical scenarios and function mappings
numpy.doc()

# Generate all files for Docker Scenario 7 in current directory
numpy.p3s7()

# Or generate files into a specific folder
numpy.p3s7("my_scenario7_folder")
```

---

## Scenarios Index

### Practical 1: Git Restore Scenarios

| Function | Focus |
|---|---|
| `p1s1()` | Baseline: restore right after commit (no-op) |
| `p1s2()` | Restore discards an **unstaged** edit |
| `p1s3()` | Restore only touches **working tree**, not index |
| `p1s4()` | Restore brings back **deleted** file and reverts edit (unstaged) |
| `p1s5()` | Staged edit + deleted file (divergent index & worktree) |
| `p1s6()` | Deleted file is **re-added** (staged deletion) |
| `p1s7()` | Both changes staged together |
| `p1s8()` | Restoring from an **older** commit after deletion (untracked) |
| `p1s9()` | Staged resurrected file removed on forward restore |

### Practical 2: Deployment Scenarios

| Function | Scenario Description |
|---|---|
| `p2s1()` | Plain Flask Dev Server (no waitress, no nginx) |
| `p2s2()` | Waitress + Flask WSGI production server |
| `p2s3()` | nginx + Waitress (1 domain) + Flask |
| `p2s4()` | nginx (1 server block) + Waitress (2 domains, 1 app) + Flask |
| `p2s5()` | nginx (2 server blocks) + Waitress (2 domains, 1 app) |
| `p2s6()` | nginx (2 server blocks) + 2 separate Waitress instances |
| `p2s7()` | 4 physical machines on LAN |
| `p2s8()` | HTTPS with self-signed certificate (OpenSSL) |
| `p2s9()` | HTTPS with mkcert (trusted local cert) |
| `p2s10()` | Serving static files directly via nginx |
| `p2s11()` | Load balancing + sticky sessions (ip_hash) |
| `p2_final()` / `p2s12()` | Multi-device demo (client + boston_backend + iris_backend) |

### Practical 3: Docker Scenarios

| Function | Scenario Description |
|---|---|
| `p3s1()` | Dockerize a simple Flask webapp |
| `p3s2()` | Webapp + SQLite DB in one container |
| `p3s3()` | Webapp + MySQL in separate containers (custom network) |
| `p3s4()` | Separate containers + named volume (no compose) |
| `p3s5()` | Separate containers via docker-compose (no volume) |
| `p3s6()` | docker-compose + named volume (data persists) |
| `p3s7()` | Export/Import & Save/Load demo |
| `p3s8()` | Multi-Stage Build (Go binary in scratch image) |

---

## License

MIT License. See [LICENSE](LICENSE) for details.
