This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

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 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 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.

Python has very flexible arguments for functions and methods, and good connection of values from classes to subclasses to methods. It doesn’t, however, connect those very well to configuration files, module defaults, method parameters, and other uses. options, in contrast, seamlessly connects all of these varied layers and cases.

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.

Release History

Release History

This version
History Node

1.4.8

History Node

1.4.7

History Node

1.4.6

History Node

1.4.5

History Node

1.4.4

History Node

1.4.3

History Node

1.4.2

History Node

1.4.1

History Node

1.4.0

History Node

1.3.2

History Node

1.3.1

History Node

1.3.0

History Node

1.2.5

History Node

1.2.2

History Node

1.2.1

History Node

1.2.0

History Node

1.1.7

History Node

1.1.6

History Node

1.1.5

History Node

1.1.4

History Node

1.1.3

History Node

1.1.2

History Node

1.1.1

History Node

1.1.0

History Node

1.0.7

History Node

1.0.6

History Node

1.0.5

History Node

1.0.4

History Node

1.0.3

History Node

1.0.2

History Node

1.0.1

History Node

1.0

History Node

0.451

History Node

0.426

History Node

0.420

History Node

0.417

History Node

0.416

History Node

0.411

History Node

0.402

History Node

0.327

History Node

0.45

History Node

0.5

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
options-1.4.8-py2.py3-none-any.whl (13.1 kB) Copy SHA256 Checksum SHA256 2.7 Wheel May 16, 2017
options-1.4.8.zip (213.1 kB) Copy SHA256 Checksum SHA256 Source May 16, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting