$npx skillfedfor your agent

methoddispatch

singledispatch decorator for class methods.

With conditionsPyPI Software DevelopmentReleased Nov 202398.4K downloads / moBSDPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — methoddispatch-5.0.1-py3-none-any.whl
v5.0.1 · released 2023-11-21

Yes, if you need independent dispatch tables in class hierarchies. The package solves a real limitation of functools.singledispatchmethod and has no dependencies. Dormant maintenance is acceptable here—the feature is stable and unlikely to need updates. Install it for polymorphic method dispatch; avoid it if you only need single-dispatch functions (use functools.singledispatch instead).AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Low install friction with no runtime dependencies.
  • Maintenance is dormant—last release was 2023-11-21 and no commits since then—but the package is stable and archived status is false, suggesting it is maintained as-is rather than abandoned.

License · maintenance · safety

BSD (permissive) — BSD license is permissive, allowing commercial and private use with minimal restrictions; suitable for most projects.

last release 2023-11-21 (997 days) · last repo commit 2023-11-21 · 5 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 98,377 downloads/mo, #13,088 on PyPI

Verify before relying

from methoddispatch import singledispatch, SingleDispatch

class MyClass(SingleDispatch):
    @singledispatch
    def process(self, arg):
        print(arg)
    
    @process.register(int)
    def process_int(self, arg):
        print(f"int: {arg}")

obj = MyClass()
obj.process(42)  # dispatches to process_int
  • Whether the package works correctly with Python 3.12+ given the last release was 2023-11-21 and no explicit classifier for 3.12 is listed.
  • Performance characteristics when dispatch registries grow large or when used in high-throughput scenarios.
Same gist for agents: .md · .json

What it is and what it does

methoddispatch extends Python's functools.singledispatchmethod to allow subclasses to maintain independent dispatch tables. The standard library's singledispatchmethod (added in Python 3.8) shares a dispatch registry across all subclasses, preventing subclasses from overriding type handlers without affecting the parent class. This package solves that by providing a SingleDispatch mixin that gives each class its own registry copy.

You decorate a method with @singledispatch and then register type-specific implementations using @method.register(type). When the method is called, it dispatches to the appropriate implementation based on the type of the first argument. Subclasses can extend or override the registry independently, and you can also register implementations at runtime via add_overload() or on individual instances. Type hints are supported for automatic type inference.

Use it for

  • Implement polymorphic behavior in class hierarchies where different subclasses need different type handlers without modifying parent dispatch tables.
  • Create generic data processors that handle multiple input types (int, str, list, etc.) with specialized logic for each.
  • Build plugin or strategy systems where handlers are registered by type and subclasses can add their own type handlers.
  • Write serializers or formatters that dispatch on object type to produce different output representations.
  • Develop type-aware method resolution in domain models where behavior depends on argument type rather than method name.

Worth the install?

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

With conditions

Yes, if you need independent dispatch tables in class hierarchies.

The package solves a real limitation of functools.singledispatchmethod and has no dependencies. Dormant maintenance is acceptable here—the feature is stable and unlikely to need updates. Install it for polymorphic method dispatch; avoid it if you only need single-dispatch functions (use functools.singledispatch instead).

Install

methoddispatch on PyPI

Before you install

Low install friction with no runtime dependencies. Maintenance is dormant—last release was 2023-11-21 and no commits since then—but the package is stable and archived status is false, suggesting it is maintained as-is rather than abandoned.

License in practice

BSD license is permissive, allowing commercial and private use with minimal restrictions; suitable for most projects.

Quickstart

from methoddispatch import singledispatch, SingleDispatch

class MyClass(SingleDispatch):
    @singledispatch
    def process(self, arg):
        print(arg)
    
    @process.register(int)
    def process_int(self, arg):
        print(f"int: {arg}")

obj = MyClass()
obj.process(42)  # dispatches to process_int

Verify before relying

  • Whether the package works correctly with Python 3.12+ given the last release was 2023-11-21 and no explicit classifier for 3.12 is listed.
  • Performance characteristics when dispatch registries grow large or when used in high-throughput scenarios.

Package facts

LicenseBSD permissive
Python supportNot specified
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceDormant 997 days since the last release
Last repo commit
First released
Downloads98,377 / month, #13,088 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
License :: OSI Approved :: BSD LicenseProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Evidence: methoddispatch-5.0.1-py3-none-any.whl

Tags

Capabilities
single dispatch decorator methodstype-based method overloadinggeneric methods pythonsingledispatch for class methodsmethod dispatch by typepolymorphic method dispatch
Topics
method-dispatchpolymorphism
PyPI keywords
singledispatchdecoratormethod

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 › “single dispatch decorator methods”

  • methoddispatchAdds single-dispatch method support to Python classes, allowing…
  • simplegenericProvides a lightweight decorator-based system for defining…
  • singledispatchProvides single-dispatch generic functions—a decorator-based…

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

More Software Development packages

typing-extensions Worth it
PyPI · Software Development · released Jul 2026

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.

PSF-2.0pure Python · 3.9+
1.9Bdownloads / mo
numpy Worth it
PyPI · Software Development · released Aug 2026

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.

BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0compiled wheel · 3.12+
1.1Bdownloads / mo
fastapi Worth it
PyPI · Software Development · released Jul 2026

FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.

MITpure Python · 3.10+
568.6Mdownloads / mo
annotated-doc With conditions
PyPI · Software Development · released Jul 2026

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.

MITpure Python · 3.9+
456.2Mdownloads / mo
typer Worth it
PyPI · Software Development · released Aug 2026

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.

MITpure Python · 3.10+
369.3Mdownloads / mo
distlib With conditions
PyPI · Software Development · released Jun 2026

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.

permissive licensepure Python
323.3Mdownloads / mo

See also singledispatch · multimethod · multipledispatch · overloading · pyvers · classes · json-encoder · decorator · ovld · overrides