示例#1
0
 def _get_service_config(self, service, version):
     # get the config file
     __location__ = os.path.join(
         '/'.join(
             os.path.abspath(os.path.dirname(__file__)).split('/')[:-1]),
         'configs', "ogc_parameters.yaml")
     data = import_yaml_configs([__location__])
     self.config = next(d for d in data if d['name'] == service.upper() +
                        version.replace('.', ''))
 def __init__(self, yaml_files, source_content, source_url, **options):
     '''
     **options:
         parser: Parser from source_content
         ignore_case: bool
     '''
     self.yaml_files = yaml_files
     self.source_content = source_content
     self.source_url = source_url
     self.yaml = import_yaml_configs(self.yaml_files)
     self.parser = Parser(source_content)
 def _get_service_config(self, service, version):
     # get the config file
     __location__ = os.path.join(
         '/'.join(os.path.abspath(
             os.path.dirname(__file__)).split('/')[:-1]),
         'configs',
         "ogc_parameters.yaml"
     )
     data = import_yaml_configs([__location__])
     self.config = next(d for d in data if d['name'] == service.upper() +
                        version.replace('.', ''))
def load_yamls(yamls):
    return import_yaml_configs(yamls)