• full name:

  • parent module:

  • type: function, subclass_name)[source]

For a given base class, recursively find the subclass with the given name.

  • base_class (class) – The base class of which subclass_name is supposed to be a subclass.

  • subclass_name (str | type) – The name (str) of the class to be found. Alternatively, if a type is given, it is directly returned. In that case, a warning is raised if it is not a subclass of base_class.


subclass – Class with name subclass_name which is a subclass of the base_class. None, if no subclass of the given name is found.

Return type



ValueError – When no or multiple subclasses of base_class exists with that subclass_name.: