<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic python SDK integration with Splunk in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/python-SDK-integration-with-Splunk/m-p/551112#M9862</link>
    <description>&lt;P&gt;I am trying to implement EventingCommand interface, and return just one custom event at the end of&amp;nbsp; processing multiple events in Splunk. I have the code written in Python and integrated. But for some reason, the code returns multiple events in Splunk.&lt;BR /&gt;&lt;BR /&gt;Can someone point out what is the problem here?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;import sys from splunklib.searchcommands&lt;BR /&gt;import dispatch, EventingCommand, Configuration&lt;BR /&gt;&lt;BR /&gt;@Configuration()&lt;BR /&gt;&amp;nbsp; &amp;nbsp; class testpython(EventingCommand):&lt;BR /&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; def transform(self, records):&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; list1 =[{'count': 1}]&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return list1&lt;BR /&gt;&lt;BR /&gt;if __name__ == "__main__": dispatch(testpython, sys.argv, sys.stdin, sys.stdout, __name__)&lt;/P&gt;</description>
    <pubDate>Mon, 10 May 2021 16:48:21 GMT</pubDate>
    <dc:creator>srijondas</dc:creator>
    <dc:date>2021-05-10T16:48:21Z</dc:date>
    <item>
      <title>python SDK integration with Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/python-SDK-integration-with-Splunk/m-p/551112#M9862</link>
      <description>&lt;P&gt;I am trying to implement EventingCommand interface, and return just one custom event at the end of&amp;nbsp; processing multiple events in Splunk. I have the code written in Python and integrated. But for some reason, the code returns multiple events in Splunk.&lt;BR /&gt;&lt;BR /&gt;Can someone point out what is the problem here?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;import sys from splunklib.searchcommands&lt;BR /&gt;import dispatch, EventingCommand, Configuration&lt;BR /&gt;&lt;BR /&gt;@Configuration()&lt;BR /&gt;&amp;nbsp; &amp;nbsp; class testpython(EventingCommand):&lt;BR /&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; def transform(self, records):&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; list1 =[{'count': 1}]&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return list1&lt;BR /&gt;&lt;BR /&gt;if __name__ == "__main__": dispatch(testpython, sys.argv, sys.stdin, sys.stdout, __name__)&lt;/P&gt;</description>
      <pubDate>Mon, 10 May 2021 16:48:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/python-SDK-integration-with-Splunk/m-p/551112#M9862</guid>
      <dc:creator>srijondas</dc:creator>
      <dc:date>2021-05-10T16:48:21Z</dc:date>
    </item>
  </channel>
</rss>

