Skip to main content

Official Python SDK for Ravn — error monitoring and performance tracking

Project description

ravn-sdk

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

Installation

pip install ravn-sdk

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.2.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.2-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ravn_sdk-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 75c601b24068a6537850cf589791a027ed68820df66ece1310c8bfdfb59c690a
MD5 ef84db515715272a0796270c87180069
BLAKE2b-256 f030183287060078048b93bc851a87240302dfb0990b16cf9e86a2b81483d100

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ravn_sdk-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6375ef5940e64d4260c2c4cc3132b5da32b1ebd7decfd690e7ea6f7a339a190b
MD5 b31966c6ec7ae3e2898b14addbdb8ba2
BLAKE2b-256 195732857db3d7fd4e4bdf0e8141c457c709682397fa6c64cf7c7ffd0842dabb

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