storage_api package¶
Submodules¶
storage_api.app module¶
storage_api.conf module¶
-
storage_api.conf.
load_backend_conf
(app, backends_module)[source]¶ Initialise back-ends into the app app, using the provided module to get back-end classes.
-
storage_api.conf.
load_oauth_conf
(app)[source]¶ Load the OAuth configuration options from the environment and insert it into the app’s conf dict.
-
storage_api.conf.
set_auth_string
(app, role_name)[source]¶ Read and parse the comma-separated list of groups for a given role from the environment variable $SAPI_ROLE_X_GROUPS into the app configuration key X_GROUPS, as a set.
-
storage_api.conf.
set_oauth_property
(app, key_name, default_value=None)[source]¶ Helper: fetch an OAuth property named PROPRETY_NAME from an environment variable named SAPI_OAUTH_PROPERTY_NAME into a configuration field named OAUTH_PROPERTY_NAME.
Raises KeyError if the variable is not set and no default value was passed.
storage_api.utils module¶
This file contains various utilities, including this recipe for an ordered set http://code.activestate.com/recipes/576694/
-
storage_api.utils.
compose_decorators
(*decs)[source]¶ Compose a set of decorators into one.
Suggested by Jochen Ritzel: http://stackoverflow.com/a/5409569
-
storage_api.utils.
dict_without
(d, *keys)[source]¶ Return a dictionary d, ensuring that keys are absent.