Registry / serialization / xdrlib3

xdrlib3

JSON →
library0.1.1pypypi✓ verified 85d ago

A Python library for encoding and decoding XDR (External Data Representation) data. It is a forked version of Python's standard library `xdrlib` (removed in Python 3.13), intended as a drop-in replacement. Current version 0.1.1, requires Python 3.7+.

pip install xdrlib3
INSTALL
IMPORT
SIG · XDRLIB3
X
xdrlib3
serializationpythonv0.1.1
Install
1.5s avg
Import
11ms
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.1.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.012s · 17.8MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.5s · import 0.006s · 18MB
16MB installed
● package 16MB
Code
Verified usage

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

Packer
from xdrlib3 import Packer
from xdrlib import Packer
xdrlib is removed in Python 3.13; xdrlib3 is the replacement.
Unpacker
from xdrlib3 import Unpacker
from xdrlib import Unpacker
Same as above, xdrlib is gone in Python 3.13.

Basic usage: pack an integer, then unpack it.

from xdrlib3 import Packer, Unpacker p = Packer() p.pack_int(42) data = p.get_buffer() u = Unpacker(data) print(u.unpack_int()) # 42
Debug
Known issues
breakingxdrlib is removed from Python stdlib starting Python 3.13. Code using `from xdrlib import ...` will fail. Migrate to xdrlib3.
fix
Replace `from xdrlib import Packer, Unpacker` with `from xdrlib3 import Packer, Unpacker`.
affects: >=3.13
gotchaThe library is a fork of the old stdlib module. It is not maintained by Python core developers. Check for compatibility if using Python <3.7.
fix
Ensure Python >=3.7, as specified in requires_python.
affects: all
gotchaThe package name on PyPI is `xdrlib3`, but the import module is also `xdrlib3`. Do not confuse with `xdrlib` (the old stdlib) or other XDR libraries.
fix
Use `pip install xdrlib3` and `import xdrlib3`.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'xdrlib'
Python 3.13 removed the deprecated xdrlib module.
fix
Install and use xdrlib3 instead: `pip install xdrlib3` and change imports to `from xdrlib3 import Packer`.
ImportError: cannot import name 'Packer' from 'xdrlib3'
Typo or incorrect submodule path. The correct import is `from xdrlib3 import Packer`.
fix
Use `from xdrlib3 import Packer` (not `from xdrlib3.xdrlib import Packer`).
TypeError: pack_int() missing 1 required positional argument: 'value'
Forgetting to pass the value to pack methods.
fix
Call `p.pack_int(42)` with an argument.
Upgrade
Version history
0.1.1latest on PyPI · released May 6, 2023
Audit
Dependencies

No dependency data recorded yet.

Agent activity
37 hits · last 30 days
node
32
OpenAI (training)
1
Resources
xdrlib3 — pip install xdrlib3 · libregistry