<?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 Re: Reload changed python code without restarting splunk? in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/How-to-reload-changed-python-code-without-restarting-Splunk/m-p/558553#M9957</link>
    <description>&lt;P&gt;Even better question, I recently learned python, how do I take what I learned and use it in splunk?&amp;nbsp; Explanation links to articles are fine answers!&amp;nbsp; Yes, I give Karma!&lt;/P&gt;</description>
    <pubDate>Wed, 07 Jul 2021 13:12:55 GMT</pubDate>
    <dc:creator>Funderburg78</dc:creator>
    <dc:date>2021-07-07T13:12:55Z</dc:date>
    <item>
      <title>How to reload changed python code without restarting Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-reload-changed-python-code-without-restarting-Splunk/m-p/558511#M9955</link>
      <description>&lt;P&gt;Hi All , My query was is there any way we can reload the changed python script without restarting the splunk everytime?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I understand we have _bump for javascript and CSS &amp;amp; debug/refresh for .conf files but do we have a similiar command for changed python scripts as well?&lt;/P&gt;
&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;
&lt;P&gt;AG.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2023 15:17:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-reload-changed-python-code-without-restarting-Splunk/m-p/558511#M9955</guid>
      <dc:creator>arjitg</dc:creator>
      <dc:date>2023-01-24T15:17:04Z</dc:date>
    </item>
    <item>
      <title>Re: Reload changed python code without restarting splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-reload-changed-python-code-without-restarting-Splunk/m-p/558543#M9956</link>
      <description>&lt;P&gt;Please describe your use case.&amp;nbsp; I change the Python code in my apps often and never need to restart Splunk.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jul 2021 12:41:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-reload-changed-python-code-without-restarting-Splunk/m-p/558543#M9956</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-07-07T12:41:26Z</dc:date>
    </item>
    <item>
      <title>Re: Reload changed python code without restarting splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-reload-changed-python-code-without-restarting-Splunk/m-p/558553#M9957</link>
      <description>&lt;P&gt;Even better question, I recently learned python, how do I take what I learned and use it in splunk?&amp;nbsp; Explanation links to articles are fine answers!&amp;nbsp; Yes, I give Karma!&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jul 2021 13:12:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-reload-changed-python-code-without-restarting-Splunk/m-p/558553#M9957</guid>
      <dc:creator>Funderburg78</dc:creator>
      <dc:date>2021-07-07T13:12:55Z</dc:date>
    </item>
    <item>
      <title>Re: Reload changed python code without restarting splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-reload-changed-python-code-without-restarting-Splunk/m-p/558571#M9958</link>
      <description>&lt;P&gt;Please ask a new question rather than hijack a thread.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jul 2021 14:12:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-reload-changed-python-code-without-restarting-Splunk/m-p/558571#M9958</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-07-07T14:12:20Z</dc:date>
    </item>
    <item>
      <title>Re: Reload changed python code without restarting splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-reload-changed-python-code-without-restarting-Splunk/m-p/558624#M9959</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp;! Thanks for this. So does it mean that you don't have to restart the Splunk server whenever you make any changes to your python code in "bin" folder? You can save the code and it should run fine whenever we are triggering this code through JS ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my use case, I am trying to encrypt password using python script. My JS is calling this python script &amp;amp;&amp;nbsp; sending that encrypted password&amp;nbsp; to Splunk to display.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;AG.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jul 2021 23:11:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-reload-changed-python-code-without-restarting-Splunk/m-p/558624#M9959</guid>
      <dc:creator>arjitg</dc:creator>
      <dc:date>2021-07-07T23:11:45Z</dc:date>
    </item>
    <item>
      <title>Re: Reload changed python code without restarting splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-reload-changed-python-code-without-restarting-Splunk/m-p/573208#M9960</link>
      <description>&lt;P&gt;I have the same problem.&amp;nbsp;&lt;/P&gt;&lt;P&gt;To specify it a little further:&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am developing a custom REST Endpoint using&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from splunk.persistconn.application import PersistentServerConnectionApplicationPython&lt;/LI-CODE&gt;&lt;P&gt;When I run the endpoint I get the expected result. However if I then go on to change the code, the changes sometimes impact the output and sometimes they don't no matter what I do to the code. Even if I deliberately break the code, the endpoint still works.&lt;/P&gt;&lt;P&gt;As far as I could figure out, I have about 5-10 iterations that will impact the output, afterwards some cached version of my script seems to be executed. If I reach that point, the only thing, that makes new versions of the code show up, is restarting splunk, as initially suggested.&lt;/P&gt;&lt;P&gt;So if there is something similar to _bump or debug/refresh for Python, that would be a HUGE help.&lt;/P&gt;&lt;P&gt;I have experienced this behavior with Splunk 6, 7, and 8. Previous versions I have not done much development on, so I can't say.&lt;/P&gt;&lt;P&gt;Any suggestions would be immensely appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Nov 2021 17:26:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-reload-changed-python-code-without-restarting-Splunk/m-p/573208#M9960</guid>
      <dc:creator>Dohrendorf_Cons</dc:creator>
      <dc:date>2021-11-01T17:26:30Z</dc:date>
    </item>
    <item>
      <title>Re: Reload changed python code without restarting splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-reload-changed-python-code-without-restarting-Splunk/m-p/628122#M10918</link>
      <description>&lt;P&gt;You need to "Disable the client and server caches during development".&lt;/P&gt;&lt;P&gt;&lt;A href="https://dev.splunk.com/enterprise/docs/developapps/manageknowledge/assetcaching/" target="_blank"&gt;https://dev.splunk.com/enterprise/docs/developapps/manageknowledge/assetcaching/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2023 11:35:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-reload-changed-python-code-without-restarting-Splunk/m-p/628122#M10918</guid>
      <dc:creator>AgentTimon</dc:creator>
      <dc:date>2023-01-24T11:35:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to reload changed python code without restarting Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-reload-changed-python-code-without-restarting-Splunk/m-p/704838#M11748</link>
      <description>&lt;P&gt;Try adding this line at the top of your python script. This will not store cached script&lt;/P&gt;&lt;P&gt;Only in dev&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&lt;EM&gt;import datetime;print(datetime.datetime.now())&lt;/EM&gt;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 20 Nov 2024 14:46:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-reload-changed-python-code-without-restarting-Splunk/m-p/704838#M11748</guid>
      <dc:creator>dhaparam</dc:creator>
      <dc:date>2024-11-20T14:46:28Z</dc:date>
    </item>
    <item>
      <title>Re: Reload changed python code without restarting splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-reload-changed-python-code-without-restarting-Splunk/m-p/759703#M12109</link>
      <description>&lt;P&gt;I know this is 5 years later, but I had the same issue and this is where Google took me.&lt;BR /&gt;&lt;BR /&gt;IMO the easiest way to fix this after several hours of various attempts is to run (on Linux at least):&amp;nbsp;pgrep -f "persistconn/appserver.py" | xargs kill -9&lt;BR /&gt;&lt;BR /&gt;This will kill the persistent app server. It restarts pretty quickly (instantly on my dev box) and changes will be registered. I run it after every save now.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Mar 2026 18:48:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-reload-changed-python-code-without-restarting-Splunk/m-p/759703#M12109</guid>
      <dc:creator>ccWildcard</dc:creator>
      <dc:date>2026-03-26T18:48:42Z</dc:date>
    </item>
  </channel>
</rss>

