Skip to main content

expand_router_string

Resolves a router string into a router instance by looking up the symbol and instantiating it if it follows the pre-4.0 router class interface.

def expand_router_string(
router: string
) - > object

Resolves a router string into a router instance, handling backward compatibility for legacy router classes that require instantiation.

Parameters​

NameTypeDescription
routerstringThe fully qualified Python path or symbol name of the router to be resolved.

Returns​

TypeDescription
objectAn instantiated router object or a router class capable of routing tasks.