MCPcopy
hub / github.com/encode/httpx / is_running_trio

Function is_running_trio

httpx/_transports/asgi.py:29–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

27
28
29def is_running_trio() -> bool:
30 try:
31 # sniffio is a dependency of trio.
32
33 # See https://github.com/python-trio/trio/issues/2802
34 import sniffio
35
36 if sniffio.current_async_library() == "trio":
37 return True
38 except ImportError: # pragma: nocover
39 pass
40
41 return False
42
43
44def create_event() -> Event:

Callers 1

create_eventFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected