$64 GRAYBYTE WORDPRESS FILE MANAGER $51

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 172.67.217.254 | ADMIN IP 216.73.216.180
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : mail

/opt/alt/python38/lib/python3.8/site-packages/sentry_sdk/

HOME
Current File : /opt/alt/python38/lib/python3.8/site-packages/sentry_sdk//api.py
import inspect
from contextlib import contextmanager

from sentry_sdk.hub import Hub
from sentry_sdk.scope import Scope


if False:
    from typing import Any
    from typing import Optional
    from typing import overload
    from typing import Callable
    from typing import Dict
    from contextlib import ContextManager
else:

    def overload(x):
        return x


__all__ = []


def public(f):
    __all__.append(f.__name__)
    return f


def hubmethod(f):
    f.__doc__ = "%s\n\n%s" % (
        "Alias for `Hub.%s`" % f.__name__,
        inspect.getdoc(getattr(Hub, f.__name__)),
    )
    return public(f)


@hubmethod
def capture_event(event, hint=None):
    # type: (Dict[str, Any], Dict[str, Any]) -> Optional[str]
    hub = Hub.current
    if hub is not None:
        return hub.capture_event(event, hint)
    return None


@hubmethod
def capture_message(message, level=None):
    # type: (str, Optional[Any]) -> Optional[str]
    hub = Hub.current
    if hub is not None:
        return hub.capture_message(message, level)
    return None


@hubmethod
def capture_exception(error=None):
    # type: (Optional[BaseException]) -> Optional[str]
    hub = Hub.current
    if hub is not None:
        return hub.capture_exception(error)
    return None


@hubmethod
def add_breadcrumb(crumb=None, hint=None, **kwargs):
    # type: (Dict[str, Any], Dict[str, Any], **Any) -> None
    hub = Hub.current
    if hub is not None:
        return hub.add_breadcrumb(crumb, hint, **kwargs)


@overload  # noqa
def configure_scope():
    # type: () -> ContextManager[Scope]
    pass


@overload  # noqa
def configure_scope(callback):
    # type: (Callable[[Scope], None]) -> None
    pass


@hubmethod  # noqa
def configure_scope(callback=None):
    hub = Hub.current
    if hub is not None:
        return hub.configure_scope(callback)
    elif callback is None:

        @contextmanager
        def inner():
            yield Scope()

        return inner()
    else:
        # returned if user provided callback
        return None


@overload  # noqa
def push_scope():
    # type: () -> ContextManager[Scope]
    pass


@overload  # noqa
def push_scope(callback):
    # type: (Callable[[Scope], None]) -> None
    pass


@hubmethod  # noqa
def push_scope(callback=None):
    hub = Hub.current
    if hub is not None:
        return hub.push_scope(callback)
    elif callback is None:

        @contextmanager
        def inner():
            yield Scope()

        return inner()
    else:
        # returned if user provided callback
        return None


@hubmethod
def flush(timeout=None, callback=None):
    hub = Hub.current
    if hub is not None:
        return hub.flush(timeout=timeout, callback=callback)


@hubmethod
def last_event_id():
    # type: () -> Optional[str]
    hub = Hub.current
    if hub is not None:
        return hub.last_event_id()
    return None


Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
4 Apr 2025 8.03 AM
root / linksafe
0755
__pycache__
--
21 Mar 2024 10.24 AM
root / linksafe
0755
integrations
--
21 Mar 2024 10.24 AM
root / linksafe
0755
__init__.py
1.403 KB
5 Apr 2019 11.15 PM
root / linksafe
0644
_compat.py
2.174 KB
5 Apr 2019 11.15 PM
root / linksafe
0644
api.py
2.816 KB
5 Apr 2019 11.15 PM
root / linksafe
0644
client.py
8.397 KB
5 Apr 2019 11.15 PM
root / linksafe
0644
consts.py
2.205 KB
5 Apr 2019 11.15 PM
root / linksafe
0644
debug.py
1.013 KB
5 Apr 2019 11.15 PM
root / linksafe
0644
hub.py
12.718 KB
5 Apr 2019 11.15 PM
root / linksafe
0644
scope.py
7.024 KB
5 Apr 2019 11.15 PM
root / linksafe
0644
transport.py
6.788 KB
5 Apr 2019 11.15 PM
root / linksafe
0644
utils.py
26.917 KB
5 Apr 2019 11.15 PM
root / linksafe
0644
worker.py
3.466 KB
5 Apr 2019 11.15 PM
root / linksafe
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF