ttp_templates
Template Text Parser Templates collections
What it is and what it does
ttp_templates is a library of pre-built parsing templates for TTP, a text parsing engine designed to extract structured data from unstructured or semi-structured text. It ships with templates tailored for network device outputs (Cisco IOS, etc.) and can map parsed results to YANG data models like ietf-interfaces. You use it by calling parse_output() with device output and platform/command metadata, or by retrieving specific templates via get_template() and passing them to the TTP parser directly.
The package depends on ttp for the actual parsing engine and pydantic for data validation. It targets Python 3.10 and later and requires no system libraries or external tools. The templates are community-contributed and cover common network operational commands; if you have a parsing problem that fits an existing template, this package saves you from writing regex and TTP grammar from scratch.
Use it for:
- Parse Cisco IOS 'show' command output into structured dictionaries for automation or inventory tools.
- Convert network device configurations into YANG-compliant JSON for standards-based tooling.
- Extract interface, routing, or VLAN data from device CLI output without writing custom parsers.
- Validate and normalize parsed network state across multiple device types using pre-tested templates.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides a curated collection of TTP (Template Text Parser) templates for parsing structured text output from network devices and other systems into validated Python data structures.
Yes. Low install friction, active maintenance, no known vulnerabilities, and a permissive MIT license. Install if you parse network device output or other semi-structured text and want to avoid writing TTP templates from scratch. Skip if you have no use for TTP or need templates for platforms not yet in the collection.
Install
ttp-templates on PyPI
pip
pip install ttp-templatesuv
uv add ttp-templatespoetry
poetry add ttp-templatesInstalling ttp_templates
Before you install
Low friction: pure Python wheel with only two runtime dependencies (ttp and pydantic). Last release 33 days ago with active maintenance and 71 repository stars.
License in practice
MIT license permits unrestricted use, modification, and distribution in commercial and private projects with minimal attribution requirements.
Quickstart
pip install ttp-templates
from ttp_templates import parse_output
result = parse_output(
data="interface GigabitEthernet1/3.251\n description Customer #32148\n ip address 172.16.33.10 255.255.255.128",
platform="Test Platform",
command="show run | sec interface"
)
print(result)
Requires Python 3.10 or later; TTP must be installed (automatic via pip).
Verify before relying
- Whether templates cover specific network platforms or command outputs beyond the Cisco IOS examples shown.
- How frequently new templates are added and the process for community contributions.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (<4.0,>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — ttp, pydantic |
| Maintenance | actively maintained — 33 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 224,359/month — #9,233 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: ttp_templates-0.5.9-py3-none-any.whl
Keywords: Parsing, TTP, regex
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
ttpTTP is a Python library for parsing…
permissive · top 15,000 on PyPI
ntc-templatesProvides a repository of TextFSM templates for…
permissive · top 5,000 on PyPI
ciscoconfparseParses and queries Cisco IOS-style network…
copyleft · top 15,000 on PyPI
comfyui-workflow-templatesProvides a curated collection of workflow…
permissive · top 5,000 on PyPI
iptoolsProvides utilities for parsing, validating, and…
permissive · top 15,000 on PyPI
IPyIPy provides Python classes for parsing,…
permissive · top 5,000 on PyPI
curlylintLints HTML templates in Jinja, Nunjucks,…
permissive · top 15,000 on PyPI
django-netfieldsProvides Django model fields for PostgreSQL…
permissive · top 15,000 on PyPI
commonregexExtracts dates, times, emails, phone numbers,…
permissive · top 15,000 on PyPI
ipaddrProvides utilities for parsing, validating, and…
permissive · top 15,000 on PyPI