--- id: zope-size version: "6.0" license: ZPL-2.1 license_treatment: unclear maintenance: aging --- # zope.size — Interfaces and simple adapter that give the size of an object License: unclear · Maintenance: aging · Downloads: 148.2K/mo ## What it is and what it does zope.size defines a simple interface (ISized) that applications can use to retrieve the size of objects in bytes, typically for display or sorting purposes. It provides a default adapter that expects objects to implement a getSize() method returning bytes; if the method is absent, the adapter gracefully returns 'not available' rather than crashing. The package is part of the Zope ecosystem and is designed as a lightweight utility for standardizing how object sizes are exposed across applications. It depends on zope.interface for interface definitions and zope.i18nmessageid for internationalization support. The package is stable and actively maintained for current Python versions (3.9, 3.10, 3.11, 3.12, 3.13), though releases are infrequent. Use it for: - Display object sizes in web applications or admin interfaces without custom size-retrieval logic. - Sort collections of objects by their size using a standardized interface. - Provide a consistent interface for third-party libraries to query object sizes in Zope-based systems. - Adapt legacy objects to expose size information through a common interface. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides a standard interface and adapter for retrieving object sizes, with a fallback to 'not available' when the object lacks a getSize method. Yes, if you are working within the Zope ecosystem or need a lightweight, stable interface for object sizing. The package has no known vulnerabilities, low install friction, and current Python support. However, verify that ZPL-2.1 is compatible with your project's license requirements before committing, and note that the aging maintenance status means updates are infrequent. ## Install pip install zope-size uv add zope-size poetry add zope-size ## Installing zope.size Before you install: Low install friction with a pure-wheel distribution. Maintenance status is aging—last release was 336 days ago—but the package remains in production/stable state with active repository and current Python version support. License in practice: Licensed under ZPL-2.1 (Zope Public License 2.1), which is OSI-approved but marked as unclear in treatment. Verify compatibility with your project's license policy before adopting. Quickstart: pip install zope.size from zope.size import ISized from zope.interface import implementer @implementer(ISized) class MyObject: def getSize(self): return size in bytes Requires Python 3.9 or later; zope.interface and zope.i18nmessageid must be available at runtime. Verify before relying: - Whether ZPL-2.1 license is compatible with common project licenses (GPL, MIT, Apache 2.0, etc.) - Real-world usage patterns and adoption outside the Zope ecosystem - Concrete example values for getSize() return to illustrate typical usage ## Package facts - License: ZPL-2.1 (unclear) - Python support: supports_current - Install friction: low - Maintenance: aging - Downloads: 148.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags object size interface, get object size bytes, zope size adapter, object size display, size sorting interface, zope-ecosystem, interface-adapter [View on SkillFed](https://skillfed.io/packages/zope-size) · [View on PyPI](https://pypi.org/project/zope-size/)