Skip to main content

A Python dict that handles TLV decode/encode, very useful for EMV Data.

Project description

TLV - Type/Tag Length Format

Simple class that supports TLV encoding/decoding.


pip install tlvdict

Simple to use!

>>> from tlvdict import TLVDict
>>> tlv = TLVDict.FromDict({"5F25": "200531", "9F06": "A0000000041010"})
>>> tlv
TLVDict([('5F25', '200531'), ('9F06', 'A0000000041010')])

>>> tlv2 = TLVDict.FromHex("5F25032005319F0607A0000000041010")
>>> tlv2
TLVDict([('5f25', '200531'), ('9f06', 'A0000000041010')])

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tlvdict-1.2.0.tar.gz (7.2 kB view hashes)

Uploaded Source

Built Distribution

tlvdict-1.2.0-py3-none-any.whl (7.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page