Splunk app packager
The Splunk app packager runs as a cli tool to package your Splunk app, validate the app, and push it to your Splunk instance.
Install splunk-app-packager
$ pip install splunk-app-packager
Run splunk-app-packager
Set environment variables
$ export SPLUNK_USER=<splunk.com user account>
$ export SPLUNK_PASSWORD=<splunk.com user password>
$ export SPLUNK_ACS_TOKEN=<splunkcloud acs token>
$ export SPLUNK_ACS_STACK=<splunkcloud acs stack name>
Create a config.toml file
Create a package_config section within your config.toml file and set the app name and splunk_user name as shown below:
[package_config]
app = "NAME"
environment = ""
version = ""
splunk_user = "SPLUNK_APP_ACCOUNT"
splunk_app_packager will look for a config.toml file in your current working directory, otherwise you can use the --config-path option to specify it's name and location.
CLI arguments
$ sap --help
Usage: splunk_app_packager [OPTIONS] APP_PACKAGE
Options:
--splunkuser TEXT The splunk.com username. Can also be set via
SPLUNK_USER environment variable [required]
--splunkpassword TEXT The splunk.com password. Can also be set via
SPLUNK_PASSWORD environment variable [required]
--justvalidate Provied a package .tag.gz instead of a directory and
validate it.
--prod Build a PRODUCTION package
--nodeploy Do NOT do the Deploy leg, just validate
--outfile TEXT Provied a package .tag.gz instead of a directory and
validate it.
--acs-stack TEXT The name of the ACS stack. Can also be set via
SPLUNK_ACS_STACK environment variable.
--acs-token TEXT A bearer token for Splunk ACS. Can also be set via
SPLUNK_ACS_TOKEN environment variable.
--config-path TEXT A path to the config.toml file. [required]
--help Show this message and exit.
Example usage
$ sap /path/to/app/folder --prod
Use as GitHub Action
Example production deployment
name: Production Deployment
on:
push:
branches:
- main
paths:
- APP_NAME/**
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dfe-digital/splunk-app-packager@v0.0.2
with:
app_package_path: 'APP_NAME'
splunk_username: ${{ secrets.SPLUNK_USERNAME }}
splunk_password: ${{ secrets.SPLUNK_PASSWORD }}
splunk_acs_token: ${{ secrets.SPLUNK_ACS_TOKEN }}
splunk_acs_stack: ${{ secrets.SPLUNK_ACS_STACK }}
Example with a different path for config.toml
name: Production Deployment
on:
push:
branches:
- main
paths:
- APP_NAME/**
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dfe-digital/splunk-app-packager@v0.0.2
with:
app_package_path: 'APP_NAME'
splunk_username: ${{ secrets.SPLUNK_USERNAME }}
splunk_password: ${{ secrets.SPLUNK_PASSWORD }}
splunk_acs_token: ${{ secrets.SPLUNK_ACS_TOKEN }}
splunk_acs_stack: ${{ secrets.SPLUNK_ACS_STACK }}
config_toml_path: 'conf/config.toml'
Contributing
Refer to our contributing guidelines if you'd like to raise a bug or pull request.
Metadata
Release files for splunk-app-packager 0.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| splunk_app_packager-0.0.6.tar.gz | 9.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| splunk_app_packager-0.0.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.4 kB
Release files / splunk_app_packager-0.0.6.tar.gz
| Download URL | splunk_app_packager-0.0.6.tar.gz |
|---|---|
| Size | 9.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c19ca92ae910efe1fd304d7a965f59bc269b6266bae050371f1a1118264b9dd4
|
|
BLAKE2b-256 checksum How to use checksums |
a5cbc41ac4da33b4aa5b6d7d9c0151c4e33e8404d82b4c3b6f74e70f737fc636
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 18, 2025.
Transparency logRelease files / splunk_app_packager-0.0.6-py3-none-any.whl
| Download URL | splunk_app_packager-0.0.6-py3-none-any.whl |
|---|---|
| Size | 8.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ccf612ce06d6ee5d9b09036ed599bcbd629130f54282f171d36f9b05a9786893
|
|
BLAKE2b-256 checksum How to use checksums |
470e7b78a6040a74d26e5f8b5edb360e07d9203b1085e56be213418c89aba708
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 18, 2025.
Transparency log