--- id: zope-container version: "7.2" license: ZPL-2.1 license_treatment: unclear maintenance: active --- # zope.container — Zope Container License: unclear · Maintenance: active · Downloads: 157.5K/mo ## What it is and what it does zope.container is a foundational package in the Zope web framework ecosystem that defines interfaces and provides implementations for container objects—data structures that hold and manage other objects. It supplies two main container types: BTreeContainer, which uses B-tree storage for scalable key-value access, and OrderedContainer, which preserves insertion order. The package also serves as the base for zope.site.folder's Folder implementation. It integrates deeply with Zope's component architecture, persistent object storage, security model, and event system through its 19 runtime dependencies. The package is used in applications that need to organize persistent objects hierarchically, support traversal and lookup by name, emit lifecycle events when objects are added or removed, and maintain compatibility with Zope's interface-based design patterns. It handles both text and byte keys, supports the PURE_PYTHON environment variable for debugging, and provides utilities like NameChooser for generating unique object names within a container. Use it for: - Building hierarchical object stores in Zope applications where containers hold and manage persistent objects with named access. - Implementing folder-like structures that preserve insertion order or optimize for large datasets using B-tree storage. - Integrating container lifecycle events (add, remove, modify) into Zope's event system for reactive application logic. - Developing Zope-based CMS or document management systems that require object containment and traversal. - Creating custom container types by inheriting from BTreeContainer or OrderedContainer with Zope interface compliance. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides container interfaces and implementations (BTreeContainer, OrderedContainer) for organizing and managing objects in Zope-based applications, with support for object containment, traversal, and lifecycle events. Yes, if you are building a Zope-based application or framework that requires object containment and lifecycle management. The package is actively maintained, supports modern Python versions (3.10–3.14), has no known vulnerabilities, and is well-integrated into the Zope ecosystem. However, verify that ZPL-2.1 is compatible with your project's license requirements (marked unclear), and be aware of the 19 runtime dependencies—this is a heavyweight addition suitable for Zope-centric projects, not a lightweight utility. ## Install pip install zope-container uv add zope-container poetry add zope-container ## Installing zope.container Before you install: Medium install friction due to 19 runtime dependencies spanning the Zope ecosystem (BTrees, persistent, zope.interface, zope.security, zope.schema, and others). Maintenance is active with recent releases; the package requires Python 3.10+ and has dropped older Python versions progressively. Pre-built wheels available for multiple platforms reduce friction on standard architectures. License in practice: Licensed under ZPL-2.1 (Zope Public License 2.1), which is OSI-approved but less common than MIT or Apache 2.0. The license treatment is marked unclear in the fact sheet, so verify compatibility with your project's license policy before adoption. Quickstart: from zope.container.btree import BTreeContainer from zope.container.ordered import OrderedContainer container = BTreeContainer() container['key'] = some_object Requires Python 3.10 or later; a full Zope environment with persistent object support is typically needed for practical use. Verify before relying: - Whether ZPL-2.1 is compatible with your project's license requirements (marked 'unclear' in metadata). - Performance characteristics of BTreeContainer vs OrderedContainer for your specific use case. - Integration requirements with zope.site.folder and other Zope framework components. ## Package facts - License: ZPL-2.1 (unclear) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 157.5K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags zope container object management, btree container implementation, ordered container zope, zope object containment, zope traversal and containers, persistent object containers, zope folder implementation, zope-framework, object-persistence, btree-storage [View on SkillFed](https://skillfed.io/packages/zope-container) · [View on PyPI](https://pypi.org/project/zope-container/)