-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy path__init__.py
More file actions
49 lines (32 loc) · 1.46 KB
/
__init__.py
File metadata and controls
49 lines (32 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import os
import integration_service
def hello_world():
"""No-op to test linting/testing CI"""
return "hello, world"
def get_process():
"""
Return metadata about the current execution process
This could include things like start time, calculated run time, state, the "execution user", etc.
"""
process_uuid = os.environ["WS_SCRIPT_PROCESS_UUID"]
process_data = integration_service.get_process(process_uuid)
return process_data
# are half of these just pass through calls to the integration service? what value does wayscript.context provide as a wrapper? where do we draw the line?
def get_event():
"""Returns the event object of the execution context"""
pass
def get_trigger():
"""Returns information about the trigger that launched the event"""
pass
def get_lair():
"""Returns lair metadata"""
pass
def get_workspace():
"""Return workspace metadata"""
pass
def get_execution_user():
"""Do we want to create a notion of a "user that this script is being executed as"? Or should we just allow people to look up the lair owner?
I think we need to establish a notion of an execution user because we need to be able to communicate to developers
who api calls will be made on behalf of against wayscript endpoints.
For now, this can just proxy the lair owner. But I think having this layer of abstraction (might?) help us in future when we have more sophisticated execution models?
"""