spinedb_api.purge ================= .. py:module:: spinedb_api.purge .. autoapi-nested-parse:: Functions to purge DBs. Functions --------- .. autoapisummary:: spinedb_api.purge.purge_url spinedb_api.purge.purge Module Contents --------------- .. py:function:: purge_url(url: str, purge_settings: dict[str, bool] | None, logger=None) -> bool Removes all items of selected types from the database at a given URL. Purges everything if ``purge_settings`` is None. :param url: database URL :param purge_settings: mapping from item type to a boolean indicating whether to remove them or not :param logger: logger :returns: True if operation was successful, False otherwise .. py:function:: purge(db_map: spinedb_api.db_mapping.DatabaseMapping, purge_settings: dict[str, bool] | None, logger=None) -> bool Removes all items of selected types from a database. Purges everything if ``purge_settings`` is None. :param db_map: target database mapping :param purge_settings: mapping from item type to a boolean indicating whether to remove them or not :param logger: logger :returns: True if operation was successful, False otherwise