An unoffical async API wrapper for the piston code execution engine
Project description
Aio-piston
This is an unoffical Api wrapper for the piston code execution engine
Examples
import aio_piston
import asyncio
async def main():
async with await aio_piston.Piston() as piston:
out = await piston.execute('print("hello world")', language="python")
#execute the code
out2 = await piston.execute('print(input("what is your name"))', language="python", inputs="bob")
return out, out2
#*OR* without a context manager
piston = await aio_piston.Piston()
...
#do stuff
...
#at the end
await piston.close()
out, out2 = asyncio.run(main())
print(str(out))
#full output
print(vars(out).keys())
#all the attributes of the response class
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
aio_piston-1.0.0.tar.gz
(3.2 kB
view hashes)