class_docstr: Defines characters to render boxes.
  
  ┌─┬┐ top
  │ ││ head
  ├─┼┤ head_row
  │ ││ mid
  ├─┼┤ row
  ├─┼┤ foot_row
  │ ││ foot
  └─┴┘ bottom
  
  Args:
      box (str): Characters making up box.
      ascii (bool, optional): True if this box uses ascii characters only. Default is False.
class_docstr_tok: ["Defines","characters","to","render","boxes",".","\u250c\u2500\u252c\u2510","top","\u2502","\u2502\u2502","head","\u251c\u2500\u253c\u2524","head_row","\u2502","\u2502\u2502","mid","\u251c\u2500\u253c\u2524","row","\u251c\u2500\u253c\u2524","foot_row","\u2502","\u2502\u2502","foot","\u2514\u2500\u2534\u2518","bottom","Args",":","box","(","str",")",":","Characters","making","up","box",".","ascii","(","bool",",","optional",")",":","True","if","this","box","uses","ascii","characters","only",".","Default","is","False","."]
docstr: Get the top of a simple box.
  
  Args:
      width (List[int]): Widths of columns.
  
  Returns:
      str: A string of box characters.
docstr_tok: ["Get","the","top","of","a","simple","box",".","Args",":","width","(","List","[","int","]",")",":","Widths","of","columns",".","Returns",":","str",":","A","string","of","box","characters","."]
code: def get_row(
      self,
      widths: Iterable[int],
      level: Literal["head", "row", "foot", "mid"] = "row",
      edge: bool = True,
  ) -> str:
      """Get the top of a simple box.
  
      Args:
          width (List[int]): Widths of columns.
  
      Returns:
          str: A string of box characters.
      """
      if level == "head":
          left = self.head_row_left
          horizontal = self.head_row_horizontal
          cross = self.head_row_cross
          right = self.head_row_right
      elif level == "row":
          left = self.row_left
          horizontal = self.row_horizontal
          cross = self.row_cross
          right = self.row_right
      elif level == "mid":
          left = self.mid_left
          horizontal = " "
          cross = self.mid_vertical
          right = self.mid_right
      elif level == "foot":
          left = self.foot_row_left
          horizontal = self.foot_row_horizontal
          cross = self.foot_row_cross
          right = self.foot_row_right
      else:
          raise ValueError("level must be 'head', 'row' or 'foot'")
  
      parts: List[str] = []
      append = parts.append
      if edge:
          append(left)
      for last, width in loop_last(widths):
          append(horizontal * width)
          if not last:
              append(cross)
      if edge:
          append(right)
      return "".join(parts)
  
file_path: rich/rich/box.py
imports: import sys
  from typing import TYPE_CHECKING, Iterable, List
  from ._loop import loop_last
label_desc: Use image node_id 7 for calling the Box obj's underlying member method code with example usage: obj.get_row(widths, level, edge) and returns: str