eww.implant

Provides functions for inserting and removing Eww.

exception eww.implant.WildlyInsecureFlagNotSet[source]

Bases: exceptions.Exception

Raised when someone tries to make Eww listen on an external interface without setting the wildly_insecure flag in their embed call.

__weakref__

list of weak references to the object (if defined)

eww.implant.embed(host='localhost', port=10000, timeout=1, max_datapoints=500, wildly_insecure=False)[source]

The main entry point for eww. It creates the threads we need.

Parameters:
  • host (str) – The interface to listen for connections on.
  • port (int) – The port to listen for connections on.
  • timeout (float) – Frequency, in seconds, to check for a stop or remove request.
  • max_datapoints (int) – The maximum number of graph datapoints to record. If this limit is hit, datapoints will be discarded based on age, oldest-first.
  • wildly_insecure (bool) – This must be set to True in order to set the host argument to anything besides localhost or 127.0.0.1.
Returns:

None

Raises:

WildlyInsecureFlagNotSet – Will be raised if you attempt to change the host parameter to something besides localhost or 127.0.0.1 without setting wildly_insecure to True.

eww.implant.remove()[source]

Stops and removes all of eww.

Returns:None