Skip to content

Commit 85bd68e

Browse files
committed
More edits
1 parent 3a25228 commit 85bd68e

File tree

1 file changed

+18
-21
lines changed

1 file changed

+18
-21
lines changed

splunklib/client.py

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,7 @@
3434
:class:`Service` class, which encapsulates a connection to the server, and
3535
provides access to the various aspects of Splunk's functionality, which are
3636
exposed via the REST API. Typically you connect to a running Splunk instance
37-
with the :func:`connect` function.
38-
39-
**Example**::
37+
with the :func:`connect` function::
4038
4139
import splunklib.client as client
4240
service = client.connect(host='localhost', port=8089,
@@ -45,9 +43,7 @@
4543
4644
:class:`Service` objects have fields for the various Splunk resources (such as apps,
4745
jobs, saved searches, inputs, and indexes). All of these fields are
48-
:class:`Collection` objects.
49-
50-
**Example**::
46+
:class:`Collection` objects::
5147
5248
appcollection = service.apps
5349
my_app = appcollection.create('my_app')
@@ -56,9 +52,7 @@
5652
5753
The individual elements of the collection, in this case *applications*,
5854
are subclasses of :class:`Entity`. An ``Entity`` object has fields for its
59-
attributes, and methods that are specific to each kind of entity.
60-
61-
**Example**::
55+
attributes, and methods that are specific to each kind of entity. For example::
6256
6357
print my_app['author'] # Or: print my_app.author
6458
my_app.package() # Creates a compressed package of this application
@@ -1403,8 +1397,7 @@ def list(self, count=None, **kwargs):
14031397
returned items: "auto", "alpha", "alpha_case", or "num".
14041398
14051399
:type kwargs: ``dict``
1406-
:return: A collection of entities.
1407-
:rtype: ``list``
1400+
:return: A ``list`` of entities.
14081401
"""
14091402
# response = self.get(count=count, **kwargs)
14101403
# return self._load_list(response)
@@ -1434,8 +1427,7 @@ def names(self, count=None, **kwargs):
14341427
returned items: "auto", "alpha", "alpha_case", or "num".
14351428
14361429
:type kwargs: ``dict``
1437-
:return: A list of entity names.
1438-
:rtype: ``list``
1430+
:return: A ``list`` of entity names.
14391431
"""
14401432
return [ent.name for ent in self.iter(count=count, **kwargs)]
14411433

@@ -1464,8 +1456,8 @@ class Collection(ReadOnlyCollection):
14641456
# Or if there is only one search visible named 'my_search'
14651457
mysearch = mycollection['my_search']
14661458
1467-
Similarly, ``name`` in ``mycollection`` works as you expect (though you cannot
1468-
currently pass a namespace to the ``in`` operator), as does
1459+
Similarly, ``name`` in ``mycollection`` works as you might expect (though
1460+
you cannot currently pass a namespace to the ``in`` operator), as does
14691461
``len(mycollection)``.
14701462
14711463
However, as an aggregate, :class:`Collection` behaves more like a
@@ -1788,12 +1780,17 @@ def attached_socket(self, *args, **kwargs):
17881780
automatically closed at the end of the ``with`` block, even if an
17891781
exception is raised in the block.
17901782
1791-
:param host: The host value for events written to the stream.
1792-
:type host: ``string``
1793-
:param source: The source value for events written to the stream.
1794-
:type source: ``string``
1795-
:param sourcetype: The sourcetype value for events written to the stream.
1796-
:type sourcetype: ``string``
1783+
:param args: Additional arguments:
1784+
1785+
- "host" (``string``): The host value for events written to the stream.
1786+
1787+
- "source" (``string``): The source value for events written to the stream.
1788+
1789+
- "sourcetype" (``string``): The sourcetype value for events written to the stream.
1790+
1791+
:type args: ``dict``
1792+
:param kwargs: FRED?
1793+
:type kwargs: ``dict``
17971794
17981795
**Example**::
17991796

0 commit comments

Comments
 (0)