Adds a pyramid route to the config. All args and kwargs will be
    passed on to config.add_route.

    This exists so the default behaviour of including crabpy will still be to
    cache all crabpy routes.
195297
def add_route(config, name, pattern, *args, **kwargs):
    
    config.add_route(name, pattern, *args, **kwargs)
    GENERATE_ETAG_ROUTE_NAMES.add(name)
1175462
def _add(self, command, *args, **kwargs):
        
        if self.indexable:
            self.index(args)
        return self._traverse_command(command, *args, **kwargs)
945373
def routeargs(path, host = None, vhost = None, method = [b'POST'], **kwargs):
        ""
        def decorator(func):
            func.routemode = 'routeargs'
            func.route_path = path
            func.route_host = host
            func.route_vhost = vhost
            func.route_method = method
            func.route_kwargs = kwargs
            return func
        return decorator
131203
def _add_url_route(self, endpoint, rule, view_func, method):
        
        if self.api_prefix:
            rule = self.api_prefix + rule

        if self.endpoint_prefix:
            endpoint = self.endpoint_prefix + endpoint

        self.app.add_url_rule(
            rule,
            endpoint,
            self._apply_auth(view_func),
            methods=[method]
        )
514644
def add_interface_router(self, router, body=None):
        """"""
        return self.put((self.router_path % router) + "/add_router_interface",
                        body=body)
1194780
def add_route(self, route):
        ''' '''
        self.routes.append(route)
        self.router.add(route.rule, route.method, route, name=route.name)
        if DEBUG: route.prepare()
1120759
def add_patch(self, *args, **kwargs):
        
        return self.add_route(hdrs.METH_PATCH, *args, **kwargs)
220114
def _route(self, mapper):
        

        # Build up the keyword arguments to feed to connect()
        kwargs = dict(conditions=dict(function=self._filter))

        # Restrict the verbs
        if self.verbs:
            kwargs['conditions']['method'] = self.verbs

        # Add requirements, if provided
        if self.requirements:
            kwargs['requirements'] = self.requirements

        # Hook to allow subclasses to override arguments to connect()
        uri = self.route(self.uri, kwargs)

        # Create the route
        mapper.connect(None, uri, **kwargs)
1019494
def add_get(self, path: str, handler: _WebHandler, *,
                name: Optional[str]=None, allow_head: bool=True,
                **kwargs: Any) -> AbstractRoute:
        
        resource = self.add_resource(path, name=name)
        if allow_head:
            resource.add_route(hdrs.METH_HEAD, handler, **kwargs)
        return resource.add_route(hdrs.METH_GET, handler, **kwargs)
438590
def route_many(self, *args, **kwargs):
        
        if len(args) == 2:
            prefix, rules = args
        elif len(args) == 1:
            prefix = None
            rules = args[0]
        else:
            raise ValueError('The amount of args of route_many method can only be one or two')
        router = Router(rules, prefix=prefix)
        self.add_handlers(router.get_handlers(), host=kwargs.get('host'))
1358659
def add_swagger(app, json_route, html_route):
    
    app.add_route(create_swagger_json_handler(app), json_route, methods=["GET"])
    add_swagger_api_route(app, html_route, json_route)
1068854
def includeme(config):
    

    settings = _parse_settings(config.registry.settings)
    base_settings = _get_proxy_settings(settings)

    # http caching tween
    if not settings.get('etag_tween_disabled', False):
        config.add_tween('crabpy_pyramid.conditional_http_tween_factory')

    # create cache
    root = settings.get('cache.file.root', '/tmp/dogpile_data')
    if not os.path.exists(root):
        os.makedirs(root)

    capakey_settings = dict(_filter_settings(settings, 'capakey.'),
                            **base_settings)
    if 'include' in capakey_settings:
        log.info("The 'capakey.include' setting is deprecated. Capakey will "
                 "always be included.")
    log.info('Adding CAPAKEY Gateway.')
    config.add_renderer('capakey_listjson', capakey_json_list_renderer)
    config.add_renderer('capakey_itemjson', capakey_json_item_renderer)
    _build_capakey(config.registry, capakey_settings)
    config.add_request_method(get_capakey, 'capakey_gateway')
    config.add_directive('get_capakey', get_capakey)
    config.include('crabpy_pyramid.routes.capakey')
    config.scan('crabpy_pyramid.views.capakey')

    crab_settings = dict(_filter_settings(settings, 'crab.'), **base_settings)
    if crab_settings['include']:
        log.info('Adding CRAB Gateway.')
        del crab_settings['include']
        config.add_renderer('crab_listjson', crab_json_list_renderer)
        config.add_renderer('crab_itemjson', crab_json_item_renderer)
        _build_crab(config.registry, crab_settings)
        config.add_directive('get_crab', get_crab)
        config.add_request_method(get_crab, 'crab_gateway')
        config.include('crabpy_pyramid.routes.crab')
        config.scan('crabpy_pyramid.views.crab')
844130
def add_route!(route)
      # Raise exception if the route is existing, too
      raise InvalidRouteError.new('Route must respond to #url_for') unless valid_route?(route)
      raise ExistingRouteError.new(("Route already exists for %s" % [route.name])) if route_exists?(route)

      @routes << route
    end
95804
public void add(HttpMethod httpMethod, RouteImpl route) {
        add(httpMethod, route.getPath() , route.getAcceptType(), route);
    }
1137686
def add(self, *args, **kwargs):
        
        return self._apply(operator.add, *args, **kwargs)
938772
def add(self, template, resource, name=None):
        
        # Special case for standalone handler functions
        if hasattr(resource, '_rhino_meta'):
            route = Route(
                    template, Resource(resource), name=name, ranges=self.ranges)
        else:
            route = Route(
                    template, resource, name=name, ranges=self.ranges)
        obj_id = id(resource)
        if obj_id not in self._lookup:
            # It's ok to have multiple routes for the same object id, the
            # lookup will return the first one.
            self._lookup[obj_id] = route
        if name is not None:
            if name in self.named_routes:
                raise InvalidArgumentError("A route named '%s' already exists in this %s object."
                        % (name, self.__class__.__name__))
            self.named_routes[name] = route
        self.routes.append(route)
1315259
def add_url(self, name: str, pattern: str, application: Callable) -> None:
        
        self.urlmapper.add(name, self.prefix + pattern)
        self.register_app(name, application)