Metadata-Version: 2.4
Name: po-lang-engine
Version: 2.3.0
Summary: Po-Lang — A high-performance programming language with native AI/ML and HTTP gateway
Author: Po-Lang
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: requests
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# Po-Lang Engine

A high-performance, Python-inspired programming language with native AI/ML engine.

## Install

```bash
pip install po-lang-engine
```

## Run

```bash
pop run script.po
```

## v2.3.0 — Production AI Serving + BPP/SSC Security Protocols

- **`model["save"](path)`** — persist trained model weights to `.po_model` file (JSON)
- **`model["load"](path)`** — restore model instantly, skip re-training
- **`req["query"]("key")`** — URL query param parser (`/predict?input=25`)
- **`sys.exists(path)`** — check if file/folder exists
- **`sys.mkdir(path)`** — create directory tree (mkdirs)

## AI Gateway Example

```po
use ai
use net
import sys

keep model = ai.Trainer("regression")

if sys.exists("models/my_ai_model.po_model") {
    model["load"]("models/my_ai_model.po_model")
    sys.stdout("[AI]: Existing model loaded instantly!\n")
} else {
    sys.stdout("[AI]: Training new model...\n")
    model["fit"]([1,2,3,4,5], [2,4,6,8,10], 200)
    model["save"]("models/my_ai_model.po_model")
    sys.stdout("[AI]: Model saved!\n")
}

keep server = net.listen(8080)

server["route"]("GET", "/predict", fn(req) {
    keep userInput = req["query"]("input")
    keep prediction = model["predict"](userInput)
    return "{ 'status': 'success', 'prediction': " + str(prediction) + " }"
})

server["start"]()
```
