Skip to main content

Official Python SDK for Ravn — error monitoring and performance tracking

Project description

ravn

The official Python SDK for Ravn — lightweight error monitoring and performance tracking for Python applications.

Installation

pip install ravn

Quick Start

import ravn

ravn.init(api_key="your_api_key_here")

That's it. Ravn will now automatically capture all unhandled exceptions and report them to your dashboard.

Features

Automatic Exception Capture

After calling ravn.init(), any unhandled exception is automatically sent to Ravn — no try/except needed.

Manual Exception Capture

try:
    risky_operation()
except Exception as e:
    ravn.capture_exception(e, metadata={"user_id": 42})

Log Messages

ravn.capture_message("Payment processed", level="info", metadata={"amount": 99.99})

Supported levels: info, warning, error.

Performance Monitoring

@ravn.measure
def slow_database_query():
    ...

Functions decorated with @ravn.measure will automatically send a warning event to Ravn if they exceed slow_threshold_ms (default: 1000ms).

Configuration

ravn.init(
    api_key="your_api_key_here",
    api_url="https://app.getravn.com/api/v1/ingest",  # optional override
    slow_threshold_ms=500,  # warn if functions take longer than 500ms
)

Requirements

  • Python >= 3.8
  • requests >= 2.28

License

MIT

Project details


Download files

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

Source Distribution

ravn_sdk-0.1.0.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

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

ravn_sdk-0.1.0-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file ravn_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: ravn_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.13

File hashes

Hashes for ravn_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fd0bbc9ed3f3d3f42a98d54ec362af26ae674e288e0b67258c0fa6ad41072e1d
MD5 a758d5439ac1266d085a8c541042d640
BLAKE2b-256 c1f66c66d94df21760c67910aacfcfc7c3dbe7d2d38d2142621db39682350f73

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ravn_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.13

File hashes

Hashes for ravn_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cbef3d34bfa670d12ba539d91bbbb71d9f48e288490dea2b41a6ba694eb13d69
MD5 92eba7b7d6af4bfd1c0c5f66dbcbbc49
BLAKE2b-256 974f9dc2ae4b31a996f69f0850647f36bbae862efca65de3b6ead02ef304f4de

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