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

Uploaded Python 3

File details

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

File metadata

  • Download URL: ravn_sdk-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 7399bca1d4825a1ad94b6a8dc879e99bde10e3bf5c6225cdb1e121a1c55a4d25
MD5 86f25286fdab3d05b00eef15d12103c5
BLAKE2b-256 20a42fe19a009f7819504112ce604513f3d83be88676fae3661f27775d7be749

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ravn_sdk-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c45d9b38698658d1040ff78925bdffa076fa57456bf1932163693129c23e1b80
MD5 fc3073226e4666d4b259e9f232a38c88
BLAKE2b-256 89adc1cd2dd4b1dd87e2ffa5649e2f377ca643d295708cecd4acb015913cf7a1

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