dicogis.utils.db_conf_reader module

Simple function to load database configuration files (= ini structure).

dicogis.utils.db_conf_reader.read_db_conf(dbconf_path)

Read databases configuration files and return parameters as list of dictionaries.

Parameters:

dbconf_path (Path) – filepath to *.dbconf file

Raises:
Returns:

list of dictionary/ies with database parameters

Return type:

Union[list, dict]

Example:
# here comes an example in Python
pprint(read_db_conf("./sample.dbconf"))
{
    "name": "database_name",
    "host": "database_server_url",
    "port": "5432",
    "username": "db_user_name",
    "password": "db_user_password",
    "schemas": "db_schemas",
    "esri_sde": False
}