# parse_configuration

**Descripción**

Analiza la configuración. Lee el fichero de configuración y almacena sus datos como dict.

**Parámetros**

<table border="1" id="bkmrk-module-acepta-el-tip" style="border-collapse: collapse; width: 100%; height: 116px;"><tbody><tr style="height: 29px;"><td style="width: 12.5%; height: 29px;">**Nombre**</td><td style="width: 6.25%;">**Tipo**</td><td style="width: 8.34877%;">**Requerido**</td><td style="width: 47.9012%; height: 29px;">**Descripción**</td></tr><tr style="height: 29px;"><td style="width: 12.5%; height: 29px;">file</td><td style="width: 6.25%;"> </td><td style="width: 8.34877%;">si</td><td style="width: 47.9012%; height: 29px;">Ruta del fichero de configuración. Por defecto es "/etc/pandora/pandora\_server.conf"</td></tr><tr style="height: 29px;"><td style="width: 12.5%; height: 29px;">separator</td><td style="width: 6.25%;"> </td><td style="width: 8.34877%;">no</td><td style="width: 47.9012%; height: 29px;">Separador para la opción y el valor. Por defecto es " "</td></tr><tr style="height: 29px;"><td style="width: 12.5%; height: 29px;">default\_values</td><td style="width: 6.25%;"> </td><td style="width: 8.34877%;">no</td><td style="width: 47.9012%; height: 29px;">Diccionario de valores por defecto</td></tr></tbody></table>

**Return**

<table border="1" id="bkmrk-module_xml-m%C3%B3dulo-en" style="border-collapse: collapse; width: 100%;"><tbody><tr><td style="width: 50%;">dict</td><td style="width: 50%;">Diccionario que contiene todas las claves y valores del fichero</td></tr></tbody></table>

**Versión**

- 1.0.0

**Ejemplo**

```
import pandoraPlugintools as pt

# Specify the path to the configuration file
config_file = "/etc/pandora/pandora_server.conf"

# Specify the separator used in the configuration file
separator = "="

# Define default values for configuration options
default_config = {
    "server_port": "8080",
    "debug_mode": "false",
    "log_file": "/var/log/pandora.log"
}

# Parse the configuration file and get the configuration data
parsed_config = pt.general.parse_configuration(file=config_file, separator=separator, default_values=default_config)

# Print the parsed configuration data
print("Parsed configuration:", parsed_config)
```