@classmethod<EOL><INDENT>def from_file(cls, filename):<DEDENT>
return cls(api=APIDefinition.from_file(filename))<EOL>
Construct a Router by parsing the given `filename`.

If PyYAML is installed, YAML files are supported.
JSON files are always supported.

:param filename: The filename to read.
:rtype: Router