Registry / serialization / python-didl-lite

python-didl-lite

JSON →
library1.5.0pypypi✓ verified 82d ago

A Python library for parsing and generating DIDL-Lite (Digital Item Declaration Language) XML, commonly used in UPnP/DLNA media servers. Current version 1.5.0, requires Python 3.10+. Released irregularly, last update in 2024.

pip install python-didl-lite
INSTALL
IMPORT
SIG · PYTHON-DIDL-LITE
P
python-didl-lite
serializationpythonv1.5.0
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 v1.5.0 · 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 · 18MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.6s · import 0.000s · 19MB
16MB installed
● package 16MB
Code
Verified usage

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

didl_lite
import didl_lite
from didl_lite import DidlObject
utils
from didl_lite import utils

Creates a simple DIDL-Lite XML with a container and an audio item, then serializes and deserializes it.

from didl_lite import DidlContainer, DidlItem, Resource, Guid, serialize, deserialize # Create a container container = DidlContainer( id='0', parent_id='-1', title='My Container', creator='User', clazz='object.container', restricted=True ) # Create an item with a resource item = DidlItem( id='1', parent_id='0', title='Song.mp3', creator='Artist', clazz='object.item.audioItem.musicTrack', restricted=True ) item.resources.append(Resource(uri='http://example.com/song.mp3', protocol='http-get:*:audio/mpeg:*', size=12345)) # Serialize to XML string xml_str = serialize([container, item], pretty_print=True) print(xml_str) # Deserialize from XML string parsed = deserialize(xml_str) print(parsed)
Debug
Known issues
breakingVersion 1.5.0 dropped support for Python versions older than 3.10. Code running on earlier Python versions will break.
fix
Upgrade Python to >=3.10 or pin to python-didl-lite<1.5.0
affects: <1.5.0
gotchaThe `clazz` parameter is named with a 'z' (to avoid 'class' keyword) and must be a fully qualified DIDL-Lite class string (e.g., 'object.container', 'object.item.audioItem'). Incorrect class strings may cause deserialization errors or non-standard XML.
fix
Use the correct DIDL-Lite class strings as per UPnP specifications.
affects: all
deprecatedThe `didl_lite.didl_lite` submodule (old import path) is deprecated since v1.0. Use `from didl_lite import ...` directly.
fix
Use `from didl_lite import DidlObject` instead of `from didl_lite.didl_lite import DidlObject`.
affects: >=1.0.0, <2.0.0
gotchaWhen serializing, ensure all required fields are set (e.g., `id`, `parent_id`, `title`, `clazz`, `restricted`). Missing fields may produce invalid XML that cannot be deserialized.
fix
Always provide all mandatory constructor arguments.
affects: all
Upgrade
Version history
1.5.0latest on PyPI · released Jan 3, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
21 hits · last 30 days
node
20
OpenAI (training)
1
Resources
python-didl-lite — pip install python-didl-lite · libregistry