Skip to content

wandbox

Wandbox API Wrapper for Tux Bot.

This module provides integration with the Wandbox online compiler API, allowing code execution and compilation for various programming languages within the Tux Discord bot.

Functions:

  • getoutput

    Compile and execute code using a specified compiler and return the output.

Classes

Functions

getoutput async

Python
getoutput(code: str, compiler: str, options: str | None) -> dict[str, Any] | None

Compile and execute code using a specified compiler and return the output.

Parameters:

  • code (str) –

    The source code to be compiled and executed.

  • compiler (str) –

    The identifier or name of the compiler to use.

  • options (str or None) –

    Additional compiler options or flags. If None, an empty string is used.

Returns:

  • dict[str, Any] or None

    A dictionary containing the compiler output if the request is successful, otherwise None. Returns None on HTTP errors or read timeout.

Raises: