Problem Statement
Was wondering by the Event type was hidden in a private module _types, I am writing my before_send function and because I am a good pythonista I wanted to type it :)
The type was added in #2753 but maybe it didn't occur to them to add it then?
The same would probably apply to a lot of other types the user might need (hint etc...)
Here is how I currently do it, which is fine, but it doesn't encourage typing
import sentry_sdk
from sentry_sdk._types import Event, Hint
def before_send(event: Event, hint: Hint) -> Event:
# do some stuff
...
return event
sentry_sdk.init(
dsn="***",
before_send=before_send
)
Solution Brainstorm
Add to init? change submodule to public, typing or types?
Problem Statement
Was wondering by the
Eventtype was hidden in a private module_types, I am writing mybefore_sendfunction and because I am a good pythonista I wanted to type it :)The type was added in #2753 but maybe it didn't occur to them to add it then?
The same would probably apply to a lot of other types the user might need (
hintetc...)Here is how I currently do it, which is fine, but it doesn't encourage typing
Solution Brainstorm
Add to init? change submodule to public,
typingortypes?