# set_global_variable

**Descripción**

Establece el valor de una variable global en el diccionario '\_GLOBAL\_VARIABLES'.

**Parámetros**

<table border="1" id="bkmrk-module-acepta-el-tip" style="border-collapse: collapse; width: 100%;"><tbody><tr><td style="width: 12.5%;">**Nombre**</td><td style="width: 6.25%;">**Tipo**</td><td style="width: 6.25%;">**Requerido**</td><td style="width: 50%;">**Descripción**</td></tr><tr><td style="width: 12.5%;">variable\_name</td><td style="width: 6.25%;">str</td><td style="width: 6.25%;">SI</td><td style="width: 50%;">Nombre de la variable a establecer</td></tr><tr><td style="width: 12.5%;">value</td><td style="width: 6.25%;">None</td><td style="width: 6.25%;">Si</td><td style="width: 50%;">Valor a asignar a la variable</td></tr></tbody></table>

**Return**

<table border="1" id="bkmrk-tipo-none" style="border-collapse: collapse; width: 100%;"><tbody><tr><td style="width: 100%;">**Tipo**</td></tr><tr><td style="width: 100%;">None</td></tr></tbody></table>

 **Versión**

- 1.0.0

**Ejemplo**

```
import pandoraPlugintools as pt

# Define the variable name and value to set
variable_name = 'security_level'
new_value = 'auth_without_privacy'

# Set the value of the global variable
pt.snmp.set_global_variable(variable_name, new_value)

# Print the updated value of the global variable
print(f"Updated value of '{variable_name}': {pt.snmp._GLOBAL_VARIABLES[variable_name]}")
```