Skip to content

Commit

Permalink
Moved execute python function higher
Browse files Browse the repository at this point in the history
  • Loading branch information
frikky committed Nov 13, 2023
1 parent f3657fd commit 31555a0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 22 deletions.
12 changes: 0 additions & 12 deletions http/1.4.0/src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,6 @@ def curl(self, statement):
return item

return item
#try:
# if not statement.startswith("curl "):
# statement = "curl %s" % statement

# data = uncurl.parse(statement)
# request = eval(data)
# if isinstance(request, requests.models.Response):
# return request.text
# else:
# return "Unable to parse the curl parameter. Remember to start with curl "
#except:
# return "An error occurred during curl parsing"

def splitheaders(self, headers):
parsed_headers = {}
Expand Down
21 changes: 11 additions & 10 deletions shuffle-tools/1.2.0/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@ actions:
returns:
schema:
type: string
- name: execute_python
description: Runs python with the data input. Any prints will be returned.
parameters:
- name: code
description: The code to run. Can be a file ID from within Shuffle.
required: true
multiline: true
example: print("hello world")
schema:
type: string
- name: check_cache_contains
description: Checks Shuffle cache whether a user-provided key contains a value. Returns ALL the values previously appended.
parameters:
Expand Down Expand Up @@ -982,16 +992,7 @@ actions:
example: '{"data": "Hello world"}'
schema:
type: string
- name: execute_python
description: Runs python with the data input. Any prints will be returned.
parameters:
- name: code
description: The code to run. Can be a file ID from within Shuffle.
required: true
multiline: true
example: print("hello world")
schema:
type: string

- name: run_math_operation
description: Takes a math input and gives you the result
parameters:
Expand Down

0 comments on commit 31555a0

Please sign in to comment.