mo-kwargs
Object destructuring of function parameters for Python!
Decision gist · record as of 2026-08-14
Yes, if you frequently work with parameter dictionaries from external sources and want to avoid boilerplate extraction or TypeError handling. The low install friction, active maintenance, and lack of security issues make it a safe choice. The MPL 2.0 copyleft license is a minor consideration only if you plan to modify and redistribute the package itself.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low friction: pure Python wheel with a single runtime dependency (mo-dots).
- Actively maintained as of March 2026, with a long release history since 2017.
License · maintenance · safety
MPL 2.0 (copyleft) — MPL 2.0 is a copyleft license; you must disclose source and license any modifications to this package, though it permits commercial use and does not require derivative works to adopt the same license.
last release 2026-03-02 (165 days) · last repo commit 2026-03-02 · 3 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 118,992 downloads/mo, #12,093 on PyPI
Alternatives
Verify before relying
from mo_kwargs import override
@override
def login(username, password=None):
return f"Logged in as {username}"
creds = {"username": "user", "password": "pass", "extra": "ignored"}
result = login(kwargs=creds)- Whether mo-dots adds meaningful install friction or is a lightweight utility dependency
- Real-world performance impact of the decorator on function call overhead
What it is and what it does
mo-kwargs is a decorator library that brings JavaScript-style object destructuring to Python function parameters. It provides an `@override` decorator that adds a `kwargs` parameter to decorated functions, allowing you to pass a dictionary of parameters that will be unpacked and merged with explicit arguments. Unlike `**kwargs`, this approach ignores extra keys in the dictionary instead of raising a TypeError, and allows explicit parameters to override values from the dictionary.
The primary use case is handling parameter sets from external sources—configuration files, APIs, or dynamic data structures—where you cannot control whether extra keys are present. The decorator ensures required parameters are still enforced, optional parameters get their defaults, and all parameters (used or not) are available in the `kwargs` dict if the function accepts it. It works with regular Python functions, instance methods, and class methods.
Use it for
- Load function parameters from a config file that may contain extra keys you don't need
- Overlay multiple parameter dictionaries with explicit overrides (e.g., base config + user overrides)
- Accept parameter bundles from external APIs without manually extracting each field
- Collect all parameters passed to a function in a single dict for logging or inspection
- Simplify function calls when parameters come from a dynamic source with unknown keys
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you frequently work with parameter dictionaries from external sources and want to avoid boilerplate extraction or TypeError handling.
The low install friction, active maintenance, and lack of security issues make it a safe choice. The MPL 2.0 copyleft license is a minor consideration only if you plan to modify and redistribute the package itself.
Install
mo-kwargs on PyPI
Before you install
Low friction: pure Python wheel with a single runtime dependency (mo-dots). Actively maintained as of March 2026, with a long release history since 2017.
License in practice
MPL 2.0 is a copyleft license; you must disclose source and license any modifications to this package, though it permits commercial use and does not require derivative works to adopt the same license.
Quickstart
from mo_kwargs import override
@override
def login(username, password=None):
return f"Logged in as {username}"
creds = {"username": "user", "password": "pass", "extra": "ignored"}
result = login(kwargs=creds)
Verify before relying
- Whether mo-dots adds meaningful install friction or is a lightweight utility dependency
- Real-world performance impact of the decorator on function call overhead
Package facts
| License | MPL 2.0 copyleft |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagemo-dots |
| Maintenance | Actively maintained 165 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 118,992 / month, #12,093 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaLicense :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.15Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python Modules |
Evidence: mo_kwargs-8.703.26061-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “function parameter destructuring”
- mo-kwargsProvides an `@override` decorator that lets you pass function…
- pampyPampy provides pattern matching for Python, letting you write match…
- parameter-decoratorsProvides decorators that automatically convert function parameters to…
Give your agent the search over MCP, or paste the wish link into any chat.
More Libraries packages
urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.
Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Provides parsing, arithmetic, and recurrence rule computation for dates and times, with timezone support and iCalendar RFC compliance.
Install it if you need to parse flexible date strings, compute relative dates, handle timezones, or work with recurrence rules—it's the de facto choice for these tasks.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.
See also overloading · overrides · mo-dots · wrapt · singleton-decorator · redo · undecorated · mo-parsing · mo-logs · mo-sql-parsing