Skip to content

Commit 25782d6

Browse files
committed
Changed Readme/changelog to conform to 80 chars.
Changed Readme/changelog to conform to 80 chars.
1 parent 942b48a commit 25782d6

File tree

2 files changed

+96
-64
lines changed

2 files changed

+96
-64
lines changed

CHANGELOG.md

Lines changed: 40 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,26 @@
66

77
* An `AuthenticationError` exception has been added.
88

9-
* An `"autologin"` argument has been added to the `splunklib.client.connect` and `splunklib.binding.connect` functions.
10-
When set to true, Splunk automatically tries to log in again if the session terminates.
9+
* An `"autologin"` argument has been added to the `splunklib.client.connect` and
10+
`splunklib.binding.connect` functions. When set to true, Splunk automatically
11+
tries to log in again if the session terminates.
1112

12-
* The `is_ready` and `is_done` methods have been added to the `Job` class to improve the verification of a job's completion status.
13+
* The `is_ready` and `is_done` methods have been added to the `Job` class to
14+
improve the verification of a job's completion status.
1315

1416
* Modular inputs have been added (requires Splunk 5.0+).
1517

1618
* The `Jobs.export` method has been added, enabling you to run export searches.
1719

18-
* The `Service.restart` method now takes a `"timeout"` argument. If a timeout period is specified, the function blocks
19-
until splunkd has restarted or the timeout period has passed. Otherwise, if a timeout period has not been specified,
20-
the function returns immediately and you must check whether splunkd has restarted yourself.
20+
* The `Service.restart` method now takes a `"timeout"` argument. If a timeout
21+
period is specified, the function blocks until splunkd has restarted or the
22+
timeout period has passed. Otherwise, if a timeout period has not been
23+
specified, the function returns immediately and you must check whether splunkd
24+
has restarted yourself.
2125

22-
* The `Collections.__getitem__` method can fetch items from collections with an explicit namespace. This example shows
23-
how to retrieve a saved search for a specific namespace:
26+
* The `Collections.__getitem__` method can fetch items from collections with an
27+
explicit namespace. This example shows how to retrieve a saved search for a
28+
specific namespace:
2429

2530
from splunklib.binding import namespace
2631
ns = client.namespace(owner='nobody', app='search')
@@ -30,19 +35,24 @@
3035
- Properties: `alert_count`, `fired_alerts`, `scheduled_times`, `suppressed`
3136
- Methods: `suppress`, `unsuppress`
3237

33-
* The `Index.attached_socket` method has been added. This method can be used inside a `with` block to
34-
submit multiple events to an index, which is a more idiomatic style than using the existing `Index.attach` method.
38+
* The `Index.attached_socket` method has been added. This method can be used
39+
inside a `with` block to submit multiple events to an index, which is a more
40+
idiomatic style than using the existing `Index.attach` method.
3541

36-
* The `Indexes.get_default` method has been added for returnings the name of the default index.
42+
* The `Indexes.get_default` method has been added for returnings the name of the
43+
default index.
3744

38-
* The `Service.search` method has been added as a shortcut for creating a search job.
45+
* The `Service.search` method has been added as a shortcut for creating a search
46+
job.
3947

40-
* The `User.role_entities` convenience method has been added for returning a list of role entities of a user.
48+
* The `User.role_entities` convenience method has been added for returning a
49+
list of role entities of a user.
4150

42-
* The `Role` class has been added, including the `grant` and `revoke` convenience methods for adding and removing
43-
capabilities from a role.
51+
* The `Role` class has been added, including the `grant` and `revoke`
52+
convenience methods for adding and removing capabilities from a role.
4453

45-
* The `Application.package` and `Application.updateInfo` methods have been added.
54+
* The `Application.package` and `Application.updateInfo` methods have been
55+
added.
4656

4757

4858
### Breaking changes
@@ -51,15 +61,17 @@
5161
`HTTPError` with code 401.
5262

5363
* `Job` objects are no longer guaranteed to be ready for querying.
54-
Client code should call the `Job.is_ready` method to determine when it is safe to
55-
access properties on the job.
64+
Client code should call the `Job.is_ready` method to determine when it is safe
65+
to access properties on the job.
5666

5767
* The `Jobs.create` method can no longer be used to create a oneshot search
5868
(with `"exec_mode=oneshot"`). Use the `Jobs.oneshot` method instead.
5969

6070
* The `ResultsReader` interface has changed completely, including:
61-
- The `read` method has been removed and you must iterate over the `ResultsReader` object directly.
62-
- Results from the iteration are either `dict`s or instances of `results.Message`.
71+
- The `read` method has been removed and you must iterate over the
72+
`ResultsReader` object directly.
73+
- Results from the iteration are either `dict`s or instances of
74+
`results.Message`.
6375

6476
* All `contains` methods on collections have been removed.
6577
Use Python's `in` operator instead. For example:
@@ -75,17 +87,18 @@
7587
the current namespace.
7688

7789
* The order of arguments in the `Inputs.create` method has changed. The `name`
78-
argument is now first, to be consistent with all other collections and all other
79-
operations on `Inputs`.
90+
argument is now first, to be consistent with all other collections and all
91+
other operations on `Inputs`.
8092

8193
* The `ConfFile` class has been renamed to `ConfigurationFile`.
8294

8395
* The `Confs` class has been renamed to `Configurations`.
8496

85-
* Namespace handling has changed and any code that depends on namespace handling in detail may break.
97+
* Namespace handling has changed and any code that depends on namespace handling
98+
in detail may break.
8699

87-
* Calling the `Job.cancel` method on a job that has already been cancelled no longer
88-
has any effect.
100+
* Calling the `Job.cancel` method on a job that has already been cancelled no
101+
longer has any effect.
89102

90103
* The `Stanza.submit` method now takes a `dict` instead of a raw string.
91104

@@ -94,8 +107,8 @@
94107

95108
* Collection listings are optionally paginated.
96109

97-
* Connecting with a pre-existing session token works whether the token begins with 'Splunk ' or not;
98-
the SDK handles either case correctly.
110+
* Connecting with a pre-existing session token works whether the token begins
111+
with 'Splunk ' or not; the SDK handles either case correctly.
99112

100113
* Documentation has been improved and expanded.
101114

README.md

Lines changed: 56 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
#### Version 1.0
44

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

88
Splunk is a search engine and analytic environment that uses a distributed
99
map-reduce architecture to efficiently index, search and process large
@@ -39,9 +39,10 @@ The Splunk Python SDK requires Python 2.6+.
3939

4040
#### Splunk
4141

42-
If you haven't already installed Splunk, download it [here](http://www.splunk.com/download).
43-
For more about installing and running Splunk
44-
and system requirements, see [Installing & Running Splunk](http://dev.splunk.com/view/SP-CAAADRV).
42+
If you haven't already installed Splunk, download it
43+
[here](http://www.splunk.com/download). For more about installing and running
44+
Splunk and system requirements, see
45+
[Installing & Running Splunk](http://dev.splunk.com/view/SP-CAAADRV).
4546

4647
#### Splunk Python SDK
4748
Get the Splunk Python SDK from [GitHub](https://github.com/) and clone the
@@ -70,21 +71,24 @@ examples and unit tests from the SDK.
7071
### Running the examples and unit tests
7172

7273
To run the examples and unit tests, you must put the root of
73-
the SDK on your PYTHONPATH. For example, add the following line to your **.bash_profile**:
74+
the SDK on your PYTHONPATH. For example, add the following line to your
75+
**.bash_profile**:
7476

7577
export PYTHONPATH=~/splunk-sdk-python
7678

7779
The SDK command-line examples require a common set of arguments
78-
that specify things like the Splunk host, port, and login credentials. For a full list of
79-
command-line arguments, include `--help` as an argument to any of the examples.
80+
that specify things like the Splunk host, port, and login credentials. For a
81+
full list of command-line arguments, include `--help` as an argument to any of
82+
the examples.
8083

8184
#### .splunkrc
8285

8386
To connect to Splunk, many of the SDK examples and unit tests take command-line
8487
arguments that specify values for the host, port, and login credentials for
8588
Splunk. For convenience during development, you can store these arguments as
86-
key-value pairs in a text file named **.splunkrc**. Then, the SDK examples and unit tests
87-
use the values from the **.splunkrc** file when you don't specify them.
89+
key-value pairs in a text file named **.splunkrc**. Then, the SDK examples and
90+
unit tests use the values from the **.splunkrc** file when you don't specify
91+
them.
8892

8993
To use this convenience file, create a text file with the following format:
9094

@@ -120,21 +124,23 @@ Save the file as **.splunkrc** in the current user's home directory.
120124

121125
Click **Yes**, then continue creating the file.
122126

123-
**Note**: Storing login credentials in the **.splunkrc** file is only for convenience
124-
during development. This file isn't part of the Splunk platform and
127+
**Note**: Storing login credentials in the **.splunkrc** file is only for
128+
convenience during development. This file isn't part of the Splunk platform and
125129
shouldn't be used for storing user credentials for production. And, if you're
126130
at all concerned about the security of your credentials, just enter them at
127131
the command line rather than saving them in this file.
128132

129133

130134
#### Examples
131135

132-
Examples are located in the **/splunk-sdk-python/examples** directory. To run the examples at
133-
the command line, use the Python interpreter and include any arguments that are required by the example:
136+
Examples are located in the **/splunk-sdk-python/examples** directory. To run
137+
the examples at the command line, use the Python interpreter and include any
138+
arguments that are required by the example:
134139

135140
python examplename.py --username="admin" --password="changeme"
136141

137-
If you saved your login credentials in the **.splunkrc** file, you can omit those arguments:
142+
If you saved your login credentials in the **.splunkrc** file, you can omit
143+
those arguments:
138144

139145
python examplename.py
140146

@@ -144,18 +150,20 @@ To get help for an example, use the `--help` argument with an example:
144150

145151
#### Unit tests
146152

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

150156
python setup.py test
151157

152-
You can also run individual test files, which are located in **/splunk-sdk-python/tests**. For example,
153-
to run the apps test, open a command prompt in the **/splunk-sdk-python/tests** subdirectory and enter:
158+
You can also run individual test files, which are located in
159+
**/splunk-sdk-python/tests**. For example, to run the apps test, open a command
160+
prompt in the **/splunk-sdk-python/tests** subdirectory and enter:
154161

155162
python test_app.py
156163

157-
The test suite uses Python's standard library and the built-in `unittest` library. If you're using Python 2.7,
158-
you're all set. However, if you are using Python 2.6, you'll also need to install the `unittest2` library to
164+
The test suite uses Python's standard library and the built-in `unittest`
165+
library. If you're using Python 2.7, you're all set. However, if you are using
166+
Python 2.6, you'll also need to install the `unittest2` library to
159167
get the additional features that were added to Python 2.7.
160168

161169
You can read more about our testing framework on
@@ -195,27 +203,35 @@ You can read more about our testing framework on
195203
### Changelog
196204

197205
The **CHANGELOG.md** file in the root of the repository contains a description
198-
of changes for each version of the SDK. You can also find it online at [https://github.com/splunk/splunk-sdk-python/blob/master/CHANGELOG.md](https://github.com/splunk/splunk-sdk-python/blob/master/CHANGELOG.md).
206+
of changes for each version of the SDK. You can also find it online at
207+
[https://github.com/splunk/splunk-sdk-python/blob/master/CHANGELOG.md](https://github.com/splunk/splunk-sdk-python/blob/master/CHANGELOG.md).
199208

200209
### Branches
201210

202211
The **master** branch always represents a stable and released version of the SDK.
203-
You can read more about our branching model on our Wiki at [https://github.com/splunk/splunk-sdk-python/wiki/Branching-Model](https://github.com/splunk/splunk-sdk-python/wiki/Branching-Model).
212+
You can read more about our branching model on our Wiki at
213+
[https://github.com/splunk/splunk-sdk-python/wiki/Branching-Model](https://github.com/splunk/splunk-sdk-python/wiki/Branching-Model).
204214

205215
## Documentation and resources
206216
If you need to know more:
207217

208-
* For all things developer with Splunk, your main resource is the [Splunk Developer Portal](http://dev.splunk.com).
218+
* For all things developer with Splunk, your main resource is the
219+
[Splunk Developer Portal](http://dev.splunk.com).
209220

210-
* For conceptual and how-to documentation, see the [Overview of the Splunk Python SDK](http://dev.splunk.com/view/SP-CAAAEBB).
221+
* For conceptual and how-to documentation, see the
222+
[Overview of the Splunk Python SDK](http://dev.splunk.com/view/SP-CAAAEBB).
211223

212-
* For API reference documentation, see the [Splunk Python SDK Reference](http://docs.splunk.com/Documentation/PythonSDK).
224+
* For API reference documentation, see the
225+
[Splunk Python SDK Reference](http://docs.splunk.com/Documentation/PythonSDK).
213226

214-
* For more about the Splunk REST API, see the [REST API Reference](http://docs.splunk.com/Documentation/Splunk/latest/RESTAPI).
227+
* For more about the Splunk REST API, see the
228+
[REST API Reference](http://docs.splunk.com/Documentation/Splunk/latest/RESTAPI).
215229

216-
* For more about about Splunk in general, see [Splunk>Docs](http://docs.splunk.com/Documentation/Splunk).
230+
* For more about about Splunk in general, see
231+
[Splunk>Docs](http://docs.splunk.com/Documentation/Splunk).
217232

218-
* For more about this SDK's repository, see our [GitHub Wiki](https://github.com/splunk/splunk-sdk-python/wiki/).
233+
* For more about this SDK's repository, see our
234+
[GitHub Wiki](https://github.com/splunk/splunk-sdk-python/wiki/).
219235

220236
## Community
221237

@@ -270,16 +286,19 @@ If you would like to contribute to the SDK, go here for more information:
270286
can find help through the broader community at:
271287

272288
<ul>
273-
<li><a href='http://splunk-base.splunk.com/answers/'>Splunk Answers</a> (use the <b>sdk</b>, <b>java</b>,
274-
<b>python</b>, and <b>javascript</b> tags to identify your questions)</li>
275-
<li><a href='http://groups.google.com/group/splunkdev'>Splunkdev Google Group</a></li>
289+
<li><a href='http://splunk-base.splunk.com/answers/'>Splunk Answers</a> (use
290+
the <b>sdk</b>, <b>java</b>, <b>python</b>, and <b>javascript</b> tags to
291+
identify your questions)</li>
292+
<li><a href='http://groups.google.com/group/splunkdev'>Splunkdev Google
293+
Group</a></li>
276294
</ul>
277295
3. Splunk will NOT provide support for SDKs if the core library (the
278-
code in the <b>/splunklib</b> directory) has been modified. If you modify an SDK and
279-
want support, you can find help through the broader community and Splunk
280-
answers (see above). We would also like to know why you modified the core
281-
library&mdash;please send feedback to _[email protected]_.
282-
4. File any issues on [GitHub](https://github.com/splunk/splunk-sdk-python/issues).
296+
code in the <b>/splunklib</b> directory) has been modified. If you modify an
297+
SDK and want support, you can find help through the broader community and
298+
Splunk answers (see above). We would also like to know why you modified the
299+
core library&mdash;please send feedback to _[email protected]_.
300+
4. File any issues on
301+
[GitHub](https://github.com/splunk/splunk-sdk-python/issues).
283302

284303
### Contact Us
285304

0 commit comments

Comments
 (0)