fhconfparser
Provides a config language independent way to read a config file.
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 fhconfparseruv
uv add fhconfparserpoetry
poetry add fhconfparserInstalling 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
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
ihmReads and writes mmCIF and BinaryCIF files…
permissive · top 15,000 on PyPI
configparser2Backport of Python 3's configparser module to…
permissive · top 15,000 on PyPI
INIToolsINITools parses and manipulates INI-style…
permissive · top 15,000 on PyPI
pyconfiguratorParses command-line arguments and INI…
permissive · top 15,000 on PyPI
python-hcl2Parses HCL2 configuration files (used by…
permissive · top 5,000 on PyPI
anyconfigLoads, dumps, and merges configuration files in…
permissive · top 15,000 on PyPI
iniconfiginiconfig parses INI configuration files while…
permissive · top 100 on PyPI
click-configfileExtends click with configuration file support,…
permissive · top 15,000 on PyPI
iniparseiniparse is an INI file parser that preserves…
permissive · top 15,000 on PyPI
maisonMaison reads configuration settings from files…
permissive · top 5,000 on PyPI