Metadata-Version: 2.4
Name: po-lang-engine
Version: 2.0.2
Summary: A high-performance, Python-inspired programming language with bytecode VM, stdlib, and FFI
Home-page: https://pypi.org/project/po-lang-engine/
Author: Po-Lang
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development :: Interpreters
Classifier: Topic :: Software Development :: Compilers
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: requests
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# Po-Lang Engine v2.0

A high-performance, Python-inspired programming language with a **bytecode VM**, full **standard library**, and **Python FFI bridge**.

## Install

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

## Quick Start

Create a file `hello.po`:

```po
keep name = "World"
show "Hello, " + name + "!"

fn greet(person) {
    return "Welcome, " + person
}

show greet("Alice")
```

Run it:

```bash
pop run hello.po
```

## Language Features

### Variables & Types
```po
keep age    = 25
keep price  = 9.99
keep name   = "Alice"
keep active = true
keep data   = null
keep items  = [1, 2, 3]
keep config = {host: "localhost", port: 8080}
```

### Control Flow
```po
if age >= 18 {
    show "Adult"
} else if age >= 13 {
    show "Teen"
} else {
    show "Child"
}
```

### Loops
```po
loop i from 0 to 5 {
    show i
}

loop item in items {
    show item
}

while active {
    show "running"
    keep active = false
}
```

### Functions
```po
fn add(a, b) {
    return a + b
}

keep result = add(10, 20)
show result
```

### Classes & Inheritance
```po
class Animal {
    fn init(name) {
        self.name = name
    }
    fn speak() {
        show self.name + " makes a sound"
    }
}

class Dog(Animal) {
    fn speak() {
        show self.name + " says: Woof!"
    }
}

keep dog = Dog("Rex")
dog.speak()
```

## Standard Library

```po
use io
keep content = io.read("file.txt")
io.write("out.txt", "Hello!")
keep lines = io.lines("data.txt")
keep rows = io.csv("data.csv")

use net
keep resp = net.get("https://api.example.com/data")
show resp["status"]
show resp["json"]
keep resp2 = net.post("https://api.example.com/users", {name: "Alice"})

use sys
keep result = sys.run("ls -la")
show result["stdout"]
keep py_ver = sys.env("PYTHON_VERSION")

use json
keep obj = json.parse('{"key": "value"}')
keep text = json.stringify(obj)

use math
show math.sqrt(144)
show math.pi

use time
keep now = time.now()
time.sleep(0.1)

use random
show random.int(1, 100)
show random.float()

use os
show os.cwd()
keep files = os.listdir(".")

use ffi
keep np = ffi.import("numpy")
```

## CLI Commands

```bash
pop run file.po           # Run a .po file
pop run file.po --debug   # Run with bytecode disassembly + timing
pop check file.po         # Parse/compile check without running
pop repl                  # Interactive REPL
pop get <package>         # Install a Po-Lang package
pop new myproject         # Scaffold a new project
pop version               # Show version info
```

## Interactive REPL

```
$ pop repl
Po-Lang REPL v2.0
po> keep x = 42
po> show x * 2
84
po> fn sq(n) { return n * n }
po> show sq(7)
49
```

## Python FFI

Call any Python library from Po-Lang:

```po
use ffi
keep math = ffi.import("math")
show math.sqrt(144)

keep os = ffi.import("os")
show os.getcwd()
```

## Package Manager

Configure your registry with environment variables:

```bash
export PO_REGISTRY_URL="https://your-supabase-url.supabase.co"
export PO_REGISTRY_KEY="your-api-key"
pop get my-package
```

## License

MIT
