not using shim

This commit is contained in:
2026-02-12 11:01:52 -06:00
parent f3c159913e
commit 9de5097061
3 changed files with 44 additions and 46 deletions

View File

@@ -3,19 +3,23 @@
Hello Action - Python Example Pack
A minimal Python action that returns "Hello, Python".
Demonstrates the basic structure of a Python action in Attune.
Demonstrates the basic structure of a self-contained action in Attune.
Actions receive parameters as JSON on stdin and write results to stdout.
"""
import json
import sys
def run(**kwargs):
"""Return a simple greeting message."""
return {"message": "Hello, Python"}
def main():
# Read parameters from stdin (JSON format)
params = json.loads(sys.stdin.readline())
name = params.get("name", "Python")
result = {"message": f"Hello, {name}"}
print(json.dumps(result))
if __name__ == "__main__":
result = run()
print(json.dumps({"result": result, "status": "success"}))
sys.exit(0)
main()