Improve Remote Python Executor error handling and allow for structured response
[ccsdk/cds.git] / components / model-catalog / blueprint-model / test-blueprint / remote_scripts / Scripts / python / SamplePython.py
1 #!/usr/bin/python
2
3 import sys
4
5 #Optional : import this utility class if returning payload
6 from cds_utils.payload_coder import send_response_data_payload
7
8 # Do your work...  using try .. except to handle errors and return False if error
9 print(sys.argv[1])
10
11 # Optional : return a JSON payload to the be published under the response-data output attribute
12 send_response_data_payload({"étudiant": ["Mélanie", "Joséphine"]})
13
14 # Always return a boolean indicating success or not..
15 sys.exit(True)