What is TextFSM?
masterTextFSM is a Python module that implements a template-based state machine designed to parse semi-formatted text. It is primarily used to programmatically extract structured data from unstructured or semi-structured text, such as command-line interface (CLI) outputs from networking devices.
The engine operates by taking two inputs:
- A template file: A file defining the state machine logic and data structures for a specific text format.
- Text input: The raw text (e.g., CLI responses) to be parsed.
It returns a list of records containing the parsed data. You can use different templates on the same input data to generate different structured views or tables.