Splunk Dev

How to package external python libraries required by a custom Splunk app?

boris
Path Finder

My splunk app requires external python libraries.

On my own system I can install these.

However, now I want to package my app for other Splunk users.

What is the standard way to handle the required installation of new python libraries when packaging a Splunk app for others to use?

Labels (2)
Tags (2)

stricaud_splunk
Splunk Employee
Splunk Employee

What I do is:
1) If the app requires lots of libraries (which seems to be your case), a README, or requirements.txt will do. I require people to install the dependencies before using the App. Just like any software.
2) If the libraries are small, I embed them. This way I guarantee the behavior. With new app update, libraries are updated.

rsathish47
Contributor

2nd option , how do we do that? how to embed the py lib in app. please guide me here

0 Karma

umairahmad3985
Path Finder

Just put the library folder in your Splunk App's bin folder and that way you can access it in your app code via import statements.

0 Karma

thomrs
Communicator

This is the approach I am taking as well.

0 Karma

rsathish47
Contributor

2nd option , how do we do that? how to embed the py lib in app. please guide me here

0 Karma

asieira
Path Finder

Option 1 is not available for Splunk Cloud users, is it?

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...