piston_sdk is a lightweight Ruby gem executing code using the Piston API.
gem install piston_sdkrequire 'piston_sdk'
client = PistonSDK::Client.new
client.add_file(content: "puts 42", name: "app.rb")
results = client.execute(language: "ruby", version: "3.0.1")
puts results.run.stdout # 42