Skip to content

Commit 8cb40d0

Browse files
author
Shakeel Mohamed
committed
Release 1.1
Conflicts: docs/conf.py
2 parents 1ed19f7 + 8e2ff5d commit 8cb40d0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1958
-36
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,5 @@ proxy.log
1313
MANIFEST
1414
coverage_report
1515
test.log
16+
examples/*/local
17+
examples/*/metadata

CHANGELOG.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,24 @@
1-
# Splunk Python SDK Changelog
1+
# Splunk SDK for Python Changelog
2+
3+
## Version 1.1
4+
5+
### New features and APIs
6+
7+
* Added support for building modular input scripts in Python using the Splunk
8+
SDK for Python.
9+
10+
### Minor additions
11+
12+
* Added 2 modular input examples: `Github forks` and `random numbers`.
13+
14+
* Added a `dist` command to `setup.py`. Running `setup.py dist` will generate
15+
2 `.spl` files for the new modular input example apps.
16+
17+
* `client.py` in the `splunklib` module will now restart Splunk via an HTTP
18+
post request instead of an HTTP get request.
19+
20+
* `.gitignore` has been updated to ignore `local` and `metadata` subdirectories
21+
for any examples.
222

323
## Version 1.0
424

README.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# The Splunk Python Software Development Kit
1+
# The Splunk Software Development Kit for Python
22

3-
#### Version 1.0
3+
#### Version 1.1
44

5-
The Splunk Python Software Development Kit (SDK) contains library code and
5+
The Splunk Software Development Kit (SDK) for Python contains library code and
66
examples designed to enable developers to build applications using Splunk.
77

88
Splunk is a search engine and analytic environment that uses a distributed
@@ -19,9 +19,9 @@ technology used by the Splunk product to build exciting new applications that
1919
are enabled by Splunk's unique capabilities.
2020

2121

22-
## Getting started with the Splunk Python SDK
22+
## Getting started with the Splunk SDK for Python
2323

24-
The Splunk Python SDK contains library code and examples that show how to
24+
The Splunk SDK for Python contains library code and examples that show how to
2525
programmatically interact with Splunk for a variety of scenarios including
2626
searching, saved searches, data inputs, and many more, along with building
2727
complete applications.
@@ -31,11 +31,11 @@ in-depth information be sure to visit the
3131
[Splunk Developer Portal](http://dev.splunk.com/view/SP-CAAAEBB).
3232
### Requirements
3333

34-
Here's what you need to get going with the Splunk Python SDK.
34+
Here's what you need to get going with the Splunk SDK for Python.
3535

3636
#### Python
3737

38-
The Splunk Python SDK requires Python 2.6+.
38+
The Splunk SDK for Python requires Python 2.6+.
3939

4040
#### Splunk
4141

@@ -44,15 +44,15 @@ If you haven't already installed Splunk, download it
4444
Splunk and system requirements, see
4545
[Installing & Running Splunk](http://dev.splunk.com/view/SP-CAAADRV).
4646

47-
#### Splunk Python SDK
48-
Get the Splunk Python SDK from [GitHub](https://github.com/) and clone the
49-
resources to your computer. For example, use the following command:
47+
#### Splunk SDK for Python
48+
Get the Splunk SDK for Python; [download the SDK as a ZIP](http://dev.splunk.com/view/SP-CAAAEBB)
49+
and extract the files. Or, if you want to contribute to the SDK, clone the
50+
repository from [GitHub](https://github.com/splunk/splunk-sdk-python).
5051

51-
git clone https://github.com/splunk/splunk-sdk-python.git
5252

5353
### Installing the SDK
5454

55-
You can install the Splunk Python SDK libraries by using `easy_install` or `pip`:
55+
You can install the Splunk SDK for Python libraries by using `easy_install` or `pip`:
5656

5757
[sudo] easy_install splunk-sdk
5858

@@ -151,7 +151,7 @@ To get help for an example, use the `--help` argument with an example:
151151

152152
#### Unit tests
153153

154-
The Splunk Python SDK contains a collection of unit tests. To run them, open a
154+
The Splunk SDK for Python contains a collection of unit tests. To run them, open a
155155
command prompt in the **/splunk-sdk-python** directory and enter:
156156

157157
python setup.py test
@@ -220,10 +220,10 @@ If you need to know more:
220220
[Splunk Developer Portal](http://dev.splunk.com).
221221

222222
* For conceptual and how-to documentation, see the
223-
[Overview of the Splunk Python SDK](http://dev.splunk.com/view/SP-CAAAEBB).
223+
[Overview of the Splunk SDK for Python](http://dev.splunk.com/view/SP-CAAAEBB).
224224

225225
* For API reference documentation, see the
226-
[Splunk Python SDK Reference](http://docs.splunk.com/Documentation/PythonSDK).
226+
[Splunk SDK for Python Reference](http://docs.splunk.com/Documentation/PythonSDK).
227227

228228
* For more about the Splunk REST API, see the
229229
[REST API Reference](http://docs.splunk.com/Documentation/Splunk/latest/RESTAPI).
@@ -281,7 +281,7 @@ If you would like to contribute to the SDK, go here for more information:
281281

282282
1. You will be granted support if you or your company are already covered
283283
under an existing maintenance/support agreement. Send an email to
284-
_support@splunk.com_ and include "Splunk Python SDK" in the subject line.
284+
_support@splunk.com_ and include "Splunk SDK for Python" in the subject line.
285285

286286
2. If you are not covered under an existing maintenance/support agreement, you
287287
can find help through the broader community at:

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Splunk Python SDK documentation build configuration file, created by
3+
# Splunk SDK for Python documentation build configuration file, created by
44
# sphinx-quickstart on Fri Apr 13 12:28:15 2012.
55
#
66
# This file is execfile()d with the current directory set to its containing dir.
@@ -110,7 +110,7 @@
110110
html_title = "Splunk SDK for Python API Reference"
111111

112112
# A shorter title for the navigation bar. Default is the same as html_title.
113-
#html_short_title = "Splunk Python SDK Reference"
113+
#html_short_title = "Splunk SDK for Python Reference"
114114

115115
# The name of an image file (relative to this directory) to place at the top
116116
# of the sidebar.

docs/index.rst

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Welcome to the API reference for the Splunk Python SDK, which describes the modules that are included in the Splunk Python SDK.
2-
For more information about the SDK, see the `Splunk Developer Portal <http://dev.splunk.com/view/python-sdk/SP-CAAAEBB>`_.
1+
Welcome to the API reference for the Splunk SDK for Python, which describes the modules that are included in the SDK.
2+
For more information, see the `Splunk Developer Portal <http://dev.splunk.com/view/python-sdk/SP-CAAAEBB>`_.
33

44
.. toctree::
55
:maxdepth: 2
@@ -122,3 +122,20 @@ For more information about the SDK, see the `Splunk Developer Portal <http://dev
122122
:class:`~splunklib.results.ResultsReader` class
123123

124124
:class:`~splunklib.results.Message` class
125+
126+
:doc:`modularinput`
127+
--------------
128+
129+
:class:`~splunklib.modularinput.Argument` class
130+
131+
:class:`~splunklib.modularinput.Event` class
132+
133+
:class:`~splunklib.modularinput.EventWriter` class
134+
135+
:class:`~splunklib.modularinput.InputDefinition` class
136+
137+
:class:`~splunklib.modularinput.Scheme` class
138+
139+
:class:`~splunklib.modularinput.Script` class
140+
141+
:class:`~splunklib.modularinput.ValidationDefinition` class

docs/modularinput.rst

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
splunklib.modularinput
2+
--------------
3+
4+
.. automodule:: splunklib.modularinput
5+
6+
.. autoclass:: Argument
7+
:members:
8+
9+
.. autoclass:: Event
10+
:members:
11+
12+
.. autoclass:: EventWriter
13+
:members:
14+
15+
.. autoclass:: InputDefinition
16+
:members:
17+
18+
.. autoclass:: Scheme
19+
:members:
20+
21+
.. autoclass:: Script
22+
:members:
23+
24+
.. autoclass:: ValidationDefinition
25+
:members:

examples/async/async.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# under the License.
1616

1717
# A sample that demonstrates a custom HTTP handler for the Splunk service,
18-
# as well as showing how you could use the Splunk Python SDK with coroutine
18+
# as well as showing how you could use the Splunk SDK for Python with coroutine
1919
# based systems like Eventlet.
2020

2121
#### Main Code

examples/export/export.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
# splunk support files
2929
from splunklib.binding import connect
3030
try:
31-
from utils import error, parse
31+
from utils import parse
3232
except ImportError:
3333
raise Exception("Add the SDK repository to your PYTHONPATH to run the examples "
3434
"(e.g., export PYTHONPATH=~/splunk-sdk-python.")
@@ -329,7 +329,9 @@ def main():
329329

330330
if path.exists(options.kwargs['output']):
331331
if options.kwargs['recover'] == False:
332-
error("Export file %s exists, and recover option nor specified" % options.kwargs['output'], exitcode=1)
332+
print "Export file %s exists, and recover option nor specified" % \
333+
options.kwargs['output']
334+
sys.exit(1)
333335
else:
334336
options.kwargs['end'] = recover(options)
335337
options.kwargs['fixtail'] = True
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[github_forks://<name>]
2+
*Streams events giving the number of forks of a GitHub repository
3+
4+
owner = <value>
5+
repo_name = <value>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[install]
2+
is_configured = 0
3+
4+
[ui]
5+
is_visible = 1
6+
label = Github Repository Forks
7+
8+
[launcher]
9+
author=Splunk
10+
description=Streams events giving the number of forks of a GitHub repository
11+
version = 1.0

0 commit comments

Comments
 (0)