Registry / serialization / uttlv
library0.7.1pypypi✓ verified 82d ago

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.

pip install uttlv
INSTALL
IMPORT
SIG · UTTLV
U
uttlv
serializationpythonv0.7.1
Install
1.6s avg
Import
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.7.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 17.8MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.6s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

TLV
from uttlv import TLV
from uttlv import Tlv
encoder
from uttlv import encoder
tlv
from uttlv import tlv

Create a TLV object, set a tag, encode to bytes, decode back.

from uttlv import Tlv tlv = Tlv() tlv[0x01] = b'data' encoded = tlv.to_bytes() print('Encoded:', encoded.hex()) decoded = Tlv() decoded.from_bytes(encoded) assert decoded[0x01] == b'data'
Debug
Known issues
breakingIn 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.
fix
Update constructor calls to use keyword arguments: Tlv(tag_len_sizes=...) if needed.
affects: <0.7.0
gotchaTag values must be integers; assigning non-integer keys will raise TypeError.
fix
Always use integer tag values, e.g., tlv[0x01] = b'...'.
affects: all
gotchaWhen decoding, from_bytes() expects bytes, not hex string. Common mistake is passing a hex string directly.
fix
Convert hex string to bytes first: tlv.from_bytes(bytes.fromhex('010203'))
affects: all
Upgrade
Version history
0.7.1latest on PyPI · released Mar 12, 2024
Audit
Dependencies

No dependency data recorded yet.

Agent activity
19 hits · last 30 days
node
16
OpenAI (training)
1
Resources
uttlv — pip install uttlv · libregistry