You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

256 line
10 KiB

  1. Metadata-Version: 2.4
  2. Name: sentry-sdk
  3. Version: 2.34.1
  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: hello@sentry.io
  8. License: MIT
  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 :: 3
  18. Classifier: Programming Language :: Python :: 3.6
  19. Classifier: Programming Language :: Python :: 3.7
  20. Classifier: Programming Language :: Python :: 3.8
  21. Classifier: Programming Language :: Python :: 3.9
  22. Classifier: Programming Language :: Python :: 3.10
  23. Classifier: Programming Language :: Python :: 3.11
  24. Classifier: Programming Language :: Python :: 3.12
  25. Classifier: Programming Language :: Python :: 3.13
  26. Classifier: Topic :: Software Development :: Libraries :: Python Modules
  27. Requires-Python: >=3.6
  28. Description-Content-Type: text/markdown
  29. License-File: LICENSE
  30. Requires-Dist: urllib3>=1.26.11
  31. Requires-Dist: certifi
  32. Provides-Extra: aiohttp
  33. Requires-Dist: aiohttp>=3.5; extra == "aiohttp"
  34. Provides-Extra: anthropic
  35. Requires-Dist: anthropic>=0.16; extra == "anthropic"
  36. Provides-Extra: arq
  37. Requires-Dist: arq>=0.23; extra == "arq"
  38. Provides-Extra: asyncpg
  39. Requires-Dist: asyncpg>=0.23; extra == "asyncpg"
  40. Provides-Extra: beam
  41. Requires-Dist: apache-beam>=2.12; extra == "beam"
  42. Provides-Extra: bottle
  43. Requires-Dist: bottle>=0.12.13; extra == "bottle"
  44. Provides-Extra: celery
  45. Requires-Dist: celery>=3; extra == "celery"
  46. Provides-Extra: celery-redbeat
  47. Requires-Dist: celery-redbeat>=2; extra == "celery-redbeat"
  48. Provides-Extra: chalice
  49. Requires-Dist: chalice>=1.16.0; extra == "chalice"
  50. Provides-Extra: clickhouse-driver
  51. Requires-Dist: clickhouse-driver>=0.2.0; extra == "clickhouse-driver"
  52. Provides-Extra: django
  53. Requires-Dist: django>=1.8; extra == "django"
  54. Provides-Extra: falcon
  55. Requires-Dist: falcon>=1.4; extra == "falcon"
  56. Provides-Extra: fastapi
  57. Requires-Dist: fastapi>=0.79.0; extra == "fastapi"
  58. Provides-Extra: flask
  59. Requires-Dist: flask>=0.11; extra == "flask"
  60. Requires-Dist: blinker>=1.1; extra == "flask"
  61. Requires-Dist: markupsafe; extra == "flask"
  62. Provides-Extra: grpcio
  63. Requires-Dist: grpcio>=1.21.1; extra == "grpcio"
  64. Requires-Dist: protobuf>=3.8.0; extra == "grpcio"
  65. Provides-Extra: http2
  66. Requires-Dist: httpcore[http2]==1.*; extra == "http2"
  67. Provides-Extra: httpx
  68. Requires-Dist: httpx>=0.16.0; extra == "httpx"
  69. Provides-Extra: huey
  70. Requires-Dist: huey>=2; extra == "huey"
  71. Provides-Extra: huggingface-hub
  72. Requires-Dist: huggingface_hub>=0.22; extra == "huggingface-hub"
  73. Provides-Extra: langchain
  74. Requires-Dist: langchain>=0.0.210; extra == "langchain"
  75. Provides-Extra: launchdarkly
  76. Requires-Dist: launchdarkly-server-sdk>=9.8.0; extra == "launchdarkly"
  77. Provides-Extra: litestar
  78. Requires-Dist: litestar>=2.0.0; extra == "litestar"
  79. Provides-Extra: loguru
  80. Requires-Dist: loguru>=0.5; extra == "loguru"
  81. Provides-Extra: openai
  82. Requires-Dist: openai>=1.0.0; extra == "openai"
  83. Requires-Dist: tiktoken>=0.3.0; extra == "openai"
  84. Provides-Extra: openfeature
  85. Requires-Dist: openfeature-sdk>=0.7.1; extra == "openfeature"
  86. Provides-Extra: opentelemetry
  87. Requires-Dist: opentelemetry-distro>=0.35b0; extra == "opentelemetry"
  88. Provides-Extra: opentelemetry-experimental
  89. Requires-Dist: opentelemetry-distro; extra == "opentelemetry-experimental"
  90. Provides-Extra: pure-eval
  91. Requires-Dist: pure_eval; extra == "pure-eval"
  92. Requires-Dist: executing; extra == "pure-eval"
  93. Requires-Dist: asttokens; extra == "pure-eval"
  94. Provides-Extra: pymongo
  95. Requires-Dist: pymongo>=3.1; extra == "pymongo"
  96. Provides-Extra: pyspark
  97. Requires-Dist: pyspark>=2.4.4; extra == "pyspark"
  98. Provides-Extra: quart
  99. Requires-Dist: quart>=0.16.1; extra == "quart"
  100. Requires-Dist: blinker>=1.1; extra == "quart"
  101. Provides-Extra: rq
  102. Requires-Dist: rq>=0.6; extra == "rq"
  103. Provides-Extra: sanic
  104. Requires-Dist: sanic>=0.8; extra == "sanic"
  105. Provides-Extra: sqlalchemy
  106. Requires-Dist: sqlalchemy>=1.2; extra == "sqlalchemy"
  107. Provides-Extra: starlette
  108. Requires-Dist: starlette>=0.19.1; extra == "starlette"
  109. Provides-Extra: starlite
  110. Requires-Dist: starlite>=1.48; extra == "starlite"
  111. Provides-Extra: statsig
  112. Requires-Dist: statsig>=0.55.3; extra == "statsig"
  113. Provides-Extra: tornado
  114. Requires-Dist: tornado>=6; extra == "tornado"
  115. Provides-Extra: unleash
  116. Requires-Dist: UnleashClient>=6.0.1; extra == "unleash"
  117. Dynamic: author
  118. Dynamic: author-email
  119. Dynamic: classifier
  120. Dynamic: description
  121. Dynamic: description-content-type
  122. Dynamic: home-page
  123. Dynamic: license
  124. Dynamic: license-file
  125. Dynamic: project-url
  126. Dynamic: provides-extra
  127. Dynamic: requires-dist
  128. Dynamic: requires-python
  129. Dynamic: summary
  130. <a href="https://sentry.io/?utm_source=github&utm_medium=logo" target="_blank">
  131. <img src="https://sentry-brand.storage.googleapis.com/github-banners/github-sdk-python.png" alt="Sentry for Python">
  132. </a>
  133. <div align="center">
  134. _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
  135. [<kbd>**Check out our open positions**</kbd>](https://sentry.io/careers/)_.
  136. [![Discord](https://img.shields.io/discord/621778831602221064?logo=discord&labelColor=%20%235462eb&logoColor=%20%23f5f5f5&color=%20%235462eb)](https://discord.com/invite/Ww9hbqr)
  137. [![Twitter Follow](https://img.shields.io/twitter/follow/getsentry?label=@getsentry&style=social)](https://twitter.com/intent/follow?screen_name=getsentry)
  138. [![PyPi page link -- version](https://img.shields.io/pypi/v/sentry-sdk.svg)](https://pypi.python.org/pypi/sentry-sdk)
  139. <img src="https://img.shields.io/badge/python-3.7 | 3.8 | 3.9 | 3.10 | 3.11 | 3.12 | 3.13-blue.svg" alt="python">
  140. [![Build Status](https://github.com/getsentry/sentry-python/actions/workflows/ci.yml/badge.svg)](https://github.com/getsentry/sentry-python/actions/workflows/ci.yml)
  141. <br/>
  142. </div>
  143. # Official Sentry SDK for Python
  144. Welcome to the official Python SDK for **[Sentry](http://sentry.io/)**.
  145. ## 📦 Getting Started
  146. ### Prerequisites
  147. You need a Sentry [account](https://sentry.io/signup/) and [project](https://docs.sentry.io/product/projects/).
  148. ### Installation
  149. Getting Sentry into your project is straightforward. Just run this command in your terminal:
  150. ```bash
  151. pip install --upgrade sentry-sdk
  152. ```
  153. ### Basic Configuration
  154. Here's a quick configuration example to get Sentry up and running:
  155. ```python
  156. import sentry_sdk
  157. sentry_sdk.init(
  158. "https://12927b5f211046b575ee51fd8b1ac34f@o1.ingest.sentry.io/1", # Your DSN here
  159. # Set traces_sample_rate to 1.0 to capture 100%
  160. # of traces for performance monitoring.
  161. traces_sample_rate=1.0,
  162. )
  163. ```
  164. With this configuration, Sentry will monitor for exceptions and performance issues.
  165. ### Quick Usage Example
  166. To generate some events that will show up in Sentry, you can log messages or capture errors:
  167. ```python
  168. import sentry_sdk
  169. sentry_sdk.init(...) # same as above
  170. sentry_sdk.capture_message("Hello Sentry!") # You'll see this in your Sentry dashboard.
  171. raise ValueError("Oops, something went wrong!") # This will create an error event in Sentry.
  172. ```
  173. ## 📚 Documentation
  174. For more details on advanced usage, integrations, and customization, check out the full documentation on [https://docs.sentry.io](https://docs.sentry.io/).
  175. ## 🧩 Integrations
  176. 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.
  177. ## 🚧 Migrating Between Versions?
  178. ### From `1.x` to `2.x`
  179. 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.
  180. ### From `raven-python`
  181. 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/).
  182. ## 🙌 Want to Contribute?
  183. 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.
  184. 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).
  185. ## 🛟 Need Help?
  186. 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!
  187. ## 🔗 Resources
  188. Here are all resources to help you make the most of Sentry:
  189. - [Documentation](https://docs.sentry.io/platforms/python/) - Official documentation to get started.
  190. - [Discord](https://discord.com/invite/Ww9hbqr) - Join our Discord community.
  191. - [X/Twitter](https://twitter.com/intent/follow?screen_name=getsentry) - Follow us on X (Twitter) for updates.
  192. - [Stack Overflow](https://stackoverflow.com/questions/tagged/sentry) - Questions and answers related to Sentry.
  193. <a name="license"></a>
  194. ## 📃 License
  195. The SDK is open-source and available under the MIT license. Check out the [LICENSE](LICENSE) file for more information.
  196. ## 😘 Contributors
  197. Thanks to everyone who has helped improve the SDK!
  198. <a href="https://github.com/getsentry/sentry-python/graphs/contributors">
  199. <img src="https://contributors-img.web.app/image?repo=getsentry/sentry-python" />
  200. </a>