mirror of
https://github.com/YuuKi-OS/Yuu-Box.git
synced 2026-02-18 21:51:10 +00:00
16 lines
325 B
Python
16 lines
325 B
Python
from yuubox import YuuBox, ResourceLimits
|
|
|
|
box = YuuBox(max_iterations=5)
|
|
|
|
limits = ResourceLimits(
|
|
memory_mb=512,
|
|
cpu_quota=1.0,
|
|
timeout_seconds=30,
|
|
)
|
|
|
|
code = "print('Hello from YuuBox!')"
|
|
result = box.execute(code, "python", limits=limits)
|
|
|
|
print(f"Success: {result.success}")
|
|
print(f"Output: {result.stdout}")
|