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.

Installation

pip install tlvdict

Simple to use!

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

>>> 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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file tlvdict-1.2.0.tar.gz.

File metadata

  • Download URL: tlvdict-1.2.0.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.11.0 Darwin/22.1.0

File hashes

Hashes for tlvdict-1.2.0.tar.gz
Algorithm Hash digest
SHA256 2a542745326dbf7128c7988e0447c596e12c439cb06604baf14c14caf5fa5b49
MD5 5c24354758ecfeef93086071dd54d9db
BLAKE2b-256 2748ade8b911b448d37f7a5c4de48dba6b26422ee69da9df680424281dcfa86c

See more details on using hashes here.

File details

Details for the file tlvdict-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: tlvdict-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.11.0 Darwin/22.1.0

File hashes

Hashes for tlvdict-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 52fd338474062941a896e89f190361d7157463ead3b9e7fc811584498096a04e
MD5 e2b04888ea6ce926689b530e74892c19
BLAKE2b-256 a040c035a5b2f978429df0b99eb92fc1b394484ea01c71d0f837ebbf886dd0e7

See more details on using hashes here.

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