<commit_before># The Splunk Python Software Development Kit

#### Version 1.0

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

Splunk is a search engine and analytic environment that uses a distributed
map-reduce architecture to efficiently index, search and process large 
time-varying data sets.

The Splunk product is popular with system administrators for aggregation and
monitoring of IT machine data, security, compliance and a wide variety of other
scenarios that share a requirement to efficiently index, search, analyze and
generate real-time notifications from large volumes of time series data.

The Splunk developer platform enables developers to take advantage of the same
technology used by the Splunk product to build exciting new applications that
are enabled by Splunk's unique capabilities.


## Getting started with the Splunk Python SDK

The Splunk Python SDK contains library code and examples that show how to 
programmatically interact with Splunk for a variety of scenarios including 
searching, saved searches, data inputs, and many more, along with building 
complete applications. 

The information in this Readme provides steps to get going quickly, but for more
in-depth information be sure to visit the 
[Splunk Developer Portal](http://dev.splunk.com/view/SP-CAAAEBB). 
### Requirements

Here's what you need to get going with the Splunk Python SDK.

#### Python

The Splunk Python SDK requires Python 2.6+. 

#### Splunk

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

#### Splunk Python SDK
Get the Splunk Python SDK from [GitHub](https://github.com/) and clone the 
resources to your computer. For example, use the following command: 

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

### Installing the SDK

You can install the Splunk Python SDK libraries by using `easy_install` or `pip`:

    [sudo] easy_install splunk-sdk

Or

    [sudo] pip install splunk-sdk

Alternatively, you can use **setup.py** on the sources you cloned from GitHub:

    [sudo] python setup.py install

However, it's not necessarry to install the libraries to run the
examples and unit tests from the SDK.


### Running the examples and units

To run the examples and unit tests, you must put the root of
the SDK on your PYTHONPATH. For example, add the following line to your **.bash_profile**:

    export PYTHONPATH=~/splunk-sdk-python

The SDK command line examples require a common set of command line arguments<commit_msg>Document conditions under which the 'export PYTHONPATH=~/splunk-sdk-python' line works.<commit_after># The Splunk Python Software Development Kit

#### Version 1.0

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

Splunk is a search engine and analytic environment that uses a distributed
map-reduce architecture to efficiently index, search and process large 
time-varying data sets.

The Splunk product is popular with system administrators for aggregation and
monitoring of IT machine data, security, compliance and a wide variety of other
scenarios that share a requirement to efficiently index, search, analyze and
generate real-time notifications from large volumes of time series data.

The Splunk developer platform enables developers to take advantage of the same
technology used by the Splunk product to build exciting new applications that
are enabled by Splunk's unique capabilities.


## Getting started with the Splunk Python SDK

The Splunk Python SDK contains library code and examples that show how to 
programmatically interact with Splunk for a variety of scenarios including 
searching, saved searches, data inputs, and many more, along with building 
complete applications. 

The information in this Readme provides steps to get going quickly, but for more
in-depth information be sure to visit the 
[Splunk Developer Portal](http://dev.splunk.com/view/SP-CAAAEBB). 
### Requirements

Here's what you need to get going with the Splunk Python SDK.

#### Python

The Splunk Python SDK requires Python 2.6+. 

#### Splunk

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

#### Splunk Python SDK
Get the Splunk Python SDK from [GitHub](https://github.com/) and clone the 
resources to your computer. For example, use the following command: 

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

### Installing the SDK

You can install the Splunk Python SDK libraries by using `easy_install` or `pip`:

    [sudo] easy_install splunk-sdk

Or

    [sudo] pip install splunk-sdk

Alternatively, you can use **setup.py** on the sources you cloned from GitHub:

    [sudo] python setup.py install

However, it's not necessarry to install the libraries to run the
examples and unit tests from the SDK.


### Running the examples and units

To run the examples and unit tests, you must put the root of
the SDK on your PYTHONPATH. For example, if you have downloaded the SDK
to your home folder and are running Mac OS X or Linux,
add the following line to your **.bash_profile**:

    export PYTHONPATH=~/splunk-sdk-python

The SDK command line examples require a common set of command line arguments
{'fraction_non_alphanumeric': 0.057692307692307696, 'fraction_numerical': 0.0014114326040931546, 'mean_word_length': 4.487899322362052, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 11, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1903732', 'n_tokens_mistral': 1555, 'n_tokens_neox': 1399, 'n_words': 769}