def from_file(cls, path, fields=None, encoding='utf-8'):
        """
        Instantiate a Table from a database file.

        This method instantiates a table attached to the file at *path*.
        The file will be opened and traversed to determine the number of
        records, but the contents will not be stored in memory unless
        they are modified.

        Args:
            path: the path to the table file
            fields: the Relation schema for the table (loaded from the
                relations file in the same directory if not given)
            encoding: the character encoding of the file at *path*
        """
        path = _table_filename(path)  # do early in case file not found
        if fields is None:
            fields = _get_relation_from_table_path(path)

        table = cls(fields)
        table.attach(path, encoding=encoding)

        return table
Instantiate a Table from a database file.

        This method instantiates a table attached to the file at *path*.
        The file will be opened and traversed to determine the number of
        records, but the contents will not be stored in memory unless
        they are modified.

        Args:
            path: the path to the table file
            fields: the Relation schema for the table (loaded from the
                relations file in the same directory if not given)
            encoding: the character encoding of the file at *path*