| 1 |
Metadata-Version: 2.1 |
| 2 |
Name: sentry-sdk |
| 3 |
Version: 1.14.0 |
| 4 |
Summary: Python client for Sentry (https://sentry.io) |
| 5 |
Home-page: https://github.com/getsentry/sentry-python |
| 6 |
Author: Sentry Team and Contributors |
| 7 |
Author-email: [email protected] |
| 8 |
License: BSD |
| 9 |
Project-URL: Documentation, https://docs.sentry.io/platforms/python/ |
| 10 |
Project-URL: Changelog, https://github.com/getsentry/sentry-python/blob/master/CHANGELOG.md |
| 11 |
Classifier: Development Status :: 5 - Production/Stable |
| 12 |
Classifier: Environment :: Web Environment |
| 13 |
Classifier: Intended Audience :: Developers |
| 14 |
Classifier: License :: OSI Approved :: BSD License |
| 15 |
Classifier: Operating System :: OS Independent |
| 16 |
Classifier: Programming Language :: Python |
| 17 |
Classifier: Programming Language :: Python :: 2 |
| 18 |
Classifier: Programming Language :: Python :: 2.7 |
| 19 |
Classifier: Programming Language :: Python :: 3 |
| 20 |
Classifier: Programming Language :: Python :: 3.4 |
| 21 |
Classifier: Programming Language :: Python :: 3.5 |
| 22 |
Classifier: Programming Language :: Python :: 3.6 |
| 23 |
Classifier: Programming Language :: Python :: 3.7 |
| 24 |
Classifier: Programming Language :: Python :: 3.8 |
| 25 |
Classifier: Programming Language :: Python :: 3.9 |
| 26 |
Classifier: Programming Language :: Python :: 3.10 |
| 27 |
Classifier: Topic :: Software Development :: Libraries :: Python Modules |
| 28 |
Description-Content-Type: text/markdown |
| 29 |
License-File: LICENSE |
| 30 |
Requires-Dist: certifi |
| 31 |
Requires-Dist: urllib3 (>=1.25.7) ; python_version <= "3.4" |
| 32 |
Requires-Dist: urllib3 (>=1.26.9) ; python_version == "3.5" |
| 33 |
Requires-Dist: urllib3 (>=1.26.11) ; python_version >= "3.6" |
| 34 |
Provides-Extra: aiohttp |
| 35 |
Requires-Dist: aiohttp (>=3.5) ; extra == 'aiohttp' |
| 36 |
Provides-Extra: beam |
| 37 |
Requires-Dist: apache-beam (>=2.12) ; extra == 'beam' |
| 38 |
Provides-Extra: bottle |
| 39 |
Requires-Dist: bottle (>=0.12.13) ; extra == 'bottle' |
| 40 |
Provides-Extra: celery |
| 41 |
Requires-Dist: celery (>=3) ; extra == 'celery' |
| 42 |
Provides-Extra: chalice |
| 43 |
Requires-Dist: chalice (>=1.16.0) ; extra == 'chalice' |
| 44 |
Provides-Extra: django |
| 45 |
Requires-Dist: django (>=1.8) ; extra == 'django' |
| 46 |
Provides-Extra: falcon |
| 47 |
Requires-Dist: falcon (>=1.4) ; extra == 'falcon' |
| 48 |
Provides-Extra: fastapi |
| 49 |
Requires-Dist: fastapi (>=0.79.0) ; extra == 'fastapi' |
| 50 |
Provides-Extra: flask |
| 51 |
Requires-Dist: flask (>=0.11) ; extra == 'flask' |
| 52 |
Requires-Dist: blinker (>=1.1) ; extra == 'flask' |
| 53 |
Provides-Extra: httpx |
| 54 |
Requires-Dist: httpx (>=0.16.0) ; extra == 'httpx' |
| 55 |
Provides-Extra: opentelemetry |
| 56 |
Requires-Dist: opentelemetry-distro (>=0.35b0) ; extra == 'opentelemetry' |
| 57 |
Provides-Extra: pure_eval |
| 58 |
Requires-Dist: pure-eval ; extra == 'pure_eval' |
| 59 |
Requires-Dist: executing ; extra == 'pure_eval' |
| 60 |
Requires-Dist: asttokens ; extra == 'pure_eval' |
| 61 |
Provides-Extra: pymongo |
| 62 |
Requires-Dist: pymongo (>=3.1) ; extra == 'pymongo' |
| 63 |
Provides-Extra: pyspark |
| 64 |
Requires-Dist: pyspark (>=2.4.4) ; extra == 'pyspark' |
| 65 |
Provides-Extra: quart |
| 66 |
Requires-Dist: quart (>=0.16.1) ; extra == 'quart' |
| 67 |
Requires-Dist: blinker (>=1.1) ; extra == 'quart' |
| 68 |
Provides-Extra: rq |
| 69 |
Requires-Dist: rq (>=0.6) ; extra == 'rq' |
| 70 |
Provides-Extra: sanic |
| 71 |
Requires-Dist: sanic (>=0.8) ; extra == 'sanic' |
| 72 |
Provides-Extra: sqlalchemy |
| 73 |
Requires-Dist: sqlalchemy (>=1.2) ; extra == 'sqlalchemy' |
| 74 |
Provides-Extra: starlette |
| 75 |
Requires-Dist: starlette (>=0.19.1) ; extra == 'starlette' |
| 76 |
Provides-Extra: starlite |
| 77 |
Requires-Dist: starlite (>=1.48) ; extra == 'starlite' |
| 78 |
Provides-Extra: tornado |
| 79 |
Requires-Dist: tornado (>=5) ; extra == 'tornado' |
| 80 |
|
| 81 |
<p align="center"> |
| 82 |
<a href="https://sentry.io/?utm_source=github&utm_medium=logo" target="_blank"> |
| 83 |
<img src="https://sentry-brand.storage.googleapis.com/sentry-wordmark-dark-280x84.png" alt="Sentry" width="280" height="84"> |
| 84 |
</a> |
| 85 |
</p> |
| 86 |
|
| 87 |
_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 [<kbd>**Check out our open positions**</kbd>](https://sentry.io/careers/)_ |
| 88 |
|
| 89 |
# Official Sentry SDK for Python |
| 90 |
|
| 91 |
[](https://github.com/getsentry/sentry-python/actions/workflows/ci.yml) |
| 92 |
[](https://pypi.python.org/pypi/sentry-sdk) |
| 93 |
[](https://discord.gg/cWnMQeA) |
| 94 |
|
| 95 |
This is the official Python SDK for [Sentry](http://sentry.io/) |
| 96 |
|
| 97 |
--- |
| 98 |
|
| 99 |
## Getting Started |
| 100 |
|
| 101 |
### Install |
| 102 |
|
| 103 |
```bash |
| 104 |
pip install --upgrade sentry-sdk |
| 105 |
``` |
| 106 |
|
| 107 |
### Configuration |
| 108 |
|
| 109 |
```python |
| 110 |
import sentry_sdk |
| 111 |
|
| 112 |
sentry_sdk.init( |
| 113 |
"https://[email protected]/1", |
| 114 |
|
| 115 |
# Set traces_sample_rate to 1.0 to capture 100% |
| 116 |
# of transactions for performance monitoring. |
| 117 |
# We recommend adjusting this value in production. |
| 118 |
traces_sample_rate=1.0, |
| 119 |
) |
| 120 |
``` |
| 121 |
|
| 122 |
### Usage |
| 123 |
|
| 124 |
```python |
| 125 |
from sentry_sdk import capture_message |
| 126 |
capture_message("Hello World") # Will create an event in Sentry. |
| 127 |
|
| 128 |
raise ValueError() # Will also create an event in Sentry. |
| 129 |
``` |
| 130 |
|
| 131 |
- To learn more about how to use the SDK [refer to our docs](https://docs.sentry.io/platforms/python/) |
| 132 |
- Are you coming from raven-python? [Use this migration guide](https://docs.sentry.io/platforms/python/migration/) |
| 133 |
- To learn about internals use the [API Reference](https://getsentry.github.io/sentry-python/) |
| 134 |
|
| 135 |
## Integrations |
| 136 |
|
| 137 |
(If you want to create a new integration have a look at the [Adding a new integration checklist](CONTRIBUTING.md#adding-a-new-integration-checklist).) |
| 138 |
|
| 139 |
- [Django](https://docs.sentry.io/platforms/python/guides/django/) |
| 140 |
- [Flask](https://docs.sentry.io/platforms/python/guides/flask/) |
| 141 |
- [Bottle](https://docs.sentry.io/platforms/python/guides/bottle/) |
| 142 |
- [AWS Lambda](https://docs.sentry.io/platforms/python/guides/aws-lambda/) |
| 143 |
- [Google Cloud Functions](https://docs.sentry.io/platforms/python/guides/gcp-functions/) |
| 144 |
- [WSGI](https://docs.sentry.io/platforms/python/guides/wsgi/) |
| 145 |
- [ASGI](https://docs.sentry.io/platforms/python/guides/asgi/) |
| 146 |
- [Starlette](https://docs.sentry.io/platforms/python/guides/starlette/) |
| 147 |
- [FastAPI](https://docs.sentry.io/platforms/python/guides/fastapi/) |
| 148 |
- [AIOHTTP](https://docs.sentry.io/platforms/python/guides/aiohttp/) |
| 149 |
- [RQ (Redis Queue)](https://docs.sentry.io/platforms/python/guides/rq/) |
| 150 |
- [Celery](https://docs.sentry.io/platforms/python/guides/celery/) |
| 151 |
- [Chalice](https://docs.sentry.io/platforms/python/guides/chalice/) |
| 152 |
- [Falcon](https://docs.sentry.io/platforms/python/guides/falcon/) |
| 153 |
- [Quart](https://docs.sentry.io/platforms/python/guides/quart/) |
| 154 |
- [Sanic](https://docs.sentry.io/platforms/python/guides/sanic/) |
| 155 |
- [Tornado](https://docs.sentry.io/platforms/python/guides/tornado/) |
| 156 |
- [Tryton](https://docs.sentry.io/platforms/python/guides/tryton/) |
| 157 |
- [Pyramid](https://docs.sentry.io/platforms/python/guides/pyramid/) |
| 158 |
- [Logging](https://docs.sentry.io/platforms/python/guides/logging/) |
| 159 |
- [Apache Airflow](https://docs.sentry.io/platforms/python/guides/airflow/) |
| 160 |
- [Apache Beam](https://docs.sentry.io/platforms/python/guides/beam/) |
| 161 |
- [Apache Spark](https://docs.sentry.io/platforms/python/guides/pyspark/) |
| 162 |
|
| 163 |
## Migrate From sentry-raven |
| 164 |
|
| 165 |
The old `raven-python` client has entered maintenance mode and was moved [here](https://github.com/getsentry/raven-python). |
| 166 |
|
| 167 |
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/). |
| 168 |
|
| 169 |
## Contributing to the SDK |
| 170 |
|
| 171 |
Please refer to [CONTRIBUTING.md](CONTRIBUTING.md). |
| 172 |
|
| 173 |
## Getting help/support |
| 174 |
|
| 175 |
If you need help setting up or configuring the Python SDK (or anything else in the Sentry universe) please head over to the [Sentry Community on Discord](https://discord.com/invite/Ww9hbqr). There is a ton of great people in our Discord community ready to help you! |
| 176 |
|
| 177 |
## Resources |
| 178 |
|
| 179 |
- [](https://docs.sentry.io/quickstart/) |
| 180 |
- [](https://forum.sentry.io/c/sdks) |
| 181 |
- [](https://discord.gg/Ww9hbqr) |
| 182 |
- [](http://stackoverflow.com/questions/tagged/sentry) |
| 183 |
- [](https://twitter.com/intent/follow?screen_name=getsentry) |
| 184 |
|
| 185 |
## License |
| 186 |
|
| 187 |
Licensed under the BSD license, see [`LICENSE`](LICENSE) |