You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Splunk Software Development Kit (SDK) for Python contains library code and
9
-
examples designed to enable developers to build applications using Splunk.
8
+
The Splunk Software Development Kit (SDK) for Python contains library code and examples designed to enable developers to build applications using the Splunk platform.
10
9
11
-
Splunk is a search engine and analytic environment that uses a distributed
12
-
map-reduce architecture to efficiently index, search and process large
13
-
time-varying data sets.
10
+
Splunk is a search engine and analytic environment that uses a distributed map-reduce architecture to efficiently index, search, and process large time-varying data sets.
14
11
15
-
The Splunk product is popular with system administrators for aggregation and
16
-
monitoring of IT machine data, security, compliance and a wide variety of other
17
-
scenarios that share a requirement to efficiently index, search, analyze and
18
-
generate real-time notifications from large volumes of time series data.
12
+
The Splunk platform is popular with system administrators for aggregation and monitoring of IT machine data, security, compliance, and a wide variety of other scenarios that share a requirement to efficiently index, search, analyze, and generate real-time notifications from large volumes of time-series data.
19
13
20
-
The Splunk developer platform enables developers to take advantage of the same
21
-
technology used by the Splunk product to build exciting new applications that
22
-
are enabled by Splunk's unique capabilities.
14
+
The Splunk developer platform enables developers to take advantage of the same technology used by the Splunk platform to build exciting new applications.
23
15
24
16
25
-
## Getting started with the Splunk SDK for Python
17
+
## Get started with the Splunk SDK for Python
26
18
27
-
The Splunk SDK for Python contains library code and examples that show how to
28
-
programmatically interact with Splunk for a variety of scenarios including
29
-
searching, saved searches, data inputs, and many more, along with building
30
-
complete applications.
19
+
The Splunk SDK for Python contains library code and examples that show how to programmatically interact with Splunk for a variety of scenarios including searching, saved searches, data inputs, and many more, along with building complete applications.
31
20
32
-
The information in this Readme provides steps to get going quickly, but for more
Here's what you need to get going with the Splunk SDK for Python.
38
24
39
25
#### Python
40
26
41
-
The Splunk SDK for Python requires Python 2.7+, including Python 3. The Splunk SDK for Python has been tested with Python v2.7 and v3.5.
27
+
The Splunk SDK for Python requires Python 2.7+ and Python 3. The Splunk SDK for Python has been tested with Python v2.7 and v3.5.
42
28
43
29
#### Splunk
44
30
45
-
If you haven't already installed Splunk, download it
46
-
[here](http://www.splunk.com/download). For more about installing and running
47
-
Splunk and system requirements, see
48
-
[Installing & Running Splunk](http://dev.splunk.com/view/SP-CAAADRV). The Splunk SDK for Python has been tested with Splunk Enterprise 7.0 and 7.2.
31
+
If you haven't already installed Splunk, download it [here](http://www.splunk.com/download).
32
+
For more information, see [System requirements for use of Splunk Enterprise on-premises](https://docs.splunk.com/Documentation/Splunk/latest/Installation/Systemrequirements) in the Splunk Enterprise _Installation Manual_.
49
33
50
34
#### Splunk SDK for Python
51
-
Get the Splunk SDK for Python; [download the SDK as a ZIP](http://dev.splunk.com/view/SP-CAAAEBB)
52
-
and extract the files. Or, if you want to contribute to the SDK, clone the
53
-
repository from [GitHub](https://github.com/splunk/splunk-sdk-python).
54
35
36
+
Get the Splunk SDK for Python from [PyPI](https://pypi.org/project/splunk-sdk/). If you want to contribute to the SDK, clone the repository from [GitHub](https://github.com/splunk/splunk-sdk-python).
55
37
56
-
### Installing the SDK
57
38
58
-
You can install the Splunk SDK for Python libraries by using `easy_install` or `pip`:
39
+
### Install the SDK
40
+
41
+
Use the following commands to install the Splunk SDK for Python libraries in different ways. However, it's not necessary to install the libraries to run the examples and unit tests from the SDK.
42
+
43
+
Use `easy_install`:
59
44
60
45
[sudo] easy_install splunk-sdk
61
46
62
-
Or
47
+
Use `pip`:
63
48
64
49
[sudo] pip install splunk-sdk
65
50
66
-
Or to install the Python egg
51
+
Install the Python egg:
67
52
68
53
[sudo] pip install --egg splunk-sdk
69
54
70
-
Alternatively, you can use **setup.py** on the sources you cloned from GitHub:
55
+
Install the sources you cloned from GitHub:
71
56
72
57
[sudo] python setup.py install
73
58
74
-
However, it's not necessary to install the libraries to run the
75
-
examples and unit tests from the SDK.
76
-
77
59
78
-
### Running the examples and unit tests
60
+
### Run the examples and unit tests
79
61
80
-
To run the examples and unit tests, you must put the root of
81
-
the SDK on your PYTHONPATH. For example, if you have downloaded the SDK to your
82
-
home folder and are running OS X or Linux, add the following line to your
83
-
**.bash_profile**:
62
+
To run the examples and unit tests, you must put the root of the SDK on your PYTHONPATH. For example, if you downloaded the SDK to your home folder and are running OS X or Linux, add the following line to your **.bash_profile** file:
84
63
85
64
export PYTHONPATH=~/splunk-sdk-python
86
65
87
-
The SDK command-line examples require a common set of arguments
88
-
that specify things like the Splunk host, port, and login credentials. For a
89
-
full list of command-line arguments, include `--help` as an argument to any of
90
-
the examples.
66
+
The SDK command-line examples require a common set of arguments that specify the host, port, and login credentials for Splunk Enterprise. For a full list of command-line arguments, include `--help` as an argument to any of the examples.
91
67
92
68
#### .splunkrc
93
69
94
-
To connect to Splunk, many of the SDK examples and unit tests take command-line
95
-
arguments that specify values for the host, port, and login credentials for
96
-
Splunk. For convenience during development, you can store these arguments as
97
-
key-value pairs in a text file named **.splunkrc**. Then, the SDK examples and
98
-
unit tests use the values from the **.splunkrc** file when you don't specify
99
-
them.
70
+
To connect to Splunk, many of the SDK examples and unit tests take command-line arguments that specify values for the host, port, and login credentials for Splunk Enterprise. For convenience during development, you can store these arguments as key-value pairs in a text file named **.splunkrc**. Then, the SDK examples and unit tests use the values from the **.splunkrc** file when you don't specify them.
100
71
101
72
To use this convenience file, create a text file with the following format:
102
73
@@ -110,8 +81,8 @@ To use this convenience file, create a text file with the following format:
110
81
password=changeme
111
82
# Access scheme (default: https)
112
83
scheme=https
113
-
# Your version of Splunk (default: 5.0)
114
-
version=5.0
84
+
# Your version of Splunk
85
+
version=8.0
115
86
116
87
Save the file as **.splunkrc** in the current user's home directory.
117
88
@@ -123,32 +94,22 @@ Save the file as **.splunkrc** in the current user's home directory.
123
94
124
95
C:\Users\currentusername\.splunkrc
125
96
126
-
You might get errors in Windows when you try to name the file because
127
-
".splunkrc" looks like a nameless file with an extension. You can use
128
-
the command line to create this file—go to the
129
-
**C:\Users\currentusername** directory and enter the following command:
97
+
You might get errors in Windows when you try to name the file because ".splunkrc" appears to be a nameless file with an extension. You can use the command line to create this file by going to the **C:\Users\**_currentusername_ directory and entering the following command:
130
98
131
99
Notepad.exe .splunkrc
132
100
133
101
Click **Yes**, then continue creating the file.
134
102
135
-
**Note**: Storing login credentials in the **.splunkrc** file is only for
136
-
convenience during development. This file isn't part of the Splunk platform and
137
-
shouldn't be used for storing user credentials for production. And, if you're
138
-
at all concerned about the security of your credentials, just enter them at
139
-
the command line rather than saving them in this file.
103
+
**Note**: Storing login credentials in the **.splunkrc** file is only for convenience during development. This file isn't part of the Splunk platform and shouldn't be used for storing user credentials for production. And, if you're at all concerned about the security of your credentials, enter them at the command line rather than saving them in this file.
140
104
141
105
142
106
#### Examples
143
107
144
-
Examples are located in the **/splunk-sdk-python/examples** directory. To run
145
-
the examples at the command line, use the Python interpreter and include any
146
-
arguments that are required by the example:
108
+
Examples are located in the **/splunk-sdk-python/examples** directory. To run the examples at the command line, use the Python interpreter and include any arguments that are required by the example:
To learn about our testing framework, see [Splunk Test Suite](https://github.com/splunk/splunk-sdk-python/tree/master/tests) on GitHub.
186
141
187
-
In addition, the test run requires the searchcommands app to be built. The `make`
188
-
command runs the tasks to do this, but more complex testing may require you to
189
-
rebuild using `make build_app`.
142
+
In addition, the test run requires you to build the searchcommands app. The `make` command runs the tasks to do this, but more complex testing may require you to rebuild using the `make build_app` command.
190
143
191
144
## Repository
192
145
193
-
<table>
194
-
195
-
<tr>
196
-
<td><b>/docs</b></td>
197
-
<td>Source for Sphinx-based docs and build</td>
198
-
</tr>
199
-
200
-
<tr>
201
-
<td><b>/examples</b></td>
202
-
<td>Examples demonstrating various SDK features</td>
203
-
<tr>
204
-
205
-
<tr>
206
-
<td><b>/splunklib</b></td>
207
-
<td>Source for the Splunk library modules</td>
208
-
<tr>
209
-
210
-
<tr>
211
-
<td><b>/tests</b></td>
212
-
<td>Source for unit tests</td>
213
-
<tr>
214
-
215
-
<tr>
216
-
<td><b>/utils</b></td>
217
-
<td>Source for utilities shared by the examples and unit tests</td>
The CHANGELOG.md file in the root of this repository contains a description
157
+
of changes for each version of the SDK. For the latest version, see the [CHANGELOG.md](https://github.com/splunk/splunk-sdk-python/blob/master/CHANGELOG.md) on GitHub.
227
158
228
159
### Branches
229
160
230
-
The **master** branch always represents a stable and released version of the SDK.
231
-
You can read more about our branching model on our Wiki at
The **master** branch represents a stable and released version of the SDK.
162
+
To learn about our branching model, see [Branching Model](https://github.com/splunk/splunk-sdk-python/wiki/Branching-Model) on GitHub.
233
163
234
164
## Documentation and resources
235
-
If you need to know more:
236
-
237
-
* For all things developer with Splunk, your main resource is the
238
-
[Splunk Developer Portal](http://dev.splunk.com).
239
-
240
-
* For conceptual and how-to documentation, see the
241
-
[Overview of the Splunk SDK for Python](http://dev.splunk.com/view/SP-CAAAEBB).
242
-
243
-
* For API reference documentation, see the
244
-
[Splunk SDK for Python Reference](http://docs.splunk.com/Documentation/PythonSDK).
245
165
246
-
* For more about the Splunk REST API, see the
247
-
[REST API Reference](http://docs.splunk.com/Documentation/Splunk/latest/RESTAPI).
166
+
| Resource | Description |
167
+
|:----------------------- |:----------- |
168
+
|[Splunk Developer Portal](http://dev.splunk.com)| General developer documentation, tools, and examples |
169
+
|[Integrate the Splunk platform using development tools for Python](https://dev.splunk.com/enterprise/docs/devtools/python)| Documentation for Python development |
170
+
|[Splunk SDK for Python Reference](http://docs.splunk.com/Documentation/PythonSDK)| SDK API reference documentation |
171
+
|[REST API Reference Manual](https://docs.splunk.com/Documentation/Splunk/latest/RESTREF/RESTprolog)| Splunk REST API reference documentation |
172
+
|[Splunk>Docs](https://docs.splunk.com/Documentation)| General documentation for the Splunk platform |
173
+
|[GitHub Wiki](https://github.com/splunk/splunk-sdk-python/wiki/)| Documentation for this SDK's repository on GitHub |
If you would like to contribute to the SDK, see [Contributions to Splunk](https://www.splunk.com/en_us/form/contributions.html).
287
190
288
-
### How to contribute
191
+
### Support
289
192
290
-
If you would like to contribute to the SDK, go here for more information:
193
+
1. You will be granted support if you or your company are already covered under an existing maintenance/support agreement.
291
194
292
-
*[Splunk and open source](http://dev.splunk.com/view/opensource/SP-CAAAEDM)
195
+
Submit a new case in the [Support Portal](https://www.splunk.com/en_us/support-and-services.html)) and include "Splunk SDK for Python" in the subject line.
2. If you are not covered under an existing maintenance/support agreement, you can find help through the broader community at [Splunk Answers](https://community.splunk.com/t5/Splunk-Development/ct-p/developer-tools).
3. Splunk will NOT provide support for SDKs if the core library (the code in the <b>/splunklib</b> directory) has been modified. If you modify an SDK and want support, you can find help through the broader community and [Splunk Answers](https://community.splunk.com/t5/Splunk-Development/ct-p/developer-tools).
297
200
298
-
### Support
201
+
We would also like to know why you modified the core library, so please send feedback to _[email protected]_.
299
202
300
-
1. You will be granted support if you or your company are already covered
301
-
under an existing maintenance/support agreement.
302
-
Submit a new case in the [Support Portal][contact] and include "Splunk SDK for Python"
303
-
in the subject line.
304
-
2. If you are not covered under an existing maintenance/support agreement, you
0 commit comments