Registry / database / products-zcatalog

products-zcatalog

JSON →
library7.3pypypi✓ verified 86d ago

ZCatalog is Zope's indexing and search solution, providing full-text, field, and keyword indexing with a catalog-like API. Version 7.3 supports Python >=3.10. It is part of the Zope ecosystem, released on a rolling basis.

pip install products-zcatalog
INSTALL
IMPORT
SIG · PRODUCTS-ZCATALOG
P
products-zcatalog
databasepythonv7.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ZCatalog
from Products.ZCatalog.ZCatalog import ZCatalog
from ZCatalog import ZCatalog
ZCatalog is a Zope product, must be imported from Products package
Catalog
from Products.ZCatalog.Catalog import Catalog
from ZCatalog.Catalog import Catalog
Same as above, wrong top-level package
CatalogBrains
from Products.ZCatalog.CatalogBrains import CatalogBrains
from ZCatalog.CatalogBrains import CatalogBrains
Common mistake: omitting Products.

Create a ZCatalog, add a field index, catalog a dictionary, and search. Requires a Zope environment.

from Products.ZCatalog.ZCatalog import ZCatalog catalog = ZCatalog('my_catalog') catalog.addIndex('title', 'FieldIndex') doc = {'id': 1, 'title': 'Hello World'} catalog.catalog_object(doc, doc['id']) results = catalog.searchResults(title='Hello') print(len(results))
Debug
Known issues
deprecatedThe old import path 'from ZCatalog import ZCatalog' is deprecated and removed in recent versions. Use 'from Products.ZCatalog.ZCatalog import ZCatalog'.
fix
Update imports to use Products.ZCatalog prefix.
affects: >=6.0
breakingPython 3.10+ required as of version 7.x. Dropped Python 2.7 and 3.8 support.
fix
Upgrade to Python 3.10 or later.
affects: >=7.0
gotchaZCatalog uses persistent storage (ZODB). Objects must be persistent or dict-like with an 'id' key. Non-persistent objects may cause transaction errors.
fix
Ensure objects passed to catalog_object are persistent subclasses or dict with 'id'.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'ZCatalog'
Importing without the Products prefix.
fix
Use 'from Products.ZCatalog.ZCatalog import ZCatalog'.
TypeError: catalog_object() argument 1 must be a dictionary or persistent object, not X
Passing a non-compliant object without an id.
fix
Pass a dictionary with an 'id' key or a persistent object.
KeyError: 'id'
Object missing an 'id' key.
fix
Include an 'id' key in the dictionary or ensure the persistent object has an id attribute.
Upgrade
Version history
7.3latest on PyPI · released Nov 22, 2025
Audit
Dependencies
ZoperequiredZCatalog is designed to run inside Zope
BTreesrequiredUsed for persistent indexing structures
zope.interfacerequiredInterface definitions
Agent activity
6 hits · last 30 days
node
6
Resources
products-zcatalog — pip install products-zcatalog · libregistry