--- id: anyconfig version: "0.16.0" license: MIT license_treatment: permissive maintenance: active --- # anyconfig — Library provides common APIs to load and dump configuration files in various formats License: permissive · Maintenance: active · Downloads: 544.9K/mo ## What it is and what it does anyconfig is a Python library that abstracts away the differences between configuration file formats, letting you load, dump, and merge configs using a single set of functions regardless of whether the source is JSON, YAML, TOML, INI, or other formats. It detects format automatically from file extensions or accepts explicit format hints. The library also supports Jinja2 template rendering during load (useful for parameterized configs), JSON schema validation, schema generation from loaded data, and querying results with JMESPath expressions. The main use case is simplifying application configuration handling: instead of writing separate parsers for each format your app might encounter, you call anyconfig.load() once and get back a dict-like object. It handles merging multiple config files, ignoring missing files, and applying templates—all without requiring you to know or care about the underlying format. A CLI tool (anyconfig_cli) is also provided for command-line config conversion and validation. Use it for: - Convert configuration files between formats (JSON to YAML, TOML to INI) without writing custom parsers. - Merge environment-specific config overlays (base.yml + production.yml + secrets.json) into a single dict. - Render parameterized configuration templates with Jinja2 before loading, e.g., injecting environment variables. - Validate loaded configuration against a JSON schema to catch errors early. - Query nested configuration values using JMESPath expressions without manual dict traversal. - Generate a JSON schema from a sample config file for documentation or validation of future configs. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Loads, dumps, and merges configuration files in multiple formats (JSON, YAML, TOML, INI, etc.) through a unified API, with optional template rendering, schema validation, and query support. Yes. Zero runtime dependencies, actively maintained, MIT licensed, and supports modern Python versions (3.9–3.13). Use it if you need to handle multiple config formats uniformly or want template rendering and validation baked in. No known security issues. The only caveat is verifying which format parsers are included by default vs. optional. ## Install pip install anyconfig uv add anyconfig poetry add anyconfig ## Installing anyconfig Before you install: Low friction: pure Python wheel with no runtime dependencies. Active maintenance—last commit 2026-08-11, released 3 days ago. Supports Python 3.9 through 3.13. License in practice: MIT licensed (permissive). No restrictions on commercial use, modification, or redistribution; attribution required. Quickstart: pip install anyconfig import anyconfig # Load config, auto-detect format by extension conf = anyconfig.load("/path/to/config.yml") # Load and merge multiple files conf = anyconfig.load(["/etc/app.json", "/etc/app.local.json"]) # Load with template rendering conf = anyconfig.load("/path/to/config.yml", ac_template=True, ac_context={"env": "prod"}) Verify before relying: - Which configuration formats (JSON, YAML, TOML, INI, etc.) are supported out-of-the-box vs. requiring optional dependencies. - Whether optional dependencies for format support (e.g., PyYAML for YAML) are listed separately or bundled. - Performance characteristics when loading or merging large configuration files. - Exact behavior and limitations of the JMESPath query feature mentioned in the description. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 544.9K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags multi-format config file loader, yaml json ini toml parser, configuration file merge, config validation schema, template-based config rendering, jinja2 config templates, configuration query jmespath, config-management, multi-format, schema-validation [View on SkillFed](https://skillfed.io/packages/anyconfig) · [View on PyPI](https://pypi.org/project/anyconfig/)