skip to navigation
skip to content

Not Logged In

options 1.1.1

Simple, super-flexible options. Does magic upon request.

options helps encapsulate options and configuration data using a layered stacking model (a.k.a. nested contexts).

For most functions and many classes, options is overkill and not recommended. Python's already-flexible function arguments, *args, **kwargs, and inheritance patterns are elegant and sufficient for 99.9% of all development situations. options is for the other 0.1%:

  • highly functional classes,
  • with many different features and options,
  • 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 simpler built-in, inheritance-based model adds complexity as non-trivial options and argument-management code spreads through many individual methods. This is where options's delegation-based approach begins to shine.

http://d.pr/i/6JI4+ https://pypip.in/d/options/badge.png

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.

 
File Type Py Version Uploaded on Size
options-1.1.1.tar.gz (md5) Source 2013-10-29 205KB
options-1.1.1.zip (md5) Source 2013-10-29 219KB
  • Downloads (All Versions):
  • 63 downloads in the last day
  • 422 downloads in the last week
  • 2824 downloads in the last month