mirror of
https://github.com/YuuKi-OS/Yuu-Box.git
synced 2026-02-18 21:51:10 +00:00
pos nomas
This commit is contained in:
15
examples/api_usage.py
Normal file
15
examples/api_usage.py
Normal file
@@ -0,0 +1,15 @@
|
||||
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}")
|
||||
Reference in New Issue
Block a user