$npx skillfedfor your agent

simplegeneric

Simple generic functions (similar to Python's own len(), pickle.dump(), etc.)

SkipPyPI Python ModulesReleased Apr 2012561.4K downloads / moZPL 2.1Source build

Decision gist · record as of 2026-08-14

sdist only — simplegeneric-0.8.1.zip · builds from source
v0.8.1 · released 2012-04-01

No. The package is abandoned (no maintenance since 2012) and its Python 3 support is undocumented and untested. Modern Python (3.4+) includes functools.singledispatch, which is actively maintained and serves the same purpose. The unclear license treatment and high install friction add further risk. Install only if you are maintaining legacy code that already depends on it and cannot migrate to functools.singledispatch.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Package is abandoned and has not been maintained since 2012; Python 3 support is undocumented and untested in the repository.
  • High install friction due to source distribution format.
  • Package is abandoned (last release 2012-04-01, no maintenance for 5248 days) and carries only Python 2 classifiers despite claiming Python 3 compatibility in its description.

License · maintenance · safety

ZPL 2.1 (unclear) — Licensed under Zope Public License 2.1 (ZPL 2.1), but license treatment is marked unclear—verify compatibility with your project's license requirements before use.

last release 2012-04-01 (5248 days)

0 known vulnerabilities (OSV.dev, 2026-08-14) · 561,418 downloads/mo, #5,996 on PyPI

Verify before relying

from simplegeneric import generic

@generic
def process(item):
    return "default"

@process.when_type(int)
def _(item):
    return f"integer: {item}"

print(process(42))      # integer: 42
print(process("text"))  # default
  • Whether Python 3 compatibility actually works as claimed in the description, given the package's age and lack of maintenance.
  • Current status of ZPL 2.1 license compatibility with modern open-source projects and commercial use.
  • Whether the package's single-dispatch model is sufficient for modern use cases or if functools.singledispatch (Python 3.4+) is a better alternative.
Same gist for agents: .md · .json

What it is and what it does

simplegeneric is a minimal single-dispatch generic function library that lets you define functions that behave differently based on the type or identity of their first argument. You decorate a base function with @generic, then register type-specific or object-specific implementations using @func.when_type() or @func.when_object() decorators. When the function is called, it looks up and invokes the appropriate implementation based on the argument's type, falling back to the default if no match is found.

The library is intentionally simple—under 100 lines of code with no dependencies—and uses lookup tables similar to pickle.dump() and other standard library generic functions. It supports inheritance (methods defined for supertypes are inherited via MRO), multiple type/object registration in a single decorator, and inspection methods like has_type() and has_object(). However, it is abandoned (last release April 2012) and predates Python's built-in functools.singledispatch by several years.

Use it for

  • Implementing a visitor-like pattern where different object types need different handling without modifying the objects themselves.
  • Creating a simple type-based dispatch system for serialization, formatting, or conversion routines.
  • Building extensible functions where new type handlers can be registered at runtime without changing the core function.
  • Legacy codebases that already depend on simplegeneric and cannot easily migrate to functools.singledispatch.

Worth the install?

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

Skip

No.

The package is abandoned (no maintenance since 2012) and its Python 3 support is undocumented and untested. Modern Python (3.4+) includes functools.singledispatch, which is actively maintained and serves the same purpose. The unclear license treatment and high install friction add further risk. Install only if you are maintaining legacy code that already depends on it and cannot migrate to functools.singledispatch.

Install

simplegeneric on PyPI

Before you install

High install friction due to source distribution format. Package is abandoned (last release 2012-04-01, no maintenance for 5248 days) and carries only Python 2 classifiers despite claiming Python 3 compatibility in its description.

Package is abandoned and has not been maintained since 2012; Python 3 support is undocumented and untested in the repository.

License in practice

Licensed under Zope Public License 2.1 (ZPL 2.1), but license treatment is marked unclear—verify compatibility with your project's license requirements before use.

Quickstart

from simplegeneric import generic

@generic
def process(item):
    return "default"

@process.when_type(int)
def _(item):
    return f"integer: {item}"

print(process(42))      # integer: 42
print(process("text"))  # default

Verify before relying

  • Whether Python 3 compatibility actually works as claimed in the description, given the package's age and lack of maintenance.
  • Current status of ZPL 2.1 license compatibility with modern open-source projects and commercial use.
  • Whether the package's single-dispatch model is sufficient for modern use cases or if functools.singledispatch (Python 3.4+) is a better alternative.

Package facts

LicenseZPL 2.1 unclear
Python supportNot specified
Install frictionHigh. Source build required
Runtime dependenciesNone
MaintenanceAbandoned 5,248 days since the last release
First released
Downloads561,418 / month, #5,996 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 6 - MatureDevelopment Status :: 7 - InactiveIntended Audience :: DevelopersLicense :: OSI Approved :: Zope Public LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.4Programming Language :: Python :: 2.5Programming Language :: Python :: 2.6Programming Language :: Python :: 2.7Programming Language :: Python :: 3Topic :: Software Development :: Libraries :: Python Modules

Evidence: simplegeneric-0.8.1.zip

Tags

Capabilities
single dispatch generic functionstype-based function dispatchgeneric function decoratormethod registration by typevisitor pattern alternative
Topics
abandonedlegacydispatch

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 generic functions”

  • simplegenericProvides a lightweight decorator-based system for defining…
  • singledispatchProvides single-dispatch generic functions—a decorator-based…
  • multimethodMultimethod provides a decorator for adding multiple argument…

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 overloading · visitor · singledispatch · classes · singleton-decorator · typish · multimethod · decorator · overrides · methoddispatch