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 ¶
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. ReturnsNoneon HTTP errors or read timeout.
Raises:
-
TuxAPIConnectionError–If connection/request fails or times out.
-
TuxAPIRequestError–If HTTP request fails with non-404 status code.
-
TuxAPIResourceNotFoundError–If compiler is not found (404).