---
title: global_settings (Python agent API)
source: https://docs.newrelic.com/docs/apm/agents/python-agent/python-agent-api/globalsettings-python-agent-api
---

## Syntax

```py
newrelic.agent.global_settings()
```

This call returns a reference to the Python agent's global settings object.

## Description

This call returns a reference to the global agent settings object, which you can then use to make changes to the available settings. The returned settings object contains nested, hierarchical objects. The setting names match the global settings' names in the [agent configuration file](https://docs.newrelic.com/docs/agents/python-agent/installation-and-configuration/python-agent-configuration).

The `global_settings` object contains settings from the configuration file and environment variables; the [`application_settings`](https://docs.newrelic.com/docs/agents/python-agent/python-agent-api/application_settings) object contains additional configuration changes from [server-side configuration](https://docs.newrelic.com/docs/agents/manage-apm-agents/configuration/configure-agent#ssc).

If you update global settings using the global settings object, the changes will only take affect the next time the Python agent is registered with the [collector](https://docs.newrelic.com/docs/accounts-partnerships/education/getting-started-new-relic/glossary#collector) for that specific application.

If accessed before the agent is initialized, the global settings will have the default configuration settings, along with any overrides from user environment variables. If accessed after agent initialization, the global settings contain any agent config file settings that are also global settings (because the config file contains fewer settings than the global settings object).

## Return values

Returns a reference to the global agent settings object.

## Examples

### Assigning various settings [#some-settings]

Here are some examples of assigning the `proxy_host`, `proxy_port`, `slow_sql.enabled`, and `browser_monitoring.auto_instrument` settings:

```py
settings = newrelic.agent.global_settings()

settings.proxy_host = 'proxy.intranet' 
settings.proxy_port = 8888
settings.slow_sql.enabled = False
settings.browser_monitoring.auto_instrument = False
```

### Passing settings into a dict [#dict]

If you are debugging or logging and require the global settings as a traditional Python dictionary object, you can pass the result into a dict. Here's an example:

```py
settings_dict = dict(newrelic.agent.global_settings())

for name, value in settings_dict.items():
    print name, value
```

Each `name` will be the full dotted path for that setting.
