def save(self, directory, dir_pattern=None, file_pattern=None):
    'Save files in specified directory.\n\n        Each txt url looks something like:\n        https://www.sec.gov/Archives/edgar/data/1018724/000101872419000043/0001018724-19-000043.txt\n\n        Args:\n            directory (str): Path to directory where files should be saved.\n            dir_pattern (str): Format string for subdirectories. Default is "{cik}/{type}".\n                Valid options are {cik} and/or {type}.\n            file_pattern (str): Format string for files. Default is "{accession_number}".\n                Valid options are {accession_number}.\n\n        Returns:\n            None\n\n        Raises:\n            ValueError: If no text urls are available for given filing object.\n        '
    urls = self.get_urls_safely()
    if (dir_pattern is None):
        dir_pattern = os.path.join('{cik}', '{type}')
    if (file_pattern is None):
        file_pattern = '{accession_number}'
    inputs = []
    for (cik, links) in urls.items():
        formatted_dir = dir_pattern.format(cik=cik, type=self.filing_type.value)
        for link in links:
            formatted_file = file_pattern.format(accession_number=self.get_accession_number(link))
            path = os.path.join(directory, formatted_dir, formatted_file)
            inputs.append((link, path))
    loop = asyncio.get_event_loop()
    loop.run_until_complete(self.client.wait_for_download_async(inputs))
Save files in specified directory.

Each txt url looks something like:
https://www.sec.gov/Archives/edgar/data/1018724/000101872419000043/0001018724-19-000043.txt

Args:
    directory (str): Path to directory where files should be saved.
    dir_pattern (str): Format string for subdirectories. Default is "{cik}/{type}".
        Valid options are {cik} and/or {type}.
    file_pattern (str): Format string for files. Default is "{accession_number}".
        Valid options are {accession_number}.

Returns:
    None

Raises:
    ValueError: If no text urls are available for given filing object.
def save(self, directory, dir_pattern=None, file_pattern=None):
    'Save files in specified directory.\n\n        Each txt url looks something like:\n        https://www.sec.gov/Archives/edgar/data/1018724/000101872419000043/0001018724-19-000043.txt\n\n        Args:\n            directory (str): Path to directory where files should be saved.\n            dir_pattern (str): Format string for subdirectories. Default is "{cik}/{type}".\n                Valid options are {cik} and/or {type}.\n            file_pattern (str): Format string for files. Default is "{accession_number}".\n                Valid options are {accession_number}.\n\n        Returns:\n            None\n\n        Raises:\n            ValueError: If no text urls are available for given filing object.\n        '
    urls = self.get_urls_safely()
    if (dir_pattern is None):
        dir_pattern = os.path.join('{cik}', '{type}')
    if (file_pattern is None):
        file_pattern = '{accession_number}'
    inputs = []
    for (cik, links) in urls.items():
        formatted_dir = dir_pattern.format(cik=cik, type=self.filing_type.value)
        for link in links:
            formatted_file = file_pattern.format(accession_number=self.get_accession_number(link))
            path = os.path.join(directory, formatted_dir, formatted_file)
            inputs.append((link, path))
    loop = asyncio.get_event_loop()
    loop.run_until_complete(self.client.wait_for_download_async(inputs))