title: Python Script using ExecuteStreamCommand
body: <p>After doing my best to find previous questions and examples relevant to this question, and still not finding the answers that I'm looking for I figured that I would submit a question myself.</p>
  
  <p>ExecuteStreamCommand seems like the perfect processor for me due to the following reasons:</p>
  
  <ul>
  <li>I am able to execute any Python script and avoid Jython (in a similar fashion as ExecuteScript). Jython is not an option for me.</li>
  <li>I can take in FlowFiles. This is necessary as my script is made to consume the output of a previous processor. Furthermore I like the idea of keeping the data under "NiFi management".</li>
  <li>It writes an "execution status" which will be useful for routing.</li>
  </ul>
  
  <p>In a nutshell, what I'm trying to do with ExecuteStreamCommand is:</p>
  
  <ul>
  <li>Ingest the output of a previous processor (a Scrapy spider that outputs a text file with JSON lines to be exact)</li>
  <li>Call a python script (e.g. <code>python3 my_script.py</code>)</li>
  <li>Load the FlowFile that was ingested in my python script.</li>
  <li>Select the content of the FlowFile.</li>
  <li>Operate on the content of the FlowFile within python.</li>
  <li>Output either an updated version of the original FlowFile or create a new one.</li>
  <li>Continue with my NiFi flow with the updated/new FlowFile.</li>
  </ul>
  
  <p>For clarity's sake I currently don't understand:</p>
  
  <ul>
  <li>How to call the python script (from the ExecuteStreamCommand Processor)</li>
  <li>How to load up the FlowFile from within Python</li>
  <li>How to update or create a new FlowFile from within Python</li>
  <li>How to output the updated FlowFile from Python back to NiFi.</li>
  </ul>
  
  <p>I have come across various examples for ExecuteScript, but unfortunately these don't exactly translate to the use of the ExecuteStreamCommand.</p>
  
  <p>Thank you in advance. Any advice is appreciated.</p>