skillfed

bestconfig

Setup your project config easily

bestconfig v1.3.6 89.4K downloads/30d#13,663 on PyPI17
Permissive license MIT Abandoned released

What it is and what it does

bestconfig is a configuration management library that scans your project directory for config files in multiple formats—YAML, JSON, INI, environment files, Python modules, and CFG—and merges them into a single unified configuration object. It provides flexible access patterns: dot notation (config.logger.mode), dictionary syntax (config['logger']['mode']), and a get() method that supports nested key paths (config.get('logger.mode')) and type casting (config.int('PORT'), config.list('PRICES')).

The package automatically discovers common config file names (config.yaml, settings.json, .env, etc.) and environment variables, then exposes them through a single interface. It also supports runtime manipulation via set(), insert(), and update_from_locals() methods, and includes validation through assert_contains(). The library depends only on PyYAML for parsing, keeping installation lightweight.

Use it for:

  • Load database credentials and connection settings from .env files and YAML configs in a single Config object.
  • Access nested configuration values like database.host and database.port using dot notation without manual dictionary traversal.
  • Merge environment-specific configs (dev.yaml, prod.yaml) with shared settings and environment variables at startup.
  • Type-cast config values to int, float, list, or dict automatically to avoid string-to-type conversion boilerplate.
  • Validate that required configuration keys exist before application startup using assert_contains().

Worth the install?

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

Loads configuration from multiple file formats (.yaml, .json, .ini, .env, .py, .cfg) and environment variables into a unified interface with dot-notation and dictionary access.

No. The package is abandoned (last commit 2023-04-17, 1215 days ago) with no active maintenance, so security patches and bug fixes are unlikely. While the core functionality is straightforward and low-friction to install, the lack of maintenance makes it a poor choice for new projects; consider actively maintained alternatives like python-dotenv, pydantic-settings, or dynaconf instead.

Install

bestconfig on PyPI

pip

pip install bestconfig

uv

uv add bestconfig

poetry

poetry add bestconfig

Installing bestconfig

Before you install

Low install friction with a single runtime dependency (PyYAML). However, the package is in abandoned status with no commits since 2023-04-17, so maintenance and bug fixes are not expected.

License in practice

MIT license is permissive, allowing free use, modification, and distribution with minimal restrictions.

Quickstart

pip install bestconfig

from bestconfig import Config

config = Config("myconfig.json")
logger_mode = config.get('logger.mode')
port = config.int('PORT')

Verify before relying

  • Whether Python version support is truly unspecified or if there are undocumented compatibility constraints.
  • Whether the package handles circular imports correctly when scanning .py files for configuration.
  • Performance characteristics when merging many configuration sources or accessing deeply nested keys.

Package facts

License MIT (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 1 — PyYAML
Maintenance abandoned — 1,215 days since the last release
Last repo commit
First released
Downloads 89,380/month — #13,663 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: bestconfig-1.3.6-py3-none-any.whl

Tags

configuration file loaderyaml json config parserenvironment variable configmulti-format config managementdotenv config readerproject settings loader
config-managementyaml-json-parser

More Utilities packages