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

## Syntax

```py
newrelic.agent.application(name=None)
```

Returns object corresponding to an agent monitored app; required by some Python agent API calls.

## Description

This call returns an object corresponding to an agent-monitored application. If no `name` value is set, the name [set via the Python agent configuration](https://docs.newrelic.com/docs/agents/python-agent/installation-configuration/python-agent-configuration#app_name) is used.

The returned application object does not present any public API, but is required by some other API calls.

> #### ⚠️ IMPORTANT
>
> This call only returns the application object. It won't attempt to register the application with the data collector if this has not already occurred.

## Parameters

| Parameter       | Description                                                                                                            |
| --------------- | ---------------------------------------------------------------------------------------------------------------------- |
| `name` _string_ | Optional. The name of the application. If set, this overrides the application name set via Python agent configuration. |

## Return values

Returns an application object. The object itself does not present any public API, but is required by some other API calls.

## Examples

### Generate and use an application object [#app-object-example]

To generate an application object, use:

```py
import newrelic.agent

app = newrelic.agent.application()
```

Some other Python agent API calls take the application object as a parameter. For an example, see the [`notice_error`](https://docs.newrelic.com/docs/agents/python-agent/python-agent-api/noticeerror-python-agent-api/) call.
