{"library":"fire","code":"import fire\n\ndef greet(name='World', enthusiasm=1):\n  \"\"\"Greets the given name with specified enthusiasm.\"\"\"\n  return f\"Hello {name}{'!' * enthusiasm}\"\n\nif __name__ == '__main__':\n  fire.Fire(greet)","lang":"python","description":"Define a Python function or class, then pass it to `fire.Fire()` within your script. When executed, Fire automatically creates a CLI from the object. You can run this example as `python your_script.py --name David --enthusiasm 3` or `python your_script.py --help`.","tag":null,"tag_description":null,"last_tested":"2026-04-24","results":[{"runtime":"python:3.10-alpine","exit_code":0},{"runtime":"python:3.10-slim","exit_code":0},{"runtime":"python:3.11-alpine","exit_code":0},{"runtime":"python:3.11-slim","exit_code":0},{"runtime":"python:3.12-alpine","exit_code":0},{"runtime":"python:3.12-slim","exit_code":0},{"runtime":"python:3.13-alpine","exit_code":0},{"runtime":"python:3.13-slim","exit_code":0},{"runtime":"python:3.9-alpine","exit_code":0},{"runtime":"python:3.9-slim","exit_code":0}]}