wuttafarm.farmos.handler

farmOS integration handler

class wuttafarm.farmos.handler.FarmOSHandler(config)[source]

Base class and default implementation for the farmOS integration handler.

get_farmos_client(hostname=None, **kwargs)[source]

Returns a new farmOS API client.

get_farmos_url(path=None, require=True)[source]

Returns the base URL for farmOS, or one with path appended.

Note that if no path is provided, the final slash will be stripped from the base URL.

Parameters:
  • path – Optional path to append to the base URL.

  • require – If true, an error is raised when base URL cannot be determined.

Returns:

URL string