Registry / serialization / fhconfparser

fhconfparser

JSON →
library2024.1pypypi✓ verified 89d ago

Provides a config language independent way to read a config file. Supports multiple config formats (YAML, TOML, JSON, etc.) under a unified API. Current version: 2024.1. Released on 2024-01-24, active maintenance, monthly/irregular releases.

pip install fhconfparser
INSTALL
IMPORT
SIG · FHCONFPARSER
F
fhconfparser
serializationpythonv2024.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

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

FHConfParser
✓ from fhconfparser import FHConfParser
✗ from fhconfparser import Config
SimpleConf
✓ from fhconfparser import SimpleConf
fhconfparser
✓ import fhconfparser

Create a Config instance and load a configuration file.

from fhconfparser import Config config = Config() # Load a config file (supports YAML, TOML, JSON, etc.) data = config.load_config('config.yaml') print(data)
Debug
Known issues
gotchaThe Config object is not a singleton; each instance has its own state. Do not assume shared state across modules.
fix
Create a single Config instance and pass it explicitly.
affects: all
gotchaFile format detection is based on file extension. Ensure your config file has a recognized extension (e.g., .yaml, .toml, .json, .ini) or use the correct loader.
fix
Use explicit loader: config.load_config('config.txt', loader='yaml')
affects: all
deprecatedThe 'load' method (without 'config' suffix) is deprecated in v2023 and may be removed in future.
fix
Use load_config() instead.
affects: >=2023
Upgrade
Version history
2024.1latest on PyPI · released Jan 24, 2024
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Resources
fhconfparser — pip install fhconfparser · libregistry