Registry / serialization / mo-kwargs

mo-kwargs

JSON →
library8.703.26061pypypi✓ verified 83d ago

Python library for object destructuring of function parameters using typed dictionaries/objects. Current version 8.703.26061. Very frequent releases (multiple per month).

pip install mo-kwargs
INSTALL
IMPORT
SIG · MO-KWARGS
M
mo-kwargs
serializationpythonv8.703.26061
Install
1.8s 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 v8.703.26061 · 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 · 18.2MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.8s · import 0.000s · 19MB
16MB installed
● package 16MB
Code
Verified usage

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

kwargs
from mo_kwargs import KWARGS
from mo_kwargs import kwargs
Data
from mo_kwargs import Data
override
from mo_kwargs import override

Decorate a class with @kwargs to automatically destructure a dictionary argument into constructor parameters.

from mo_kwargs import kwargs @kwargs class MyClass: def __init__(self, a, b=10, c=None): self.a = a self.b = b self.c = c obj = MyClass({'a': 1, 'c': 2}) print(obj.a, obj.b, obj.c) # 1 10 2
Debug
Known issues
breakingVersion 8 introduced major changes: the default destructuring changed from 'typed' to 'explicit' mode. Existing code relying on implicit type matching may fail. Use @kwargs to opt into typed mode if needed.
fix
Add @kwargs decorator to classes that previously worked without it, or adjust parameter names to match dictionary keys exactly.
affects: >=8.0.0
gotchaThe library uses the underscore (_) to mark positional parameters. Parameters starting with underscore are not destructured from the input dict; they remain as positional arguments.
fix
Ensure that any parameter you want to receive from a dict does not start with underscore.
affects: all
deprecatedThe old pattern using 'from mo_kwargs import kwargs_decorator' is deprecated and may be removed. Use the kwargs function directly.
fix
Replace 'from mo_kwargs import kwargs_decorator' with 'from mo_kwargs import kwargs'.
affects: <8.0.0
Upgrade
Version history
8.703.26061latest on PyPI · released Mar 2, 2026
Audit
Dependencies
mo-dotsoptionalUsed for dot-notation access and object conversion
mo-importsoptionalUsed by some older patterns
Agent activity
2 hits · last 30 days
node
2
Resources
mo-kwargs — pip install mo-kwargs · libregistry