Metadata-Version: 2.4
Name: luawrap
Version: 0.1.2
Summary: Write and run Lua code directly from Python files.
License: LicenseRef-LuaWrap-Custom
Author: Your Name V011DZ
Requires-Python: >=3.8,<4.0
Classifier: License :: Other/Proprietary License
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: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Dist: lupa (>=2.0,<3.0)
Description-Content-Type: text/markdown

# LuaWrap

Write and run Lua code directly inside your Python files — no separate Lua install needed!

## Installation

```bash
poetry add lupa
poetry install
```

## Usage

```python
from LuaWrap import lua, run_lua, lua_function, LuaBlock

# Run Lua directly
lua("print('Hello from Lua!')")

# Get a return value back in Python
result = run_lua("return 2 + 2")
print(result)  # 4

# Decorator style
@lua_function
def my_script():
    return "print('I am a Lua function!')"

my_script()

# Context manager style
with LuaBlock() as lb:
    lb.code = "print('Runs when the block exits!')"
```

## API

| Function | Description |
|---|---|
| `lua(code)` | Run a Lua string |
| `run_lua(code)` | Same as `lua()`, alias |
| `@lua_function` | Decorator — function returns Lua code as a string |
| `LuaBlock` | Context manager — set `lb.code` to your Lua string |
