Skip to content

Commit e30936a

Browse files
Merge pull request splunk#245 from lowell80/fix-the-docs
Fix the docs
2 parents ce58176 + 969ab4c commit e30936a

16 files changed

+97
-65
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
[![Build Status](https://travis-ci.org/splunk/splunk-sdk-python.svg?branch=master)](https://travis-ci.org/splunk/splunk-sdk-python)
2+
[![Documentation Status](https://readthedocs.org/projects/splunk-python-sdk/badge/?version=latest)](https://splunk-python-sdk.readthedocs.io/en/latest/?badge=latest)
3+
24
# The Splunk Software Development Kit for Python
35

46
#### Version 1.6.6

docs/index.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,16 @@ For more information, see the `Splunk Developer Portal <http://dev.splunk.com/vi
33

44
.. toctree::
55
:maxdepth: 2
6+
:name: SDK for Python API Reference
7+
8+
binding
9+
client
10+
data
11+
results
12+
modularinput
13+
searchcommands
14+
searchcommandsvalidators
15+
616

717
:doc:`binding`
818
--------------

docs/searchcommands.rst

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,6 @@ splunklib.searchcommands
8080
:members:
8181
:inherited-members:
8282

83-
.. autoclass:: Fieldname
84-
:members:
85-
:inherited-members:
86-
8783
.. autoclass:: File
8884
:members:
8985
:inherited-members:
@@ -100,6 +96,3 @@ splunklib.searchcommands
10096
:members:
10197
:inherited-members:
10298

103-
.. autoclass:: Validator
104-
:members:
105-
:inherited-members:

docs/searchcommandsvalidators.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
splunklib.searchcommands.validators
2+
-----------------------------------
3+
4+
.. automodule:: splunklib.searchcommands.validators
5+
6+
.. autoclass:: Fieldname
7+
:members:
8+
:inherited-members:
9+
10+
.. autoclass:: Validator
11+
:members:
12+
:inherited-members:

splunklib/binding.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ def _parse_cookies(cookie_str, dictionary):
8080
then updates the the dictionary with any key-value pairs found.
8181
8282
**Example**::
83+
8384
dictionary = {}
8485
_parse_cookies('my=value', dictionary)
8586
# Now the following is True

splunklib/client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1200,7 +1200,7 @@ def __getitem__(self, key):
12001200
:raises ValueError: Raised if no namespace is specified and *key*
12011201
does not refer to a unique name.
12021202
1203-
*Example*::
1203+
**Example**::
12041204
12051205
s = client.connect(...)
12061206
saved_searches = s.saved_searches
@@ -1636,9 +1636,9 @@ def get(self, name="", owner=None, app=None, sharing=None, **query):
16361636
:rtype: ``dict`` with keys ``body``, ``headers``, ``reason``,
16371637
and ``status``
16381638
1639-
Example:
1639+
**Example**::
16401640
1641-
import splunklib.client
1641+
import splunklib.client
16421642
s = client.service(...)
16431643
saved_searches = s.saved_searches
16441644
saved_searches.get("my/saved/search") == \\

splunklib/modularinput/argument.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ def __init__(self, name, description=None, validation=None,
5454
:param name: ``string``, identifier for this argument in Splunk.
5555
:param description: ``string``, human-readable description of the argument.
5656
:param validation: ``string`` specifying how the argument should be validated, if using internal validation.
57-
If using external validation, this will be ignored.
57+
If using external validation, this will be ignored.
5858
:param data_type: ``string``, data type of this field; use the class constants.
59-
"data_type_boolean", "data_type_number", or "data_type_string".
59+
"data_type_boolean", "data_type_number", or "data_type_string".
6060
:param required_on_edit: ``Boolean``, whether this arg is required when editing an existing modular input of this kind.
6161
:param required_on_create: ``Boolean``, whether this arg is required when creating a modular input of this kind.
6262
:param title: ``String``, a human-readable title for the argument.

splunklib/modularinput/scheme.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def add_argument(self, arg):
5555
def to_xml(self):
5656
"""Creates an ``ET.Element`` representing self, then returns it.
5757
58-
:returns root, an ``ET.Element`` representing this scheme.
58+
:returns: an ``ET.Element`` representing this scheme.
5959
"""
6060
root = ET.Element("scheme")
6161

splunklib/modularinput/script.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,9 @@ def service(self):
118118
available as soon as the :code:`Script.stream_events` method is
119119
called.
120120
121-
:return: :class:splunklib.client.Service. A value of None is returned,
122-
if you call this method before the :code:`Script.stream_events` method
123-
is called.
121+
:return: :class:`splunklib.client.Service`. A value of None is returned,
122+
if you call this method before the :code:`Script.stream_events` method
123+
is called.
124124
125125
"""
126126
if self._service is not None:

splunklib/modularinput/validation_definition.py

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class ValidationDefinition(object):
2828
2929
**Example**::
3030
31-
``v = ValidationDefinition()``
31+
v = ValidationDefinition()
3232
3333
"""
3434
def __init__(self):
@@ -46,23 +46,25 @@ def parse(stream):
4646
4747
The XML typically will look like this:
4848
49-
``<items>``
50-
`` <server_host>myHost</server_host>``
51-
`` <server_uri>https://127.0.0.1:8089</server_uri>``
52-
`` <session_key>123102983109283019283</session_key>``
53-
`` <checkpoint_dir>/opt/splunk/var/lib/splunk/modinputs</checkpoint_dir>``
54-
`` <item name="myScheme">``
55-
`` <param name="param1">value1</param>``
56-
`` <param_list name="param2">``
57-
`` <value>value2</value>``
58-
`` <value>value3</value>``
59-
`` <value>value4</value>``
60-
`` </param_list>``
61-
`` </item>``
62-
``</items>``
49+
.. code-block:: xml
50+
51+
<items>
52+
<server_host>myHost</server_host>
53+
<server_uri>https://127.0.0.1:8089</server_uri>
54+
<session_key>123102983109283019283</session_key>
55+
<checkpoint_dir>/opt/splunk/var/lib/splunk/modinputs</checkpoint_dir>
56+
<item name="myScheme">
57+
<param name="param1">value1</param>
58+
<param_list name="param2">
59+
<value>value2</value>
60+
<value>value3</value>
61+
<value>value4</value>
62+
</param_list>
63+
</item>
64+
</items>
6365
6466
:param stream: ``Stream`` containing XML to parse.
65-
:return definition: A ``ValidationDefinition`` object.
67+
:return: A ``ValidationDefinition`` object.
6668
6769
"""
6870

0 commit comments

Comments
 (0)