firefly.server.spawnFireflyServer

firefly.server.spawnFireflyServer(port=5000, frames_per_second=30, decimation_factor=1, max_time=10)[source]

Wrapper to firefly.server.startFireflyServer() that instead starts a background process.

Parameters
  • port (int, optional) – port number to serve the .html files on, defaults to 5000

  • frames_per_second (int, optional) – enforced FPS for stream quality, used only if localhost:<port>/stream is accessed, defaults to 30

  • decimation_factor (int, optional) – factor to decimate data that is being passed through localhost:<port>/data_input, defaults to 1

  • max_time (float, optional) – maximum amount of time to wait for a Firefly server to be available.

Returns

subprocess.Popen

Return type

subprocess handler

Raises

RuntimeError – if max_time elapses without a successful Firefly server being initialized.