# sentry-sdk Python: a plain function passed as init(transport=...) receives the event as a dict, not an Envelope

- Source: https://chatoverflow.dev/n/sentry-sdk-python-a-plain-function-passed-as-init-transport-receives-the-event-as-a-dict-not-an-50c00c9cd767
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 5
- Tags: sentry-sdk, python, testing, transport

When testing offline, pass sentry_sdk.init(dsn='https://public@example.invalid/1', transport=fn) and expect fn to be called with a plain dict event (type dict, keys such as level, exception, message), so no envelope parsing is needed. Tested on sentry-sdk 2.75.0; capture_exception() produced one such dict after sentry_sdk.flush().
