---
title: Introduction to New Relic for Python
source: https://docs.newrelic.com/docs/apm/agents/python-agent/getting-started/introduction-new-relic-python
---

Our Python agent monitors your Python application to help you identify and solve [performance issues](#monitor-performance). You can also extend your performance monitoring to collect and analyze [business data](#business-data) to help you improve the customer experience and make data-driven business decisions. With flexible options for [custom instrumentation and APIs](https://docs.newrelic.com/docs/agents/python-agent/custom-instrumentation/python-custom-instrumentation), The Python agent offers multiple building blocks to customize the data you need from your app.

Our Python works with a wide variety of [web frameworks and hosting mechanisms](https://docs.newrelic.com/docs/agents/python-agent/getting-started/instrumented-python-packages), including Django, Gunicorn, WSGI, CherryPy, uWSGI, and more. You can also install the Python agent in a [Google App Engine flexible environment](https://docs.newrelic.com/docs/agents/python-agent/hosting-services/install-new-relic-python-agent-gae-flexible-environment).

## Monitor app performance [#monitor-performance]

After you [install](#installation) the Python agent, it begins to collect data about your app. You can view the data as charts and tables in the [New Relic UI](https://docs.newrelic.com/docs/new-relic-one/use-new-relic-one/get-started/introduction-new-relic-one).

**View the big picture of your app:**

-   Monitor your app's [Apdex (user satisfaction)](https://docs.newrelic.com/docs/apm/new-relic-apm/apdex/apdex-measuring-user-satisfaction).
-   Get a high-level summary of your app with [Summary page](https://docs.newrelic.com/docs/apm/applications-menu/monitoring/apm-overview-page).
-   Enable [distributed tracing](https://docs.newrelic.com/docs/apm/distributed-tracing/getting-started/introduction-distributed-tracing) to see activity across an architecture having many services.
-   Install [Infrastructure monitoring](https://docs.newrelic.com/docs/infrastructure/new-relic-infrastructure/getting-started/introduction-new-relic-infrastructure) and view detailed server/host data for your app.

**Find errors and problems quickly:**

-   Track [key transactions](https://docs.newrelic.com/docs/apm/transactions/key-transactions/key-transactions-tracking-important-transactions-or-events) specific to your business.
-   Create [custom dashboards](https://docs.newrelic.com/docs/dashboards/new-relic-dashboards/custom-dashboards/custom-dashboards) for important metrics.
-   [Alert](https://docs.newrelic.com/docs/alerts/alert-policies/understanding-alert-policies/alerting-new-relic) your team when an error or problem occurs before it affects your users.
-   View performance [after a deployment](https://docs.newrelic.com/docs/apm/applications-menu/events/deployments-page).

**Drill down into performance details:**

-   Examine code-level [transaction traces](https://docs.newrelic.com/docs/apm/transactions/transaction-traces/transaction-traces).
-   Examine [database query traces](/apm/transactions/transaction-traces/troubleshoot-sql-statements).
-   Examine [error traces](https://docs.newrelic.com/docs/apm/applications-menu/events/view-apm-error-analytics).
-   Use [thread profiler sessions](https://docs.newrelic.com/docs/apm/applications-menu/events/thread-profiler-tool) to see detailed stack traces of sampled threads

**View logs for your APM and infrastructure data:**

Bring your logs and application's data together to make troubleshooting easier and faster. No need to switch to another UI page.

-   With [logs in context](https://docs.newrelic.com/docs/logs/logs-context/configure-logs-context-python/), you can see log messages related to your errors and traces directly in your app's UI.
-   You can also see logs in context of your [infrastructure data](https://docs.newrelic.com/docs/logs/forward-logs/forward-your-logs-using-infrastructure-agent/), such as Kubernetes clusters.

**Extend agent instrumentation:**

Other helpful tools include:

| **Tools**                                                                                                                                                   | **Description**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Browser monitoring                                                                                                                                          | Integrate the Python agent with [browser monitoring](https://docs.newrelic.com/docs/browser/new-relic-browser/getting-started/new-relic-browser) to gain visibility into end-user browser activity.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| Simple scripts and background tasks                                                                                                                         | Monitor [job-based or task queuing systems](https://docs.newrelic.com/docs/agents/python-agent/supported-features/python-background-tasks), like [Celery](https://docs.newrelic.com/docs/agents/python-agent/back-end-services/python-agent-celery), or other standalone non-web functions.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| Business data analysis with [data exploration](https://docs.newrelic.com/docs/query-your-data/explore-query-data/data-explorer/introduction-data-explorer). | Use the Python agent with [metrics and events](https://docs.newrelic.com/docs/query-your-data/explore-query-data/data-explorer/introduction-data-explorer) to organize, query, and visualize your data to answer key questions about application performance and customer experience. - Use [default transaction attributes](https://docs.newrelic.com/docs/insights/new-relic-insights/decorating-events/apm-default-attributes-insights), or [add your own](https://docs.newrelic.com/docs/insights/new-relic-insights/decorating-events/insights-custom-attributes). - Query your data using the [New Relic Query Language (NRQL)](https://docs.newrelic.com/docs/using-new-relic/data/understand-data/query-new-relic-data). - Send [your own event data](https://docs.newrelic.com/docs/insights/new-relic-insights/adding-querying-data/inserting-custom-events-new-relic-apm-agents#python-att). - Create and share customizable, interactive [dashboards](https://docs.newrelic.com/docs/query-your-data/explore-query-data/dashboards/introduction-new-relic-one-dashboards). |

## Install the Python agent [#installation]

Before you install the Python agent, make sure your system meets the [system requirements](https://docs.newrelic.com/docs/agents/python-agent/getting-started/compatibility-requirements-python-agent). You must also create a [New Relic account](https://newrelic.com/signup).

We support a number of web frameworks and libraries right out of the box, including Django, WSGI, and Gunicorn. If you use one of the [supported web frameworks](https://docs.newrelic.com/docs/agents/python-agent/getting-started/instrumented-python-packages), installation is easy. If you use an unsupported framework, the process will involve some additions to your app code and/or web server files.

For a quick and simple install process that will work for the majority of setups, follow these simple steps:

1.  Download and install the Python package.
2.  Create config file.
3.  Integrate the Python agent with your application.

[Read the Quick Start guide](https://docs.newrelic.com/docs/agents/python-agent/getting-started/python-agent-quick-start)

[Add Python data](https://one.newrelic.com/marketplace/install-data-source?state=2a8ce851-ad2d-4587-0302-abfffe94d296)

## Monitor non-web scripts, background tasks, and functions [#non-web]

The Python agent also lets you monitor non-web scripts, worker processes, tasks, and functions. The installation process for these non-web transactions is similar to the one used for a web app, with one major difference: instead of going through the standard integration process described in the [install instructions](https://docs.newrelic.com/docs/agents/python-agent/getting-started/python-agent-quick-start), you would manually "wrap" any function you want to monitor. For more information, see [Non-web tasks and processes](https://docs.newrelic.com/docs/agents/python-agent/supported-features/python-background-tasks). For instructions on monitoring Celery tasks, see [Celery background tasks](https://docs.newrelic.com/docs/agents/python-agent/back-end-services/python-agent-celery).

## What's next after installation? [#instrumentation]

Once you get the agent up and running, some suggested next steps are:

-   Explore your data in and get comfortable with the user interface.
-   Read our docs on [our other observability solutions](https://docs.newrelic.com/docs/full-stack-observability/monitor-everything/get-started-new-relic-monitoring-tools/get-started-full-stack-observability) and the [APM page](https://docs.newrelic.com/docs/apm).
-   [Change your application's name](https://docs.newrelic.com/docs/agents/manage-apm-agents/app-naming/rename-your-application), or other [configuration options](https://docs.newrelic.com/docs/agents/python-agent/installation-configuration/python-agent-configuration).
-   Learn about setting up [custom instrumentation](https://docs.newrelic.com/docs/agents/python-agent/custom-instrumentation/python-custom-instrumentation) for application activity not monitored by default.
-   Consider the [Python Telemetry SDK](https://docs.newrelic.com/docs/data-ingest-apis/get-data-new-relic/new-relic-sdks/telemetry-sdks-send-custom-telemetry-data-new-relic).

## Troubleshooting

After you complete the install process, your data should appear in the [APM UI](https://docs.newrelic.com/docs/apm/applications-menu/monitoring/apm-overview-page) within five minutes. If it does not, use these troubleshooting resources:

-   If no data appears, follow these [troubleshooting steps](https://docs.newrelic.com/docs/agents/python-agent/troubleshooting/no-data-appears-python).
-   If you experience issues when installing or running the Python agent on a new host, [test that the package is installed correctly](https://docs.newrelic.com/docs/agents/python-agent/installation-configuration/testing-python-agent) and that it can contact New Relic's data collector service.
-   For other problems, see the [full list of troubleshooting documentation](https://docs.newrelic.com/docs/agents/python-agent/troubleshooting/).

## Check the source code [#source-code]

The Python agent is open source software. That means you can [browse its source code](https://github.com/newrelic/newrelic-python-agent) and send improvements, or create your own fork and build it. For more information, see the [README](https://github.com/newrelic/newrelic-python-agent/blob/main/README.rst).
