How to retreive the hotkey of a function/tool? I want to print the hotkeys for some tools in the console. How can I retreive the hotkey for let's say the circle select tool, or the hotkey for rotating the viewport with python?

Note that I do not want to execute those tools. So I guess I need to access the keymap directly, and read the hotkeys from there. But how does it work?
You need to have some clue about how each command is executed (i.e. the operator) in order to find its hotkeys, but if you do, it's not too difficult:

wm            = bpy.context.window_manager                       # Blender window manager
keymaps_3DV   = wm.keyconfigs['Blender'].keymaps['3D View']      # 3D View hotkeys
circle_keymap = keymaps_3DV.keymap_items['view3d.select_circle'] # Circle select keymap object
main_key      = circle_keymap.type                               # "C" in this case


If you want to see if any modifier key is used, or if the ALT / SHIFT / CTRL keys are used, you can access this info this way:

modifier_key = circle_keymap.key_modifier   # Is 'NONE' in this case
shift        = circle_keymap.shift          # Is False in this case
ctrl         = circle_keymap.ctrl           # Is False in this case
alt          = circle_keymap.alt            # You've guessed it


There's lots of other interesting properties of hotkeys to investigate, but I'll leave it to you.

To see the rotate operator's hotkey, access it thus:

circle_keymap = keymaps_3DV.keymap_items['transform.rotate']