loadit/database.py
def create_database(database_path, overwrite=False):
    """
    Create a new database from .pch files.

    Parameters
    ----------
    database_path : str
        Database path.
    overwrite : bool, optional
        Whether to rewrite or not an already existing database.
    """
    Path(database_path).mkdir(parents=True, exist_ok=overwrite)
    (Path(database_path) / '.attachments').mkdir(exist_ok=overwrite)
    assembly_database(database_path, dict(), list())
    log.info(f"Database '{os.path.basename(database_path)}' created")
    database = Database(database_path)
    database.load()
    return database

    Create a new database from .pch files.

    Parameters
    ----------
    database_path : str
        Database path.
    overwrite : bool, optional
        Whether to rewrite or not an already existing database.
    
Create a new database from .pch files.
Parameters

database_path : str
Database path.
overwrite : bool, optional
Whether to rewrite or not an already existing database.
Create a new database from . pch files . Parameters database_path : str Database path . overwrite : bool optional Whether to rewrite or not an already existing database .
def create_database(database_path, overwrite=False):
    Path(database_path).mkdir(parents=True, exist_ok=overwrite)
    (Path(database_path) / '.attachments').mkdir(exist_ok=overwrite)
    assembly_database(database_path, dict(), list())
    log.info(f"Database '{os.path.basename(database_path)}' created")
    database = Database(database_path)
    database.load()
    return database
def create_database ( database_path , overwrite = False ) : Path ( database_path ) . mkdir ( parents = True , exist_ok = overwrite ) ( Path ( database_path ) / '.attachments' ) . mkdir ( exist_ok = overwrite ) assembly_database ( database_path , dict ( ) , list ( ) ) log . info ( f"Database '{os.path.basename(database_path)}' created" ) database = Database ( database_path ) database . load ( ) return database
Create a new database from .pch files.
Create a new database from . pch files .
"""
    Create a new database from .pch files.

    Parameters
    ----------
    database_path : str
        Database path.
    overwrite : bool, optional
        Whether to rewrite or not an already existing database.
    """
database_path
overwrite