skillfed

configobj

Config file reading, writing and validation.

configobj v5.0.9 7.2M downloads/30d#1,778 on PyPI338
Permissive license BSD-3-Clause Active released

What it is and what it does

ConfigObj is a mature configuration file library that reads and writes INI-format files with a focus on ease of use and round-trip fidelity—it preserves comments and key order. It handles nested sections to arbitrary depth, list values, multiline values, and full Unicode. The library includes a validation subsystem with automatic type conversion, default values, and support for repeated sections. It also offers an unrepr mode for serializing and deserializing Python data types.

The package is designed for developers who need straightforward configuration management without complex dependencies. It's commonly used in system administration tools, application configuration, and any context where INI files are the preferred format. Recent versions dropped Python 2 support and patched a ReDoS vulnerability.

Use it for:

  • Reading and writing application configuration files in INI format with automatic preservation of comments and structure
  • Validating configuration values with automatic type conversion and default fallbacks during application startup
  • Building admin tools or sysadmin utilities that need to parse and modify INI-based config files
  • Storing nested configuration hierarchies in a human-readable format that users can edit directly
  • Serializing Python data structures into config files and deserializing them back via unrepr mode

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

ConfigObj reads, writes, and validates INI-format configuration files with support for nested sections, list values, string interpolation, and automatic type checking.

Yes. ConfigObj is a stable, actively maintained library with zero known vulnerabilities, low install friction, and a permissive license. It solves a well-defined problem—INI file handling with validation—and is widely used. Install it if your application needs configuration file support; the lack of dependencies makes it a lightweight choice.

Install

configobj on PyPI

pip

pip install configobj

uv

uv add configobj

poetry

poetry add configobj

Installing configobj

Before you install

Low install friction with no runtime dependencies. Actively maintained with recent security fix (CVE-2023-26112 in 5.0.9) and last commit 2026-08-01.

License in practice

BSD-3-Clause permissive license allows commercial and private use with minimal restrictions; suitable for most projects.

Quickstart

pip install configobj

from configobj import ConfigObj
config = ConfigObj('settings.ini')
config['section']['key'] = 'value'
config.write()

Requires Python 3.7 or later (supports 3.7 through 3.12)

Verify before relying

  • Whether the ReDoS fix in 5.0.9 affects existing validation patterns or performance
  • Specific validation system capabilities beyond type checking and defaults mentioned

Package facts

License BSD-3-Clause (permissive)
Python support supports the current Python release (>=3.7)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance actively maintained — 692 days since the last release
Last repo commit
First released
Downloads 7,158,377/month — #1,778 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: configobj-5.0.9-py2.py3-none-any.whl

Keywords: config, ini, dictionary, application, admin, sysadmin, configuration, validation

Development Status :: 6 - MatureIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python Modules

Tags

ini file reader writerconfig file parserconfiguration validationnested config sectionsini file round tripconfig interpolationpython config management
config-managementini-formatvalidation

More Libraries packages