One project that I'm starting to use more and more is Rich. In short, Rich is a Python library for:

writing rich text (with colour and style) to the terminal and displaying advanced content such as tables, markdown, and syntax highlighted code.

... and I have to say, it does it very very well! But this is not all, Rich also includes a great feature - inspect(). Quite simply inspect generates a report on any Python object. Great for a quick form of documentation or debug aid!

Here's a quick example that allows you to see all the attributes configured for a Netmiko connectHandler.

$ pip3 install rich

>>> from rich import inspect
>>> inspect(netmiko_connection)
โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ <class 'netmiko.cisco.cisco_ios.CiscoIosSSH'> โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ Cisco IOS SSH driver.                                                                                       โ”‚
โ”‚                                                                                                             โ”‚
โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚
โ”‚ โ”‚ <netmiko.cisco.cisco_ios.CiscoIosSSH object at 0x7f4b90e43ac0>                                          โ”‚ โ”‚
โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โ”‚
โ”‚                                                                                                             โ”‚
โ”‚               allow_agent = False                                                                           โ”‚
โ”‚         allow_auto_change = False                                                                           โ”‚
โ”‚             alt_host_keys = False                                                                           โ”‚
โ”‚              alt_key_file = ''                                                                              โ”‚
โ”‚         ansi_escape_codes = False                                                                           โ”‚
โ”‚              auth_timeout = None                                                                            โ”‚
โ”‚            banner_timeout = 15                                                                              โ”‚
โ”‚               base_prompt = 'ios-001'                                                                       โ”‚
โ”‚          blocking_timeout = 20                                                                              โ”‚
โ”‚              conn_timeout = 5                                                                               โ”‚
โ”‚               device_type = 'cisco_ios'                                                                     โ”‚
โ”‚                  encoding = 'ascii'                                                                         โ”‚
โ”‚                  fast_cli = False                                                                           โ”‚
โ”‚         global_cmd_verify = None                                                                            โ”‚
โ”‚       global_delay_factor = 1                                                                               โ”‚
โ”‚                      host = 'lab.packetflow.co.uk'                                                          โ”‚
โ”‚                 keepalive = 0                                                                               โ”‚
โ”‚                  key_file = None                                                                            โ”‚
โ”‚                key_policy = <paramiko.client.AutoAddPolicy object at 0x7f4b80dae610>                        โ”‚
โ”‚                passphrase = None                                                                            โ”‚
โ”‚                  password = 'abc'                                                                           โ”‚
โ”‚                      pkey = None                                                                            โ”‚
โ”‚                      port = 2101                                                                            โ”‚
โ”‚                  protocol = 'ssh'                                                                           โ”‚
โ”‚               remote_conn = None                                                                            โ”‚
โ”‚           remote_conn_pre = None                                                                            โ”‚
โ”‚           RESPONSE_RETURN = '\n'                                                                            โ”‚
โ”‚                    RETURN = '\n'                                                                            โ”‚
โ”‚                    secret = ''                                                                              โ”‚
โ”‚           serial_settings = {'port': 'COM1', 'baudrate': 9600, 'bytesize': 8, 'parity': 'N', 'stopbits': 1} โ”‚
โ”‚               session_log = None                                                                            โ”‚
โ”‚ session_log_record_writes = False                                                                           โ”‚
โ”‚           session_timeout = 60                                                                              โ”‚
โ”‚                      sock = None                                                                            โ”‚
โ”‚           ssh_config_file = None                                                                            โ”‚
โ”‚          system_host_keys = False                                                                           โ”‚
โ”‚             TELNET_RETURN = '\r\n'                                                                          โ”‚
โ”‚                   timeout = 100                                                                             โ”‚
โ”‚                  use_keys = False                                                                           โ”‚
โ”‚                  username = 'lab'                                                                           โ”‚
โ”‚                   verbose = False                                                                           โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
Master Network Automation
Join today and get access to:
  • Full deep-dive course library (inc. Batfish, pyATS, Netmiko)
  • Code repositories inc. full course code, scripts and examples
  • 24x7 Multi-vendor labs (Arista, Cisco, Juniper)
  • Private online community
  • Monthly online meetups
  • Monthly guest speakers

100% Satisfaction Guaranteed!
Cancel your membership at any time.


Join Today