YamlFile¶
YamlFile ¶
YamlFile(filespec)
Bases: object
Config file in YAML format.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
filespec
|
str
|
The filespec of the YAML file to read |
required |
Returns:
Type | Description |
---|---|
YamlFile
|
An instance of this object |
Source code in osm_merge/yamlfile.py
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
|
get ¶
get(keyword, tag=None)
Get the values for a top level keyword Args: keyword (str): The top level keyword to get the values for tag (str): The category for the tag/values
Returns:
Type | Description |
---|---|
dict
|
The values for the top level keyword |
Source code in osm_merge/yamlfile.py
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
|
getEntries ¶
getEntries()
Convert the list from the YAML file into a searchable data structure
Returns:
Type | Description |
---|---|
dict
|
The parsed config file |
Source code in osm_merge/yamlfile.py
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
|
dump ¶
dump()
Dump internal data structures, for debugging purposes only.
Source code in osm_merge/yamlfile.py
92 93 94 95 96 97 98 99 100 |
|
options: show_source: false heading_level: 3