--- id: textfsm version: "2.1.0" license: Apache License, Version 2.0 license_treatment: permissive maintenance: aging --- # textfsm — Python module for parsing semi-structured text into python tables. License: permissive · Maintenance: aging · Downloads: 1.5M/mo ## What it is and what it does TextFSM is a Python state-machine engine for extracting structured data from semi-formatted text, originally built at Google for parsing CLI output from networking devices. It takes a template file (which defines parsing rules and state transitions) and raw text input, then returns a list of records containing the extracted data. The template approach lets you reuse the same parser logic across different text sources by swapping templates, and you can apply multiple templates to the same input to generate different views of the data. The package has no runtime dependencies and installs as a pure Python wheel, making it lightweight and portable. It's classified as Production/Stable and maintained by Google, though releases are infrequent (last update 484 days ago). It's widely used in network automation and system administration contexts where CLI output parsing is common. Use it for: - Parse network device CLI output (show commands, logs) into structured tables for automation scripts. - Extract data from system command output (e.g., ifconfig, netstat) for monitoring or reporting. - Build a reusable template library to parse multiple text formats without rewriting parsing logic. - Convert semi-structured log files into structured records for analysis or database ingestion. - Generate different data views from the same text by applying different templates to the same input. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. TextFSM parses semi-structured text (like CLI command output) using template-based state machines to extract data into structured records. Yes, if you need to parse semi-structured text with template-driven rules. TextFSM is stable, dependency-free, permissively licensed, and widely adopted in network automation. The infrequent release cadence reflects maturity rather than abandonment (last commit April 2025), but verify that its template syntax and capabilities match your parsing needs before committing to it. ## Install pip install textfsm uv add textfsm poetry add textfsm ## Installing textfsm Before you install: Low install friction with a pure-Python wheel. The package is aging (484 days since last release) but marked Production/Stable and actively maintained—last commit was 2025-04-17 with 1246 repository stars. License in practice: Apache License 2.0 is permissive and imposes no restrictions on commercial or proprietary use. Contributors must sign a CLA before patches are accepted. Quickstart: pip install textfsm import textfsm template = textfsm.TextFSM(open('template.txt')) result = template.ParseText(text_input) for row in result: print(row) A template file matching your text structure is required; TextFSM itself has no external dependencies but you must design or obtain a template for your specific parsing task. Verify before relying: - Whether Python 2 support is still active (wheel name suggests py2.py3 compatibility, but classifiers list only Python 3). - Performance characteristics on large text inputs or complex templates. ## Package facts - License: Apache License, Version 2.0 (permissive) - Python support: unspecified - Install friction: low - Maintenance: aging - Downloads: 1.5M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags parse cli output, template-based text parsing, network device output parsing, semi-structured text extraction, state machine text parser, structured data from text, command output parsing, cli-parsing, network-automation, text-extraction [View on SkillFed](https://skillfed.io/packages/textfsm) · [View on PyPI](https://pypi.org/project/textfsm/)