Using the Python SDK
As an example of using the Python SDK, navigate to the dev.splunk.com/sdks page and click the button to download the Python SDK; this will provide a splunk-sdk-python-x.x.x.zip file that you can save in your development folder. Unzipping the file will create a similarly-named directory that contains folders for the library files, examples, and so on.
You will need to have a Python 2.7 environment set up on your development environment; Splunk only works with the 2.7 version of Python at present, and you'll want your code to be compatible in case you want to run it on a Splunk server instead of on a remote machine. You will need to set your PYTHONPATH environment variable to point to the Splunk Python SDK directory.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access