skillfed

fhconfparser

Provides a config language independent way to read a config file.

fhconfparser v2024.1 365.6K downloads/30d#7,208 on PyPI0
Permissive license MIT DORMANT released

What it is and what it does

FHConfParser provides a single API to read configuration files regardless of whether they are written in INI, TOML, or JSON format. Instead of writing separate parsing logic for each format, you pass a file path and get back the parsed configuration data in a consistent structure. This is useful for tools that need to support multiple config formats—like linters or configuration management utilities—without duplicating parsing code.

The package wraps format-specific libraries (notably tomli for TOML) and attrs for data handling, keeping the dependency footprint small. It's marked as Production/Stable and supports Python 3.8 through 3.12, though development has slowed significantly.

Use it for:

  • Build a linting tool that accepts configuration in INI, TOML, or JSON without duplicating parser logic.
  • Create a CLI application that auto-detects and reads config files in any of the three supported formats.
  • Migrate a project's configuration from one format to another by reading with a single parser.
  • Write a configuration validation layer that works uniformly across multiple file formats.
  • Simplify testing by loading test fixtures from config files in whichever format is most convenient.

Worth the install?

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

Reads configuration files in INI, TOML, or JSON format through a single unified interface, abstracting away format-specific syntax differences.

Yes, if you need to support multiple config formats without writing format-specific code. The low install friction and permissive license make it a safe choice. However, be aware that maintenance is dormant—last release was 933 days ago—so consider whether you need active support or can tolerate a stable, unchanging library.

Install

fhconfparser on PyPI

pip

pip install fhconfparser

uv

uv add fhconfparser

poetry

poetry add fhconfparser

Installing fhconfparser

Before you install

Low friction install with only two lightweight runtime dependencies (attrs and tomli). Dormant maintenance status—last release was 933 days ago, though the repository remains active with a recent commit on 2024-12-01.

License in practice

MIT license is permissive; you can use, modify, and distribute this package with minimal restrictions, making it suitable for both open-source and commercial projects.

Quickstart

pip install fhconfparser

from fhconfparser import FHConfParser

parser = FHConfParser('config.toml')
config_data = parser.read()

Requires Python 3.8 or later; package is tested on Python 3.8 and 3.11.

Verify before relying

  • Whether the unified interface handles nested structures and type conversions consistently across all three formats.
  • Performance characteristics when parsing large configuration files.
  • Error handling and reporting quality for malformed config files in each supported format.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.8,<4.0)
Install friction low — pure-Python wheel
Runtime dependencies 2 — attrs, tomli
Maintenance dormant — 933 days since the last release
Last repo commit
First released
Downloads 365,612/month — #7,208 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: fhconfparser-2024.1-py3-none-any.whl

Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: EducationLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonTopic :: SecurityTopic :: Software Development :: Libraries :: Python ModulesTopic :: Utilities

Tags

config file parser multiple formatsunified ini toml json readerformat-agnostic configuration loadermulti-format config abstractionini toml json config parserlanguage-independent config reader
config-parsingmulti-format

More Python Modules packages