xmod
🌱 Turn any object into a module 🌱
Decision gist · record as of 2026-08-14
Yes, if you want to simplify module APIs or reduce import boilerplate in single-purpose modules. The package is lightweight, actively maintained, permissively licensed, and carries no security vulnerabilities. Install friction is minimal. It's a niche tool, but well-suited to its specific use case.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- Low install friction with no runtime dependencies.
- Active maintenance with a recent release 97 days ago and current Python version support (3.10–3.14).
License · maintenance · safety
MIT (permissive) — MIT license is permissive; you can use, modify, and distribute this package freely with minimal restrictions.
last release 2026-05-09 (97 days) · last repo commit 2026-05-09 · 5 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 4,908,921 downloads/mo, #2,200 on PyPI
Alternatives
Verify before relying
pip install xmod
import xmod
@xmod
def a_function():
return 'result'
# Module is now callable
print(a_function()) # 'result'- Whether the decorator approach preserves standard module attributes like __all__ and __doc__.
- Performance overhead of the module wrapping mechanism for frequently-accessed modules.
- Compatibility with module introspection tools and import hooks.
What it is and what it does
xmod is a lightweight library that lets you give a module the behavior of a callable or container object. Normally, modules are static namespaces; xmod wraps a module so it can respond to function calls, indexing, or other object protocols. This is useful for single-purpose modules where you want to avoid boilerplate and instead call or index the module directly.
The package has no runtime dependencies and works with modern Python versions (3.10–3.14). It's maintained actively with no known vulnerabilities. The core use case is simplifying APIs of modules that "just do one thing" by letting them behave like the objects they export.
Use it for
- Make a module callable so the module itself can be invoked as a function without intermediate imports.
- Wrap a module around a list or dict to support indexing and mutation directly on the module.
- Reduce import boilerplate in libraries where the module itself is the primary interface.
- Create a module that mimics a built-in type's interface for a more intuitive API.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you want to simplify module APIs or reduce import boilerplate in single-purpose modules.
The package is lightweight, actively maintained, permissively licensed, and carries no security vulnerabilities. Install friction is minimal. It's a niche tool, but well-suited to its specific use case.
Install
xmod on PyPI
Before you install
Low install friction with no runtime dependencies. Active maintenance with a recent release 97 days ago and current Python version support (3.10–3.14).
Requires Python 3.10 or later.
License in practice
MIT license is permissive; you can use, modify, and distribute this package freely with minimal restrictions.
Quickstart
pip install xmod
import xmod
@xmod
def a_function():
return 'result'
# Module is now callable
print(a_function()) # 'result'
Verify before relying
- Whether the decorator approach preserves standard module attributes like __all__ and __doc__.
- Performance overhead of the module wrapping mechanism for frequently-accessed modules.
- Compatibility with module introspection tools and import hooks.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 97 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 4,908,921 / month, #2,200 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14 |
Evidence: xmod-1.10.0-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 › “callable modules”
- xmodLets a module behave like a callable object or container by wrapping…
- lazy-importDefers module loading and ImportErrors until a module or callable is…
- funcsigsProvides Python function signature introspection (PEP 362) for Python…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also wirerope · zope.hookable · lazy-import · publication · threaded · python-utils · pytest-lazy-fixtures · decopatch · mixed-methods · wrapt