Skip to main content

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

Metadata

Release files for aio-piston 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aio-piston 1.0.0
File Size Uploaded
aio_piston-1.0.0.tar.gz 3.2 kB Details

Release files / aio_piston-1.0.0.tar.gz

Download URL aio_piston-1.0.0.tar.gz
Size 3.2 kB
Tags Source
SHA-256 checksum
How to use checksums
5489fe735a517d0c81f5e8156ee52b78d70c848db12959d596e31bb04f962ab9
BLAKE2b-256 checksum
How to use checksums
d651bdf61a55d689532aa648fe6a152060055f70c42541798fae3e80e70353d7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.0 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.8.9

Release history Release notifications | RSS feed

This release

1.0.0 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page