getEnv package:gi-glib

Returns the value of an environment variable. On UNIX, the name and value are byte strings which might or might not be in some consistent character set and encoding. On Windows, they are in UTF-8. On Windows, in case the environment variable's value contains references to other environment variables, they are expanded.
Gets the list of environment variables for the current process. The list is Nothing terminated and each item in the list is of the form 'NAME=VALUE'. This is equivalent to direct access to the 'environ' global variable, except portable. The return value is freshly allocated and it should be freed with strfreev when it is no longer needed. Since: 2.28
Returns the value of the environment variable variable in the provided list envp. Since: 2.32