-_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**](https://sentry.io/careers/)_
+_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**](https://sentry.io/careers/)_.
-# Official Sentry SDK for Python
-
-[](https://github.com/getsentry/sentry-python/actions/workflows/ci.yml)
+[](https://discord.com/invite/Ww9hbqr)
+[](https://x.com/intent/follow?screen_name=sentry)
[](https://pypi.python.org/pypi/sentry-sdk)
-[](https://discord.gg/cWnMQeA)
+

+[](https://github.com/getsentry/sentry-python/actions/workflows/ci.yml)
+
+
-This is the official Python SDK for [Sentry](http://sentry.io/)
+
----
-## Note about SDK 2.0.0rc1
+# Official Sentry SDK for Python
-**Sentry SDK 2.0.0rc1** has been tested under load on Sentry itself. But we advice you to still be careful if you test this in production.
+Welcome to the official Python SDK for **[Sentry](http://sentry.io/)**.
-Please give it a spin and test it with your project. If you have any questions or feedback please contact us on [Discord](https://discord.gg/Ww9hbqr) in the [#sdk-chat](https://discord.com/channels/621778831602221064/1211958154984820776) channel or create a [GitHub Issue](https://github.com/getsentry/sentry-python/issues) or start a [GitHub Discussion](https://github.com/getsentry/sentry-python/discussions).
-Thanks!
+## 📦 Getting Started
-https://discord.com/channels/621778831602221064/621783758739079168
+### Prerequisites
-## Getting Started
+You need a Sentry [account](https://sentry.io/signup/) and [project](https://docs.sentry.io/product/projects/).
-### Install
+### Installation
+
+Getting Sentry into your project is straightforward. Just run this command in your terminal:
```bash
pip install --upgrade sentry-sdk
```
-### Configuration
+### Basic Configuration
+
+Here's a quick configuration example to get Sentry up and running:
```python
import sentry_sdk
sentry_sdk.init(
- "https://12927b5f211046b575ee51fd8b1ac34f@o1.ingest.sentry.io/1",
+ "https://12927b5f211046b575ee51fd8b1ac34f@o1.ingest.sentry.io/1", # Your DSN here
# Set traces_sample_rate to 1.0 to capture 100%
- # of transactions for performance monitoring.
+ # of traces for performance monitoring.
traces_sample_rate=1.0,
)
```
-### Usage
+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:
```python
-from sentry_sdk import capture_message
-capture_message("Hello World") # Will create an event in Sentry.
+import sentry_sdk
+sentry_sdk.init(...) # same as above
-raise ValueError() # Will also create an event in Sentry.
+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.
```
-- To learn more about how to use the SDK [refer to our docs](https://docs.sentry.io/platforms/python/).
-- Are you coming from `raven-python`? [Use this migration guide](https://docs.sentry.io/platforms/python/migration/).
-- To learn about internals use the [API Reference](https://getsentry.github.io/sentry-python/).
-## Integrations
+## 📚 Documentation
+
+For more details on advanced usage, integrations, and customization, check out the full documentation on [https://docs.sentry.io](https://docs.sentry.io/).
+
+
+## 🧩 Integrations
+
+Sentry integrates with a ton of popular Python libraries and frameworks, including [FastAPI](https://docs.sentry.io/platforms/python/integrations/fastapi/), [Django](https://docs.sentry.io/platforms/python/integrations/django/), [Celery](https://docs.sentry.io/platforms/python/integrations/celery/), [OpenAI](https://docs.sentry.io/platforms/python/integrations/openai/) and many, many more. Check out the [full list of integrations](https://docs.sentry.io/platforms/python/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](https://docs.sentry.io/platforms/python/migration/1.x-to-2.x) for assistance.
+
+### From `raven-python`
-(If you want to create a new integration, have a look at the [Adding a new integration checklist](https://github.com/getsentry/sentry-python/blob/master/CONTRIBUTING.md#adding-a-new-integration).)
+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](https://docs.sentry.io/platforms/python/migration/raven-to-sentry-sdk/).
-See [the documentation](https://docs.sentry.io/platforms/python/integrations/) for an up-to-date list of libraries and frameworks we support. Here are some examples:
-- [Django](https://docs.sentry.io/platforms/python/integrations/django/)
-- [Flask](https://docs.sentry.io/platforms/python/integrations/flask/)
-- [FastAPI](https://docs.sentry.io/platforms/python/integrations/fastapi/)
-- [AIOHTTP](https://docs.sentry.io/platforms/python/integrations/aiohttp/)
-- [SQLAlchemy](https://docs.sentry.io/platforms/python/integrations/sqlalchemy/)
-- [asyncpg](https://docs.sentry.io/platforms/python/integrations/asyncpg/)
-- [Redis](https://docs.sentry.io/platforms/python/integrations/redis/)
-- [Celery](https://docs.sentry.io/platforms/python/integrations/celery/)
-- [Apache Airflow](https://docs.sentry.io/platforms/python/integrations/airflow/)
-- [Apache Spark](https://docs.sentry.io/platforms/python/integrations/pyspark/)
-- [asyncio](https://docs.sentry.io/platforms/python/integrations/asyncio/)
-- [Graphene](https://docs.sentry.io/platforms/python/integrations/graphene/)
-- [Logging](https://docs.sentry.io/platforms/python/integrations/logging/)
-- [Loguru](https://docs.sentry.io/platforms/python/integrations/loguru/)
-- [HTTPX](https://docs.sentry.io/platforms/python/integrations/httpx/)
-- [AWS Lambda](https://docs.sentry.io/platforms/python/integrations/aws-lambda/)
-- [Google Cloud Functions](https://docs.sentry.io/platforms/python/integrations/gcp-functions/)
+## 🙌 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.
-## Migrating
+For details on how to contribute, please read our [contribution guide](CONTRIBUTING.md) and explore the [open issues](https://github.com/getsentry/sentry-python/issues).
-### Migrating From `1.x` to `2.x`
-If you're on SDK version 1.x, we highly recommend updating to the 2.x major. To make the process easier we've prepared a [migration guide](https://docs.sentry.io/platforms/python/migration/) with the most common changes as well as a [detailed changelog](MIGRATION_GUIDE.md).
+## 🛟 Need Help?
-### Migrating From `raven-python`
+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](https://discord.com/invite/Ww9hbqr). There is a ton of great people there ready to help!
-The old `raven-python` client has entered maintenance mode and was moved [here](https://github.com/getsentry/raven-python).
-If you're using `raven-python`, we recommend you to migrate to this new SDK. You can find the benefits of migrating and how to do it in our [migration guide](https://docs.sentry.io/platforms/python/migration/).
+## 🔗 Resources
-## Contributing to the SDK
+Here are all resources to help you make the most of Sentry:
-Please refer to [CONTRIBUTING.md](CONTRIBUTING.md).
+- [Documentation](https://docs.sentry.io/platforms/python/) - Official documentation to get started.
+- [Discord](https://discord.com/invite/Ww9hbqr) - Join our Discord community.
+- [X/Twitter](https://x.com/intent/follow?screen_name=sentry) - Follow us on X (Twitter) for updates.
+- [Stack Overflow](https://stackoverflow.com/questions/tagged/sentry) - Questions and answers related to Sentry.
-## Getting Help/Support
+