from dotenv import dotenv_values
-from .errors import UsageError
+from nominatim.errors import UsageError
LOG = logging.getLogger()
self._config['NOMINATIM_ADDRESS_LEVEL_CONFIG'] = \
str(config_dir / 'address-levels.json')
+ class _LibDirs: # pylint: disable=too-few-public-methods
+ pass
+
+ self.lib_dir = _LibDirs()
+
+ def set_libdirs(self, **kwargs):
+ """ Set paths to library functions and data.
+ """
+ for key, value in kwargs.items():
+ setattr(self.lib_dir, key, Path(value).resolve())
def __getattr__(self, name):
name = 'NOMINATIM_' + name