Load data given a data path. This is a low level method that will search through the various search paths until it's able to load a value. This is typically only needed to load *non* model files (such as _endpoints and _retry). If you need to load model files, you
(self, name)
| 436 | raise DataNotFoundError(data_path=name) |
| 437 | |
| 438 | def load_data(self, name): |
| 439 | """Load data given a data path. |
| 440 | |
| 441 | This is a low level method that will search through the various |
| 442 | search paths until it's able to load a value. This is typically |
| 443 | only needed to load *non* model files (such as _endpoints and |
| 444 | _retry). If you need to load model files, you should prefer |
| 445 | ``load_service_model``. Use ``load_data_with_path`` to get the |
| 446 | data path of the data file as second return value. |
| 447 | |
| 448 | :type name: str |
| 449 | :param name: The data path, i.e ``ec2/2015-03-01/service-2``. |
| 450 | |
| 451 | :return: The loaded data. If no data could be found then |
| 452 | a DataNotFoundError is raised. |
| 453 | """ |
| 454 | data, _ = self.load_data_with_path(name) |
| 455 | return data |
| 456 | |
| 457 | def _potential_locations(self, name=None, must_exist=False, is_dir=False): |
| 458 | # Will give an iterator over the full path of potential locations |