import json d = json.load(open('/home/hmo/.hermes/auth.json')) pool = d.get('credential_pool', {}) for name, entries in pool.items(): if 'custom' in name or 'ocg' in name.lower(): for e in entries: print(f"{name}: label={e.get('label')} priority={e.get('priority')} " f"last_status={e.get('last_status')} err_code={e.get('last_error_code')} " f"req_count={e.get('request_count')}")