Skip to content

Tom-the-Bomb/aio-piston

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Aio-piston

This is an unoffical Api wrapper for the piston code execution engine

Example

# assuming you are already inside an async environment and have already imported everything
# to instantiate:
# recommended to have a global class if you are going to run .execute more than 1 time throughout the program
# alternatively you can use the async context manager if it's a one time use:
# async with aio_piston.Piston() as piston: ...
piston = aio_piston.Piston() # pass in Optional 'loop' and 'session' kwargs etc.

# to execute
output = await piston.execute("print('')", language="python") # pass in other optional kwargs if needed

print(str(output)) # returns the full output, returns the .output attr
print(output.stdout) # returns the stdout only

print(vars(out).keys())
#all the attributes of the response class .language, .stdout etc.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages