tkipw 0.0.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tkipw/__init__.py +89 -0
- tkipw/app.py +708 -0
- tkipw/comm_backend.py +282 -0
- tkipw/display_mode.py +462 -0
- tkipw/extensions/__init__.py +19 -0
- tkipw/extensions/altair.py +104 -0
- tkipw/extensions/bokeh.py +192 -0
- tkipw/extensions/folium.py +73 -0
- tkipw/extensions/matplotlib.py +183 -0
- tkipw/extensions/pillow.py +73 -0
- tkipw/extensions/pyvista.py +185 -0
- tkipw/html/runtime.css +9 -0
- tkipw/html/runtime.js +259 -0
- tkipw/html_host.py +221 -0
- tkipw/jupyter.py +229 -0
- tkipw/manager.py +22 -0
- tkipw/output.py +397 -0
- tkipw/protocol.py +34 -0
- tkipw-0.0.1.dist-info/METADATA +330 -0
- tkipw-0.0.1.dist-info/RECORD +23 -0
- tkipw-0.0.1.dist-info/WHEEL +4 -0
- tkipw-0.0.1.dist-info/licenses/LICENSE +21 -0
- tkipw-0.0.1.dist-info/licenses/NOTICE +71 -0
tkipw/__init__.py
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"""tkipw — ipywidgets / anywidget runtime on tkwry."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from .app import App, Runtime
|
|
6
|
+
from .comm_backend import (
|
|
7
|
+
install_comm_backend,
|
|
8
|
+
uninstall_comm_backend,
|
|
9
|
+
)
|
|
10
|
+
from .display_mode import get_display_mode, set_display_mode
|
|
11
|
+
from .jupyter import (
|
|
12
|
+
JupyterExtension,
|
|
13
|
+
enable_extension,
|
|
14
|
+
get_extension,
|
|
15
|
+
install_jupyter_support,
|
|
16
|
+
register_extension,
|
|
17
|
+
uninstall_jupyter_support,
|
|
18
|
+
)
|
|
19
|
+
from .output import (
|
|
20
|
+
Output,
|
|
21
|
+
clear_output,
|
|
22
|
+
display,
|
|
23
|
+
display_error,
|
|
24
|
+
to_widget,
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
# Install as early as possible so widgets created after ``import tkipw``
|
|
28
|
+
# use TkwryComm instead of DummyComm.
|
|
29
|
+
install_comm_backend()
|
|
30
|
+
|
|
31
|
+
__all__ = [
|
|
32
|
+
"App",
|
|
33
|
+
"Runtime",
|
|
34
|
+
"Output",
|
|
35
|
+
"clear_output",
|
|
36
|
+
"display",
|
|
37
|
+
"display_error",
|
|
38
|
+
"to_widget",
|
|
39
|
+
"get_display_mode",
|
|
40
|
+
"set_display_mode",
|
|
41
|
+
"install_comm_backend",
|
|
42
|
+
"uninstall_comm_backend",
|
|
43
|
+
"JupyterExtension",
|
|
44
|
+
"register_extension",
|
|
45
|
+
"enable_extension",
|
|
46
|
+
"get_extension",
|
|
47
|
+
"install_jupyter_support",
|
|
48
|
+
"uninstall_jupyter_support",
|
|
49
|
+
"enable_matplotlib",
|
|
50
|
+
"matplotlib_inline",
|
|
51
|
+
"matplotlib_window",
|
|
52
|
+
"enable_pyvista",
|
|
53
|
+
"enable_pillow",
|
|
54
|
+
"enable_altair",
|
|
55
|
+
"enable_bokeh",
|
|
56
|
+
]
|
|
57
|
+
__version__ = "0.0.1"
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def __getattr__(name: str):
|
|
61
|
+
if name in ("enable_matplotlib", "matplotlib_inline", "matplotlib_window"):
|
|
62
|
+
from .extensions.matplotlib import (
|
|
63
|
+
enable_matplotlib,
|
|
64
|
+
matplotlib_inline,
|
|
65
|
+
matplotlib_window,
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
return {
|
|
69
|
+
"enable_matplotlib": enable_matplotlib,
|
|
70
|
+
"matplotlib_inline": matplotlib_inline,
|
|
71
|
+
"matplotlib_window": matplotlib_window,
|
|
72
|
+
}[name]
|
|
73
|
+
if name == "enable_pyvista":
|
|
74
|
+
from .extensions.pyvista import enable_pyvista
|
|
75
|
+
|
|
76
|
+
return enable_pyvista
|
|
77
|
+
if name == "enable_pillow":
|
|
78
|
+
from .extensions.pillow import enable_pillow
|
|
79
|
+
|
|
80
|
+
return enable_pillow
|
|
81
|
+
if name == "enable_altair":
|
|
82
|
+
from .extensions.altair import enable_altair
|
|
83
|
+
|
|
84
|
+
return enable_altair
|
|
85
|
+
if name == "enable_bokeh":
|
|
86
|
+
from .extensions.bokeh import enable_bokeh
|
|
87
|
+
|
|
88
|
+
return enable_bokeh
|
|
89
|
+
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|