{"id":26987,"library":"fhconfparser","title":"FHConfParser","description":"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.","status":"active","version":"2024.1","language":"python","source_language":"en","source_url":"https://github.com/FHPythonUtils/FHConfParser","tags":["config","configuration","yaml","json","toml","ini"],"install":[{"cmd":"pip install fhconfparser","lang":"bash","label":"Install via pip"}],"dependencies":[],"imports":[{"note":"Direct import of Config from module is the correct pattern.","wrong":"import fhconfparser\nconfig = fhconfparser.Config()","symbol":"Config","correct":"from fhconfparser import Config"}],"quickstart":{"code":"from fhconfparser import Config\n\nconfig = Config()\n# Load a config file (supports YAML, TOML, JSON, etc.)\ndata = config.load_config('config.yaml')\nprint(data)","lang":"python","description":"Create a Config instance and load a configuration file."},"warnings":[{"fix":"Create a single Config instance and pass it explicitly.","message":"The Config object is not a singleton; each instance has its own state. Do not assume shared state across modules.","severity":"gotcha","affected_versions":"all"},{"fix":"Use explicit loader: config.load_config('config.txt', loader='yaml')","message":"File 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.","severity":"gotcha","affected_versions":"all"},{"fix":"Use load_config() instead.","message":"The 'load' method (without 'config' suffix) is deprecated in v2023 and may be removed in future.","severity":"deprecated","affected_versions":">=2023"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run 'pip install fhconfparser' in the correct environment.","cause":"Package not installed or installed in wrong Python environment.","error":"ModuleNotFoundError: No module named 'fhconfparser'"},{"fix":"Install necessary dependencies: 'pip install pyyaml toml' and ensure file has correct extension.","cause":"File extension not recognized or missing required library (e.g., PyYAML for YAML, toml for TOML).","error":"fhconfparser.exceptions.UnsupportedFormatError: Unsupported config format"},{"fix":"Use 'from fhconfparser import Config'","cause":"Importing incorrectly; fhconfparser doesn't expose Config directly if imported as module.","error":"AttributeError: module 'fhconfparser' has no attribute 'Config'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}