All Projects → jbasko → configmanager

jbasko / configmanager

Licence: MIT license
Forget about configparser, YAML, or JSON parsers. Focus on configuration. NOT RECOMMENDED FOR USE (2019-01-26)

Programming Languages

python
139335 projects - #7 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to configmanager

config-parser
A slim, fully managed C# library for reading/writing .ini, .conf, .cfg etc configuration files.
Stars: ✭ 67 (+346.67%)
Mutual labels:  configs, configuration-file
portainer-stack-utils
CLI client for Portainer
Stars: ✭ 66 (+340%)
Mutual labels:  json-configuration, yaml-configuration
Qconf
Qihoo Distributed Configuration Management System
Stars: ✭ 1,843 (+12186.67%)
Mutual labels:  configuration-management, configuration-file
BuildConfig.swift
Android-like auto-generate configuration files for macOS/iOS
Stars: ✭ 30 (+100%)
Mutual labels:  json-configuration, yaml-configuration
libconfini
Yet another INI parser
Stars: ✭ 106 (+606.67%)
Mutual labels:  configuration-management, configuration-file
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 (+473.33%)
Mutual labels:  configuration-management, configuration-file
secret config
Centralized Configuration and Secrets Management for Ruby and Rails applications.
Stars: ✭ 15 (+0%)
Mutual labels:  configs, configuration-management
i3
Archivos de configuraciones de i3
Stars: ✭ 32 (+113.33%)
Mutual labels:  configs, configuration-file
oscp-omnibus
A collection of resources I'm using while working toward the OSCP
Stars: ✭ 46 (+206.67%)
Mutual labels:  configs
saltstack-cheatsheet
🧂 SaltStack Cheat Sheet Plus
Stars: ✭ 31 (+106.67%)
Mutual labels:  configuration-management
snap
Snap Programming Language
Stars: ✭ 20 (+33.33%)
Mutual labels:  object-oriented
three-onEvent
Add an EventListener for Object3d in your three.js project.(support click,hover or gaze)
Stars: ✭ 55 (+266.67%)
Mutual labels:  click
decaf-rs
The Decaf compiler, written in Rust
Stars: ✭ 43 (+186.67%)
Mutual labels:  object-oriented
metronome
An elementary OS app
Stars: ✭ 16 (+6.67%)
Mutual labels:  click
spock
spock is a framework that helps manage complex parameter configurations during research and development of Python applications
Stars: ✭ 65 (+333.33%)
Mutual labels:  configuration-management
prime.js
Prime JS is a different kind of JavaScript framework. Prime is written in 100% standard, explicit, and namespaced Object Oriented JavaScript.
Stars: ✭ 13 (-13.33%)
Mutual labels:  object-oriented
ansible-arch
ansible-arch is an Ansible playbook to provision and recreate from scratch my archlinux workstation environment.
Stars: ✭ 29 (+93.33%)
Mutual labels:  configuration-management
initool
Manipulate INI files from the command line
Stars: ✭ 40 (+166.67%)
Mutual labels:  configuration-file
secode
Utility for encoding/decoding Kubernetes secrets (base64)
Stars: ✭ 23 (+53.33%)
Mutual labels:  configuration-management
dots
My dotfiles
Stars: ✭ 67 (+346.67%)
Mutual labels:  configs

configmanager

Update on 2019-05-13: Version 1.35 and above require Python 3.6+.

Update on 2018-10-20: I no longer use this library. It tries to do too many things. It was written in Python 2.7 and made work with Python 3. With type hints, dataclasses, and many other cool features in Python 3.6+ you can express the same things in a much nicer way than this.


https://travis-ci.org/jbasko/configmanager.svg?branch=master

Don't let standard library's configparser drive your configuration value access design. Let it do what it does best -- parse and write configuration files. And let configmanager do the rest.

Main Features

  • Every configuration item is an object with a type, a default value, a custom value and other metadata
  • No sections required
  • Any depth of sections allowed
  • INI (ConfigParser), JSON, YAML formats
  • click framework integration

Documentation

https://jbasko.github.io/configmanager/

Source Code and Issue Tracking

https://github.com/jbasko/configmanager

Quick Start

Install from Python Package index with pip install configmanager.

Declare your configuration, the sources, and off you go. Remember, every configuration item is an object, not just a plain configuration value. If you don't need the rich features of configuration items, use configmanager.PlainConfig instead.

import warnings
from configmanager import Config

config = Config({
    'uploads': {
        'threads': 1,
        'enabled': False,
        'db': {
            'user': 'root',
            'password': {
                '@default': 'root',
                '@envvar': 'MY_UPLOADER_DB_PASSWORD',
            },
        }
    }
}, load_sources=[
    '/etc/my-uploader/config.ini',
    '~/.config/my-uploader/config.json',
], auto_load=True)

if config.uploads.db.user.is_default:
    warnings.warn('Using default db user!')

if config.uploads.enabled.get():
    connect_to_database(
        user=config.uploads.db.user.get(),
        password=config.uploads.db.password.get(),
    )
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].