$npx skillfedfor your agent

multimethod

Multiple argument dispatching.

Worth itPyPI Python ModulesReleased Jul 20264.1M downloads / moApache-2.0Pure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — multimethod-2.1-py3-none-any.whl
v2.1 · released 2026-07-29 · Python >=3.11

Yes. Multimethod is actively maintained, has no dependencies, supports modern Python versions (3.11+), carries a permissive license, and solves a real problem—type-based function dispatch—with a clean API and documented performance trade-offs. It's suitable for production use.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.11 or later.
  • Low friction: pure Python wheel with no runtime dependencies.
  • Actively maintained with recent release (16 days old) and 316 repository stars.

License · maintenance · safety

Apache-2.0 (permissive) — Apache-2.0 permissive license allows commercial and private use with minimal restrictions.

last release 2026-07-29 (16 days) · last repo commit 2026-08-12 · 316 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 4,117,958 downloads/mo, #2,377 on PyPI

Verify before relying

from multimethod import multimethod

@multimethod
def func(x: int, y: float):
    return x + y

@multimethod
def func(x: float, y: int):
    return x * y

print(func(1, 2.0))  # calls first implementation
print(func(1.0, 2))  # calls second implementation
  • Performance comparison with other multiple dispatch libraries on realistic workloads.
  • Whether caching strategy remains effective with complex generic type hierarchies.
Same gist for agents: .md · .json

What it is and what it does

Multimethod is a pure Python library that adds multiple argument dispatching to functions through a decorator. It lets you define multiple implementations of the same function name, each handling different argument type combinations. When called, the library inspects argument types and routes to the matching implementation—or the closest match if an exact one isn't registered. It caches type lookups for speed and supports both simple type dispatch (using issubclass) and advanced generic types like Mapping, tuple, Iterable, and Callable with variance rules.

The library aims for simplicity and speed, offering two main modes: multimethod for faster cached positional-only dispatch, and multidispatch for compatibility with functools.singledispatch that also handles keyword arguments. It works with class methods, static methods, and custom metaclasses, and includes a subtype utility for isinstance and issubclass checks on generic types. No external dependencies are required.

Use it for

  • Implement mathematical operations that behave differently for int vs float arguments without explicit type checking.
  • Build serializers that handle different data types (dict, list, custom objects) with specialized logic per type.
  • Create API handlers that dispatch to different implementations based on request payload type.
  • Define recursive algorithms where base cases and recursive cases are separated by argument type.
  • Extend third-party classes with new methods by registering multimethod implementations across inheritance hierarchies.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

Multimethod is actively maintained, has no dependencies, supports modern Python versions (3.11+), carries a permissive license, and solves a real problem—type-based function dispatch—with a clean API and documented performance trade-offs. It's suitable for production use.

Install

multimethod on PyPI

Before you install

Low friction: pure Python wheel with no runtime dependencies. Actively maintained with recent release (16 days old) and 316 repository stars.

Requires Python 3.11 or later.

License in practice

Apache-2.0 permissive license allows commercial and private use with minimal restrictions.

Quickstart

from multimethod import multimethod

@multimethod
def func(x: int, y: float):
    return x + y

@multimethod
def func(x: float, y: int):
    return x * y

print(func(1, 2.0))  # calls first implementation
print(func(1.0, 2))  # calls second implementation

Verify before relying

  • Performance comparison with other multiple dispatch libraries on realistic workloads.
  • Whether caching strategy remains effective with complex generic type hierarchies.

Package facts

LicenseApache-2.0 permissive
Python supportSupports the current Python release >=3.11
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceActively maintained 16 days since the last release
Last repo commit
First released
Downloads4,117,958 / month, #2,377 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableIntended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.15Topic :: Software Development :: Libraries :: Python ModulesTyping :: Typed

Evidence: multimethod-2.1-py3-none-any.whl

Tags

Capabilities
multiple dispatch decoratorfunction overloading by typemultimethod dispatchgeneric functions pythontype-based function routingsingledispatch alternativemultidispatch implementation
Topics
dispatchgeneric-functionstype-routing
PyPI keywords
multipledispatchmultidispatchgenericfunctionsmethodsoverload

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 › “multimethod dispatch”

  • multimethodMultimethod provides a decorator for adding multiple argument…
  • multipledispatchEnables functions to dispatch on the types of multiple arguments,…
  • plum-dispatchPlum implements multiple dispatch in Python, allowing you to define…

Give your agent the search over MCP, or paste the wish link into any chat.

More Python Modules packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
PyYAML Worth it
PyPI · Python Modules · released Sep 2025

PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.

MITcompiled wheel · 3.8+
1.2Bdownloads / mo
pydantic Worth it
PyPI · Python Modules · released May 2026

Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.

MITpure Python · 3.9+
1.1Bdownloads / mo
annotated-types Worth it
PyPI · Python Modules · released Jul 2026

Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.

Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…

MITpure Python · 3.10+
871.3Mdownloads / mo
typing-inspection Worth it
PyPI · Python Modules · released Aug 2026

Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.

MITpure Python · 3.10+
783.0Mdownloads / mo

See also mixed-methods · multipledispatch · pyvers · overloading · methoddispatch · ovld · singledispatch · decorator · visitor · runtype