Get header information and store as metadata for the endpoint.
484199
def _get_metadata(self):
        """"""
        self.metadata = self.fetch_header()
        self.variables = {g.name for g in self.metadata.grids}
891525
def _generate_request_head_bytes(method, endpoint, headers):
    

    head_string = _FORMAT_METHOD_AND_ENDPOINT.format(method, endpoint)
    header_tuples = sorted((k, headers[k]) for k in headers)

    for name, value in header_tuples:
        if _should_sign_request_header(name):
            head_string += _FORMAT_HEADER_STRING.format(name, value)

    return (head_string + _DELIMITER_NEWLINE).encode()
330915
def _read_header(self):
        """"""
        self._header = self.cdmrf.fetch_header()
        self.load_from_stream(self._header)
547207
def get_headers(self):
        

        headers = {'Content-Type': goldman.JSON_MIMETYPE}

        for error in self.errors:
            if 'headers' in error:
                headers.update(error['headers'])
        return headers
63448
def get_header(self, individual=-1):
        
        type_map = dict([(val,key) for key,val in self.meta.type_map.iteritems()])
        extra = '\n'.join(['##{0}'.format(i) for i in self.meta.extra])
        info = '\n'.join(['##INFO=<ID={0},Number={1},Type={2},Description={3}>'.format(key, val.get('num_entries','.'), type_map.get(val.get('type', '')), val.get('description')) for key,val in self.meta.info.iteritems()])
        filter = '\n'.join(['##FILTER=<ID={0},Description={1}>'.format(key, val.get('description','.')) for key,val in self.meta.filter.iteritems()])
        format = '\n'.join(['##FORMAT=<ID={0},Number={1},Type={2},Description={3}>'.format(key, val.get('num_entries','.'), type_map.get(val.get('type', '')), val.get('description')) for key,val in self.meta.format.iteritems()])
        alt = '\n'.join(['##ALT=<ID={0},Description={1}>'.format(key, val.get('description','.')) for key,val in self.meta.alt.iteritems()])
        header = '\t'.join(['#CHROM','POS','ID','REF','ALT','QUAL','FILTER','INFO','FORMAT'])
        if individual is not None:
            if individual == -1:
                individual = '\t'.join(self.individuals.keys())
            else:
                if isinstance(individual, int):
                    for i, v in self.individuals.iteritems():
                        if v == individual:
                            individual = i
                            break
            header += '\t'+individual
        return '\n'.join([extra, info, filter, format, alt, header])
956163
def _headers(self, others={}):
        """"""
        headers = {
            'Content-Type': 'application/json'
        }

        for p in others.keys():
            headers[p] = others[p]
        return headers
69444
def get_metadata(self, container, prefix=None):
        
        headers = self.get_headers(container)
        if prefix is None:
            prefix = CONTAINER_META_PREFIX
        low_prefix = prefix.lower()
        ret = {}
        for hkey, hval in list(headers.items()):
            if hkey.lower().startswith(low_prefix):
                cleaned = hkey.replace(low_prefix, "").replace("-", "_")
                ret[cleaned] = hval
        return ret
482242
def metadata(self):
    
    if self._info is None:
      try:
        self._info = self._api.buckets_get(self._name)
      except Exception as e:
        raise e

    return BucketMetadata(self._info) if self._info else None
251271
def _get_headers(self, is_json=False):
        

        headers = {"Authorization": "Bearer " + self._get_token()}

        if self.client_type is not None:
            headers["Client-Type"] = self.client_type

        if self.client_version is not None:
            headers["Client-Version"] = self.client_version

        if self.client_metatag is not None:
            headers["Client-Metatag"] = self.client_metatag

        if is_json:
            headers['Content-Type'] = 'application/json'

        return headers
116099
def _get_header(self):
        """"""
        fh = self._src
        obj = _make_object("Header")

        # first part of the header
        obj.Signature = sign = "".join(chr(unpack_ui8(fh)) for _ in range(3))
        obj.Version = self._version = unpack_ui8(fh)
        obj.FileLength = file_length = unpack_ui32(fh)

        # deal with compressed content
        if sign[0] == 'C':
            uncompressed = zlib.decompress(fh.read())
            if len(uncompressed) + 8 != file_length:
                raise ValueError("Problems dealing with compressed content")
            fh = self._src = io.BytesIO(uncompressed)

        # second part of the header
        obj.FrameSize = self._get_struct_rect()
        obj.FrameRate = unpack_ui16(fh)
        obj.FrameCount = unpack_ui16(fh)
        return obj
1129694
def get_metadata(self, namespace, name):
        ""

        if namespace in NAMESPACES:
            namespace = NAMESPACES[namespace]

        return self.metadata[namespace].get(name, [])
429822
def get_header(self, name, default=None):
        
        return self._handler.headers.get(name, default)
764919
def get_endpoint(self):
        
        if self.endpoint:
            return self.endpoint
        else:
            return self.service_context.provider_info[self.endpoint_name]
76158
def headers(self):
        
        client_headers = getattr(self.client, 'headers', {})
        return dict(self.DEFAULT_HEADERS, **client_headers)
537331
def parse_headers(self, req, name, field):
        """"""
        # Use req.get_headers rather than req.headers for performance
        return req.get_header(name, required=False) or core.missing
877265
def get_headers(self, header_name):
		
		header_name = self.normalize_name(header_name)
		if header_name in self.__headers.keys():
			return tuple(self.__headers[header_name])
651797
def metadata():
    """"""
    with open(os.path.join(charm_dir(), 'metadata.yaml')) as md:
        return yaml.safe_load(md)