io.export_to_stream()
Writes the book data directly into an open file-like stream (file or stdout).
Usage
io.export_to_stream(
books,
stream,
name_format,
)Format is managed by NameFormatter.
Parameters
books: list[Book]-
List of books to export.
stream: FileTextWrite-
An open, writable file-like object (e.g. a file handle opened in text mode, or
sys.stdout) that the formatted book data is written to. The stream is not closed by this function. name_format: NameFormatter- NameFormatter controlling how author and narrator names are rendered in the output.
Returns
None-
Data is written to
streamas a side effect.