updater

A module for updating package data.

collect_site_map([confirmation_required]) Collect data of the site map.
fetch_site_map([update, …]) Fetch the site map from the package data.
update_backup_data([verbose, time_gap]) Update package data.
pyrcs.updater.collect_site_map(confirmation_required=True)[source]

Collect data of the site map.

Parameters:confirmation_required (bool) – whether to prompt a message for confirmation to proceed, defaults to True
Returns:dictionary of site map data
Return type:dict
pyrcs.updater.fetch_site_map(update=False, confirmation_required=True, verbose=False)[source]

Fetch the site map from the package data.

Parameters:
  • update (bool) – whether to check on update and proceed to update the package data, defaults to False
  • confirmation_required (bool) – whether to prompt a message for confirmation to proceed, defaults to True
  • verbose (bool, int) – whether to print relevant information in console as the function runs, defaults to False
Returns:

dictionary of site map data

Return type:

dict

Examples:

from pyrcs.updater import fetch_site_map

update = False
site_map = fetch_site_map(update)

update = True
site_map = fetch_site_map(update)
pyrcs.updater.update_backup_data(verbose=False, time_gap=5)[source]

Update package data.

Parameters:
  • verbose (bool) – whether to print relevant information in console as the function runs, defaults to False
  • time_gap (int) – time gap (in seconds) between the updating of different classes

Example:

from pyrcs.updater import update_backup_data

verbose = True
time_gap = 5

update_backup_data(verbose, time_gap)