class_docstr: Provides convenience methods for accessing and modifying the rules table.
class_docstr_tok: ["Provides","convenience","methods","for","accessing","and","modifying","the","rules","table","."]
docstr: Return a human-readable respresentation of the table's data
docstr_tok: ["Return","a","human-readable","respresentation","of","the","table","'s","data"]
code: def __str__(self, verbose=False):
      """Return a human-readable respresentation of the table's data"""
      if not self.remote_rule_names:
          return "Rule table is empty"
  
      pad_size = (
          max(
              [len(rule) for rule in list(self.remote_rule_info.keys())]
          )
          + 4
      )
      output = [
          "{rule:<{pad}}Staged?".format(rule="Rule", pad=pad_size + 5)
      ]
      for index, rule in enumerate(
          sorted(self.remote_rule_info.keys()), start=1
      ):
          output.append(
              "{index:>3d}: {rule: <{pad}}{staged}".format(
                  index=index,
                  rule=rule,
                  pad=pad_size,
                  staged=self.remote_rule_info[rule]["Staged"],
              )
          )
          # Append additional information if verbose is enabled
          if verbose:
              details_pad_size = (
                  max(
                      [
                          len(prop)
                          for prop in list(
                              self.remote_rule_info[rule].keys()
                          )
                      ]
                  )
                  + 4
              )
              output.extend(
                  "{prefix:>{left_pad}}{property: <{internal_pad}}{value}".format(
                      prefix="- ",
                      left_pad=7,
                      property="{}:".format(prop),
                      internal_pad=details_pad_size,
                      value=self.remote_rule_info[rule][prop],
                  )
                  for prop in sorted(self.remote_rule_info[rule].keys())
                  if prop != "Staged"
              )
  
      return "\n".join(output)
  
imports: from datetime import datetime, timedelta
  import boto3
  from streamalert.shared.helpers.dynamodb import ignore_conditional_failure
  from streamalert.shared.importer import import_folders
  from streamalert.shared.logger import get_logger
  from streamalert.shared.rule import Rule
label_desc: Use image node_id 2 for calling the RuleTable obj's underlying member method code with example usage: obj.__str__(verbose) and returns: str, str