Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Splunk Enterprise SDK for Python Changelog

## Version 1.6.18

### Bug fixes
* [#405](https://github.com/splunk/splunk-sdk-python/pull/405) Fix searchcommands_app example
* [#406](https://github.com/splunk/splunk-sdk-python/pull/406) Fix mod inputs examples
* [#407](https://github.com/splunk/splunk-sdk-python/pull/407) Fixed issue with Streaming and Generating Custom Search Commands dropping fields that aren't present in the first row of results. More details on how to opt-in to this fix can be found here:
https://github.com/splunk/splunk-sdk-python/blob/develop/README.md#customization [ [issue#401](https://github.com/splunk/splunk-sdk-python/issues/401) ]

### Minor changes
* [#408](https://github.com/splunk/splunk-sdk-python/pull/408) Add search mode example
* [#409](https://github.com/splunk/splunk-sdk-python/pull/409) Add Support for authorization tokens read from .splunkrc [ [issue#388](https://github.com/splunk/splunk-sdk-python/issues/388) ]
* [#413](https://github.com/splunk/splunk-sdk-python/pull/413) Default kvstore owner to nobody [ [issue#231](https://github.com/splunk/splunk-sdk-python/issues/231) ]

## Version 1.6.17

### Bug fixes
Expand Down
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# The Splunk Enterprise Software Development Kit for Python

#### Version 1.6.17
#### Version 1.6.18

The Splunk Enterprise Software Development Kit (SDK) for Python contains library code and examples designed to enable developers to build applications using the Splunk platform.

Expand Down Expand Up @@ -71,6 +71,26 @@ To run the examples and unit tests, you must put the root of the SDK on your PYT

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.

### Following are the different ways to connect to Splunk Enterprise
#### Using username/password
```python
import splunklib.client as client
service = client.connect(host=<host_url>, username=<username>, password=<password>, autoLogin=True)
```

#### Using bearer token
```python
import splunklib.client as client
service = client.connect(host=<host_url>, splunkToken=<bearer_token>, autologin=True)
```

#### Using session key
```python
import splunklib.client as client
service = client.connect(host=<host_url>, token=<session_key>, autologin=True)
```

###
#### Create a .splunkrc convenience file

To connect to Splunk Enterprise, 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.
Expand Down
2 changes: 1 addition & 1 deletion splunklib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@

from __future__ import absolute_import
from splunklib.six.moves import map
__version_info__ = (1, 6, 17)
__version_info__ = (1, 6, 18)
__version__ = ".".join(map(str, __version_info__))
2 changes: 1 addition & 1 deletion splunklib/binding.py
Original file line number Diff line number Diff line change
Expand Up @@ -1389,7 +1389,7 @@ def request(url, message, **kwargs):
head = {
"Content-Length": str(len(body)),
"Host": host,
"User-Agent": "splunk-sdk-python/1.6.17",
"User-Agent": "splunk-sdk-python/1.6.18",
"Accept": "*/*",
"Connection": "Close",
} # defaults
Expand Down