sentry-sdk


Namesentry-sdk JSON
Version 2.1.1 PyPI version JSON
download
home_pagehttps://github.com/getsentry/sentry-python
SummaryPython client for Sentry (https://sentry.io)
upload_time2024-05-06 12:02:29
maintainerNone
docs_urlNone
authorSentry Team and Contributors
requires_python>=3.6
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align="center">
  <a href="https://sentry.io/?utm_source=github&utm_medium=logo" target="_blank">
    <img src="https://sentry-brand.storage.googleapis.com/sentry-wordmark-dark-280x84.png" alt="Sentry" width="280" height="84">
  </a>
</p>

_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/)_

# Official Sentry SDK for Python

[![Build Status](https://github.com/getsentry/sentry-python/actions/workflows/ci.yml/badge.svg)](https://github.com/getsentry/sentry-python/actions/workflows/ci.yml)
[![PyPi page link -- version](https://img.shields.io/pypi/v/sentry-sdk.svg)](https://pypi.python.org/pypi/sentry-sdk)
[![Discord](https://img.shields.io/discord/621778831602221064)](https://discord.gg/cWnMQeA)

This is the official Python SDK for [Sentry](http://sentry.io/)

## Getting Started

### Install

```bash
pip install --upgrade sentry-sdk
```

### Configuration

```python
import sentry_sdk

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

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

### Usage

```python
from sentry_sdk import capture_message
capture_message("Hello World")  # Will create an event in Sentry.

raise ValueError()  # Will also create an 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

(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).)

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/)


## Migrating

### 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/1.x-to-2.x) with the most common changes as well as a [detailed changelog](MIGRATION_GUIDE.md).

### Migrating From `raven-python`

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/raven-to-sentry-sdk/).

## Contributing to the SDK

Please refer to [CONTRIBUTING.md](CONTRIBUTING.md).

## Getting Help/Support

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!

## Resources

- [![Documentation](https://img.shields.io/badge/documentation-sentry.io-green.svg)](https://docs.sentry.io/quickstart/)
- [![Forum](https://img.shields.io/badge/forum-sentry-green.svg)](https://forum.sentry.io/c/sdks)
- [![Discord](https://img.shields.io/discord/621778831602221064)](https://discord.gg/Ww9hbqr)
- [![Stack Overflow](https://img.shields.io/badge/stack%20overflow-sentry-green.svg)](http://stackoverflow.com/questions/tagged/sentry)
- [![Twitter Follow](https://img.shields.io/twitter/follow/getsentry?label=getsentry&style=social)](https://twitter.com/intent/follow?screen_name=getsentry)

## License

Licensed under the MIT license, see [`LICENSE`](LICENSE)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/getsentry/sentry-python",
    "name": "sentry-sdk",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": null,
    "author": "Sentry Team and Contributors",
    "author_email": "hello@sentry.io",
    "download_url": "https://files.pythonhosted.org/packages/76/81/3f0e14f35253c3d4fddb6e5ec190f654cd7fd2f19c23fbe0f6afd85b03b6/sentry_sdk-2.1.1.tar.gz",
    "platform": null,
    "description": "<p align=\"center\">\n  <a href=\"https://sentry.io/?utm_source=github&utm_medium=logo\" target=\"_blank\">\n    <img src=\"https://sentry-brand.storage.googleapis.com/sentry-wordmark-dark-280x84.png\" alt=\"Sentry\" width=\"280\" height=\"84\">\n  </a>\n</p>\n\n_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/)_\n\n# Official Sentry SDK for Python\n\n[![Build Status](https://github.com/getsentry/sentry-python/actions/workflows/ci.yml/badge.svg)](https://github.com/getsentry/sentry-python/actions/workflows/ci.yml)\n[![PyPi page link -- version](https://img.shields.io/pypi/v/sentry-sdk.svg)](https://pypi.python.org/pypi/sentry-sdk)\n[![Discord](https://img.shields.io/discord/621778831602221064)](https://discord.gg/cWnMQeA)\n\nThis is the official Python SDK for [Sentry](http://sentry.io/)\n\n## Getting Started\n\n### Install\n\n```bash\npip install --upgrade sentry-sdk\n```\n\n### Configuration\n\n```python\nimport sentry_sdk\n\nsentry_sdk.init(\n    \"https://12927b5f211046b575ee51fd8b1ac34f@o1.ingest.sentry.io/1\",\n\n    # Set traces_sample_rate to 1.0 to capture 100%\n    # of transactions for performance monitoring.\n    traces_sample_rate=1.0,\n)\n```\n\n### Usage\n\n```python\nfrom sentry_sdk import capture_message\ncapture_message(\"Hello World\")  # Will create an event in Sentry.\n\nraise ValueError()  # Will also create an event in Sentry.\n```\n\n- To learn more about how to use the SDK [refer to our docs](https://docs.sentry.io/platforms/python/).\n- Are you coming from `raven-python`? [Use this migration guide](https://docs.sentry.io/platforms/python/migration/).\n- To learn about internals use the [API Reference](https://getsentry.github.io/sentry-python/).\n\n## Integrations\n\n(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).)\n\nSee [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:\n\n- [Django](https://docs.sentry.io/platforms/python/integrations/django/)\n- [Flask](https://docs.sentry.io/platforms/python/integrations/flask/)\n- [FastAPI](https://docs.sentry.io/platforms/python/integrations/fastapi/)\n- [AIOHTTP](https://docs.sentry.io/platforms/python/integrations/aiohttp/)\n- [SQLAlchemy](https://docs.sentry.io/platforms/python/integrations/sqlalchemy/)\n- [asyncpg](https://docs.sentry.io/platforms/python/integrations/asyncpg/)\n- [Redis](https://docs.sentry.io/platforms/python/integrations/redis/)\n- [Celery](https://docs.sentry.io/platforms/python/integrations/celery/)\n- [Apache Airflow](https://docs.sentry.io/platforms/python/integrations/airflow/)\n- [Apache Spark](https://docs.sentry.io/platforms/python/integrations/pyspark/)\n- [asyncio](https://docs.sentry.io/platforms/python/integrations/asyncio/)\n- [Graphene](https://docs.sentry.io/platforms/python/integrations/graphene/)\n- [Logging](https://docs.sentry.io/platforms/python/integrations/logging/)\n- [Loguru](https://docs.sentry.io/platforms/python/integrations/loguru/)\n- [HTTPX](https://docs.sentry.io/platforms/python/integrations/httpx/)\n- [AWS Lambda](https://docs.sentry.io/platforms/python/integrations/aws-lambda/)\n- [Google Cloud Functions](https://docs.sentry.io/platforms/python/integrations/gcp-functions/)\n\n\n## Migrating\n\n### Migrating From `1.x` to `2.x`\n\nIf 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/1.x-to-2.x) with the most common changes as well as a [detailed changelog](MIGRATION_GUIDE.md).\n\n### Migrating From `raven-python`\n\nThe old `raven-python` client has entered maintenance mode and was moved [here](https://github.com/getsentry/raven-python).\n\nIf 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/raven-to-sentry-sdk/).\n\n## Contributing to the SDK\n\nPlease refer to [CONTRIBUTING.md](CONTRIBUTING.md).\n\n## Getting Help/Support\n\nIf 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!\n\n## Resources\n\n- [![Documentation](https://img.shields.io/badge/documentation-sentry.io-green.svg)](https://docs.sentry.io/quickstart/)\n- [![Forum](https://img.shields.io/badge/forum-sentry-green.svg)](https://forum.sentry.io/c/sdks)\n- [![Discord](https://img.shields.io/discord/621778831602221064)](https://discord.gg/Ww9hbqr)\n- [![Stack Overflow](https://img.shields.io/badge/stack%20overflow-sentry-green.svg)](http://stackoverflow.com/questions/tagged/sentry)\n- [![Twitter Follow](https://img.shields.io/twitter/follow/getsentry?label=getsentry&style=social)](https://twitter.com/intent/follow?screen_name=getsentry)\n\n## License\n\nLicensed under the MIT license, see [`LICENSE`](LICENSE)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Python client for Sentry (https://sentry.io)",
    "version": "2.1.1",
    "project_urls": {
        "Changelog": "https://github.com/getsentry/sentry-python/blob/master/CHANGELOG.md",
        "Documentation": "https://docs.sentry.io/platforms/python/",
        "Homepage": "https://github.com/getsentry/sentry-python"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cf58cfbed3fdc41891e9d2b45a5dbe706dcaf35429eb1446e30a504bb2ea9ea2",
                "md5": "9639f894850bf8d7abf6a629db1e1d13",
                "sha256": "99aeb78fb76771513bd3b2829d12613130152620768d00cd3e45ac00cb17950f"
            },
            "downloads": -1,
            "filename": "sentry_sdk-2.1.1-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9639f894850bf8d7abf6a629db1e1d13",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.6",
            "size": 277292,
            "upload_time": "2024-05-06T12:02:25",
            "upload_time_iso_8601": "2024-05-06T12:02:25.762349Z",
            "url": "https://files.pythonhosted.org/packages/cf/58/cfbed3fdc41891e9d2b45a5dbe706dcaf35429eb1446e30a504bb2ea9ea2/sentry_sdk-2.1.1-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "76813f0e14f35253c3d4fddb6e5ec190f654cd7fd2f19c23fbe0f6afd85b03b6",
                "md5": "d4e1ef6f759444ea405f96f42e209ed2",
                "sha256": "95d8c0bb41c8b0bc37ab202c2c4a295bb84398ee05f4cdce55051cd75b926ec1"
            },
            "downloads": -1,
            "filename": "sentry_sdk-2.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "d4e1ef6f759444ea405f96f42e209ed2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 262413,
            "upload_time": "2024-05-06T12:02:29",
            "upload_time_iso_8601": "2024-05-06T12:02:29.176723Z",
            "url": "https://files.pythonhosted.org/packages/76/81/3f0e14f35253c3d4fddb6e5ec190f654cd7fd2f19c23fbe0f6afd85b03b6/sentry_sdk-2.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-06 12:02:29",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "getsentry",
    "github_project": "sentry-python",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "sentry-sdk"
}
        
Elapsed time: 0.27195s