sentry-sdk 2.42.1


pip install sentry-sdk

  Latest version

Released: Oct 20, 2025


Meta
Author: Sentry Team and Contributors
Requires Python: >=3.6

Classifiers

Development Status
  • 5 - Production/Stable

Environment
  • Web Environment

Intended Audience
  • Developers

License
  • OSI Approved :: BSD License

Operating System
  • OS Independent

Programming Language
  • Python
  • Python :: 3
  • Python :: 3.6
  • Python :: 3.7
  • Python :: 3.8
  • Python :: 3.9
  • Python :: 3.10
  • Python :: 3.11
  • Python :: 3.12
  • Python :: 3.13

Topic
  • Software Development :: Libraries :: Python Modules
Sentry for Python

Bad software is everywhere, and we're tired of it. Sentry is on a mission to help developers write better software faster, so we can get back to enjoying technology. If you want to join us Check out our open positions.

Discord Twitter Follow PyPi page link -- version python Build Status


Official Sentry SDK for Python

Welcome to the official Python SDK for Sentry.

๐Ÿ“ฆ Getting Started

Prerequisites

You need a Sentry account and project.

Installation

Getting Sentry into your project is straightforward. Just run this command in your terminal:

pip install --upgrade sentry-sdk

Basic Configuration

Here's a quick configuration example to get Sentry up and running:

import sentry_sdk

sentry_sdk.init(
    "https://12927b5f211046b575ee51fd8b1ac34f@o1.ingest.sentry.io/1",  # Your DSN here

    # Set traces_sample_rate to 1.0 to capture 100%
    # of traces for performance monitoring.
    traces_sample_rate=1.0,
)

With this configuration, Sentry will monitor for exceptions and performance issues.

Quick Usage Example

To generate some events that will show up in Sentry, you can log messages or capture errors:

import sentry_sdk
sentry_sdk.init(...)  # same as above

sentry_sdk.capture_message("Hello Sentry!")  # You'll see this in your Sentry dashboard.

raise ValueError("Oops, something went wrong!")  # This will create an error event in Sentry.

๐Ÿ“š Documentation

For more details on advanced usage, integrations, and customization, check out the full documentation on https://docs.sentry.io.

๐Ÿงฉ Integrations

Sentry integrates with a ton of popular Python libraries and frameworks, including FastAPI, Django, Celery, OpenAI and many, many more. Check out the full list of integrations to get the full picture.

๐Ÿšง Migrating Between Versions?

From 1.x to 2.x

If you're using the older 1.x version of the SDK, now's the time to upgrade to 2.x. It includes significant upgrades and new features. Check our migration guide for assistance.

From raven-python

Using the legacy raven-python client? It's now in maintenance mode, and we recommend migrating to the new SDK for an improved experience. Get all the details in our migration guide.

๐Ÿ™Œ Want to Contribute?

We'd love your help in improving the Sentry SDK! Whether it's fixing bugs, adding features, writing new integrations, or enhancing documentation, every contribution is valuable.

For details on how to contribute, please read our contribution guide and explore the open issues.

๐Ÿ›Ÿ Need Help?

If you encounter issues or need help setting up or configuring the SDK, don't hesitate to reach out to the Sentry Community on Discord. There is a ton of great people there ready to help!

๐Ÿ”— Resources

Here are all resources to help you make the most of Sentry:

๐Ÿ“ƒ License

The SDK is open-source and available under the MIT license. Check out the LICENSE file for more information.

๐Ÿ˜˜ Contributors

Thanks to everyone who has helped improve the SDK!

3.0.0a7 Oct 20, 2025
3.0.0a6 Sep 01, 2025
3.0.0a5 Aug 07, 2025
3.0.0a4 Jul 31, 2025
3.0.0a3 Jul 22, 2025
3.0.0a2 Jun 12, 2025
3.0.0a1 May 08, 2025
2.42.1 Oct 20, 2025
2.42.0 Oct 15, 2025
2.41.0 Oct 09, 2025
2.40.0 Oct 06, 2025
2.39.0 Sep 25, 2025
2.38.0 Sep 15, 2025
2.37.1 Sep 09, 2025
2.37.0 Sep 05, 2025
2.36.0 Sep 04, 2025
2.35.2 Sep 01, 2025
2.35.1 Aug 26, 2025
2.35.0 Aug 14, 2025
2.34.1 Jul 30, 2025
2.34.0 Jul 29, 2025
2.33.2 Jul 22, 2025
2.33.1 Jul 21, 2025
2.33.0 Jul 15, 2025
2.32.0 Jun 27, 2025
2.31.0 Jun 24, 2025
2.30.0 Jun 12, 2025
2.29.1 May 19, 2025
2.29.0 May 19, 2025
2.28.0 May 12, 2025
2.27.0 Apr 24, 2025
2.26.1 Apr 15, 2025
2.26.0 Apr 14, 2025
2.25.1 Apr 02, 2025
2.25.0 Mar 31, 2025
2.24.1 Mar 24, 2025
2.24.0 Mar 21, 2025
2.23.1 Mar 17, 2025
2.23.0 Mar 17, 2025
2.22.0 Feb 17, 2025
2.21.0 Feb 12, 2025
2.20.0 Jan 14, 2025
2.19.2 Dec 06, 2024
2.19.1 Dec 05, 2024
2.19.0 Nov 21, 2024
2.18.0 Nov 04, 2024
2.17.0 Oct 17, 2024
2.16.0 Oct 08, 2024
2.15.0 Oct 01, 2024
2.14.0 Sep 09, 2024
2.13.0 Aug 13, 2024
2.12.0 Jul 31, 2024
2.11.0 Jul 24, 2024
2.10.0 Jul 15, 2024
2.9.0 Jul 10, 2024
2.8.0 Jul 08, 2024
2.7.1 Jun 27, 2024
2.7.0 Jun 26, 2024
2.6.0 Jun 19, 2024
2.5.1 Jun 07, 2024
2.5.0 Jun 06, 2024
2.4.0 Jun 04, 2024
2.3.1 May 23, 2024
2.3.0 May 23, 2024
2.2.1 May 21, 2024
2.2.0 May 16, 2024
2.1.1 May 06, 2024
2.1.0 May 06, 2024
2.0.1 Apr 26, 2024
2.0.0 Apr 25, 2024
2.0.0rc6 Apr 23, 2024
2.0.0rc5 Apr 10, 2024
2.0.0rc4 Apr 03, 2024
2.0.0rc3 Mar 21, 2024
2.0.0rc2 Mar 13, 2024
2.0.0rc1 Mar 11, 2024
2.0.0a2 Feb 29, 2024
2.0.0a1 Feb 26, 2024
1.45.1 Jul 26, 2024
1.45.0 Apr 10, 2024
1.44.1 Apr 03, 2024
1.44.0 Mar 28, 2024
1.43.0 Mar 20, 2024
1.42.0 Mar 13, 2024
1.41.0 Mar 07, 2024
1.40.6 Feb 27, 2024
1.40.5 Feb 19, 2024
1.40.4 Feb 13, 2024
1.40.3 Feb 09, 2024
1.40.2 Feb 07, 2024
1.40.1 Feb 06, 2024
1.40.0 Jan 30, 2024
1.39.2 Jan 10, 2024
1.39.1 Dec 14, 2023
1.39.0 Dec 12, 2023
1.38.0 Nov 29, 2023
1.37.1 Nov 24, 2023
1.37.0 Nov 24, 2023
1.36.0 Nov 21, 2023
1.35.0 Nov 13, 2023
1.34.0 Nov 02, 2023
1.33.1 Oct 31, 2023
1.33.0 Oct 31, 2023
1.32.0 Oct 11, 2023
1.31.0 Sep 13, 2023
1.30.0 Aug 29, 2023
1.29.2 Aug 01, 2023
1.29.1 Aug 01, 2023
1.29.0 Jul 31, 2023
1.28.1 Jul 13, 2023
1.28.0 Jul 10, 2023
1.27.1 Jul 06, 2023
1.27.0 Jul 04, 2023
1.26.0 Jun 22, 2023
1.25.1 Jun 07, 2023
1.25.0 Jun 02, 2023
1.24.0 May 23, 2023
1.23.1 May 17, 2023
1.23.0 May 15, 2023
1.22.2 May 08, 2023
1.22.1 May 05, 2023
1.22.0 May 05, 2023
1.21.1 Apr 28, 2023
1.21.0 Apr 25, 2023
1.20.0 Apr 19, 2023
1.19.1 Apr 05, 2023
1.19.0 Apr 04, 2023
1.18.0 Mar 28, 2023
1.17.0 Mar 16, 2023
1.16.0 Feb 27, 2023
1.15.0 Feb 07, 2023
1.14.0 Jan 23, 2023
1.13.0 Jan 12, 2023
1.12.1 Dec 19, 2022
1.12.0 Dec 15, 2022
1.11.1 Nov 22, 2022
1.11.0 Nov 14, 2022
1.10.1 Oct 21, 2022
1.10.0 Oct 20, 2022
1.9.10 Oct 03, 2022
1.9.9 Sep 26, 2022
1.9.8 Sep 05, 2022
1.9.7 Sep 01, 2022
1.9.6 Aug 31, 2022
1.9.5 Aug 16, 2022
1.9.4 Aug 11, 2022
1.9.3 Aug 09, 2022
1.9.2 Aug 05, 2022
1.9.1 Aug 05, 2022
1.9.0 Jul 28, 2022
1.8.0 Jul 21, 2022
1.7.2 Jul 15, 2022
1.7.1 Jul 13, 2022
1.7.0 Jul 11, 2022
1.6.0 Jun 22, 2022
1.5.12 May 10, 2022
1.5.11 May 03, 2022
1.5.10 Apr 15, 2022
1.5.9 Apr 11, 2022
1.5.8 Mar 18, 2022
1.5.7 Mar 08, 2022
1.5.6 Feb 22, 2022
1.5.5 Feb 11, 2022
1.5.4 Jan 25, 2022
1.5.3 Jan 20, 2022
1.5.2 Jan 10, 2022
1.5.1 Dec 13, 2021
1.5.0 Nov 17, 2021
1.4.3 Sep 29, 2021
1.4.2 Sep 27, 2021
1.4.1 Sep 22, 2021
1.4.0 Sep 21, 2021
1.3.1 Jul 27, 2021
1.3.0 Jul 08, 2021
1.2.0 Jul 06, 2021
1.1.0 May 06, 2021
1.0.0 Mar 03, 2021
0.20.3 Feb 18, 2021
0.20.2 Feb 15, 2021
0.20.1 Feb 12, 2021
0.20.0 Feb 11, 2021
0.19.5 Dec 10, 2020
0.19.4 Nov 19, 2020
0.19.3 Nov 12, 2020
0.19.2 Nov 02, 2020
0.19.1 Oct 19, 2020
0.19.0 Oct 13, 2020
0.18.0 Sep 29, 2020
0.17.8 Sep 23, 2020
0.17.7 Sep 22, 2020
0.17.6 Sep 15, 2020
0.17.5 Sep 14, 2020
0.17.4 Sep 09, 2020
0.17.3 Sep 02, 2020
0.17.2 Sep 01, 2020
0.17.1 Aug 28, 2020
0.17.0 Aug 24, 2020
0.16.5 Aug 14, 2020
0.16.4 Aug 13, 2020
0.16.3 Aug 01, 2020
0.16.2 Jul 22, 2020
0.16.1 Jul 10, 2020
0.16.0 Jul 03, 2020
0.15.1 Jun 18, 2020
0.15.0 Jun 17, 2020
0.14.4 May 13, 2020
0.14.3 Mar 20, 2020
0.14.2 Feb 26, 2020
0.14.1 Jan 21, 2020
0.14.0 Jan 08, 2020
0.13.5 Dec 05, 2019
0.13.4 Nov 26, 2019
0.13.3 Nov 25, 2019
0.13.2 Nov 08, 2019
0.13.1 Oct 25, 2019
0.13.0 Oct 17, 2019
0.12.3 Oct 02, 2019
0.12.2 Sep 21, 2019
0.12.1 Sep 19, 2019
0.12.0 Sep 18, 2019
0.11.2 Aug 30, 2019
0.11.1 Aug 19, 2019
0.11.0 Aug 16, 2019
0.10.2 Jul 15, 2019
0.10.1 Jul 09, 2019
0.10.0 Jul 06, 2019
0.9.5 Jun 28, 2019
0.9.4 Jun 28, 2019
0.9.3 Jun 28, 2019
0.9.2 Jun 23, 2019
0.9.1 Jun 21, 2019
0.9.0 Jun 03, 2019
0.8.1 Jun 01, 2019
0.8.0 May 17, 2019
0.7.14 Apr 29, 2019
0.7.13 Apr 29, 2019
0.7.12 Apr 25, 2019
0.7.11 Apr 23, 2019
0.7.10 Apr 05, 2019
0.7.9 Mar 30, 2019
0.7.8 Mar 26, 2019
0.7.7 Mar 20, 2019
0.7.6 Mar 05, 2019
0.7.5 Mar 05, 2019
0.7.4 Feb 26, 2019
0.7.3 Feb 17, 2019
0.7.2 Feb 07, 2019
0.7.1 Feb 06, 2019
0.7.0 Feb 04, 2019
0.6.9 Jan 19, 2019
0.6.8 Jan 18, 2019
0.6.7 Jan 17, 2019
0.6.6 Jan 04, 2019
0.6.5 Dec 21, 2018
0.6.4 Dec 19, 2018
0.6.3 Dec 19, 2018
0.6.2 Dec 05, 2018
0.6.1 Dec 04, 2018
0.6.0 Dec 03, 2018
0.5.5 Nov 15, 2018
0.5.4 Nov 10, 2018
0.5.3 Nov 05, 2018
0.5.2 Oct 29, 2018
0.5.1 Oct 24, 2018
0.5.0 Oct 23, 2018
0.4.3 Oct 19, 2018
0.4.2 Oct 17, 2018
0.4.1 Oct 11, 2018
0.4.0 Oct 09, 2018
0.3.11 Oct 08, 2018
0.3.10 Oct 08, 2018
0.3.9 Oct 03, 2018
0.3.8 Oct 02, 2018
0.3.7 Oct 01, 2018
0.3.6 Sep 27, 2018
0.3.5 Sep 25, 2018
0.3.4 Sep 21, 2018
0.3.3 Sep 21, 2018
0.3.2 Sep 21, 2018
0.3.1 Sep 17, 2018
0.3.0 Sep 13, 2018
0.2.2 Sep 11, 2018
0.2.1 Sep 05, 2018
0.1.3 Aug 27, 2018
0.1.2 Aug 24, 2018
0.1.1 Aug 21, 2018
0.1.0 Aug 21, 2018
0.1.0rc16 Aug 09, 2018
0.1.0rc15 Aug 04, 2018
0.1.0rc14 Aug 03, 2018
0.1.0rc13 Aug 02, 2018
0.1.0rc12 Aug 02, 2018
0.1.0rc11 Aug 01, 2018
0.1.0rc10 Aug 01, 2018
0.1.0rc9 Aug 01, 2018
0.1.0rc8 Jul 31, 2018
0.1.0rc7 Jul 31, 2018
0.1.0rc6 Jul 31, 2018
0.1.0rc5 Jul 31, 2018
0.1.0rc4 Jul 31, 2018
0.1.0rc3 Jul 31, 2018
0.1.0rc2 Jul 26, 2018
0.1.0rc1 Jul 26, 2018

Wheel compatibility matrix

Platform Python 2 Python 3
any

Files in release

Extras:
Dependencies:
urllib3 (>=1.26.11)
certifi