Template Text Parser
Project description
Template Text Parser
TTP is a Python library that allows parsing of semi-structured text data using templates relying on Python built-in regular expression module and XML Etree to structure templates. TTP was mainly developed to enable programmatic access to data produced by CLI of networking devices, however, it can be used to parse any semi-structured text that contains distinctive repetition patterns.
In the simplest case TTP takes two files as an input - data that needs to be parsed and template, returning results structure that contains extracted information.
Same data can be parsed by several templates producing results accordingly, templates are easy to create and users encouraged to write their own TTP templates, in addition TTP docs shipped with a set of template examples applicable for parsing CLI output of major network equipment.
Reference documentation for more information.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.