splunklib.data

This module provides an Atom Feed response loader.

A simple load() utility reads Atom Feed XML data (the format returned by the Splunk REST API), and converts it to a native Python dictionary or list.

splunklib.data.load(text, match=None)

Loads XML text into a native Python structure (dict or list). If you provide an optional match string (a tag name or path), only the matching sub-elements are loaded.

Parameters:
  • text (string) – The XML text to load.
  • match (string) – A tag name or path to match (optional).
splunklib.data.record(value=None)

Returns a record instance constructed with an initial value that you provide.

Parameters:value (dict) – An initial record value.
class splunklib.data.Record

A generic utility class that enables dot access to members of a Python dictionary.

static fromkv(k, v)