scglue.utils.get_chained_attr

scglue.utils.get_chained_attr(x, attr)[source]

Get attribute from an object, with support for chained attribute names.

Parameters:
  • x (typing.Any) – Object to get attribute from

  • attr (str) – Attribute name

Return type:

typing.Any

Returns:

attr_value – Attribute value