Registry / devops / setoptconf

setoptconf

JSON →
library0.3.0pypypi✓ verified 84d ago

A module for retrieving program settings from various sources in a consistent method. Version 0.3.0, last released May 2018. The library is in maintenance/abandoned state with no updates planned.

pip install setoptconf==0.3.0
INSTALL
IMPORT
SIG · SETOPTCONF
S
setoptconf
devopspythonv0.3.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

setoptconf
import setoptconf
No common import mistakes; the library is a single module.

Create a configuration object with multiple sources and retrieve a setting.

import setoptconf config = setoptconf.Config( 'myapp', setoptconf.EnvSource(), setoptconf.YamlFileSource('config.yaml'), setoptconf.CommandLineSource() ) # Access a setting value = config.get('my_setting', default='default') print(value)
Debug
Known issues
deprecatedThe library is unmaintained since 2018. Use at your own risk; no security patches.
fix
Consider using a modern alternative like 'configobj' or 'python-decouple'.
affects: >=0.1.0, <=0.3.0
gotchaYamlFileSource requires PyYAML to be installed separately; it is not an automatic dependency.
fix
Install PyYAML: pip install PyYAML
affects: 0.3.0
gotchaCommandLineSource only parses arguments with '--' prefix; not all conventions supported.
fix
Ensure command line arguments are passed as --key=value or --key value.
affects: 0.3.0
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'yaml'
Using YamlFileSource without installing PyYAML.
fix
Install PyYAML: pip install PyYAML
TypeError: object() takes no parameters
Using Config() incorrectly, e.g., passing arguments as positional without proper source objects.
fix
Check that all source arguments are instances of setoptconf.Source subclasses.
ValueError: No sources provided
Calling Config without any source objects.
fix
Pass at least one source to Config().
Upgrade
Version history
0.3.0latest on PyPI · released Sep 10, 2021
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
4
Resources
setoptconf — pip install setoptconf · libregistry