Skip to main content

Python SDK for sending error and event reports to the Artim Stacktrace backend.

Project description

stacktrace-sdk-python

Python SDK for the Artim Stacktrace backend. This package provides basic error reporting and event capture utilities similar to the existing React SDK.

Usage

from bug_sdk_python import ArtimStacktrace

ArtimStacktrace.init(
    api_key="your-api-key",
    project_id="your-project-id",
    environment="production",
    release="1.0.0",
)

ArtimStacktrace.capture_message("Something went wrong", level="warn")

try:
    1 / 0
except Exception as error:
    ArtimStacktrace.capture_exception(error)

ArtimStacktrace.set_user({"id": "123", "email": "user@example.com"})

# Or identify by callback
ArtimStacktrace.identify(lambda: {"id": "123", "email": "user@example.com"})

Features

  • init sets API key, project id, environment, release, and backend endpoint
  • capture_exception sends exception details and stacktrace
  • capture_message sends simple event messages
  • set_user and identify attach user context to events
  • default backend endpoint: https://stacktrace-backend.artim-industries.com/api/events

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

stacktrace_sdk_python-0.1.0-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file stacktrace_sdk_python-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for stacktrace_sdk_python-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5be22f80167d93c955e0fe88e50ec0db922200fbec18592b93d922d13ac36663
MD5 909ef40d385af208472f190b745aa81d
BLAKE2b-256 e2b2c3a2ce28bce4550b62417ebf53c3d6f42c726cf942fabf07fdd9bf716466

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page