{"id":24799,"library":"uttlv","title":"UTTLV - Python TLV (Tag-Length-Value) Library","description":"A Python library for encoding and decoding TLV (Tag-Length-Value) objects. Supports custom tag definitions, nested TLV structures, and iterator access. Current version 0.7.1, maintained on GitHub.","status":"active","version":"0.7.1","language":"python","source_language":"en","source_url":"https://github.com/ustropo/uttlv","tags":["tlv","encoding","decoding","tag-length-value","binary"],"install":[{"cmd":"pip install uttlv","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"wrong":"from uttlv import Tlv","symbol":"TLV","correct":"from uttlv import TLV"},{"symbol":"encoder","correct":"from uttlv import encoder"},{"symbol":"tlv","correct":"from uttlv import tlv"}],"quickstart":{"code":"from uttlv import Tlv\n\ntlv = Tlv()\ntlv[0x01] = b'data'\nencoded = tlv.to_bytes()\nprint('Encoded:', encoded.hex())\n\ndecoded = Tlv()\ndecoded.from_bytes(encoded)\nassert decoded[0x01] == b'data'","lang":"python","description":"Create a TLV object, set a tag, encode to bytes, decode back."},"warnings":[{"fix":"Update constructor calls to use keyword arguments: Tlv(tag_len_sizes=...) if needed.","message":"In v0.7.0, the 'nested_tag_config_map' parameter was added to Tlv constructor, changing the signature. Code using positional arguments for 'tag_len_sizes' may break.","severity":"breaking","affected_versions":"<0.7.0"},{"fix":"Always use integer tag values, e.g., tlv[0x01] = b'...'.","message":"Tag values must be integers; assigning non-integer keys will raise TypeError.","severity":"gotcha","affected_versions":"all"},{"fix":"Convert hex string to bytes first: tlv.from_bytes(bytes.fromhex('010203'))","message":"When decoding, from_bytes() expects bytes, not hex string. Common mistake is passing a hex string directly.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'0.7.1':34 'access':31 'binari':45 'current':32 'custom':23 'decod':15,40 'definit':25 'encod':13,39 'github':37 'iter':30 'length':6,19,43 'librari':8,11 'maintain':35 'nest':26 'object':21 'python':2,10 'structur':28 'support':22 'tag':5,18,24,42 'tag-length-valu':4,17,41 'tlv':3,16,27,38 'uttlv':1 'valu':7,20,44 'version':33","created_at":"2026-05-01T08:14:58.777495+00:00","updated_at":"2026-05-01T08:14:58.777495+00:00","problems":null,"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.7.1","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/ustropo/uttlv","docs":null,"changelog":null,"pypi":"https://pypi.org/project/uttlv/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["serialization"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-08-02","install_tag":null}}