JsonManager

class manage_json.JsonManager(main_dir, base_dict, debug=None)[source]
Parameters:
  • main_dir (str or None) – The main directory to write json files.

  • base_dict (dict) – The base dict for json files.

  • debug (bool, optional) – Pass True to see more information in STDOUT.

property base_dict: dict[str, Any]
check(chat_id, /)[source]
Parameters:

chat_id (int)

Return type:

dict[str, Any]

get(chat_id, /)[source]
Parameters:

chat_id (int)

Return type:

dict[str, Any]

property main_dir: str
merge()[source]
Return type:

dict[int, dict[str, Any]]

async process_updates(delay=15, /)[source]
Parameters:

delay (float)

Return type:

None

push_updates()[source]
Return type:

int

property updates: dict[int, dict[str, Any]]