Description
<a href="https://opensource.newrelic.com/oss-category/#community-project"><picture> <source media="(prefers-color-scheme: dark)" srcset="https://github.com/newrelic/opensource-website/raw/main/src/images/categories/dark/Community_Plus.png"> <source media="(prefers-color-scheme: light)" srcset="https://github.com/newrelic/opensource-website/raw/main/src/images/categories/Community_Plus.png"> <img alt="New Relic Open Source community project banner." src="https://github.com/newrelic/opensource-website/raw/main/src/images/categories/Community_Plus.png"> </picture></a> # New Relic Python Agent [](https://github.com/newrelic/newrelic-python-agent/releases) [](https://pypi.python.org/pypi/newrelic) [](https://pypi.python.org/pypi/newrelic) [](https://pepy.tech/projects/newrelic) [](https://github.com/newrelic/newrelic-python-agent/actions/workflows/tests.yml) [](https://github.com/astral-sh/ruff) [](https://github.com/newrelic/newrelic-python-agent/actions/workflows/mega-linter.yml) [](https://codecov.io/gh/newrelic/newrelic-python-agent) [](https://github.com/aquasecurity/trivy) The `newrelic` package instruments your application for performance monitoring and advanced performance analytics with [New Relic](http://newrelic.com). Pinpoint and solve Python application performance issues down to the line of code. [New Relic APM](http://newrelic.com/application-monitoring) is the only tool you\'ll need to see everything in your Python application, from the end user experience to server monitoring. Trace problems down to slow database queries, slow 3rd party APIs and web services, caching layers, and more. Monitor your app in a production environment and make sure your app can stand a big spike in traffic by running scalability reports. Visit [Python Application Performance Monitoring with New Relic](http://newrelic.com/python) to learn more. ## Usage This package can be installed via pip: ```bash pip install newrelic ``` (These instructions can also be found online: [Python Agent Installation Guide](https://docs.newrelic.com/install/python/).) 1. Generate the agent configuration file with your [license key](https://docs.newrelic.com/docs/apis/intro-apis/new-relic-api-keys/). ```bash newrelic-admin generate-config $YOUR_LICENSE_KEY newrelic.ini ``` 2. Validate the agent configuration and test the connection to our data collector service. ```bash newrelic-admin validate-config newrelic.ini ``` 3. Integrate the agent with your web application. If you control how your web application or WSGI server is started, the recommended way to integrate the agent is to use the `newrelic-admin` [wrapper script](https://docs.newrelic.com/docs/agents/python-agent/installation-configuration/python-agent-integration#wrapper-script). Modify the existing startup script, prefixing the existing startup command and options with `newrelic-admin run-program`. Also, set the **NEW_RELIC_CONFIG_FILE** environment variable to the name of the configuration file you created above: ```bash NEW_RELIC_CONFIG_FILE=newrelic.ini newrelic-admin run-program $YOUR_COMMAND_OPTIONS ``` Examples: ```bash NEW_RELIC_CONFIG_FILE=newrelic.ini newrelic-admin run-program gunicorn -c config.py test_site.wsgi $ NEW_RELIC_CONFIG_FILE=newrelic.ini newrelic-admin run-program uwsgi uwsgi_config.ini ``` Alternatively, you can also [manually integrate the agent](https://docs.newrelic.com/docs/agents/python-agent/installation-configuration/python-agent-integration#manual-integration) by adding the following lines at the very top of your python WSGI script file. (This is useful if you\'re using `mod_wsgi`.) ``` python import newrelic.agent newrelic.agent.initialize('/path/to/newrelic.ini') ``` 4. Start or restart your Python web application or WSGI server. 5. Done! Check your application in the [New Relic UI](https://rpm.newrelic.com) to see the real time statistics generated from your application. Additional resources may be found here: - [N
Release History
| Version | Changes | Urgency | Date |
|---|---|---|---|
| 12.1.0 | Imported from PyPI (12.1.0) | Low | 4/21/2026 |
| v12.1.0 | ## Notes This release of the Python agent adds support for time to first token and fixes an incompatible [Flask](https://pypi.org/project/Flask/) `add_url_rule` function signature. Install the agent using `easy_install/pip/distribute` via the [Python Package Index](https://pypi.python.org/pypi/newrelic), using `conda` via the [Conda-Forge Package Index](https://anaconda.org/conda-forge/newrelic), or download it directly from the [New Relic download site](https://download.newrelic.com/pytho | Medium | 3/26/2026 |
| v12.0.0 | https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-120000/ | Low | 3/12/2026 |
| v11.5.0 | https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-110500/ | Low | 2/20/2026 |
| v11.4.0 | https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-110400/ | Low | 1/29/2026 |
| v11.3.0 | https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-110300/ | Low | 1/22/2026 |
| v11.2.0 | https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-110200/ | Low | 12/8/2025 |
| v11.1.0 | https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-110100/ | Low | 11/3/2025 |
| v11.0.1 | https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-110001/ | Low | 10/6/2025 |
| v11.0.0 | CAUTION: This version of the agent has been yanked. https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-110000/ | Low | 9/25/2025 |
| v10.17.0 | https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-101700/ | Low | 9/4/2025 |
| v10.16.0 | https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-101600/ | Low | 8/14/2025 |
| v10.15.0 | https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-101500/ | Low | 7/24/2025 |
| v10.14.0 | https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-101400/ | Low | 6/18/2025 |
| v10.13.0 | https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-101300/ | Low | 6/9/2025 |
| v10.12.0 | https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-101200/ | Low | 5/12/2025 |
| v10.11.0 | https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-101100/ | Low | 5/1/2025 |
| v10.10.0 | https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-101000/ | Low | 4/24/2025 |
| v10.9.0 | https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-100900/ | Low | 4/11/2025 |
| v10.8.1 | https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-100801/ | Low | 3/31/2025 |
| v10.8.0 | https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-100800/ | Low | 3/27/2025 |
| v10.7.0 | https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-100700/ | Low | 3/7/2025 |
| v10.6.0 | https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-100600/ | Low | 2/6/2025 |
| v10.5.0 | https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-100500/ | Low | 1/30/2025 |
| v10.4.0 | https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-100400/ | Low | 12/12/2024 |
| v10.3.1 | https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-100301/ | Low | 11/25/2024 |
| v10.3.0 | https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-100300/ | Low | 11/19/2024 |
| v10.2.0 | https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-100200/ | Low | 10/15/2024 |
| v10.1.0 | https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-100100/ | Low | 10/10/2024 |
| v10.0.0 | https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-100000/ | Low | 9/26/2024 |
| v9.13.0 | https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-91300/ | Low | 8/8/2024 |
| v9.12.0 | https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-91200/ | Low | 7/11/2024 |
| v9.11.0 | https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-91100/ | Low | 6/13/2024 |
| v9.10.0 | https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-91000/ | Low | 5/23/2024 |
| v9.9.1 | https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-90901/ | Low | 5/13/2024 |
| v9.9.0 | https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-90900/ | Low | 4/18/2024 |
| v9.8.0 | https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-90800/ | Low | 3/27/2024 |
| v9.7.1 | https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-90701/ | Low | 3/11/2024 |
| v9.7.0 | https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-90700/ | Low | 2/22/2024 |
| v9.6.0 | https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-90600/ | Low | 1/25/2024 |
| v9.5.0 | https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-90500/ | Low | 1/12/2024 |
| v9.4.0 | https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-90400/ | Low | 1/8/2024 |
| v9.3.0 | https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-90300/ | Low | 12/6/2023 |
| v9.2.0 | https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-90200/ | Low | 11/16/2023 |
| v9.1.2 | https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-90102/ | Low | 11/13/2023 |
| v9.1.1 | https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-90101/ | Low | 10/19/2023 |
| v9.1.0 | https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-90100/ | Low | 9/25/2023 |
| v9.0.0 | https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-90000/ | Low | 8/28/2023 |
| v8.11.0 | https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-81100/ | Low | 8/23/2023 |
| v8.10.1 | https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-81001/ | Low | 8/17/2023 |
| v8.10.0 | https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-81000/ | Low | 8/10/2023 |
