Skip to content


ExportFormat (str, Enum)

An enumeration.

OrganizeBy (str, Enum)

An enumeration.

install_sentinel(directory, config, overwrite)

Writes the configuration file to a specified directory.

Source code in nbautoexport/
def install_sentinel(directory: Path, config: NbAutoexportConfig, overwrite: bool):
    """Writes the configuration file to a specified directory."""
    sentinel_path = directory / SAVE_PROGRESS_INDICATOR_FILE

    if sentinel_path.exists() and (not overwrite):
        raise FileExistsError(
            f"""Detected existing autoexport configuration at {sentinel_path}. """
            """If you wish to overwrite, use the --overwrite flag."""
    else:"Creating configuration file at {sentinel_path}")"\n{config.json(indent=2)}")
        with"w", encoding="utf-8") as fp:
Back to top