ttp
Template Text Parser
Decision gist · record as of 2026-08-14
Yes. TTP is worth installing for any project requiring semi-structured text parsing. It has zero runtime dependencies, low install friction, active maintenance, no known vulnerabilities, and a permissive MIT license. The template-based approach reduces boilerplate compared to hand-written regex, and the library's built-in processing functions handle common transformation tasks. Best fit for network automation, log parsing, and configuration extraction workflows.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.9 or later (supports 3.9 through 3.14).
- Low install friction with no runtime dependencies.
- Actively maintained with recent releases; last commit 2026-03-24 and 393 repository stars indicate ongoing development.
License · maintenance · safety
MIT (permissive) — MIT license permits unrestricted use, modification, and distribution in both open-source and proprietary projects with minimal attribution requirements.
last release 2026-03-21 (146 days) · last repo commit 2026-03-24 · 393 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 479,568 downloads/mo, #6,433 on PyPI
Alternatives
Verify before relying
from ttp import ttp
data = "interface Loopback0\n ip address 192.168.0.113/24"
template = "interface {{ interface }}\n ip address {{ ip }}/{{ mask }}"
parser = ttp(data, template)
parser.parse()
result = parser.result()- Performance characteristics with large text inputs or complex template hierarchies
- Comparison of template syntax learning curve relative to other parsing libraries
- Availability and maturity of the community template collection referenced in documentation
What it is and what it does
TTP is a template-driven text parser that converts unstructured or semi-structured text into hierarchical structured data. It works by dynamically generating regexes from user-defined templates with placeholder syntax, then matching and extracting data from input text. The library includes built-in functions for processing matches on-the-fly, combining results into arbitrary hierarchies, and formatting output for storage or further processing.
The package is designed for scenarios where raw text output—such as network device configurations, command outputs, or log files—needs to be transformed into machine-readable formats. It handles multi-level nesting, lookups across parsing groups, and output formatting (including tabular display), making it particularly suited for network automation and data extraction tasks where regex alone would be tedious to maintain.
Use it for
- Parse network device configuration and state outputs (BGP, interfaces, routing) into structured JSON or dictionaries for automation workflows.
- Extract and combine data from multiple command outputs by correlating results across parsing groups using lookup functions.
- Transform unstructured log files or text reports into tabular or hierarchical formats for analysis or storage in databases.
- Build reusable parsing templates for repetitive text extraction tasks without writing custom regex code for each variation.
- Process CLI output from infrastructure tools to feed structured data into downstream systems or APIs.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
TTP is worth installing for any project requiring semi-structured text parsing. It has zero runtime dependencies, low install friction, active maintenance, no known vulnerabilities, and a permissive MIT license. The template-based approach reduces boilerplate compared to hand-written regex, and the library's built-in processing functions handle common transformation tasks. Best fit for network automation, log parsing, and configuration extraction workflows.
Install
ttp on PyPI
Before you install
Low install friction with no runtime dependencies. Actively maintained with recent releases; last commit 2026-03-24 and 393 repository stars indicate ongoing development.
Requires Python 3.9 or later (supports 3.9 through 3.14).
License in practice
MIT license permits unrestricted use, modification, and distribution in both open-source and proprietary projects with minimal attribution requirements.
Quickstart
from ttp import ttp
data = "interface Loopback0\n ip address 192.168.0.113/24"
template = "interface {{ interface }}\n ip address {{ ip }}/{{ mask }}"
parser = ttp(data, template)
parser.parse()
result = parser.result()
Verify before relying
- Performance characteristics with large text inputs or complex template hierarchies
- Comparison of template syntax learning curve relative to other parsing libraries
- Availability and maturity of the community template collection referenced in documentation
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release <4.0,>=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 146 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 479,568 / month, #6,433 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: MIT LicenseOperating System :: POSIX :: LinuxProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Topic :: Utilities |
Evidence: ttp-0.10.1-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “semi-structured text parsing”
- ttpTTP is a Python library for parsing semi-structured text into…
- textfsmTextFSM parses semi-structured text (like CLI command output) using…
- probableparsingProvides common utility methods for building probable parsers, a…
Give your agent the search over MCP, or paste the wish link into any chat.
More Utilities packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.
Install it if you need to display or transform source code.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
See also ttp_templates · ntc-templates · textfsm · stringparser · multiregex · pyap2 · parse · commonregex · Jinja2 · stix