Registry / serialization / zconfig

zconfig

JSON →
library4.3pypypi✓ verified 89d ago

ZConfig is a Python library designed for structured, schema-driven configuration, particularly useful for complex applications and logging. It employs an XML-based schema language to define the allowable structure and content of configuration documents, including custom data conversion routines written in Python. This approach offers greater flexibility and validation capabilities compared to Python's standard `ConfigParser` module. ZConfig is currently at version 4.3 and is actively maintained by the Zope Foundation.

pip install zconfig
INSTALL
IMPORT
SIG · ZCONFIG
Z
zconfig
serializationpythonv4.3
Install
1.6s avg
Import
120ms
Disk
17MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v4.3 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.10–3.920 runs
installs and imports cleanly · install 0.0s · import 0.125s · 19MB
glibc
py 3.10–3.920 runs
installs and imports cleanly · install 1.6s · import 0.115s · 19MB
17MB installed
● package 17MB
Code
Verified usage

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

configureLoggers
✓ from ZConfig import configureLoggers
loadSchema
✓ from ZConfig import loadSchema
loadConfig
✓ from ZConfig import loadConfig

This quickstart demonstrates how to configure Python's logging framework using ZConfig's `configureLoggers` function. It takes an XML string defining the logging setup, including log level and output destination (STDOUT in this case).

from ZConfig import configureLoggers import logging # Define a simple ZConfig XML for logging log_config = ''' <logger> level INFO <logfile> PATH STDOUT format %(levelname)s %(name)s %(message)s </logfile> </logger> ''' # Configure the Python logging framework using ZConfig configureLoggers(log_config) # Get a logger and test it logger = logging.getLogger() logger.info('An info message') logger.debug('A debug message') # This will not show as level is INFO
Debug
Known issues
breakingZConfig versions frequently drop support for older Python versions. For example, version 4.0 dropped Python 2.7, 3.5, 3.6; version 4.2 dropped 3.7, 3.8; and version 4.3 dropped 3.9. Always check `requires_python` on PyPI for compatibility.
fix
Ensure your Python environment meets the `requires_python` specification of the ZConfig version you intend to install. Upgrade Python or pin an older ZConfig version if necessary.
affects: 4.0, 4.2, 4.3 and later
breakingSchema component loading underwent a significant change in version 3.5. Older versions searched directories, while 3.5+ strictly requires schema components to be located within Python packages and discoverable via standard import mechanisms (`component.xml` at package root).
fix
For ZConfig versions 3.5 and newer, ensure all schema components are properly packaged as Python modules (e.g., with `__init__.py` and `component.xml` in the expected location) and are importable by Python.
affects: <3.5 vs. >=3.5
Errors
Common errors & fixes
ZConfig.ZConfigError: Could not locate component 'some.package.component_name'
ZConfig could not find the specified schema component. This typically happens if the `component.xml` file is not in the correct Python package location or the package itself is not discoverable.
fix
Verify that the Python package containing the schema component is correctly installed and accessible on `PYTHONPATH`. Ensure `component.xml` is present at the root of the specified Python package.
TypeError: configureLoggers() missing 1 required positional argument: 'config'
The `configureLoggers` function was called without providing the XML configuration string as its argument.
fix
Pass a valid XML string containing the logging configuration to the `configureLoggers` function. For example: `configureLoggers('<logger>...</logger>')`.
ZConfig.ZConfigError: Invalid configuration format: syntax error at line X, column Y
The provided XML schema or configuration file has a syntax error or does not conform to the expected ZConfig XML structure.
fix
Carefully review the XML configuration or schema file for well-formedness. Check for unclosed tags, incorrect attributes, or other XML parsing issues. Refer to ZConfig documentation for correct schema syntax.
ERROR: Package 'zconfig' requires Python '>=3.10' but the running Python is '3.9.x'
You are attempting to install `zconfig` version 4.3 (or a similar recent version) using a Python interpreter that does not meet its minimum version requirement.
fix
Upgrade your Python environment to version 3.10 or higher. Alternatively, install an older version of `zconfig` that is compatible with your current Python version, e.g., `pip install 'zconfig<4.0'`.
Upgrade
Version history
4.3latest on PyPI · released Nov 21, 2025
Audit
Dependencies

No dependency data recorded yet.

Agent activity
44 hits · last 30 days
node
36
OpenAI (training)
1
Resources
zconfig — pip install zconfig · libregistry