CMD + K

optionsfactory

Community

Python package for handling user-provided options with flexible defaults, documentation and checking

Installation

To install this package, run one of the following:

Conda
$conda install conda-forge::optionsfactory

Usage Tracking

1.0.11
1.0.10
1.0.9
1.0.8
1.0.7
5 / 8 versions selected
Downloads (Last 6 months): 0

Description

OptionsFactory allows you to define a set of options, which can have (if you like): default values (which may be expressions depending on other options); documentation for each option; an allowed type or list of types; a check that the value option is on an allowed list; checks that the value of an option satisfies some tests. Once the options are defined in an OptionsFactory, you create a particular instance of the options by passing some user settings (a dict or YAML file). The OptionsFactory uses the values passed, sets the remaining options from the default values or expressions and returns an Options object. Options are immutable so that you do not have to worry about the options being accidentally changed during execution - however, the package also provides MutableOptionsFactory if you do want to be able to update the options dynamically.

About

Summary

Python package for handling user-provided options with flexible defaults, documentation and checking

Last Updated

Jan 8, 2023 at 22:17

License

BSD-3-Clause

Total Downloads

24.7K

Supported Platforms

noarch