Ttp

Latest version: v0.9.5

Safety actively analyzes 710445 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 5

0.9.0

CHANGES

1. Removed input sources feature together with Nornir and Netmiko sources as TTP integrated well with Netmiko and Nornir supported was of version 2.5.0, while there is Nornir 3 was released, removing input sources feature as it does not seems to add much value.
2. Switches dependency management, packaging and virtual environment management to Poetry.

FEATURES

1. Added `full` installation extras i.e. `pip install ttp[full]` can now install all optional dependencies of versions that has been tested.
2. Added extend tag support for `macro` function to apply arbitrary Python function on template content before including it into parent template.
3. Added support to use `TTP_TEMPLATES_DIR` environment variable, TTP can source templates files from that directory for extend tag or on ttp object instantiation.

BUG

1. Implemented fix for 69 to properly process joinmatch results for parent groups.

0.8.4

BUGS

1. Fixed issue 65, the problem was with edge-case handling when add function called but result belongs to parent group, updated logic to make sure current group properly
saved, ended and new group started out of previous group results, moreover, results saving logic modified to perform recursive merge in such a case.
2. Added fix for issue 67 by introducing TTP object boolean switch argument `dynamic_path_key_to_int`

0.8.3

BUGS

1. Fixed issue 66

0.8.2

BUGS

1. Looks like TTP was not thread safe, tested using thread pool executor set to 800 threads with having group function containsall and output formatter, seems that one thread overwrites _ttp_ dictionary for other threads somehow, not sure why it happens, multiprocessing is turned off, this issue pertains to github issue 63 as well. Was able to fix the problem by removing _ttp_ dictionary from TTP module global scope and making it TTP class attribute instead, have to pass it around now as an argument for all classes instantiation. But threading issue seems gone after that.

CHANGES

1. Code checks and linting added using pre-commit, work in progress.

0.8.1

BUGS

1. Fixed 59
2. Added fixes for 57 `_headers_` indicator handling
3. Fixed `_anonymous_` group_id formation to improve results selection logic an allow anonymous group to re-start the group even if previous matches filtered
4. Fixed issue 57 with `...*` producing empty results when group does not contain matches but only `_start_` statement, this was due to how `...*` list path formatter was handled,
fix makes sure to check if result data is not empty and skip saving them if so.

FEATURES

1. Added `_headers_` indicator `columns` variable to indicate how many mandatory columns expect to match

CHANGES

1. Updated logic around results selection for multiple `_start_` vs `_startempty_` matches to make latter one always more preferred
2. Updated selection logic for multiple `add` matches to make sure that we selecting results for group that already started
3. Updated logic for `_end_` and locked groups tracking to use `self.ended_groups` set

0.8.0

FEATURES

1. Added `<extend>` tag to support loading template content from files or from TTP_templates repository and use them within other templates
2. Added filters to `<extend>` tag to support groups, inputs, vars, lookups, outputs tag filtering
3. Added support for nested `<extend>` tag handling with child groups
4. Added Environment variable `TTPCACHEFOLDER` for lazy import system to support caching TTP dictionary at user defined path
5. Added new match variable function - raise, to raise RuntimeError error if it is called, useful for testing text data - if pattern matched, error raised
6. Added support for group function `itemize` to support dynamic path
7. Added group items2dict function to combine match values in a dictionary
8. Added `quick_parse` utility function to allow parsing data in one line of code

CHANGES

1. Modified group macro function to check result of each macro execution at each step to exit immediately if receive False.
2. Improved handling of empty characters between words - prior to this change all spaces were replaced with "\\ +" regex, now tabs also included in that regex - "[ \t]+" allowing to have tabs and space mixed between words within line.
3. Added documentation for doc `<tag>`

BUGS

1. Encountered issue with results processing when child group being parsed even when parent group does not have start re matched, improved parsing logic to account for edge cases were it can be useful, for all other cases child groups no longer parsed - that fixed the issue and should improve processing speed.
2. Bug with file loader not joining OS path properly if path itself is a bit malformed, updated to use os.path.join to account for it.
3. Bug - when group macro returns None, TTP assigns None to results, this was fixed to make sure that original data processed further instead of replacing it with None
4. If last start regex span is bigger than last end regex span TTP skipping some text data to parse, fixed it and made sure that end span set to the end of document in this case

Page 2 of 5

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.