All Projects → beetbox → Confuse

beetbox / Confuse

Licence: mit
painless YAML config files for Python

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Confuse

Config
JSON or YAML configuration wrapper with convenient access methods.
Stars: ✭ 237 (-16.84%)
Mutual labels:  yaml, configuration
go-config
Configuration file loader for Go
Stars: ✭ 27 (-90.53%)
Mutual labels:  yaml, configuration
Config
Configuration for Go applications
Stars: ✭ 239 (-16.14%)
Mutual labels:  yaml, configuration
Configurate
A simple configuration library for Java applications providing a node structure, a variety of formats, and tools for transformation
Stars: ✭ 148 (-48.07%)
Mutual labels:  yaml, configuration
goodconf
Transparently load variables from environment or JSON/YAML file.
Stars: ✭ 80 (-71.93%)
Mutual labels:  yaml, configuration
Simple Settings
A simple way to manage your project settings.
Stars: ✭ 165 (-42.11%)
Mutual labels:  yaml, configuration
icingaweb2-module-fileshipper
Provide CSV, JSON, XML and YAML files as an Import Source for the Icinga Director and optionally ship hand-crafted additional Icinga2 config files
Stars: ✭ 25 (-91.23%)
Mutual labels:  yaml, configuration
Hiyapyco
HiYaPyCo - A Hierarchical Yaml Python Config
Stars: ✭ 58 (-79.65%)
Mutual labels:  yaml, configuration
parse it
A python library for parsing multiple types of config files, envvars & command line arguments that takes the headache out of setting app configurations.
Stars: ✭ 86 (-69.82%)
Mutual labels:  yaml, configuration
climatecontrol
Python library for loading settings and config data from files and environment variables
Stars: ✭ 20 (-92.98%)
Mutual labels:  yaml, configuration
Fig
A minimalist Go configuration library
Stars: ✭ 142 (-50.18%)
Mutual labels:  yaml, configuration
Simple-YAML
A Java API that provides an easy-to-use way to store data using the YAML format.
Stars: ✭ 68 (-76.14%)
Mutual labels:  yaml, configuration
Night Config
Powerful java configuration library for toml, yaml, hocon, json and in-memory configurations
Stars: ✭ 93 (-67.37%)
Mutual labels:  yaml, configuration
Konf
A type-safe cascading configuration library for Kotlin/Java/Android, supporting most configuration formats
Stars: ✭ 225 (-21.05%)
Mutual labels:  yaml, configuration
Config Lite
A super simple & flexible & useful config module.
Stars: ✭ 78 (-72.63%)
Mutual labels:  yaml, configuration
paerser
No description or website provided.
Stars: ✭ 38 (-86.67%)
Mutual labels:  yaml, configuration
Zaml
The Final Form of configuration files
Stars: ✭ 45 (-84.21%)
Mutual labels:  yaml, configuration
Resticprofile
Configuration profiles for restic backup
Stars: ✭ 48 (-83.16%)
Mutual labels:  yaml, configuration
cfg-rs
A Configuration Library for Rust Applications
Stars: ✭ 18 (-93.68%)
Mutual labels:  yaml, configuration
yaask
Make your yaml configurable with interactive configurations!
Stars: ✭ 15 (-94.74%)
Mutual labels:  yaml, configuration

Confuse: painless YAML config files

.. image:: https://github.com/beetbox/confuse/workflows/Build/badge.svg?branch=master :target: https://github.com/beetbox/confuse/actions

.. image:: http://img.shields.io/pypi/v/confuse.svg :target: https://pypi.python.org/pypi/confuse

Confuse is a configuration library for Python that uses YAML_. It takes care of defaults, overrides, type checking, command-line integration, human-readable errors, and standard OS-specific locations.

What It Does

Here’s what Confuse brings to the table:

  • An utterly sensible API resembling dictionary-and-list structures but providing transparent validation without lots of boilerplate code. Type config['num_goats'].get(int) to get the configured number of goats and ensure that it’s an integer.

  • Combine configuration data from multiple sources. Using layering, Confuse allows user-specific configuration to seamlessly override system-wide configuration, which in turn overrides built-in defaults. An in-package config_default.yaml can be used to provide bottom-layer defaults using the same syntax that users will see. A runtime overlay allows the program to programmatically override and add configuration values.

  • Look for configuration files in platform-specific paths. Like $XDG_CONFIG_HOME or ~/.config on Unix; "Application Support" on macOS; %APPDATA% on Windows. Your program gets its own directory, which you can use to store additional data. You can transparently create this directory on demand if, for example, you need to initialize the configuration file on first run. And an environment variable can be used to override the directory's location.

  • Integration with command-line arguments via argparse_ or optparse_ from the standard library. Use argparse's declarative API to allow command-line options to override configured defaults.

Installation

Confuse is available on PyPI <https://pypi.org/project/confuse/>_ and can be installed using :code:pip:

.. code-block:: sh

pip install confuse

Using Confuse

Confuse's documentation_ describes its API in detail.

Credits

Confuse was made to power beets. Like beets, it is available under the MIT license.

.. _ConfigParser: http://docs.python.org/library/configparser.html .. _YAML: http://yaml.org/ .. _optparse: http://docs.python.org/dev/library/optparse.html .. _argparse: http://docs.python.org/dev/library/argparse.html .. _logging: http://docs.python.org/library/logging.html .. _Confuse's documentation: http://confuse.readthedocs.org/en/latest/usage.html .. _MIT license: http://www.opensource.org/licenses/mit-license.php .. _beets: https://github.com/beetbox/beets

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].