ExtensionClass
Metaclass for subclassable extension types
What it is and what it does
ExtensionClass is a metaclass that allows classes defined in C extension modules to be subclassed from Python code—a capability not normally available with standard extension types. It also provides ComputedAttribute (similar to property but works on instances and preserves Acquisition semantics) and MethodObject (for attaching callable methods to extension classes). The package is primarily maintained for legacy Zope applications; modern Python code should use standard new-style classes and descriptors instead.
The package has no runtime dependencies and ships as compiled wheels for Python 3.10–3.14 across macOS (Intel and ARM64), Linux (i686, x86_64, aarch64), and Windows (x86_64 and ARM64). It is actively maintained and has been updated to support free-threaded Python 3.14t, though it is explicitly recommended only for applications that require it for backward compatibility.
Use it for:
- Maintaining legacy Zope applications that depend on ExtensionClass-based object models.
- Subclassing C extension types when standard Python descriptors or properties are insufficient.
- Preserving Acquisition wrapper semantics in extension-based object hierarchies.
- Attaching computed attributes to extension class instances that behave like properties.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides a metaclass that enables extension module classes to be subclassed in Python, along with utilities for computed attributes and method objects on ExtensionClass instances.
Yes, but only if you are maintaining a legacy Zope application or have a specific need to subclass C extension types. The package is actively maintained and has no known vulnerabilities. For new projects, use Python's built-in descriptor protocol and properties instead. Install friction is moderate due to compiled wheels, but prebuilt binaries are available for common platforms.
Install
extensionclass on PyPI
pip
pip install extensionclassuv
uv add extensionclasspoetry
poetry add extensionclassInstalling ExtensionClass
Before you install
Medium install friction due to compiled wheels for multiple platforms and Python versions (3.10–3.14). Actively maintained with recent release (106 days ago) and ongoing support for new Python versions including free-threaded 3.14t.
License in practice
Licensed under ZPL-2.1 (Zope Public License 2.1), a permissive open-source license. License treatment is marked unclear in the fact sheet, so verify compatibility with your project's licensing requirements before use.
Quickstart
import extensionclass
class MyExtension(extensionclass.ExtensionClass):
pass
obj = MyExtension()
Requires Python 3.10 or later; compiled C extension wheels are provided for common platforms but may require a C compiler on unsupported architectures.
Verify before relying
- Whether ZPL-2.1 is compatible with your project's license (marked unclear in metadata).
- Performance characteristics compared to modern Python descriptors and properties.
- Whether Acquisition wrapper semantics are still needed for your use case versus standard Python patterns.
Package facts
| License | ZPL-2.1 (unclear) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 106 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 169,563/month — #10,417 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: extensionclass-6.3-cp310-cp310-macosx_10_9_x86_64.whl; extensionclass-6.3-cp310-cp310-macosx_11_0_arm64.whl; extensionclass-6.3-cp310-cp310-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl; extensionclass-6.3-cp310-cp310-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl; extensionclass-6.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl; extensionclass-6.3-cp310-cp310-win_amd64.whl; extensionclass-6.3-cp311-cp311-macosx_10_9_x86_64.whl; extensionclass-6.3-cp311-cp311-macosx_11_0_arm64.whl; extensionclass-6.3-cp311-cp311-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl; extensionclass-6.3-cp311-cp311-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl; extensionclass-6.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl; extensionclass-6.3-cp311-cp311-win_amd64.whl; extensionclass-6.3-cp311-cp311-win_arm64.whl; extensionclass-6.3-cp312-cp312-macosx_10_9_x86_64.whl; extensionclass-6.3-cp312-cp312-macosx_11_0_arm64.whl; extensionclass-6.3-cp312-cp312-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl; extensionclass-6.3-cp312-cp312-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl; extensionclass-6.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl; extensionclass-6.3-cp312-cp312-win_amd64.whl; extensionclass-6.3-cp312-cp312-win_arm64.whl
Tags
More Application Frameworks packages
FastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
textualTextual is a Python framework for building…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
mcpBuild and connect to Model Context Protocol…
permissive · top 1,000 on PyPI
WerkzeugWerkzeug is a WSGI utility library providing…
permissive · top 1,000 on PyPI
PersistenceProvides a persistent base class built on…
unclear · top 15,000 on PyPI
zope.deprecationProvides a decorator and utilities to mark…
unclear · top 5,000 on PyPI
zope.interfaceProvides a Python implementation of object…
unclear · top 1,000 on PyPI
zope.annotationStores additional metadata on objects without…
unclear · top 15,000 on PyPI
zope.proxyzope.proxy provides transparent wrapper objects…
unclear · top 15,000 on PyPI
zope.exceptionsProvides general-purpose exception classes and…
unclear · top 15,000 on PyPI
zope.viewletzope.viewlet provides a pluggable framework for…
unclear · top 15,000 on PyPI
zope.componentImplements the core Zope Component Architecture…
unclear · top 5,000 on PyPI
zope.configurationZope.configuration provides an extensible…
unclear · top 5,000 on PyPI
persistentProvides transparent persistence for Python…
unclear · top 15,000 on PyPI