Skip to content

timgabets/pytlv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 

Repository files navigation

TLV parser

To import the pytlv module in your code:

from pytlv.TLV import *

To parse data from a TLV string:

tlv = TLV(['84', 'A5']) # provide the possible tag values
tlv.parse('840E315041592E5359532E4444463031A5088801025F2D02656E')
>>> {'84': '315041592E5359532E4444463031', 'A5': '8801025F2D02656E'}

To build a TLV string:

tlv = TLV(['9F02', '9F04'])
tlv.build({'9f02': '000000001337'})
>>> '9F0206000000001337'

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages