Splunk® SOAR (Cloud)

Develop Apps for Splunk SOAR (Cloud)

The classic playbook editor will be deprecated in early 2025. Convert your classic playbooks to modern mode.
After the future removal of the classic playbook editor, your existing classic playbooks will continue to run, However, you will no longer be able to visualize or modify existing classic playbooks.
For details, see:

Frequently asked questions

How do I handle Python module dependencies for my app?

You can manage dependencies on Python modules by packaging the required modules with the app, or by adding PIP dependencies in the app JSON.

When an action is executed, the platform adds the following directories to the PYTHONPATH environment:

  • /opt/phantom/lib
  • /opt/phantom/www
  • /opt/phantom/apps/[app_install_directory]
  • /opt/phantom/apps/[app_install_directory]/dependencies

Use Python modules included with

The following Python modules are already available to apps, so you don't need to specify them as dependencies or include their wheel files:

  • beautifulsoup4
  • soupsieve
  • parse
  • python_dateutil
  • six
  • requests
  • certifi
  • charset_normalizer
  • idna
  • urllib3
  • sh
  • xmltodict

Package required modules with the app

Place all required modules as part of the app TAR file. You can do this in the following ways:

  • Install the modules into a sub directory of the app. PIP supports the --target command line switch that allows the modules to be installed at a specific location. Use this switch to install the modules into the app's subdirectory called dependencies. When the app TAR file is installed on the platform the modules will be part of the app code.
  • Distribute the complete module, including the source and license file, in a sub directory of the app. In this case the app will need to append any folders in the PYTHONPATH it self.

The platform will install all the files present in the app TAR file in the app install directory. Be careful while packaging modules this way. Many Python modules are released under various licenses. Make sure the license allows for such redistribution. Packaging modules this way makes the app self-sufficient.

Add PIP dependencies in the app JSON

Specify app dependencies in the app JSON so that the platform tries to install the dependencies with the app. See Specifying pip dependencies for more information.

Last modified on 18 September, 2024
Tutorial: Use the app wizard to develop an app framework   Table Template

This documentation applies to the following versions of Splunk® SOAR (Cloud): current


Was this topic useful?







You must be logged into splunk.com in order to post comments. Log in now.

Please try to keep this discussion focused on the content covered in this documentation topic. If you have a more general question about Splunk functionality or are experiencing a difficulty with Splunk, consider posting a question to Splunkbase Answers.

0 out of 1000 Characters