dasha-framework 0.0.1__tar.gz

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.
Files changed (194) hide show
  1. dasha_framework-0.0.1/LICENSE +201 -0
  2. dasha_framework-0.0.1/PKG-INFO +346 -0
  3. dasha_framework-0.0.1/README.md +302 -0
  4. dasha_framework-0.0.1/pyproject.toml +124 -0
  5. dasha_framework-0.0.1/setup.cfg +4 -0
  6. dasha_framework-0.0.1/src/dasha/__init__.py +9 -0
  7. dasha_framework-0.0.1/src/dasha/__main__.py +534 -0
  8. dasha_framework-0.0.1/src/dasha/animation.py +90 -0
  9. dasha_framework-0.0.1/src/dasha/application.py +276 -0
  10. dasha_framework-0.0.1/src/dasha/border.py +34 -0
  11. dasha_framework-0.0.1/src/dasha/canvas.py +331 -0
  12. dasha_framework-0.0.1/src/dasha/client.py +642 -0
  13. dasha_framework-0.0.1/src/dasha/clipboard.py +94 -0
  14. dasha_framework-0.0.1/src/dasha/config.py +89 -0
  15. dasha_framework-0.0.1/src/dasha/desktop.py +58 -0
  16. dasha_framework-0.0.1/src/dasha/dialog.py +601 -0
  17. dasha_framework-0.0.1/src/dasha/events.py +471 -0
  18. dasha_framework-0.0.1/src/dasha/filedialog.py +323 -0
  19. dasha_framework-0.0.1/src/dasha/help.py +900 -0
  20. dasha_framework-0.0.1/src/dasha/helppages/applications.md +25 -0
  21. dasha_framework-0.0.1/src/dasha/helppages/index.md +20 -0
  22. dasha_framework-0.0.1/src/dasha/helppages/keyboard.md +45 -0
  23. dasha_framework-0.0.1/src/dasha/helppages/menus.md +32 -0
  24. dasha_framework-0.0.1/src/dasha/helppages/running.md +18 -0
  25. dasha_framework-0.0.1/src/dasha/helppages/settings.md +25 -0
  26. dasha_framework-0.0.1/src/dasha/helppages/windows.md +36 -0
  27. dasha_framework-0.0.1/src/dasha/host.py +120 -0
  28. dasha_framework-0.0.1/src/dasha/hosting.py +1081 -0
  29. dasha_framework-0.0.1/src/dasha/inbox.py +122 -0
  30. dasha_framework-0.0.1/src/dasha/install.py +369 -0
  31. dasha_framework-0.0.1/src/dasha/keytest.py +86 -0
  32. dasha_framework-0.0.1/src/dasha/logs.py +104 -0
  33. dasha_framework-0.0.1/src/dasha/manager.py +2468 -0
  34. dasha_framework-0.0.1/src/dasha/markdown.py +1173 -0
  35. dasha_framework-0.0.1/src/dasha/menu.py +701 -0
  36. dasha_framework-0.0.1/src/dasha/printing.py +42 -0
  37. dasha_framework-0.0.1/src/dasha/processes.py +293 -0
  38. dasha_framework-0.0.1/src/dasha/protocol.py +335 -0
  39. dasha_framework-0.0.1/src/dasha/pseudoterminal/__init__.py +43 -0
  40. dasha_framework-0.0.1/src/dasha/pseudoterminal/_posix.py +133 -0
  41. dasha_framework-0.0.1/src/dasha/pseudoterminal/_windows.py +352 -0
  42. dasha_framework-0.0.1/src/dasha/pseudoterminal/base.py +151 -0
  43. dasha_framework-0.0.1/src/dasha/py.typed +0 -0
  44. dasha_framework-0.0.1/src/dasha/recovery.py +239 -0
  45. dasha_framework-0.0.1/src/dasha/registry.py +475 -0
  46. dasha_framework-0.0.1/src/dasha/remote.py +284 -0
  47. dasha_framework-0.0.1/src/dasha/rundialog.py +342 -0
  48. dasha_framework-0.0.1/src/dasha/scrollbar.py +193 -0
  49. dasha_framework-0.0.1/src/dasha/settings/__init__.py +326 -0
  50. dasha_framework-0.0.1/src/dasha/settings/appearance.py +353 -0
  51. dasha_framework-0.0.1/src/dasha/settings/applications.py +165 -0
  52. dasha_framework-0.0.1/src/dasha/settings/colours.py +94 -0
  53. dasha_framework-0.0.1/src/dasha/settings/keys.py +225 -0
  54. dasha_framework-0.0.1/src/dasha/settings/lists.py +11 -0
  55. dasha_framework-0.0.1/src/dasha/shell.py +118 -0
  56. dasha_framework-0.0.1/src/dasha/shortcuts.py +536 -0
  57. dasha_framework-0.0.1/src/dasha/statusbar.py +111 -0
  58. dasha_framework-0.0.1/src/dasha/style.py +256 -0
  59. dasha_framework-0.0.1/src/dasha/terminal/__init__.py +236 -0
  60. dasha_framework-0.0.1/src/dasha/terminal/_posix.py +130 -0
  61. dasha_framework-0.0.1/src/dasha/terminal/_winbuffer.py +264 -0
  62. dasha_framework-0.0.1/src/dasha/terminal/_windows.py +349 -0
  63. dasha_framework-0.0.1/src/dasha/terminal/ansi.py +46 -0
  64. dasha_framework-0.0.1/src/dasha/theme.py +749 -0
  65. dasha_framework-0.0.1/src/dasha/vt.py +1216 -0
  66. dasha_framework-0.0.1/src/dasha/widgets/__init__.py +90 -0
  67. dasha_framework-0.0.1/src/dasha/widgets/autocomplete.py +153 -0
  68. dasha_framework-0.0.1/src/dasha/widgets/base.py +298 -0
  69. dasha_framework-0.0.1/src/dasha/widgets/button.py +224 -0
  70. dasha_framework-0.0.1/src/dasha/widgets/checkbox.py +52 -0
  71. dasha_framework-0.0.1/src/dasha/widgets/cluster.py +357 -0
  72. dasha_framework-0.0.1/src/dasha/widgets/collapsible.py +224 -0
  73. dasha_framework-0.0.1/src/dasha/widgets/combobox.py +157 -0
  74. dasha_framework-0.0.1/src/dasha/widgets/container.py +182 -0
  75. dasha_framework-0.0.1/src/dasha/widgets/editing.py +195 -0
  76. dasha_framework-0.0.1/src/dasha/widgets/groupbox.py +126 -0
  77. dasha_framework-0.0.1/src/dasha/widgets/label.py +106 -0
  78. dasha_framework-0.0.1/src/dasha/widgets/listbox.py +535 -0
  79. dasha_framework-0.0.1/src/dasha/widgets/paragraph.py +265 -0
  80. dasha_framework-0.0.1/src/dasha/widgets/password.py +60 -0
  81. dasha_framework-0.0.1/src/dasha/widgets/progressbar.py +196 -0
  82. dasha_framework-0.0.1/src/dasha/widgets/radiobutton.py +61 -0
  83. dasha_framework-0.0.1/src/dasha/widgets/scrollbar.py +157 -0
  84. dasha_framework-0.0.1/src/dasha/widgets/slider.py +196 -0
  85. dasha_framework-0.0.1/src/dasha/widgets/spinbox.py +237 -0
  86. dasha_framework-0.0.1/src/dasha/widgets/splitter.py +274 -0
  87. dasha_framework-0.0.1/src/dasha/widgets/switch.py +190 -0
  88. dasha_framework-0.0.1/src/dasha/widgets/table.py +413 -0
  89. dasha_framework-0.0.1/src/dasha/widgets/tabs.py +291 -0
  90. dasha_framework-0.0.1/src/dasha/widgets/terminalview.py +475 -0
  91. dasha_framework-0.0.1/src/dasha/widgets/textarea.py +990 -0
  92. dasha_framework-0.0.1/src/dasha/widgets/textbox.py +591 -0
  93. dasha_framework-0.0.1/src/dasha/widgets/tree.py +443 -0
  94. dasha_framework-0.0.1/src/dasha/window.py +992 -0
  95. dasha_framework-0.0.1/src/dasha/windowmenu.py +165 -0
  96. dasha_framework-0.0.1/src/dasha_framework.egg-info/PKG-INFO +346 -0
  97. dasha_framework-0.0.1/src/dasha_framework.egg-info/SOURCES.txt +192 -0
  98. dasha_framework-0.0.1/src/dasha_framework.egg-info/dependency_links.txt +1 -0
  99. dasha_framework-0.0.1/src/dasha_framework.egg-info/entry_points.txt +3 -0
  100. dasha_framework-0.0.1/src/dasha_framework.egg-info/requires.txt +15 -0
  101. dasha_framework-0.0.1/src/dasha_framework.egg-info/top_level.txt +1 -0
  102. dasha_framework-0.0.1/tests/test_alignment.py +81 -0
  103. dasha_framework-0.0.1/tests/test_animation.py +399 -0
  104. dasha_framework-0.0.1/tests/test_application.py +674 -0
  105. dasha_framework-0.0.1/tests/test_atomic_writes.py +135 -0
  106. dasha_framework-0.0.1/tests/test_autocomplete.py +163 -0
  107. dasha_framework-0.0.1/tests/test_canvas.py +126 -0
  108. dasha_framework-0.0.1/tests/test_client.py +323 -0
  109. dasha_framework-0.0.1/tests/test_clipboard.py +311 -0
  110. dasha_framework-0.0.1/tests/test_clusters.py +354 -0
  111. dasha_framework-0.0.1/tests/test_collapsible.py +227 -0
  112. dasha_framework-0.0.1/tests/test_combobox.py +154 -0
  113. dasha_framework-0.0.1/tests/test_command_line.py +291 -0
  114. dasha_framework-0.0.1/tests/test_command_prompt.py +271 -0
  115. dasha_framework-0.0.1/tests/test_container.py +103 -0
  116. dasha_framework-0.0.1/tests/test_context_menu.py +353 -0
  117. dasha_framework-0.0.1/tests/test_crash_restore.py +193 -0
  118. dasha_framework-0.0.1/tests/test_desktop.py +70 -0
  119. dasha_framework-0.0.1/tests/test_dialog.py +225 -0
  120. dasha_framework-0.0.1/tests/test_editing.py +328 -0
  121. dasha_framework-0.0.1/tests/test_escape_injection.py +199 -0
  122. dasha_framework-0.0.1/tests/test_escape_timeout.py +65 -0
  123. dasha_framework-0.0.1/tests/test_events.py +277 -0
  124. dasha_framework-0.0.1/tests/test_filedialog.py +237 -0
  125. dasha_framework-0.0.1/tests/test_footer.py +157 -0
  126. dasha_framework-0.0.1/tests/test_frozen.py +101 -0
  127. dasha_framework-0.0.1/tests/test_fuzz.py +373 -0
  128. dasha_framework-0.0.1/tests/test_groupbox.py +104 -0
  129. dasha_framework-0.0.1/tests/test_grow.py +100 -0
  130. dasha_framework-0.0.1/tests/test_help.py +1453 -0
  131. dasha_framework-0.0.1/tests/test_hosting.py +920 -0
  132. dasha_framework-0.0.1/tests/test_inbox.py +183 -0
  133. dasha_framework-0.0.1/tests/test_inert_menus.py +159 -0
  134. dasha_framework-0.0.1/tests/test_install.py +537 -0
  135. dasha_framework-0.0.1/tests/test_key_hints.py +199 -0
  136. dasha_framework-0.0.1/tests/test_key_release.py +145 -0
  137. dasha_framework-0.0.1/tests/test_keyboard_adjust.py +252 -0
  138. dasha_framework-0.0.1/tests/test_large_text.py +124 -0
  139. dasha_framework-0.0.1/tests/test_line_numbers.py +158 -0
  140. dasha_framework-0.0.1/tests/test_listbox.py +359 -0
  141. dasha_framework-0.0.1/tests/test_loading.py +550 -0
  142. dasha_framework-0.0.1/tests/test_manager.py +474 -0
  143. dasha_framework-0.0.1/tests/test_markdown.py +490 -0
  144. dasha_framework-0.0.1/tests/test_menu.py +305 -0
  145. dasha_framework-0.0.1/tests/test_package.py +105 -0
  146. dasha_framework-0.0.1/tests/test_paragraph.py +153 -0
  147. dasha_framework-0.0.1/tests/test_password.py +71 -0
  148. dasha_framework-0.0.1/tests/test_processes.py +264 -0
  149. dasha_framework-0.0.1/tests/test_progressbar.py +115 -0
  150. dasha_framework-0.0.1/tests/test_pseudoterminal.py +177 -0
  151. dasha_framework-0.0.1/tests/test_recovery.py +440 -0
  152. dasha_framework-0.0.1/tests/test_registry.py +243 -0
  153. dasha_framework-0.0.1/tests/test_repeat_and_clicks.py +192 -0
  154. dasha_framework-0.0.1/tests/test_resize.py +179 -0
  155. dasha_framework-0.0.1/tests/test_rgb.py +245 -0
  156. dasha_framework-0.0.1/tests/test_robustness.py +435 -0
  157. dasha_framework-0.0.1/tests/test_rundialog.py +271 -0
  158. dasha_framework-0.0.1/tests/test_scroll.py +347 -0
  159. dasha_framework-0.0.1/tests/test_security.py +513 -0
  160. dasha_framework-0.0.1/tests/test_settings.py +611 -0
  161. dasha_framework-0.0.1/tests/test_shadow.py +218 -0
  162. dasha_framework-0.0.1/tests/test_shell.py +153 -0
  163. dasha_framework-0.0.1/tests/test_shortcuts.py +261 -0
  164. dasha_framework-0.0.1/tests/test_show_mouse.py +148 -0
  165. dasha_framework-0.0.1/tests/test_slider.py +93 -0
  166. dasha_framework-0.0.1/tests/test_spinbox.py +198 -0
  167. dasha_framework-0.0.1/tests/test_splitter.py +185 -0
  168. dasha_framework-0.0.1/tests/test_statusbar.py +414 -0
  169. dasha_framework-0.0.1/tests/test_submenus.py +255 -0
  170. dasha_framework-0.0.1/tests/test_switch.py +140 -0
  171. dasha_framework-0.0.1/tests/test_table.py +191 -0
  172. dasha_framework-0.0.1/tests/test_tabs.py +155 -0
  173. dasha_framework-0.0.1/tests/test_terminal.py +211 -0
  174. dasha_framework-0.0.1/tests/test_terminalview.py +457 -0
  175. dasha_framework-0.0.1/tests/test_textarea.py +320 -0
  176. dasha_framework-0.0.1/tests/test_textbox.py +603 -0
  177. dasha_framework-0.0.1/tests/test_theme.py +525 -0
  178. dasha_framework-0.0.1/tests/test_theme_switching.py +341 -0
  179. dasha_framework-0.0.1/tests/test_titles_and_system_menu.py +89 -0
  180. dasha_framework-0.0.1/tests/test_tree.py +363 -0
  181. dasha_framework-0.0.1/tests/test_tutorial.py +128 -0
  182. dasha_framework-0.0.1/tests/test_vt.py +336 -0
  183. dasha_framework-0.0.1/tests/test_vt_keys.py +136 -0
  184. dasha_framework-0.0.1/tests/test_waiting_dialogs.py +134 -0
  185. dasha_framework-0.0.1/tests/test_wake.py +282 -0
  186. dasha_framework-0.0.1/tests/test_widget_edge_cases.py +610 -0
  187. dasha_framework-0.0.1/tests/test_widgets.py +228 -0
  188. dasha_framework-0.0.1/tests/test_winbuffer.py +179 -0
  189. dasha_framework-0.0.1/tests/test_window.py +63 -0
  190. dasha_framework-0.0.1/tests/test_window_colours.py +141 -0
  191. dasha_framework-0.0.1/tests/test_window_states.py +426 -0
  192. dasha_framework-0.0.1/tests/test_windowmenu.py +98 -0
  193. dasha_framework-0.0.1/tests/test_windows_console.py +174 -0
  194. dasha_framework-0.0.1/tests/test_word_wrap.py +217 -0
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,346 @@
1
+ Metadata-Version: 2.4
2
+ Name: dasha-framework
3
+ Version: 0.0.1
4
+ Summary: Dasha Framework: a dependency-free text-mode desktop and application framework for local and SSH terminals.
5
+ Author: Dasha Sierra
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/dashasierra/dasha-framework
8
+ Project-URL: Documentation, https://dasha.readthedocs.io/
9
+ Project-URL: Source, https://github.com/dashasierra/dasha-framework
10
+ Project-URL: Issues, https://github.com/dashasierra/dasha-framework/issues
11
+ Project-URL: Changelog, https://github.com/dashasierra/dasha-framework/blob/HEAD/CHANGELOG.md
12
+ Keywords: terminal,tui,text-mode,desktop,windows,widgets,dialogs,ssh
13
+ Classifier: Development Status :: 5 - Production/Stable
14
+ Classifier: Environment :: Console
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: Operating System :: MacOS
17
+ Classifier: Operating System :: Microsoft :: Windows
18
+ Classifier: Operating System :: POSIX
19
+ Classifier: Programming Language :: Python :: 3
20
+ Classifier: Programming Language :: Python :: 3 :: Only
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Programming Language :: Python :: 3.13
23
+ Classifier: Programming Language :: Python :: 3.14
24
+ Classifier: Topic :: Terminals
25
+ Classifier: Topic :: Software Development :: User Interfaces
26
+ Classifier: Typing :: Typed
27
+ Requires-Python: >=3.12
28
+ Description-Content-Type: text/markdown
29
+ License-File: LICENSE
30
+ Provides-Extra: dev
31
+ Requires-Dist: autopep8>=2.3; extra == "dev"
32
+ Requires-Dist: black<27,>=26.10; extra == "dev"
33
+ Requires-Dist: build>=1.2; extra == "dev"
34
+ Requires-Dist: coverage>=7.10; extra == "dev"
35
+ Requires-Dist: mypy>=1.15; extra == "dev"
36
+ Requires-Dist: pylint>=3.3; extra == "dev"
37
+ Requires-Dist: twine>=6.0; extra == "dev"
38
+ Provides-Extra: docs
39
+ Requires-Dist: furo>=2025.7; extra == "docs"
40
+ Requires-Dist: myst-parser>=4.0; extra == "docs"
41
+ Requires-Dist: pillow>=11.0; extra == "docs"
42
+ Requires-Dist: sphinx>=8.2; extra == "docs"
43
+ Dynamic: license-file
44
+
45
+ # Dasha Framework
46
+
47
+ **Dasha Framework** is a text-mode application framework for terminals, both local and
48
+ over SSH.
49
+
50
+ Dasha Framework has **no third-party dependencies**. It is built entirely on the
51
+ Python standard library, using `ctypes` and similar modules to talk to the
52
+ terminal directly.
53
+
54
+ ## Features
55
+
56
+ **The desktop**
57
+
58
+ - Overlapping windows that can be moved, resized, maximised, minimised and
59
+ closed with the mouse or the keyboard, each with a drop shadow and with
60
+ scroll bars on its frame when needed.
61
+ - A menu bar with drop-down menus, submenus, mnemonics and shortcut keys;
62
+ context menus; and a status bar showing help and clickable key hints.
63
+ - Several applications side by side, each in its own process, so one that
64
+ crashes or hangs affects only its own windows.
65
+ - Themes (Default, Dark, Monochrome, or your own) and animations, both of
66
+ which can be changed while Dasha Framework is running and are remembered.
67
+ - Settings... in the system menu changes everything that the command line
68
+ and the settings files do: the theme and every colour, the keyboard
69
+ shortcuts, animations, the applications to start with the desktop, and
70
+ the installed applications. It saves to the same files.
71
+ - A command prompt (Alt+F12) for running commands without shutting
72
+ Dasha Framework down: your own shell, until you type `exit`.
73
+
74
+ **For applications**
75
+
76
+ - An `Application` class that runs unchanged either on the desktop or on
77
+ its own in a terminal.
78
+ - Widgets: labels, buttons, text boxes and text areas (with undo, the
79
+ clipboard, word wrap and line numbers), check boxes, radio buttons,
80
+ switches, list boxes, combo boxes, autocomplete boxes, spin boxes,
81
+ sliders, progress bars, tables, tree views (picking one item or several,
82
+ with items loaded as they are expanded), tabs, splitters, group boxes and
83
+ collapsible areas.
84
+ - Dialog boxes, ready-made questions and a file dialog.
85
+ - Help windows, opened with F1: an application's own pages of Markdown, with
86
+ links between them, history and search, going straight to the topic for
87
+ the widget with the focus. Dasha Framework has help of its own for the desktop.
88
+ - Installed applications can have their own virtual environments, for
89
+ libraries that Dasha Framework does not include.
90
+
91
+ **Standards and safety**
92
+
93
+ - **Pure Python 3.12 or newer, using only the standard library**, with no
94
+ third-party runtime dependencies. The package is fully typed (PEP 561,
95
+ `py.typed`).
96
+ - **Windows, Linux and macOS**, locally or over SSH, using ANSI/VT (ECMA-48)
97
+ escape sequences. Dasha Framework uses the alternate screen, xterm SGR mouse
98
+ reporting (mode 1006) and bracketed paste, as well as the kitty keyboard
99
+ protocol and xterm's "modifyOtherKeys" where a terminal supports them.
100
+ - **Code page 437** for everything it draws, so that any terminal font can
101
+ display it, in the 16 standard colours, the 256-colour palette, or 24-bit
102
+ RGB colour (drawn as the nearest of the 256, or of the 16, where a
103
+ terminal cannot show it).
104
+ Dasha Framework honours [`NO_COLOR`](https://no-color.org).
105
+ - **Every key can be remapped, and every colour is a theme role**, set in
106
+ Settings... or in a JSON file of your own.
107
+ - **Nothing reaches the terminal unchecked.** Control characters in a file,
108
+ a title or any other text are displayed as their code page 437 pictures,
109
+ and are never sent to the terminal to act on. Applications talk to the
110
+ desktop through a versioned JSON protocol, and every message is checked
111
+ when it arrives, so no application can harm the desktop or impersonate
112
+ another.
113
+ - Releases follow [Semantic Versioning](https://semver.org), and changes
114
+ are recorded in the [changelog](https://github.com/dashasierra/dasha-framework/blob/HEAD/CHANGELOG.md)
115
+ in the [Keep a Changelog](https://keepachangelog.com) format. Dasha Framework is
116
+ licensed under the Apache License 2.0.
117
+
118
+ ## Requirements
119
+
120
+ - Python 3.12 or newer
121
+ - Windows, Linux or macOS
122
+
123
+ ## Quick start
124
+
125
+ ```bash
126
+ python -m venv .venv
127
+ ```
128
+
129
+ Activate the environment (`.venv\Scripts\activate` on Windows,
130
+ `source .venv/bin/activate` elsewhere), then install Dasha Framework:
131
+
132
+ ```bash
133
+ python -m pip install dasha-framework
134
+ ```
135
+
136
+ Or, from a copy of this repository, install it in editable mode:
137
+
138
+ ```bash
139
+ python -m pip install -e .
140
+ ```
141
+
142
+ Then start the desktop:
143
+
144
+ ```bash
145
+ dasha desktop
146
+ ```
147
+
148
+ or, for short:
149
+
150
+ ```bash
151
+ dasha-desktop
152
+ ```
153
+
154
+ `dasha` on its own only says what it needs: `desktop`, or an application to
155
+ run. Dasha Framework starts with an empty desktop. The Applications submenu of the
156
+ system menu (`≡`) lists the installed applications. None come with the
157
+ package, but the repository's `apps/` folder has two to try: Notepad, and a
158
+ Demo of the widgets (see [apps/README.md](https://github.com/dashasierra/dasha-framework/blob/HEAD/apps/README.md)).
159
+ Install them with:
160
+
161
+ ```bash
162
+ dasha install-app apps/notepad.py
163
+ ```
164
+
165
+ ```bash
166
+ dasha install-app apps/demo.py
167
+ ```
168
+
169
+ Then start the desktop (`dasha desktop`) and choose them from the
170
+ Applications menu, or name them to start them on it straight away:
171
+
172
+ ```bash
173
+ dasha-desktop notepad
174
+ ```
175
+
176
+ (`dasha desktop notepad` is the same.) You can also name an application to
177
+ run it on its own, without the desktop, exactly as running its script
178
+ would:
179
+
180
+ ```bash
181
+ dasha notepad
182
+ ```
183
+
184
+ ## Writing an application
185
+
186
+ An application is a class with a `start` method, which sets up its menus
187
+ and opens its windows. It keeps running until it exits (File > Exit, here),
188
+ not merely until its windows are closed. It can run on its own, with no
189
+ desktop to set up:
190
+
191
+ ```python
192
+ from dasha.application import Application
193
+ from dasha.canvas import Rect
194
+ from dasha.menu import Menu, MenuItem
195
+ from dasha.window import Window
196
+
197
+
198
+ class Hello(Application):
199
+ name = "Hello"
200
+
201
+ def start(self) -> None:
202
+ self.menus = [Menu("&File", [MenuItem("E&xit", self.exit)])]
203
+ self.open(Window("Hello", Rect(2, 2, 6, 30), ["Hello, world"], closable=True))
204
+
205
+
206
+ if __name__ == "__main__":
207
+ raise SystemExit(Hello().run())
208
+ ```
209
+
210
+ The same class also runs on the Dasha Desktop, in its own process. To
211
+ list it in the Applications menu, install it. If it needs libraries that
212
+ Dasha Framework does not include, it can have a virtual environment of its own:
213
+
214
+ ```bash
215
+ dasha install-app hello.py
216
+ ```
217
+
218
+ ```bash
219
+ dasha install-app hello.py --create-venv --pip "nltk==3.8.1"
220
+ ```
221
+
222
+ `dasha list-apps` lists the installed applications, and `dasha
223
+ hello` runs this one on its own, just as `python hello.py` does. For more,
224
+ see [Applications](https://github.com/dashasierra/dasha-framework/blob/HEAD/docs/architecture.md#applications-dashaapplication)
225
+ and [Installing applications](https://github.com/dashasierra/dasha-framework/blob/HEAD/docs/architecture.md#installing-applications-dasharegistry-dashainstall)
226
+ in the architecture guide, and the example applications in `apps/`.
227
+
228
+ ### Command-line options
229
+
230
+ `dasha --help` lists these too.
231
+
232
+ | Option | What it does |
233
+ | --- | --- |
234
+ | `-h`, `--help` | List the options, and the application commands |
235
+ | `-v`, `--version` | Show Dasha Framework's version |
236
+ | `-s FILE`, `--shortcuts FILE` | Use this keyboard shortcuts file (default `~/.dasha/shortcuts.json`) |
237
+ | `--init-shortcuts` | Write the default shortcuts to the shortcuts file, ready to edit |
238
+ | `-c FILE`, `--colours FILE` | Use this colours file (default `~/.dasha/colours.json`) |
239
+ | `--init-colours` | Write the default colours to the colours file, ready to edit |
240
+ | `--init-theme NAME` | Write a new theme, `NAME`, to edit, in `~/.dasha/themes/` |
241
+ | `--monochrome` | Use the Monochrome theme: no colours, only bold, underline and reverse video |
242
+ | `-d DEPTH`, `--colour-depth DEPTH` | Draw colours at `24bit`, `256` or `16` colours, or `auto` (the default); remembered for next time |
243
+ | `-m`, `--show-mouse` | Invert the cell under the mouse, for terminals that show no pointer; remembered for next time |
244
+ | `-k`, `--key-test` | Show the name of each key as you press it (Ctrl+C to finish) |
245
+ | `desktop [APP ...]` | Start the desktop, with these applications on it (as `dasha-desktop [APP ...]` does) |
246
+ | `APP ...` | Run just these applications, by id or name, without the desktop |
247
+
248
+ An application can be named by its id (`dasha notepad`) or by its name, in
249
+ any case (`dasha Notepad`): an application with the id `dasha-github`, called
250
+ Git, starts with `dasha git` too. An id comes first, and a name that more
251
+ than one application has is refused, with their ids to choose from.
252
+ `dasha list-apps` shows each one's id and name.
253
+
254
+ One of the last two is needed, except with `--init-shortcuts`,
255
+ `--init-colours`, `--init-theme` or `--key-test`: `dasha` with nothing to
256
+ run shows its usage and an error.
257
+
258
+ `-d` and `-m` are kept in `~/.dasha/settings.toml`, as Settings...
259
+ keeps them, so you need give them only once: `dasha desktop -d 16` starts in
260
+ 16 colours from then on. `-d auto` goes back to letting Dasha Framework decide,
261
+ and `` Alt+` `` or Settings... stops showing the mouse.
262
+
263
+ If something goes wrong inside Dasha Framework itself, it writes the details to a
264
+ log in `~/.dasha/logs/`, tells you where, and carries on, so that your
265
+ applications and their work are not lost. If it says so, save your work and
266
+ restart Dasha Framework, and please report the log.
267
+
268
+ If arrow keys or function keys sometimes act as Escape over a slow SSH
269
+ connection, raise how long Escape waits for the rest of a key (Settings...,
270
+ the Desktop page; 100 ms by default). If a shortcut does not work in your
271
+ terminal or over SSH (Alt keys often do not), you can remap it: see [docs/shortcuts.md](https://github.com/dashasierra/dasha-framework/blob/HEAD/docs/shortcuts.md).
272
+ To see exactly what your terminal sends for each key, run:
273
+
274
+ ```bash
275
+ dasha --key-test
276
+ ```
277
+
278
+ For a terminal without colour, run `dasha desktop --monochrome`, or set
279
+ `NO_COLOR`. To change the colours while Dasha Framework is running, choose a
280
+ theme from the system menu's Themes: Default, Dark, Monochrome, or one of
281
+ your own in `~/.dasha/themes/` (see [docs/colours.md](https://github.com/dashasierra/dasha-framework/blob/HEAD/docs/colours.md)).
282
+ Menus drop down, and windows zoom as they are minimised, maximised and
283
+ restored. To turn these animations off, or back on, choose Animations from
284
+ the system menu.
285
+
286
+ If your terminal shows no mouse pointer, press `` Alt+` `` (or run
287
+ `dasha desktop -m`) to show where the mouse is: the cell under it is
288
+ inverted. Press `` Alt+` `` again to stop. Dasha Framework remembers the choice.
289
+
290
+ To run commands without shutting Dasha Framework down, press Alt+F12 or choose
291
+ Command prompt from the system menu. Your own screen and shell come back:
292
+ `cmd.exe` on Windows (`COMSPEC`), or `$SHELL` elsewhere. Type `exit` to
293
+ return to the desktop exactly as you left it. Your applications keep
294
+ running meanwhile.
295
+
296
+ Everything above can also be changed from within Dasha Framework: choose
297
+ Settings... from the system menu. Its pages cover the theme and each part of
298
+ the screen's colours (RGB colours included), the keyboard shortcuts,
299
+ animations, how colours are drawn, showing the mouse and the
300
+ applications to start with the desktop, and installing and uninstalling
301
+ applications. Changes show at once; OK or Apply saves them to the usual
302
+ files (the colours file, the shortcuts file and `settings.toml`), and Cancel
303
+ puts them back.
304
+
305
+ ## Development
306
+
307
+ See [docs/development.md](https://github.com/dashasierra/dasha-framework/blob/HEAD/docs/development.md).
308
+
309
+ ## Documentation
310
+
311
+ To build the documentation, run this from the repository root with the
312
+ virtual environment activated:
313
+
314
+ ```bash
315
+ python -m sphinx -W --keep-going -E -b html docs docs/_build/html
316
+ ```
317
+
318
+ The built pages are written to `docs/_build/html`.
319
+
320
+ ## Project layout
321
+
322
+ ```
323
+ src/dasha/ the package (src layout, so tests run against the installed code)
324
+ frozen/ the entry point of a PyInstaller build of dasha (dasha.spec)
325
+ tests/ unittest test suite
326
+ apps/ example applications and their tests (not in the package)
327
+ docs/ project documentation
328
+ ```
329
+
330
+ ## Licence
331
+
332
+ Copyright 2026 - Dasha Sierra
333
+
334
+ Licensed under the Apache License, Version 2.0 (the "License");
335
+ you may not use this software except in compliance with the License.
336
+ You may obtain a copy of the License at
337
+
338
+ http://www.apache.org/licenses/LICENSE-2.0
339
+
340
+ Unless required by applicable law or agreed to in writing, software
341
+ distributed under the License is distributed on an "AS IS" BASIS,
342
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
343
+ See the License for the specific language governing permissions and
344
+ limitations under the License.
345
+
346
+ Apache License 2.0 - see [LICENSE](https://github.com/dashasierra/dasha-framework/blob/HEAD/LICENSE).