title: Bloomberg blpapi on Python with remote/server connection
body: <p>I am currently developing a new solution on Python using the Bloomberg api, and it is working very well, however I have to open a Bloomberg terminal each time I want to execute the code otherwise the api is not working. Does someone know if the Bloomberg api can be called on a server (by changing connection settings), instead of a local connection, allowing the code to be executed on airflow for instance instead of having to open Bloomberg every time?</p>
  <p>Here is the beginning of my code where the connection settings can be found:</p>
  <pre><code>from __future__ import print_function
  from __future__ import absolute_import
  
  import blpapi
  import pandas as pd
  import pickle
  from optparse import OptionParser
  
  def parseCmdLine():
      parser = OptionParser(description=&quot;Retrieve reference data.&quot;)
      parser.add_option(&quot;-a&quot;,
                        &quot;--ip&quot;,
                        dest=&quot;host&quot;,
                        help=&quot;server name or IP (default: %default)&quot;,
                        metavar=&quot;ipAddress&quot;,
                        default=&quot;localhost&quot;)
      parser.add_option(&quot;-p&quot;,
                        dest=&quot;port&quot;,
                        type=&quot;int&quot;,
                        help=&quot;server port (default: %default)&quot;,
                        metavar=&quot;tcpPort&quot;,
                        default=8194)
  
      (options, args) = parser.parse_args()
  
      return options
  
  def _get_flows_from_bbg(isin:int):
      global options
      options = parseCmdLine()
  
      # Fill SessionOptions
      sessionOptions = blpapi.SessionOptions()
      sessionOptions.setServerHost(options.host)
      sessionOptions.setServerPort(options.port)
  
      #print(&quot;Connecting to %s:%d&quot; % (options.host, options.port))
  
      # Create a Session
      session = blpapi.Session(sessionOptions)
  </code></pre>
  <p>Thanks in advance!</p>