understatapi.utils module

Helper functions for formatting data

understatapi.utils.get_all_methods(cls)[source]

Get the names of all methods in a class, excluding methods decorated with @property, @classmethod, etc

Parameters

cls (type) – The class to get the methods for

Return type

List[str]

Returns

A list of the names of the methods

understatapi.utils.get_public_methods(cls)[source]

Get the names of all public methods in a class

Parameters

cls (type) – The class to get all public methods for

Return type

List[str]

Returns

A list of the names of the public methods

understatapi.utils.find_endpoints(line)[source]

Find the name of a subclass of ~understatapi.endpoints.base.BaseEndpoint in a string

Parameters

line (str) – The string in which to search for the name of a ~understatapi.endpoints.base.BaseEndpoint object

Return type

List[str]

understatapi.utils.str_to_class(modulename, classname)[source]

Get a class by using its name

Return type

type