Creates base URL path

        :param force_http: `True` if HTTP base URL should be used and `False` otherwise
        :type force_http: str
        :return: base url string
        :rtype: str
549055
def get_base_url(self, force_http=False):
        
        base_url = SHConfig().aws_metadata_url.rstrip('/') if force_http else 's3:/'
        aws_bucket = SHConfig().aws_s3_l1c_bucket if self.data_source is DataSource.SENTINEL2_L1C else \
            SHConfig().aws_s3_l2a_bucket

        return '{}/{}/'.format(base_url, aws_bucket)
762034
def get_base_url(self):
        
        return "http://{hostname}:{port}/{api}".format(
                hostname=self.hostname,
                port=self.port,
                api=self.api_version)
560510
def get_resource_url(self):
        

        name = self.__class__.resource_name
        url = self.__class__.rest_base_url()

        return "%s/%s" % (url, name)
535898
def build_url(base_url, path):
    
    if absolute_http_url_regexp.match(path):
        return path
    elif base_url:
        return "{}/{}".format(base_url.rstrip("/"), path.lstrip("/"))
    else:
        raise ParamsError("base url missed!")
318744
def construct_url(self):
        """"""
        path = [self.path]
        path.extend(self.params)

        # Build URL
        url = self.client.base_url + '/'.join(
            str(value) for value in path
            if value
        )

        # Append query parameters (if defined)
        query = self.encode_query(self.query)

        if query:
            url += '?' + query

        return url
194784
def get_url(self, fname):
        
        self._assert_file_in_registry(fname)
        return self.urls.get(fname, "".join([self.base_url, fname]))
1078451
def download_url(self, url, **kwargs):
        
        if self.baseurl and '://' not in url:
            url = join(self.baseurl, url)
        return self.resolver.download_to_directory(self.directory, url, **kwargs)
1013262
def base_uri(self):
        
        if self._base_uri is None:
            if self._resolver is not None:
                self._base_uri = self.resolver.resolution_scope
            else:
                self._base_uri = 'http://pudo.github.io/jsongraph'
        return URIRef(self._base_uri)
770541
def build_url(self, path):
        
        url = '{0}{1}'.format(self.base_url, path)
        url = re.sub('([^:])//', '\\1/', url)  # Remove double slashes
        return url
1063852
def base_url(self):
        ''''''
        config_value = self.config.get('url')
        if config_value:
            return self._clean_url(config_value)
        default_url = current_app.config.get('FS_URL')
        default_url = current_app.config.get('{0}URL'.format(self.backend_prefix), default_url)
        if default_url:
            url = urljoin(default_url, self.name)
            return self._clean_url(url)
        return url_for('fs.get_file', fs=self.name, filename='', _external=True)
80678
def create_basic_url(self):
        
        if self.username is None:
            if self.namespace is None:
                request_url = "{}/api/0/{}/".format(
                    self.instance, self.repo)
            else:
                request_url = "{}/api/0/{}/{}/".format(
                    self.instance, self.namespace, self.repo)
        else:
            if self.namespace is None:
                request_url = "{}/api/0/fork/{}/{}/".format(
                    self.instance, self.username, self.repo)
            else:
                request_url = "{}/api/0/fork/{}/{}/{}/".format(
                    self.instance, self.username, self.namespace, self.repo)
        return request_url
913755
def serve_static(app, base_url, base_path, index=False):
    
    @app.route(base_url + '/(.*)')
    def serve(env, req):
        """
        Static files
        """
        try:
            base = pathlib.Path(base_path).resolve()
            path = (base / req.match.group(1)).resolve()
        except FileNotFoundError:
            return Response(None, 404, 'Not Found')


        # Don't let bad paths through
        if base == path or base in path.parents:
            if path.is_file():
                return ResponseFile(str(path))
            if index and path.is_dir():
                if base == path:
                    ret = ''
                else:
                    ret = '<a href="../">../</a><br/>\r\n'
                for item in path.iterdir():
                    name = item.parts[-1]
                    if item.is_dir():
                        name += '/'
                    ret += '<a href="{}">{}</a><br/>\r\n'.format(urllib.parse.quote(name), html.escape(name))
                ret = ResponseString(ret, 'text/html')
                return ret

        return Response(None, 404, 'Not Found')
180837
def build_url(self):
        
        url = "%s/1.0/%s/%s/%s" % (
            self.request.endpoint.get_url(),
            self.request.api_object,
            self.request.api_method,
            to_hex(self.request.nonce)
        )
        return url
370418
def get_url(self, path):
        
        host = ('[' + self.host + ']' if (self.host.find(':') != -1)
                else self.host)
        base_url = self.protocol + '://' + host + ':' + str(self.port)
        return base_url + '/v3alpha/' + path.lstrip("/")
538621
function buildPath (basePath, queryParams) {
    basePath = basePath.concat('?')
    var url = basePath.concat(queryString.stringify(queryParams))
    return url
  }
755474
def construct_url(self):
        """"""
        path = [self.path]
        path.extend([str(x) for x in self.params])

        url = self.client.base_url + '/'.join(x for x in path if x)
        query = self.kwargs.get('query')

        if query:
            # Dict -> List
            if type(query) is dict:
                query = query.items()

            # Remove items with `None` value
            query = [
                (k, v) for (k, v) in query
                if v is not None
            ]

            # Encode query, append to URL
            url += '?' + urlencode(query)

        return url
147508
def get_pypi_url(requirement, version=None, base_url=PYPI_BASE_URL):
    
    if version:
        return '{base}/{req}/{version}/json'.format(base=base_url,
                                                    req=requirement,
                                                    version=version)
    else:
        return '{base}/{req}/json'.format(base=base_url, req=requirement)