runtime
runtime
SERVER_PORT = 8050
module-attribute
HTTP port used by the local Dash server.
AppMeta
dataclass
Define application metadata.
Source code in runtime.py
13 14 15 16 17 18 19 | |
RuntimeContext
dataclass
Define runtime context for the current OS and execution mode.
Attributes:
| Name | Type | Description |
|---|---|---|
meta |
AppMeta
|
Application metadata. |
app_data_dir |
Path
|
Per-user application data directory. |
run_dir |
Path
|
Directory containing the executable or source entry point. |
is_frozen |
bool
|
True when running as a bundled executable (PyInstaller). |
net_backend |
str
|
Network connection backend name. |
net_backend_version |
str
|
Network backend version. |
Source code in runtime.py
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | |
geo_data_dir
property
Return the directory containing GeoIP databases.
ensure_app_data_dir(app_dir)
Create the application data directory and README.txt file when missing.
Source code in app_dirs.py
52 53 54 55 56 57 58 59 | |
ensure_native_app_data_dir(app_name=APP_NAME)
Return native app data directory and ensure it exists.
Source code in app_dirs.py
62 63 64 65 66 | |
_get_app_data_dir(meta)
Return application data directory for the current runtime.
Source code in runtime.py
50 51 52 53 54 55 56 57 58 | |
_get_server_host()
Return server bind host for the current runtime.
Source code in runtime.py
60 61 62 | |
_get_server_port()
Return server port for the current runtime.
Source code in runtime.py
64 65 66 | |
_detect_docker()
Return True when running in Docker.
Source code in runtime.py
68 69 70 | |
build_runtime(meta)
Build the runtime context for the current OS and execution mode.
Source code in runtime.py
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | |
_detect_network_backend()
Return network backend name and version.
Source code in runtime.py
97 98 99 100 101 102 103 104 105 106 | |