I have created a custom python script named "sn_sec_util.py" in the bin folder of the splunk app. I want to load this file in the python REST handler "my_submit.py" which is also in the bin folder.
But I am facing the issue at the import statement mentioning "ModuleNotFoundError: No module named 'sn_sec_util".
Here is the file "my_submit.py" with import statement of the module "sn_sec_util.py" in the line 4.
import sys
import splunk
import logging, logging.handlers
import sn_sec_util as snutil
from urllib.parse import unquote
class Submit(splunk.rest.BaseRestHandler):
def handle_submit(self):
payload = self.request['payload']
sessionKey = self.sessionKey
handle_POST = handle_submit
... View more