Esempio n. 1
0
def export_stream(exporter: Exporter, path: Path) -> None:
    try:
        for entity in path_entities(path, EntityProxy):
            exporter.write(entity)
    except BrokenPipeError:
        raise click.Abort()
    finally:
        exporter.finalize()
Esempio n. 2
0
 def __init__(
     self,
     directory: PathLike,
     export_all: bool = True,
     extra: Optional[List[str]] = None,
 ) -> None:
     Exporter.__init__(self, export_all=export_all)
     self._configure(directory, extra=extra)
Esempio n. 3
0
 def __init__(self, file_path: PathLike, extra: Optional[List[str]] = None):
     ExcelWriter.__init__(self)
     Exporter.__init__(self)
     self.file_path = file_path
     self.extra = extra or []
     self.sheets: Dict[Schema, Worksheet] = {}
Esempio n. 4
0
 def __init__(self, directory, export_all=True, extra=None):
     Exporter.__init__(self, export_all=True)
     self._configure(directory, extra=extra)
Esempio n. 5
0
 def __init__(self, file_path, extra=None):
     ExcelWriter.__init__(self)
     Exporter.__init__(self)
     self.file_path = file_path
     self.extra = extra or []
     self.sheets = {}