Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
T

ttp

> 编程语言
Open source

Template Text Parser

392 stars0 likes1 views
WebsiteGitHub

About

Template Text Parser

Template Text Parser

TTP is a Python library for semi-structured text parsing using templates.

Why?

To save ones time on transforming raw text into structured data and beyond.

How?

Regexes, regexes everywhere... but, dynamically formed out of TTP templates with added capabilities to simplify the process of getting desired outcome.

What?

In essence TTP can help to:

  • Prepare, sort and load text data for parsing
  • Parse text using regexes dynamically derived out of templates
  • Process matches on the fly using broad set of built-in or custom functions
  • Combine match results in a structure with arbitrary hierarchy
  • Transform results in desired format to ease consumption by humans or machines
  • Return results to various destinations for storage or further processing

Reference documentation for more information.

TTP Networktocode Slack channel

Collection of TTP Templates

Example - as simple as it can be

Simple interfaces configuration parsing example

Code

…

Example - a bit more complicated

For this example lets say we want to parse BGP peerings output, but combine state with configuration data, at the end we want to get pretty looking text table printed to screen.

Code

…

Contributions

Feel free to submit an issue, report a bug or ask a question, feature requests are welcomed.

Community Contributions

List of community resources:

  • Sandbox to test TTP templates by tbotnz
  • TTP Video Tutorials by Kirk Byers
  • TTP Standalone editor by roc-ops, Online Sandbox to test it

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Python

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言