@classmethod<EOL><INDENT>def from_file(cls, db_file=ALL_SETS_PATH):<DEDENT>
if callable(getattr(db_file, '<STR_LIT>', None)):<EOL><INDENT>return cls(json.load(db_file))<EOL><DEDENT>with io.open(db_file, encoding='<STR_LIT:utf8>') as inp:<EOL><INDENT>return cls(json.load(inp))<EOL><DEDENT>
Reads card data from a JSON-file.

        :param db_file: A file-like object or a path.
        :return: A new :class:`~mtgjson.CardDb` instance.