Skip to content

Release/1.6.19 #443

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 87 commits into from
Mar 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
3dd5d75
Identical entity names will cause an infinite loop "RuntimeError: max…
Jul 26, 2016
d44c2af
Fixing missing handlers stanza in examples/searchcommands_template/de…
Jul 30, 2016
e934bc8
Making stream.py work without modification
Jul 30, 2016
20a86da
Don't output close tags if you haven't written a start tag
Jan 8, 2019
e7a631a
properly add parameters to request based on the method of the request
billmurrin Jul 24, 2019
19d59c6
reduced number of api calls
billmurrin Aug 9, 2019
6a0910c
tests: stop using assertNotEquals
xrmx Jun 16, 2020
99d28bc
searchcommands: don't use deprecated BaseException.message
xrmx Jun 16, 2020
5aaef29
tests: use six.assertRegex instead of deprecated assertRegexpMatches
xrmx Jun 16, 2020
3687786
Added Float parameter validator for custom search commands.
VatsalJagani Jun 14, 2021
4b3aef0
Update filter.py
SaltyHash123 Jul 6, 2021
8cea66f
Break out search argument parsing
acharlieh Aug 29, 2021
d9a6fae
client: use six.string_types instead of basestring
xrmx Jun 16, 2020
0c3b64a
client: remove outdated comment in Index.submit
xrmx Jun 16, 2020
4d9a378
Merge pull request #415 from splunk/master
ashah-splunk Nov 12, 2021
526e5d7
Removed strip() method from data.py file
akaila-splunk Nov 18, 2021
ec76d1e
Update test_storage_passwords.py
akaila-splunk Nov 23, 2021
07f04fc
Update client.py
ashah-splunk Nov 24, 2021
611f4a3
Merge pull request #416 from splunk/DVPL-10302
akaila-splunk Nov 25, 2021
b2d7bde
Update client.py
ashah-splunk Nov 26, 2021
a44a8f1
Update client.py
ashah-splunk Nov 26, 2021
2adde31
Test case for HEC event
ashah-splunk Dec 1, 2021
ea8dae0
Update test_service.py
ashah-splunk Dec 1, 2021
dbfd038
Update client.py
ashah-splunk Dec 1, 2021
f054c82
Update client.py
ashah-splunk Dec 1, 2021
0fbd782
Update README.md
sudoexec Dec 2, 2021
28e93b5
ordereddict and all its reference removed
vmalaviya-splunk Dec 2, 2021
b066cef
Python3 compatibility for ResponseReader.__str__()
vmalaviya-splunk Dec 2, 2021
89e53c0
Merge pull request #419 from splunk/hec_endpoint_issue
ashah-splunk Dec 6, 2021
c9245b1
Merge pull request #422 from splunk/DVPL-10345
ashah-splunk Dec 6, 2021
7e35282
Merge pull request #329 from xrmx/index-submit-outdated-comment
ashah-splunk Dec 8, 2021
79db92e
Merge pull request #421 from u23a/develop
ashah-splunk Dec 8, 2021
a17e0cd
Merge pull request #387 from SaltyHash123/patch-1
ashah-splunk Dec 9, 2021
da36226
Merge pull request #384 from VatsalJagani/float-validator-for-custom-…
ashah-splunk Dec 9, 2021
6b0d620
Merge pull request #392 from acharlieh/configurable_options
fantavlik Dec 9, 2021
7928675
Update test_validators.py
ashah-splunk Dec 13, 2021
03bcab1
Update test_decorators.py
ashah-splunk Dec 13, 2021
40ca0a2
Update test_decorators.py
ashah-splunk Dec 13, 2021
5290946
Update test_decorators.py
ashah-splunk Dec 13, 2021
9c8df44
Update test_validators.py
ashah-splunk Dec 13, 2021
87bb920
Update test_decorators.py
ashah-splunk Dec 14, 2021
5267fea
Merge pull request #424 from splunk/float_validator_test_fix
fantavlik Dec 15, 2021
e5402ee
Merge pull request #262 from billmurrin/hotfix/261-context-request-ge…
ashah-splunk Dec 15, 2021
69f5040
Merge pull request #330 from xrmx/dontusebasestringdirectly
ashah-splunk Dec 23, 2021
877fe64
Added new github_commit modular input example
akaila-splunk Dec 31, 2021
7291614
change checkpoint_filename and copyright year
akaila-splunk Jan 5, 2022
c8fe42c
Merge pull request #426 from splunk/DVPL-8272
ashah-splunk Jan 5, 2022
397f0aa
Capture 'app' context for modinput input_items
lowell80 Mar 13, 2021
40efe72
Simplified variable handing in parse_xml_data
lowell80 Mar 13, 2021
0f65cd7
Add 'app' input example into github_fork.py
lowell80 Mar 13, 2021
4e3cab2
version checking updated for __str__ method
vmalaviya-splunk Jan 11, 2022
09551a8
Replace .splunkrc with .env file in test and examples
akaila-splunk Jan 11, 2022
fbb867c
removed .splunkrc support
akaila-splunk Jan 11, 2022
9389ba2
Merge pull request #371 from lowell80/modinput-preserve-app
ashah-splunk Jan 11, 2022
cadf1d1
Merge pull request #423 from splunk/DVPL-8632
ashah-splunk Jan 12, 2022
307f729
Merge pull request #149 from doksu/master
bparmar-splunk Jan 13, 2022
7cafff4
Merged in latest code from upstream
scottsavarese Jan 13, 2022
2f0eab1
documented how to access modular input metadata
akaila-splunk Jan 18, 2022
ea1fb5b
Merge pull request #331 from xrmx/miscwarnings
ashah-splunk Jan 19, 2022
a750f3b
Merge pull request #148 from darlingtld/master
ashah-splunk Jan 19, 2022
048aeab
Fix bug in write for python3
scottsavarese Jan 19, 2022
49a387a
Fix indentation in README
artemrys Jan 19, 2022
e29004a
Merge pull request #429 from splunk/DVPL-8273
ashah-splunk Jan 20, 2022
b81e081
Merge pull request #237 from scottsavarese/develop
bparmar-splunk Jan 20, 2022
56c108b
Merge pull request #430 from artemrys/docs-small-fix
bparmar-splunk Jan 24, 2022
34421e9
Added build-env.py file and updated Makefile commands to create an en…
akaila-splunk Jan 25, 2022
d47f918
Create distsearch.conf
Bre77 Jan 28, 2022
514cb43
Create distsearch.conf
Bre77 Jan 28, 2022
7ee8528
Merge pull request #431 from Bre77/develop
bparmar-splunk Feb 2, 2022
41ae251
Merge pull request #427 from splunk/DVPL-8563
ashah-splunk Feb 2, 2022
00fadcb
Used module-specific logger in splunklib code instead of root logger
akaila-splunk Feb 7, 2022
313e97b
Docs updates for #434
tdhellmann Feb 22, 2022
ec06849
add method to set logging for splunklib directory
akaila-splunk Mar 1, 2022
fbeff52
add formatter for logs and update README.md file
akaila-splunk Mar 3, 2022
f1db833
Merge pull request #437 from splunk/DVPL-10608
akaila-splunk Mar 4, 2022
88a9869
JSONResultsReader changes
ashah-splunk Mar 8, 2022
debd64c
deprecated annotation for ResultsReader
ashah-splunk Mar 8, 2022
82bff6c
Added condition check for post method debug logs
akaila-splunk Mar 8, 2022
c163daf
Merge pull request #439 from splunk/DVPL-10693
akaila-splunk Mar 9, 2022
0038597
Github release workflow modified
bparmar-splunk Mar 10, 2022
af44b5e
added deprecated function annotation
ashah-splunk Mar 10, 2022
9ea8662
Update test_validators.py
ashah-splunk Mar 10, 2022
4a0e670
Merge pull request #440 from splunk/DVPL-10793
bparmar-splunk Mar 15, 2022
55d4603
Update stail.py
ashah-splunk Mar 23, 2022
528118b
Merge pull request #441 from splunk/json-resultreader
ashah-splunk Mar 23, 2022
7b0b486
release/1.6.19 changes
akaila-splunk Mar 25, 2022
adb6fcd
Merge pull request #436 from splunk/docs-updates-issue-434
ashah-splunk Mar 29, 2022
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
16 changes: 16 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Splunk host (default: localhost)
host=localhost
# Splunk admin port (default: 8089)
port=8089
# Splunk username
username=admin
# Splunk password
password=changed!
# Access scheme (default: https)
scheme=https
# Your version of Splunk (default: 6.2)
version=8.0
# Bearer token for authentication
#bearerToken="<Bearer-token>"
# Session key for authentication
#sessionKey="<Session-Key>"
16 changes: 14 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
push:
branches:
- master
workflow_dispatch: {}
workflow_dispatch: { }

jobs:
find_version:
Expand All @@ -21,6 +21,13 @@ jobs:
- name: Get version
id: get-version
run: python -c 'import splunklib; print("::set-output name=version::%s" % splunklib.__version__)'
- name: Install tox
run: pip install tox
- name: Generate API docs
run: |
rm -rf ./docs/_build
tox -e docs
cd ./docs/_build/html && zip -r ../docs_html.zip . -x ".*" -x "__MACOSX"
tag_version:
needs: find_version
name: Tag Version
Expand All @@ -32,7 +39,7 @@ jobs:
repo-token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ needs.find_version.outputs.version }}
release:
needs: [find_version, tag_version]
needs: [ find_version, tag_version ]
name: Create Release
runs-on: ubuntu-latest
steps:
Expand All @@ -52,6 +59,11 @@ jobs:
**TODO: Insert CHANGELOG.md contents here.**
draft: false
prerelease: false
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: apidocs
path: docs/_build/docs_html.zip
publish:
needs: release
name: Deploy Release to PyPI
Expand Down
13 changes: 2 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Python CI

on:
[push, pull_request]
[ push, pull_request ]

jobs:
build:
Expand All @@ -11,7 +11,7 @@ jobs:
matrix:
os:
- ubuntu-latest
python: [2.7, 3.7]
python: [ 2.7, 3.7 ]
splunk-version:
- "8.0"
- "latest"
Expand All @@ -36,15 +36,6 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Create .splunkrc file
run: |
cd ~
echo host=localhost > .splunkrc
echo port=8089 >> .splunkrc
echo username=admin >> .splunkrc
echo password=changed! >> .splunkrc
echo scheme=https >> .splunkrc
echo version=${{ matrix.splunk }} >> .splunkrc
- name: Install tox
run: pip install tox
- name: Test Execution
Expand Down
37 changes: 37 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,42 @@
# Splunk Enterprise SDK for Python Changelog

## Version 1.6.19

### New features and APIs
* [#441](https://github.com/splunk/splunk-sdk-python/pull/441) JSONResultsReader added and deprecated ResultsReader
* Pre-requisite: Query parameter 'output_mode' must be set to 'json'
* Improves performance by approx ~80-90%
* ResultsReader is deprecated and will be removed in future releases (NOTE: Please migrate to JSONResultsReader)
* [#437](https://github.com/splunk/splunk-sdk-python/pull/437) added setup_logging() method in splunklib for logging
* [#426](https://github.com/splunk/splunk-sdk-python/pull/426) Added new github_commit modular input example
* [#392](https://github.com/splunk/splunk-sdk-python/pull/392) Break out search argument to option parsing for v2 custom search commands
* [#384](https://github.com/splunk/splunk-sdk-python/pull/384) Added Float parameter validator for custom search commands
* [#371](https://github.com/splunk/splunk-sdk-python/pull/371) Modinput preserve 'app' context

### Bug fixes
* [#439](https://github.com/splunk/splunk-sdk-python/pull/439) Modified POST method debug log to not log sensitive body/data
* [#431](https://github.com/splunk/splunk-sdk-python/pull/431) Add distsearch.conf to Stream Search Command examples [ [issue#418](https://github.com/splunk/splunk-sdk-python/issues/418) ]
* [#419](https://github.com/splunk/splunk-sdk-python/pull/419) Hec endpoint issue[ [issue#345](https://github.com/splunk/splunk-sdk-python/issues/345) ]
* [#416](https://github.com/splunk/splunk-sdk-python/pull/416) Removed strip() method in load_value() method from data.py file [ [issue#400](https://github.com/splunk/splunk-sdk-python/issues/400) ]
* [#148](https://github.com/splunk/splunk-sdk-python/pull/148) Identical entity names will cause an infinite loop

### Minor changes
* [#440](https://github.com/splunk/splunk-sdk-python/pull/440) Github release workflow modified to generate docs
* [#430](https://github.com/splunk/splunk-sdk-python/pull/430) Fix indentation in README
* [#429](https://github.com/splunk/splunk-sdk-python/pull/429) documented how to access modular input metadata
* [#427](https://github.com/splunk/splunk-sdk-python/pull/427) Replace .splunkrc with .env file in test and examples
* [#424](https://github.com/splunk/splunk-sdk-python/pull/424) Float validator test fix
* [#423](https://github.com/splunk/splunk-sdk-python/pull/423) Python3 compatibility for ResponseReader.__str__()
* [#422](https://github.com/splunk/splunk-sdk-python/pull/422) ordereddict and all its reference removed
* [#421](https://github.com/splunk/splunk-sdk-python/pull/421) Update README.md
* [#387](https://github.com/splunk/splunk-sdk-python/pull/387) Update filter.py
* [#331](https://github.com/splunk/splunk-sdk-python/pull/331) Fix a couple of warnings spotted when running python 2.7 tests
* [#330](https://github.com/splunk/splunk-sdk-python/pull/330) client: use six.string_types instead of basestring
* [#329](https://github.com/splunk/splunk-sdk-python/pull/329) client: remove outdated comment in Index.submit
* [#262](https://github.com/splunk/splunk-sdk-python/pull/262) properly add parameters to request based on the method of the request
* [#237](https://github.com/splunk/splunk-sdk-python/pull/237) Don't output close tags if you haven't written a start tag
* [#149](https://github.com/splunk/splunk-sdk-python/pull/149) "handlers" stanza missing in examples/searchcommands_template/default/logging.conf

## Version 1.6.18

### Bug fixes
Expand Down
20 changes: 10 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,16 @@ test_smoke_no_app:
@echo "$(ATTN_COLOR)==> test_smoke_no_app $(NO_COLOR)"
@tox -e py27,py37 -- -m "smoke and not app"

.PHONY: splunkrc
splunkrc:
@echo "$(ATTN_COLOR)==> splunkrc $(NO_COLOR)"
@echo "To make a .splunkrc:"
@echo " [SPLUNK_INSTANCE_JSON] | python scripts/build-splunkrc.py ~/.splunkrc"

.PHONY: splunkrc_default
splunkrc_default:
@echo "$(ATTN_COLOR)==> splunkrc_default $(NO_COLOR)"
@python scripts/build-splunkrc.py ~/.splunkrc
.PHONY: env
env:
@echo "$(ATTN_COLOR)==> env $(NO_COLOR)"
@echo "To make a .env:"
@echo " [SPLUNK_INSTANCE_JSON] | python scripts/build-env.py"

.PHONY: env_default
env_default:
@echo "$(ATTN_COLOR)==> env_default $(NO_COLOR)"
@python scripts/build-env.py

.PHONY: up
up:
Expand Down
82 changes: 49 additions & 33 deletions 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.18
#### Version 1.6.19

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 @@ -60,7 +60,6 @@ You'll need `docker` and `docker-compose` to get up and running using this metho
```
make up SPLUNK_VERSION=8.0
make wait_up
make splunkrc_default
make test
make down
```
Expand All @@ -75,7 +74,7 @@ The SDK command-line examples require a common set of arguments that specify the
#### Using username/password
```python
import splunklib.client as client
service = client.connect(host=<host_url>, username=<username>, password=<password>, autoLogin=True)
service = client.connect(host=<host_url>, username=<username>, password=<password>, autologin=True)
```

#### Using bearer token
Expand All @@ -91,13 +90,13 @@ service = client.connect(host=<host_url>, token=<session_key>, autologin=True)
```

###
#### Create a .splunkrc convenience file
#### Update a .env 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.
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 **.env** file. Then, the SDK examples and unit tests use the values from the **.env** file when you don't specify them.

>**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.
>**Note**: Storing login credentials in the **.env** 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.

To use this convenience file, create a text file with the following format:
here is an example of .env file:

# Splunk Enterprise host (default: localhost)
host=localhost
Expand All @@ -106,27 +105,15 @@ To use this convenience file, create a text file with the following format:
# Splunk Enterprise username
username=admin
# Splunk Enterprise password
password=changeme
password=changed!
# Access scheme (default: https)
scheme=https
# Your version of Splunk Enterprise
version=8.0

Save the file as **.splunkrc** in the current user's home directory.

* For example on OS X, save the file as:

~/.splunkrc

* On Windows, save the file as:

C:\Users\currentusername\.splunkrc

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\\&lt;currentusername&gt;** directory and entering the following command:

Notepad.exe .splunkrc

Click **Yes**, then continue creating the file.
# Bearer token for authentication
#bearerToken=<Bearer-token>
# Session key for authentication
#sessionKey=<Session-Key>

#### Run the examples

Expand All @@ -144,7 +131,7 @@ Using Session key

python examplename.py --sessionKey="<value>"

If you saved your login credentials in the **.splunkrc** file, you can omit those arguments:
If you saved your login credentials in the **.env** file, you can omit those arguments:

python examplename.py

Expand Down Expand Up @@ -212,19 +199,48 @@ class CustomStreamingCommand(StreamingCommand):
Do
```python
@Configuration()
class GeneratorTest(GeneratingCommand):
def generate(self):
yield self.gen_record(_time=time.time(), one=1)
yield self.gen_record(_time=time.time(), two=2)
class GeneratorTest(GeneratingCommand):
def generate(self):
yield self.gen_record(_time=time.time(), one=1)
yield self.gen_record(_time=time.time(), two=2)
```

Don't
```python
@Configuration()
class GeneratorTest(GeneratingCommand):
def generate(self):
yield {'_time': time.time(), 'one': 1}
yield {'_time': time.time(), 'two': 2}
class GeneratorTest(GeneratingCommand):
def generate(self):
yield {'_time': time.time(), 'one': 1}
yield {'_time': time.time(), 'two': 2}
```

### Access metadata of modular inputs app
* In stream_events() method we can access modular input app metadata from InputDefinition object
* See [GitHub Commit](https://github.com/splunk/splunk-sdk-python/blob/develop/examples/github_commits/bin/github_commits.py) Modular input App example for reference.
```python
def stream_events(self, inputs, ew):
# other code

# access metadata (like server_host, server_uri, etc) of modular inputs app from InputDefinition object
# here inputs is a InputDefinition object
server_host = inputs.metadata["server_host"]
server_uri = inputs.metadata["server_uri"]

# Get the checkpoint directory out of the modular input's metadata
checkpoint_dir = inputs.metadata["checkpoint_dir"]
```

#### Optional:Set up logging for splunklib
+ The default level is WARNING, which means that only events of this level and above will be visible
+ To change a logging level we can call setup_logging() method and pass the logging level as an argument.
+ Optional: we can also pass log format and date format string as a method argument to modify default format

```python
import logging
from splunklib import setup_logging

# To see debug and above level logs
setup_logging(logging.DEBUG)
```

### Changelog
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ services:
- ./splunklib:/opt/splunk/etc/apps/github_forks/lib/splunklib
- ./examples/random_numbers:/opt/splunk/etc/apps/random_numbers
- ./splunklib:/opt/splunk/etc/apps/random_numbers/lib/splunklib
- ./examples/github_commits:/opt/splunk/etc/apps/github_commits
- ./splunklib:/opt/splunk/etc/apps/github_commits/lib/splunklib
- ./examples/searchcommands_app/package:/opt/splunk/etc/apps/searchcommands_app
- ./splunklib:/opt/splunk/etc/apps/searchcommands_app/lib/splunklib
- ./examples/twitted/twitted:/opt/splunk/etc/apps/twitted
Expand Down
4 changes: 4 additions & 0 deletions docs/searchcommands.rst
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ splunklib.searchcommands
:members:
:inherited-members:

.. autoclass:: Float
:members:
:inherited-members:

.. autoclass:: RegularExpression
:members:
:inherited-members:
Expand Down
2 changes: 1 addition & 1 deletion examples/analytics/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def main():

argv = sys.argv[1:]

splunk_opts = utils.parse(argv, {}, ".splunkrc", usage=usage)
splunk_opts = utils.parse(argv, {}, ".env", usage=usage)
tracker = AnalyticsTracker("cli_app", splunk_opts.kwargs)

#tracker.track("test_event", "abc123", foo="bar", bar="foo")
Expand Down
2 changes: 1 addition & 1 deletion examples/analytics/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def main():

argv = sys.argv[1:]

opts = utils.parse(argv, {}, ".splunkrc", usage=usage)
opts = utils.parse(argv, {}, ".env", usage=usage)
retriever = AnalyticsRetriever(opts.args[0], opts.kwargs)

#events = retriever.events()
Expand Down
2 changes: 1 addition & 1 deletion examples/analytics/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def application(name):
def main():
argv = sys.argv[1:]

opts = utils.parse(argv, {}, ".splunkrc")
opts = utils.parse(argv, {}, ".env")
global splunk_opts
splunk_opts = opts.kwargs

Expand Down
2 changes: 1 addition & 1 deletion examples/async/async.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def main(argv):
usage = "async.py <sync | async>"

# Parse the command line args.
opts = parse(argv, {}, ".splunkrc")
opts = parse(argv, {}, ".env")

# We have to see if we got either the "sync" or
# "async" command line arguments.
Expand Down
2 changes: 1 addition & 1 deletion examples/binding1.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def search(self, query, **kwargs):
return self.context.post("search/jobs/export", search=query, **kwargs)

def main(argv):
opts = parse(argv, {}, ".splunkrc")
opts = parse(argv, {}, ".env")
context = connect(**opts.kwargs)
service = Service(context)
assert service.apps().status == 200
Expand Down
2 changes: 1 addition & 1 deletion examples/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def main():
commands = ['create', 'delete', 'list']

# parse args, connect and setup
opts = parse(argv, {}, ".splunkrc", usage=usage)
opts = parse(argv, {}, ".env", usage=usage)
service = connect(**opts.kwargs)
program = Program(service)

Expand Down
2 changes: 1 addition & 1 deletion examples/dashboard/feed.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def iterate(job):

def main(argv):
# Parse the command line args.
opts = parse(argv, {}, ".splunkrc")
opts = parse(argv, {}, ".env")

# Connect to Splunk
service = client.connect(**opts.kwargs)
Expand Down
2 changes: 1 addition & 1 deletion examples/event_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"(e.g., export PYTHONPATH=~/splunk-sdk-python.")

def main():
opts = parse(sys.argv[1:], {}, ".splunkrc")
opts = parse(sys.argv[1:], {}, ".env")
service = connect(**opts.kwargs)

for item in service.event_types:
Expand Down
Loading