return the object in a file

def export(self):
        """return the object in a file"""

        with open(self.export_url, 'w', encoding='utf-8') as file:
            file.write(self.build())
            if self.open_browser:
                webbrowser.open_new_tab(self.export_url)