Package¶
Python library for BER-TLV en-/decoding.
Versioning scheme: https://semver.org/spec/v2.0.0.html
- 
bertlv.tree_from_binary(source: Union[bytes, BinaryIO]) → bertlv.tree.Tree[source]¶ Parse a TLV tree from binary data and return the resulting Tree.
- 
bertlv.tree_from_xml(source: Union[bytes, BinaryIO]) → bertlv.tree.Tree[source]¶ Parse a TLV tree from XML data and return the resulting Tree.
- 
bertlv.tree_to_binary(source: bertlv.tree.Tree, file: Optional[BinaryIO] = None) → Optional[bytes][source]¶ Generate binary data of a TLV tree and return it or write it to file.
If file is
Nonereturn the bytes otherwise write data to file.
- 
bertlv.tree_to_text(source: bertlv.tree.Tree, file: Optional[BinaryIO] = None) → Optional[bytes][source]¶ Generate a text dump of a TLV tree and return it or write it to file.
If file is
Nonereturn the bytes otherwise write data to file.
- 
bertlv.tree_to_xml(source: bertlv.tree.Tree, file: Optional[BinaryIO] = None) → Optional[bytes][source]¶ Generate XML data of a TLV tree and return it or write it to file.
If file is
Nonereturn the bytes otherwise write data to file.