Registry / serialization / configparser2

configparser2

JSON →
library4.0.0pypypiunverified

Backport of Python 3.5's configparser to older Python versions (2.6-3.5). Version 4.0.0 is the final release. Provides the updated ConfigParser with features like mapping protocol support, ordered dicts, and interpolation depth checking. Consider using Python 3's standard library configparser instead.

pip install configparser2==4.0.0
INSTALL
IMPORT
SIG · CONFIGPARSER2
C
configparser2
serializationpythonv4.0.0
Install
2.4s avg
Import
Disk
17MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v4.0.0 · 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.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 19.3MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.4s · import 0.000s · 20MB
17MB installed
● package 17MB
Code
Verified usage

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

ConfigParser
from backports.configparser import ConfigParser
from configparser2 import ConfigParser

Minimal example using ConfigParser and environment variable for auth.

from configparser2 import ConfigParser import os config = ConfigParser() config.read_string(os.environ.get('CONFIG_STRING', '[DEFAULT]\nkey=value\n')) print(dict(config['DEFAULT']))
Debug
Known issues
deprecatedconfigparser2 is no longer maintained. Use Python 3's standard library configparser instead, or the backport 'configparser' package if stuck on Python 2.
fix
Switch to `import configparser` (stdlib backport) or upgrade to Python 3.
affects: all
breakingIn version 4.0.0, the `ConfigParser` class may have different default behavior for interpolation compared to older versions. Specifically, `strict` parameter defaults may break existing config files with duplicate keys.
fix
Set `strict=False` when creating ConfigParser if you rely on duplicate key behavior: `ConfigParser(strict=False)`.
affects: 4.0.0
gotchaInstalling configparser2 will uninstall the standard library backport `configparser` due to package conflicts. This can break other tools that depend on the stdlib backport.
fix
Use a virtual environment to isolate projects, or avoid installing both packages simultaneously.
affects: all
Upgrade
Version history
4.0.0latest on PyPI · released May 12, 2015
Audit
Dependencies
configparserrequiredMay conflict with the standard library backport configparser; either can be imported, but mixing causes issues
Agent activity
14 hits · last 30 days
node
12
OpenAI (training)
1
Resources
configparser2 — pip install configparser2 · libregistry