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

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 details)

Uploaded Source

File details

Details for the file aio_piston-1.0.0.tar.gz.

File metadata

  • Download URL: aio_piston-1.0.0.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for aio_piston-1.0.0.tar.gz
Algorithm Hash digest
SHA256 5489fe735a517d0c81f5e8156ee52b78d70c848db12959d596e31bb04f962ab9
MD5 90cf2988bfd50dc09f8ed6adfdb0cd09
BLAKE2b-256 d651bdf61a55d689532aa648fe6a152060055f70c42541798fae3e80e70353d7

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.0 This release

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page