Context as a :class:`shelter.core.context.Context` class or subclass.
13825
def context_class(self):
        
        if 'context_class' not in self._cached_values:
            context_cls_name = getattr(self.settings, 'CONTEXT_CLASS', '')
            if context_cls_name:
                context_class = import_object(context_cls_name)
            else:
                context_class = Context
            self._cached_values['context_class'] = context_class
        return self._cached_values['context_class']
593124
function(options)
	{
		options = conbo.clone(options || {});
		options.app = this;
		
		this.context = new this.contextClass(options);
	}
555205
def spawn(self, context=None):
        
        if context is None:
            context = self.default_context

        if isinstance(context, collections.Callable):
            context = context()

        if not isinstance(context, collections.Mapping):
            raise PatchboardError('Cannot determine a valid context')

        return Client(self, context, self.api, self.endpoint_classes)
1073923
def subclass(self, klass):
        """"""
        return bool(lib.EnvSubclassP(self._env, self._cls, klass._cls))
889474
def resolve_context(self):
        
        merged = dict()
        for context in self.located_context.values():
            merged.update(context)
        return merged
605511
def root_context
      context = parent
      context = context.parent until context.is_a? Symbol
      return context
    end
1129376
private static JAXBContext getContext(String[] contexts) throws Exception {
		List<String> ctx = Lists.asList(BASE_CONTEXT, contexts);
		return JAXBContext.newInstance(JOINER.join(ctx));
	}
800291
def set_context(self, definition: Definition, explanation: str) -> None:
        """"""
        self.definition = definition
        self.explanation = explanation
418728
def wrap_context(func):
    
    @functools.wraps(func)
    def wrapper(self, request, context):
        return func(self, request, LogFieldsContext(context))

    return wrapper
239180
def from_context(cls, ctx, config_paths=None, project=None):
        """"""
        if ctx.obj is None:
            ctx.obj = Bunch()
        ctx.obj.cfg = cls(ctx.info_name, config_paths, project=project)
        return ctx.obj.cfg
21388
def from_context(cls):
        
        try:
            ctx = click.get_current_context()
        except RuntimeError:
            return cls()
        return ctx.find_object(cls)
454732
def set_context(context):
    """"""
    try:
        handler = logging.getLogger().handlers[0]
    except IndexError:
        # logging is not initialized
        return
    if not isinstance(handler, StructuredHandler):
        return
    handler.acquire()
    try:
        handler.local.context = context
    finally:
        handler.release()
343797
def set_context(context):
    """"""
    global _context
    _context = {k: v for k, v in context.items()}
556244
def get_context(self):
        
        ctx = {}
        for clause in self.where_clauses or []:
            clause.update_context(ctx)
        return ctx
638405
def inject_context(self):
        """"""
        navbar = filter(lambda entry: entry.visible, self.navbar_entries)
        return {'navbar': navbar}
662729
function Context() {
	/**
	 * @member {Object}
	 * @property {Object} client
	 * @property {Object<Call>} client.map - map from call name and call id
	 * @property {Array<Call>} client.list
	 * @property {Object} server
	 * @property {Object<Call>} server.map - map from call name and call id
	 * @property {Array<Call>} server.list
	 * @private
	 */
	this._calls = {
		client: {
			map: Object.create(null),
			list: []
		},
		server: {
			map: Object.create(null),
			list: []
		}
	}

	/**
	 * @member {Object}
	 * @property {Object} client
	 * @property {Object<Message>} client.map - map from message name and message id
	 * @property {Array<Message>} client.list
	 * @property {Object} server
	 * @property {Object<Message>} server.map - map from message name and message id
	 * @property {Array<Message>} server.list
	 * @private
	 */
	this._messages = {
		client: {
			map: Object.create(null),
			list: []
		},
		server: {
			map: Object.create(null),
			list: []
		}
	}
}
1060024
def context_loader(self, callback):
        
        if not callback or not callable(callback):
            raise Exception("Please pass in a callable that loads your context.")
        self.context_loader_callback = callback
        return callback