MCPcopy
hub / github.com/SwanHubX/SwanLab / get

Function get

swanlab/sdk/internal/probe_python/environment/runtime.py:18–30  ·  view source on GitHub ↗

获取运行时信息快照

()

Source from the content-addressed store, hash-verified

16
17
18def get() -> RuntimeSnapshot:
19 """获取运行时信息快照"""
20 return RuntimeSnapshot(
21 os=get_os(),
22 os_pretty=get_os_pretty(),
23 hostname=get_hostname(),
24 pid=get_pid(),
25 cwd=get_cwd(),
26 python_version=get_python_version(),
27 python_verbose=get_python_verbose(),
28 python_executable=get_python_executable(),
29 command=get_command(),
30 )
31
32
33@safe.decorator(level="debug", message="Failed to get runtime os")

Callers

nothing calls this directly

Calls 10

RuntimeSnapshotClass · 0.90
get_osFunction · 0.85
get_os_prettyFunction · 0.85
get_hostnameFunction · 0.85
get_pidFunction · 0.85
get_cwdFunction · 0.85
get_python_versionFunction · 0.85
get_python_verboseFunction · 0.85
get_python_executableFunction · 0.85
get_commandFunction · 0.85

Tested by

no test coverage detected