mypy-zope
Plugin for mypy to support zope interfaces
Decision gist · record as of 2026-08-14
Yes, if you use zope.interface in a mypy-checked project. The plugin is active, production-grade, and has no security vulnerabilities. Install friction is low. The main caveat: some advanced zope.interface features remain unsupported, and stub coverage is incomplete—verify that your specific patterns are listed in the documented supported features before committing.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low friction: pure Python wheel with only three runtime dependencies (mypy, zope.interface, zope.schema).
- Active maintenance—last commit 2026-07-15, release within 30 days—and marked production-grade despite acknowledging potential subtle bugs.
License · maintenance · safety
permissive license (permissive) — Permissive license (MIT) with no notable restrictions on use or redistribution.
last release 2026-07-15 (30 days) · last repo commit 2026-07-15 · 40 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 132,498 downloads/mo, #11,548 on PyPI
Alternatives
Verify before relying
pip install mypy-zope
# Add to mypy.ini:
# [mypy]
# plugins=mypy_zope:plugin
# Then use in code:
import zope.interface
class IAnimal(zope.interface.Interface):
def say() -> None:
pass
@zope.interface.implementer(IAnimal)
class Cow:
def say(self) -> None:
print("Moo")
animal: IAnimal = Cow()
animal.say()- Whether stub files for zope.interface and zope.schema are complete enough for real-world projects beyond the documented limitations.
- Performance impact of the plugin on large codebases with many interfaces.
- Whether the 'subtle bugs' acknowledged in production use affect common patterns.
What it is and what it does
mypy-zope is a mypy plugin that bridges the gap between zope.interface's runtime interface system and static type checking. It teaches mypy to understand zope interfaces as types, so you can write polymorphic code using zope's interface pattern and have mypy verify type safety across interface boundaries. The plugin infers types from zope.schema field declarations (Int, Text, etc.), handles interface implementation via @implementer decorators or classImplements calls, supports the adaptation pattern where interfaces are called to look up adapters, and enables type narrowing with providedBy() and implementedBy() checks.
The package ships with type stubs for zope.interface and zope.schema, which are automatically enabled when the plugin is active. It supports overloaded methods in interfaces, field properties, and conditional type inference. The plugin is marked production-grade and used in large projects, though the maintainers note that subtle bugs may still exist. Some advanced zope.interface features—like module-level interface declarations, List and Dict field type inference, and full interface compatibility checking—are not yet supported.
Use it for
- Type-check a zope-based application where interfaces define contracts and implementations are polymorphic.
- Verify that schema field assignments match their declared types (e.g., Int fields reject strings).
- Enable IDE autocomplete and type hints for code using zope.interface.implementer decorators.
- Narrow types in conditional branches using zope's providedBy() and implementedBy() runtime checks.
- Catch adapter lookup errors by treating interface calls as typed function invocations.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you use zope.interface in a mypy-checked project.
The plugin is active, production-grade, and has no security vulnerabilities. Install friction is low. The main caveat: some advanced zope.interface features remain unsupported, and stub coverage is incomplete—verify that your specific patterns are listed in the documented supported features before committing.
Install
mypy-zope on PyPI
Before you install
Low friction: pure Python wheel with only three runtime dependencies (mypy, zope.interface, zope.schema). Active maintenance—last commit 2026-07-15, release within 30 days—and marked production-grade despite acknowledging potential subtle bugs.
License in practice
Permissive license (MIT) with no notable restrictions on use or redistribution.
Quickstart
pip install mypy-zope
# Add to mypy.ini:
# [mypy]
# plugins=mypy_zope:plugin
# Then use in code:
import zope.interface
class IAnimal(zope.interface.Interface):
def say() -> None:
pass
@zope.interface.implementer(IAnimal)
class Cow:
def say(self) -> None:
print("Moo")
animal: IAnimal = Cow()
animal.say()
Verify before relying
- Whether stub files for zope.interface and zope.schema are complete enough for real-world projects beyond the documented limitations.
- Performance impact of the plugin on large codebases with many interfaces.
- Whether the 'subtle bugs' acknowledged in production use affect common patterns.
Package facts
| License | permissive license permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagesmypyzope.interfacezope.schema |
| Maintenance | Actively maintained 30 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 132,498 / month, #11,548 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/StableEnvironment :: ConsoleIntended 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.13Programming Language :: Python :: 3.14Topic :: Software Development |
Evidence: mypy_zope-1.0.16-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 › “mypy plugin zope interface”
- mypy-zopeA mypy plugin that treats zope.interface declarations as types,…
- zope.componentImplements the core Zope Component Architecture for defining,…
- zope.ptresourceProvides a resource class that processes Zope Page Templates and…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
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.
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.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
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.
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.
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.
See also zope.interface · zope.schema · twilio-stubs · zope.component · sqlalchemy-stubs · classes · mypy-boto3 · flake8-annotations · z3c.pt · types-decorator