mixed-methods
Mixed methods.
Decision gist · record as of 2026-08-14
Yes, if you specifically need a method that behaves as both classmethod and instance method. The package is lightweight, permissively licensed, and solves its narrow problem cleanly. However, dormant maintenance and minimal download volume suggest it remains a niche utility; only install if this exact pattern fits your design.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.8 or above.
- Low friction install with only two lightweight runtime dependencies (attrs and typing-extensions).
- Maintenance is dormant—last release was over 900 days ago and the repository shows minimal activity, though it remains unarchived and marked production-stable.
License · maintenance · safety
MIT (permissive) — MIT license is permissive; you can use, modify, and distribute this package freely with minimal restrictions.
last release 2024-02-26 (900 days) · last repo commit 2024-05-09 · 1 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 77,688 downloads/mo, #14,506 on PyPI
Alternatives
Verify before relying
pip install mixed-methods
from mixed_methods import mixed_method
class Type:
@classmethod
def type_method(cls) -> int:
return 13
def instance_method(self) -> int:
return 42
method = mixed_method(type_method, instance_method)
Type.method() # returns 13
instance = Type()
instance.method() # returns 42- Whether the package handles edge cases like inheritance, property interaction, or descriptor protocol conflicts
- Performance characteristics when mixed methods are called in tight loops or hot code paths
What it is and what it does
mixed-methods is a small utility library that exports a single decorator, `mixed_method`, which allows you to define a method that behaves as a classmethod when called on the class itself and as an instance method when called on an instance. You pass two functions to the decorator—one for class-level behavior and one for instance-level behavior—and the resulting method dispatches to the appropriate implementation based on how it's invoked.
The package is typed and supports Python 3.8 and above. It has no external dependencies beyond attrs and typing-extensions, making it lightweight. The library is dormant (last updated over 900 days ago) but marked as production-stable; it solves a narrow, well-defined problem and has remained essentially unchanged since its early releases.
Use it for
- Factory methods that construct instances differently when called on the class versus operating on an existing instance
- Dual-mode utilities where class-level calls perform setup or configuration and instance calls perform operations
- Avoiding name collisions when you need both a classmethod and instance method with identical names
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you specifically need a method that behaves as both classmethod and instance method.
The package is lightweight, permissively licensed, and solves its narrow problem cleanly. However, dormant maintenance and minimal download volume suggest it remains a niche utility; only install if this exact pattern fits your design.
Install
mixed-methods on PyPI
Before you install
Low friction install with only two lightweight runtime dependencies (attrs and typing-extensions). Maintenance is dormant—last release was over 900 days ago and the repository shows minimal activity, though it remains unarchived and marked production-stable.
Requires Python 3.8 or above.
License in practice
MIT license is permissive; you can use, modify, and distribute this package freely with minimal restrictions.
Quickstart
pip install mixed-methods
from mixed_methods import mixed_method
class Type:
@classmethod
def type_method(cls) -> int:
return 13
def instance_method(self) -> int:
return 42
method = mixed_method(type_method, instance_method)
Type.method() # returns 13
instance = Type()
instance.method() # returns 42
Verify before relying
- Whether the package handles edge cases like inheritance, property interaction, or descriptor protocol conflicts
- Performance characteristics when mixed methods are called in tight loops or hot code paths
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagesattrstyping-extensions |
| Maintenance | Dormant 900 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 77,688 / month, #14,506 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: UtilitiesTyping :: Typed |
Evidence: mixed_methods-1.1.1-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 › “mixed method decorator”
- mixed-methodsProvides a decorator that lets a single method behave differently…
- overridesProvides a @override decorator that validates method overrides match…
- botoinatorBotoinator lets you attach decorators to boto3 client and resource…
Give your agent the search over MCP, or paste the wish link into any chat.
More Utilities packages
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.
Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.
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.
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.
Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.
Install it if you need to display or transform source code.
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.
See also multimethod · wraps · orderings · solus · wirerope · named · methodtools · entrypoint · singleton-decorator · forbiddenfruit