Simple, super-flexible options. Does magic upon request.
Project description
options helps represent option and configuration data in a clean, high-function way. Changes can “overlay” defaults or earlier settings.
For most functions and classes, options is flexibility overkill. Not everyone wants or needs to be a world-class gymnast, yogi, or contortionist For most, Python’s regular function arguments, *args, **kwargs, and inheritance patterns are elegant and sufficient. options is for the top 1% that need:
extremely functional classes, functions, and methods,
with many different features and options,
the settings for which might be adjusted or overriden at any time,
yet that need “reasonable” or “intelligent” defaults, and
that yearn for a simple, unobtrusive API.
In those cases, Python’s built-in, inheritance-based model stops being the simple approach. Non-trivial argument-management code code and complexity begins to pervade. This is where options’s layered, delegation-based approach begins to shine. Almost regardless of how varied the options it wrangles, or how much flexibility is required, code complexity remains very flat.
For more backstory, see this StackOverflow.com discussion of how to combat “configuration sprawl”. options full documentation can be found at Read the Docs. For examples of options in use, see say and show.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Hashes for options-1.3.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b46fe6392bf3f46b867c16e25d6d534900a2a7e956d263087878d17e82c2bc68 |
|
MD5 | f1aab2ed58af08dd27c17a033b807677 |
|
BLAKE2b-256 | 96470d2abb9709bd916cb20076dd01e29a3cf62bf8de93eae02a2fa5ba68a0ae |