runtimepy 5.8.4__tar.gz → 5.9.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 (303) hide show
  1. {runtimepy-5.8.4 → runtimepy-5.9.1}/LICENSE +1 -1
  2. {runtimepy-5.8.4/runtimepy.egg-info → runtimepy-5.9.1}/PKG-INFO +10 -6
  3. {runtimepy-5.8.4 → runtimepy-5.9.1}/README.md +2 -2
  4. {runtimepy-5.8.4 → runtimepy-5.9.1}/pyproject.toml +1 -1
  5. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/__init__.py +2 -2
  6. runtimepy-5.9.1/runtimepy/data/js/markdown_page.js +28 -0
  7. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/html/__init__.py +49 -12
  8. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/server/__init__.py +13 -4
  9. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/util.py +1 -1
  10. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/primitives/int.py +11 -0
  11. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/requirements.txt +1 -1
  12. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/task/basic/periodic.py +9 -0
  13. {runtimepy-5.8.4 → runtimepy-5.9.1/runtimepy.egg-info}/PKG-INFO +10 -6
  14. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy.egg-info/requires.txt +2 -2
  15. runtimepy-5.8.4/runtimepy/data/js/markdown_page.js +0 -24
  16. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/__main__.py +0 -0
  17. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/app.py +0 -0
  18. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/channel/__init__.py +0 -0
  19. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/channel/environment/__init__.py +0 -0
  20. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/channel/environment/array.py +0 -0
  21. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/channel/environment/base.py +0 -0
  22. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/channel/environment/command/__init__.py +0 -0
  23. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/channel/environment/command/parser.py +0 -0
  24. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/channel/environment/command/processor.py +0 -0
  25. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/channel/environment/command/result.py +0 -0
  26. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/channel/environment/create.py +0 -0
  27. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/channel/environment/file.py +0 -0
  28. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/channel/environment/sample.py +0 -0
  29. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/channel/environment/telemetry.py +0 -0
  30. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/channel/event/__init__.py +0 -0
  31. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/channel/event/header.py +0 -0
  32. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/channel/registry.py +0 -0
  33. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/codec/__init__.py +0 -0
  34. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/codec/protocol/__init__.py +0 -0
  35. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/codec/protocol/base.py +0 -0
  36. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/codec/protocol/json.py +0 -0
  37. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/codec/system/__init__.py +0 -0
  38. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/commands/__init__.py +0 -0
  39. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/commands/all.py +0 -0
  40. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/commands/arbiter.py +0 -0
  41. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/commands/common.py +0 -0
  42. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/commands/mtu.py +0 -0
  43. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/commands/server.py +0 -0
  44. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/commands/task.py +0 -0
  45. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/commands/tftp.py +0 -0
  46. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/commands/tui.py +0 -0
  47. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/control/__init__.py +0 -0
  48. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/control/env/__init__.py +0 -0
  49. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/control/source.py +0 -0
  50. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/control/step.py +0 -0
  51. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/404.html +0 -0
  52. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/browser.yaml +0 -0
  53. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/css/bootstrap_extra.css +0 -0
  54. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/css/font.css +0 -0
  55. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/css/main.css +0 -0
  56. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/dummy_load.yaml +0 -0
  57. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/factories.yaml +0 -0
  58. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/favicon.ico +0 -0
  59. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/js/DataConnection.js +0 -0
  60. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/js/JsonConnection.js +0 -0
  61. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/js/audio.js +0 -0
  62. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/js/classes/App.js +0 -0
  63. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/js/classes/ChannelTable.js +0 -0
  64. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/js/classes/DataConnection.js +0 -0
  65. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/js/classes/JsonConnection.js +0 -0
  66. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/js/classes/OverlayManager.js +0 -0
  67. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/js/classes/Plot.js +0 -0
  68. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/js/classes/PlotDrawer.js +0 -0
  69. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/js/classes/PlotManager.js +0 -0
  70. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/js/classes/PlotModalManager.js +0 -0
  71. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/js/classes/PointBuffer.js +0 -0
  72. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/js/classes/PointManager.js +0 -0
  73. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/js/classes/TabFilter.js +0 -0
  74. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/js/classes/TabInterface.js +0 -0
  75. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/js/classes/UnitSystem.js +0 -0
  76. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/js/classes/WindowHashManager.js +0 -0
  77. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/js/classes/WorkerInterface.js +0 -0
  78. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/js/events.js +0 -0
  79. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/js/init.js +0 -0
  80. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/js/main.js +0 -0
  81. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/js/tab/env.js +0 -0
  82. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/js/tab/sound.js +0 -0
  83. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/js/third-party/webgl-debug.js +0 -0
  84. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/js/unused/pyodide.js +0 -0
  85. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/js/util.js +0 -0
  86. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/js/worker.js +0 -0
  87. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/md/Connection.md +0 -0
  88. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/md/PeriodicTask.md +0 -0
  89. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/md/RuntimeStruct.md +0 -0
  90. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/md/RuntimepyPeer.md +0 -0
  91. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/md/SinusoidTask.md +0 -0
  92. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/sample_telemetry.yaml +0 -0
  93. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/schemas/BitFields.yaml +0 -0
  94. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/schemas/Channel.yaml +0 -0
  95. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/schemas/ChannelCommand.yaml +0 -0
  96. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/schemas/ChannelRegistry.yaml +0 -0
  97. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/schemas/ClientConnectionConfig.yaml +0 -0
  98. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/schemas/ConnectionArbiterConfig.yaml +0 -0
  99. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/schemas/EnumRegistry.yaml +0 -0
  100. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/schemas/FindFile.yaml +0 -0
  101. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/schemas/PeerProcessConfig.yaml +0 -0
  102. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/schemas/RuntimeEnum.yaml +0 -0
  103. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/schemas/ServerConnectionConfig.yaml +0 -0
  104. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/schemas/StructConfig.yaml +0 -0
  105. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/schemas/TaskConfig.yaml +0 -0
  106. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/schemas/channel_controls.yaml +0 -0
  107. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/schemas/has_config.yaml +0 -0
  108. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/schemas/has_factory.yaml +0 -0
  109. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/schemas/has_markdown.yaml +0 -0
  110. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/schemas/has_name.yaml +0 -0
  111. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/schemas/has_request_flag.yaml +0 -0
  112. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/server.yaml +0 -0
  113. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/server_base.yaml +0 -0
  114. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/server_dev.yaml +0 -0
  115. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/static/svg/chip-circle-bootstrap.svg +0 -0
  116. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/static/woff2/CascadiaCode-Bold.woff2 +0 -0
  117. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/static/woff2/CascadiaCode-BoldItalic.woff2 +0 -0
  118. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/static/woff2/CascadiaCode-Italic.woff2 +0 -0
  119. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/static/woff2/CascadiaCode-Regular.woff2 +0 -0
  120. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/static/woff2/CascadiaMono-Bold.woff2 +0 -0
  121. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/static/woff2/CascadiaMono-BoldItalic.woff2 +0 -0
  122. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/static/woff2/CascadiaMono-Italic.woff2 +0 -0
  123. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/static/woff2/CascadiaMono-Regular.woff2 +0 -0
  124. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/static/woff2/README.md +0 -0
  125. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/data/tftp_server.yaml +0 -0
  126. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/dev_requirements.txt +0 -0
  127. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/entry.py +0 -0
  128. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/enum/__init__.py +0 -0
  129. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/enum/registry.py +0 -0
  130. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/enum/types.py +0 -0
  131. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/mapping.py +0 -0
  132. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/message/__init__.py +0 -0
  133. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/message/handlers.py +0 -0
  134. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/message/interface.py +0 -0
  135. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/message/types.py +0 -0
  136. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/metrics/__init__.py +0 -0
  137. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/metrics/channel.py +0 -0
  138. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/metrics/connection.py +0 -0
  139. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/metrics/task.py +0 -0
  140. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/mixins/__init__.py +0 -0
  141. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/mixins/async_command.py +0 -0
  142. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/mixins/enum.py +0 -0
  143. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/mixins/environment.py +0 -0
  144. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/mixins/finalize.py +0 -0
  145. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/mixins/logging.py +0 -0
  146. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/mixins/psutil.py +0 -0
  147. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/mixins/regex.py +0 -0
  148. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/mixins/trig.py +0 -0
  149. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/__init__.py +0 -0
  150. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/apps/__init__.py +0 -0
  151. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/arbiter/__init__.py +0 -0
  152. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/arbiter/base.py +0 -0
  153. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/arbiter/config/__init__.py +0 -0
  154. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/arbiter/config/codec.py +0 -0
  155. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/arbiter/config/util.py +0 -0
  156. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/arbiter/factory/__init__.py +0 -0
  157. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/arbiter/factory/connection.py +0 -0
  158. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/arbiter/factory/task.py +0 -0
  159. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/arbiter/housekeeping/__init__.py +0 -0
  160. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/arbiter/imports/__init__.py +0 -0
  161. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/arbiter/imports/util.py +0 -0
  162. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/arbiter/info.py +0 -0
  163. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/arbiter/result.py +0 -0
  164. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/arbiter/struct/__init__.py +0 -0
  165. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/arbiter/task.py +0 -0
  166. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/arbiter/tcp/__init__.py +0 -0
  167. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/arbiter/tcp/json.py +0 -0
  168. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/arbiter/udp.py +0 -0
  169. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/arbiter/websocket.py +0 -0
  170. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/backoff.py +0 -0
  171. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/connection.py +0 -0
  172. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/factories/__init__.py +0 -0
  173. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/html/arbiter.py +0 -0
  174. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/html/bootstrap/__init__.py +0 -0
  175. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/html/bootstrap/elements.py +0 -0
  176. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/html/bootstrap/tabs.py +0 -0
  177. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/http/__init__.py +0 -0
  178. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/http/common.py +0 -0
  179. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/http/header.py +0 -0
  180. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/http/request_target.py +0 -0
  181. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/http/response.py +0 -0
  182. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/http/state.py +0 -0
  183. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/http/version.py +0 -0
  184. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/manager.py +0 -0
  185. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/mixin.py +0 -0
  186. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/mtu.py +0 -0
  187. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/server/app/__init__.py +0 -0
  188. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/server/app/base.py +0 -0
  189. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/server/app/create.py +0 -0
  190. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/server/app/elements.py +0 -0
  191. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/server/app/env/__init__.py +0 -0
  192. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/server/app/env/modal.py +0 -0
  193. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/server/app/env/settings.py +0 -0
  194. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/server/app/env/tab/__init__.py +0 -0
  195. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/server/app/env/tab/base.py +0 -0
  196. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/server/app/env/tab/controls.py +0 -0
  197. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/server/app/env/tab/html.py +0 -0
  198. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/server/app/env/tab/message.py +0 -0
  199. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/server/app/env/widgets.py +0 -0
  200. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/server/app/files.py +0 -0
  201. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/server/app/landing_page.py +0 -0
  202. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/server/app/placeholder.py +0 -0
  203. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/server/app/pyodide.py +0 -0
  204. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/server/app/sound.py +0 -0
  205. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/server/app/tab.py +0 -0
  206. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/server/html.py +0 -0
  207. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/server/json.py +0 -0
  208. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/server/struct/__init__.py +0 -0
  209. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/server/websocket/__init__.py +0 -0
  210. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/server/websocket/state.py +0 -0
  211. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/ssl.py +0 -0
  212. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/stream/__init__.py +0 -0
  213. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/stream/base.py +0 -0
  214. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/stream/json/__init__.py +0 -0
  215. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/stream/string.py +0 -0
  216. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/tcp/__init__.py +0 -0
  217. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/tcp/connection.py +0 -0
  218. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/tcp/create.py +0 -0
  219. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/tcp/http/__init__.py +0 -0
  220. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/tcp/protocol.py +0 -0
  221. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/tcp/scpi/__init__.py +0 -0
  222. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/tcp/telnet/__init__.py +0 -0
  223. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/tcp/telnet/codes.py +0 -0
  224. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/tcp/telnet/np_05b.py +0 -0
  225. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/udp/__init__.py +0 -0
  226. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/udp/connection.py +0 -0
  227. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/udp/create.py +0 -0
  228. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/udp/protocol.py +0 -0
  229. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/udp/queue.py +0 -0
  230. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/udp/tftp/__init__.py +0 -0
  231. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/udp/tftp/base.py +0 -0
  232. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/udp/tftp/endpoint.py +0 -0
  233. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/udp/tftp/enums.py +0 -0
  234. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/udp/tftp/io.py +0 -0
  235. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/websocket/__init__.py +0 -0
  236. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/net/websocket/connection.py +0 -0
  237. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/noise/__init__.py +0 -0
  238. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/primitives/__init__.py +0 -0
  239. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/primitives/array/__init__.py +0 -0
  240. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/primitives/base.py +0 -0
  241. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/primitives/bool.py +0 -0
  242. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/primitives/byte_order.py +0 -0
  243. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/primitives/evaluation.py +0 -0
  244. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/primitives/field/__init__.py +0 -0
  245. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/primitives/field/fields.py +0 -0
  246. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/primitives/field/manager/__init__.py +0 -0
  247. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/primitives/field/manager/base.py +0 -0
  248. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/primitives/float.py +0 -0
  249. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/primitives/scaling.py +0 -0
  250. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/primitives/serializable/__init__.py +0 -0
  251. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/primitives/serializable/base.py +0 -0
  252. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/primitives/serializable/fixed.py +0 -0
  253. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/primitives/serializable/framer.py +0 -0
  254. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/primitives/serializable/prefixed.py +0 -0
  255. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/primitives/string.py +0 -0
  256. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/primitives/types/__init__.py +0 -0
  257. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/primitives/types/base.py +0 -0
  258. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/primitives/types/bool.py +0 -0
  259. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/primitives/types/bounds.py +0 -0
  260. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/primitives/types/float.py +0 -0
  261. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/primitives/types/int.py +0 -0
  262. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/py.typed +0 -0
  263. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/registry/__init__.py +0 -0
  264. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/registry/bool.py +0 -0
  265. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/registry/item.py +0 -0
  266. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/registry/name.py +0 -0
  267. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/sample/__init__.py +0 -0
  268. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/sample/peer.py +0 -0
  269. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/sample/program.py +0 -0
  270. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/schemas.py +0 -0
  271. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/struct/__init__.py +0 -0
  272. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/subprocess/__init__.py +0 -0
  273. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/subprocess/interface.py +0 -0
  274. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/subprocess/peer.py +0 -0
  275. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/subprocess/program.py +0 -0
  276. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/subprocess/protocol.py +0 -0
  277. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/task/__init__.py +0 -0
  278. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/task/asynchronous.py +0 -0
  279. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/task/basic/__init__.py +0 -0
  280. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/task/basic/manager.py +0 -0
  281. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/task/sample.py +0 -0
  282. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/task/trig/__init__.py +0 -0
  283. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/telemetry/__init__.py +0 -0
  284. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/telemetry/sample.py +0 -0
  285. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/tui/__init__.py +0 -0
  286. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/tui/channels/__init__.py +0 -0
  287. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/tui/cursor.py +0 -0
  288. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/tui/mixin.py +0 -0
  289. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/tui/mock.py +0 -0
  290. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/tui/task.py +0 -0
  291. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/ui/__init__.py +0 -0
  292. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/ui/controls.py +0 -0
  293. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy/util.py +0 -0
  294. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy.egg-info/SOURCES.txt +0 -0
  295. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy.egg-info/dependency_links.txt +0 -0
  296. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy.egg-info/entry_points.txt +0 -0
  297. {runtimepy-5.8.4 → runtimepy-5.9.1}/runtimepy.egg-info/top_level.txt +0 -0
  298. {runtimepy-5.8.4 → runtimepy-5.9.1}/setup.cfg +0 -0
  299. {runtimepy-5.8.4 → runtimepy-5.9.1}/setup.py +0 -0
  300. {runtimepy-5.8.4 → runtimepy-5.9.1}/tests/test_entry.py +0 -0
  301. {runtimepy-5.8.4 → runtimepy-5.9.1}/tests/test_mapping.py +0 -0
  302. {runtimepy-5.8.4 → runtimepy-5.9.1}/tests/test_resources.py +0 -0
  303. {runtimepy-5.8.4 → runtimepy-5.9.1}/tests/test_util.py +0 -0
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2024 Libre Embedded
3
+ Copyright (c) 2025 Libre Embedded
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: runtimepy
3
- Version: 5.8.4
3
+ Version: 5.9.1
4
4
  Summary: A framework for implementing Python services.
5
5
  Home-page: https://github.com/vkottler/runtimepy
6
6
  Author: Vaughn Kottler
@@ -18,10 +18,10 @@ Requires-Python: >=3.12
18
18
  Description-Content-Type: text/markdown
19
19
  License-File: LICENSE
20
20
  Requires-Dist: websockets
21
- Requires-Dist: aiofiles
22
21
  Requires-Dist: psutil
23
- Requires-Dist: vcorelib>=3.4.8
24
22
  Requires-Dist: svgen>=0.7.4
23
+ Requires-Dist: aiofiles
24
+ Requires-Dist: vcorelib>=3.5.1
25
25
  Provides-Extra: test
26
26
  Requires-Dist: pylint; extra == "test"
27
27
  Requires-Dist: flake8; extra == "test"
@@ -40,16 +40,20 @@ Requires-Dist: types-psutil; extra == "test"
40
40
  Requires-Dist: setuptools-wrapper; extra == "test"
41
41
  Requires-Dist: types-setuptools; extra == "test"
42
42
  Requires-Dist: uvloop; (sys_platform != "win32" and sys_platform != "cygwin") and extra == "test"
43
+ Dynamic: author
44
+ Dynamic: home-page
45
+ Dynamic: requires-dist
46
+ Dynamic: requires-python
43
47
 
44
48
  <!--
45
49
  =====================================
46
50
  generator=datazen
47
51
  version=3.1.4
48
- hash=f89c565370dd68d4215345aeab6feff4
52
+ hash=f3a77d6dfc0bda171a9716c3731531c5
49
53
  =====================================
50
54
  -->
51
55
 
52
- # runtimepy ([5.8.4](https://pypi.org/project/runtimepy/))
56
+ # runtimepy ([5.9.1](https://pypi.org/project/runtimepy/))
53
57
 
54
58
  [![python](https://img.shields.io/pypi/pyversions/runtimepy.svg)](https://pypi.org/project/runtimepy/)
55
59
  ![Build Status](https://github.com/vkottler/runtimepy/workflows/Python%20Package/badge.svg)
@@ -2,11 +2,11 @@
2
2
  =====================================
3
3
  generator=datazen
4
4
  version=3.1.4
5
- hash=f89c565370dd68d4215345aeab6feff4
5
+ hash=f3a77d6dfc0bda171a9716c3731531c5
6
6
  =====================================
7
7
  -->
8
8
 
9
- # runtimepy ([5.8.4](https://pypi.org/project/runtimepy/))
9
+ # runtimepy ([5.9.1](https://pypi.org/project/runtimepy/))
10
10
 
11
11
  [![python](https://img.shields.io/pypi/pyversions/runtimepy.svg)](https://pypi.org/project/runtimepy/)
12
12
  ![Build Status](https://github.com/vkottler/runtimepy/workflows/Python%20Package/badge.svg)
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta:__legacy__"
4
4
 
5
5
  [project]
6
6
  name = "runtimepy"
7
- version = "5.8.4"
7
+ version = "5.9.1"
8
8
  description = "A framework for implementing Python services."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.12"
@@ -1,7 +1,7 @@
1
1
  # =====================================
2
2
  # generator=datazen
3
3
  # version=3.1.4
4
- # hash=99838ab674af55409015e5abdd55fc6e
4
+ # hash=47ca3ea38190cecfff6abaeec5ce0939
5
5
  # =====================================
6
6
 
7
7
  """
@@ -10,7 +10,7 @@ Useful defaults and other package metadata.
10
10
 
11
11
  DESCRIPTION = "A framework for implementing Python services."
12
12
  PKG_NAME = "runtimepy"
13
- VERSION = "5.8.4"
13
+ VERSION = "5.9.1"
14
14
 
15
15
  # runtimepy-specific content.
16
16
  METRICS_NAME = "metrics"
@@ -0,0 +1,28 @@
1
+ /* Dark is hard-coded initial state (in HTML). */
2
+ let lightMode = false;
3
+
4
+ function lightDarkClick(event) {
5
+ lightMode = !lightMode;
6
+
7
+ document.getElementById("runtimepy")
8
+ .setAttribute("data-bs-theme", lightMode ? "light" : "dark");
9
+
10
+ window.location.hash = lightMode ? "#light-mode" : "";
11
+ }
12
+
13
+ window.onload = () => {
14
+ let lightDarkButton = document.getElementById("theme-button");
15
+ if (lightDarkButton) {
16
+ lightDarkButton.addEventListener("click", lightDarkClick);
17
+ }
18
+
19
+ if (window.location.hash) {
20
+ let parts = window.location.hash.slice(1).split(",");
21
+
22
+ if (parts.includes("light-mode")) {
23
+ lightDarkButton.click();
24
+ }
25
+ }
26
+
27
+ bootstrap_init();
28
+ };
@@ -4,7 +4,8 @@ A module implementing HTML-related interfaces.
4
4
 
5
5
  # built-in
6
6
  from io import StringIO
7
- from typing import Optional
7
+ from typing import Any, Optional
8
+ from urllib.parse import parse_qs
8
9
 
9
10
  # third-party
10
11
  from svgen.element import Element
@@ -12,6 +13,7 @@ from svgen.element.html import Html, div
12
13
  from vcorelib import DEFAULT_ENCODING
13
14
  from vcorelib.io import IndentedFileWriter
14
15
  from vcorelib.paths import find_file
16
+ from vcorelib.python import StrToBool
15
17
 
16
18
  # internal
17
19
  from runtimepy import PKG_NAME
@@ -26,18 +28,25 @@ from runtimepy.net.html.bootstrap.elements import (
26
28
  )
27
29
 
28
30
 
29
- def create_app_shell(parent: Element, **kwargs) -> tuple[Element, Element]:
31
+ def create_app_shell(
32
+ parent: Element,
33
+ bootstrap_theme: str = "dark",
34
+ use_button_column: bool = True,
35
+ **kwargs,
36
+ ) -> tuple[Element, Element]:
30
37
  """Create a bootstrap-based application shell."""
31
38
 
32
39
  container = div(parent=parent, **kwargs)
33
40
  container.add_class("d-flex", "align-items-start", "bg-body")
34
41
 
35
42
  # Dark theme.
36
- container["data-bs-theme"] = "dark"
43
+ container["data-bs-theme"] = bootstrap_theme
37
44
 
38
45
  # Buttons.
39
- button_column = div(parent=container)
40
- button_column.add_class("d-flex", "flex-column", "h-100", "bg-dark-subtle")
46
+ button_column = div(parent=container if use_button_column else None)
47
+ button_column.add_class(
48
+ "d-flex", "flex-column", "h-100", f"bg-{bootstrap_theme}-subtle"
49
+ )
41
50
 
42
51
  # Dark/light theme switch button.
43
52
  bootstrap_button(
@@ -50,14 +59,18 @@ def create_app_shell(parent: Element, **kwargs) -> tuple[Element, Element]:
50
59
  return container, button_column
51
60
 
52
61
 
53
- def markdown_page(parent: Element, markdown: str, **kwargs) -> None:
62
+ def markdown_page(
63
+ parent: Element, markdown: str, **kwargs
64
+ ) -> tuple[Element, Element]:
54
65
  """Compose a landing page."""
55
66
 
56
- container = centered_markdown(
57
- create_app_shell(parent, **kwargs)[0], markdown, "h-100", "text-body"
58
- )
67
+ parent, button_column = create_app_shell(parent, **kwargs)
68
+
69
+ container = centered_markdown(parent, markdown, "h-100", "text-body")
59
70
  container.add_class("overflow-y-auto")
60
71
 
72
+ return container, button_column
73
+
61
74
 
62
75
  def common_css(document: Html) -> None:
63
76
  """Add common CSS to an HTML document."""
@@ -69,14 +82,38 @@ def common_css(document: Html) -> None:
69
82
  )
70
83
 
71
84
 
72
- def full_markdown_page(document: Html, markdown: str) -> None:
85
+ def full_markdown_page(
86
+ document: Html, markdown: str, uri_query: Optional[str] = None
87
+ ) -> None:
73
88
  """Render a full markdown HTML app."""
74
89
 
75
90
  common_css(document)
76
- markdown_page(document.body, markdown, id=PKG_NAME)
91
+
92
+ markdown_kwargs: dict[str, Any] = {"id": PKG_NAME}
93
+
94
+ if uri_query:
95
+ parsed = parse_qs(uri_query)
96
+
97
+ # Handle pages optimized for document creation.
98
+ if "print" in parsed and any(
99
+ StrToBool.check(x) for x in parsed["print"]
100
+ ):
101
+ markdown_kwargs["bootstrap_theme"] = "light"
102
+ markdown_kwargs["use_button_column"] = False
103
+
104
+ _, button_column = markdown_page(
105
+ document.body, markdown, **markdown_kwargs
106
+ )
107
+
108
+ bootstrap_button(
109
+ icon_str("printer"),
110
+ tooltip="Printer-friendly view.",
111
+ id="print-button",
112
+ parent=div(tag="a", href="?print=true", parent=button_column),
113
+ )
77
114
 
78
115
  # JavaScript.
79
- append_kind(document.body, "markdown_page")
116
+ append_kind(document.body, "util", "markdown_page")
80
117
  add_bootstrap_js(document.body)
81
118
 
82
119
 
@@ -136,7 +136,11 @@ class RuntimepyServerConnection(HttpConnection):
136
136
  return result
137
137
 
138
138
  def render_markdown(
139
- self, content: str, response: ResponseHeader, **kwargs
139
+ self,
140
+ content: str,
141
+ response: ResponseHeader,
142
+ query: Optional[str],
143
+ **kwargs,
140
144
  ) -> bytes:
141
145
  """Return rendered markdown content."""
142
146
 
@@ -146,6 +150,7 @@ class RuntimepyServerConnection(HttpConnection):
146
150
  full_markdown_page(
147
151
  document,
148
152
  writer.stream.getvalue(), # type: ignore
153
+ uri_query=query,
149
154
  )
150
155
 
151
156
  response["Content-Type"] = f"text/html; charset={DEFAULT_ENCODING}"
@@ -153,12 +158,16 @@ class RuntimepyServerConnection(HttpConnection):
153
158
  return document.encode_str().encode()
154
159
 
155
160
  async def render_markdown_file(
156
- self, path: Path, response: ResponseHeader, **kwargs
161
+ self,
162
+ path: Path,
163
+ response: ResponseHeader,
164
+ query: Optional[str],
165
+ **kwargs,
157
166
  ) -> bytes:
158
167
  """Render a markdown file as HTML and return the result."""
159
168
 
160
169
  return self.render_markdown(
161
- (await read_binary(path)).decode(), response, **kwargs
170
+ (await read_binary(path)).decode(), response, query, **kwargs
162
171
  )
163
172
 
164
173
  async def try_file(
@@ -177,7 +186,7 @@ class RuntimepyServerConnection(HttpConnection):
177
186
  md_candidate = candidate.with_suffix(".md")
178
187
  if md_candidate.is_file():
179
188
  return await self.render_markdown_file(
180
- md_candidate, response
189
+ md_candidate, response, path[1]
181
190
  )
182
191
 
183
192
  if candidate.is_file():
@@ -159,7 +159,7 @@ def hostname(ip_address: str) -> str:
159
159
  def address_str(name: str, fallback_host: str = "localhost", **kwargs) -> str:
160
160
  """Get an IP address string for a given name."""
161
161
 
162
- return _socket.getaddrinfo(
162
+ return _socket.getaddrinfo( # type: ignore
163
163
  name if name else fallback_host, None, **kwargs
164
164
  )[0][4][0]
165
165
 
@@ -40,6 +40,17 @@ class BaseIntPrimitive(PrimitiveIsCloseMixin[int]):
40
40
  self.set_value(new_val, timestamp_ns=timestamp_ns)
41
41
  return new_val
42
42
 
43
+ async def wait_for_increment(
44
+ self, timeout: float, count: int = 1
45
+ ) -> EvalResult:
46
+ """Wait for this primitive to increment by a certain amount."""
47
+
48
+ return await self.wait_for_value(
49
+ self.raw.value + count,
50
+ timeout,
51
+ operation=Operator.LESS_THAN_OR_EQUAL,
52
+ )
53
+
43
54
  async def wait_for_value(
44
55
  self,
45
56
  value: int | float,
@@ -1,5 +1,5 @@
1
1
  aiofiles
2
- vcorelib>=3.4.8
2
+ vcorelib>=3.5.1
3
3
  svgen>=0.7.4
4
4
  websockets
5
5
  psutil
@@ -136,6 +136,15 @@ class PeriodicTask(
136
136
  self._enabled.clear()
137
137
  return result
138
138
 
139
+ async def wait_iterations(self, timeout: float, count: int = 1) -> bool:
140
+ """Wait for a task to complete a certain number of iterations."""
141
+
142
+ return bool(
143
+ await self.metrics.dispatches.wait_for_increment(
144
+ timeout, count=count
145
+ )
146
+ )
147
+
139
148
  async def run(
140
149
  self, period_s: float = None, stop_sig: _asyncio.Event = None
141
150
  ) -> None:
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: runtimepy
3
- Version: 5.8.4
3
+ Version: 5.9.1
4
4
  Summary: A framework for implementing Python services.
5
5
  Home-page: https://github.com/vkottler/runtimepy
6
6
  Author: Vaughn Kottler
@@ -18,10 +18,10 @@ Requires-Python: >=3.12
18
18
  Description-Content-Type: text/markdown
19
19
  License-File: LICENSE
20
20
  Requires-Dist: websockets
21
- Requires-Dist: aiofiles
22
21
  Requires-Dist: psutil
23
- Requires-Dist: vcorelib>=3.4.8
24
22
  Requires-Dist: svgen>=0.7.4
23
+ Requires-Dist: aiofiles
24
+ Requires-Dist: vcorelib>=3.5.1
25
25
  Provides-Extra: test
26
26
  Requires-Dist: pylint; extra == "test"
27
27
  Requires-Dist: flake8; extra == "test"
@@ -40,16 +40,20 @@ Requires-Dist: types-psutil; extra == "test"
40
40
  Requires-Dist: setuptools-wrapper; extra == "test"
41
41
  Requires-Dist: types-setuptools; extra == "test"
42
42
  Requires-Dist: uvloop; (sys_platform != "win32" and sys_platform != "cygwin") and extra == "test"
43
+ Dynamic: author
44
+ Dynamic: home-page
45
+ Dynamic: requires-dist
46
+ Dynamic: requires-python
43
47
 
44
48
  <!--
45
49
  =====================================
46
50
  generator=datazen
47
51
  version=3.1.4
48
- hash=f89c565370dd68d4215345aeab6feff4
52
+ hash=f3a77d6dfc0bda171a9716c3731531c5
49
53
  =====================================
50
54
  -->
51
55
 
52
- # runtimepy ([5.8.4](https://pypi.org/project/runtimepy/))
56
+ # runtimepy ([5.9.1](https://pypi.org/project/runtimepy/))
53
57
 
54
58
  [![python](https://img.shields.io/pypi/pyversions/runtimepy.svg)](https://pypi.org/project/runtimepy/)
55
59
  ![Build Status](https://github.com/vkottler/runtimepy/workflows/Python%20Package/badge.svg)
@@ -1,8 +1,8 @@
1
1
  websockets
2
- aiofiles
3
2
  psutil
4
- vcorelib>=3.4.8
5
3
  svgen>=0.7.4
4
+ aiofiles
5
+ vcorelib>=3.5.1
6
6
 
7
7
  [test]
8
8
  pylint
@@ -1,24 +0,0 @@
1
- /* Dark is hard-coded initial state (in HTML). */
2
- let lightMode = false;
3
-
4
- function lightDarkClick(event) {
5
- lightMode = !lightMode;
6
-
7
- document.getElementById("runtimepy")
8
- .setAttribute("data-bs-theme", lightMode ? "light" : "dark");
9
-
10
- window.location.hash = lightMode ? "#light-mode" : "";
11
- }
12
-
13
- let lightDarkButton = document.getElementById("theme-button");
14
- if (lightDarkButton) {
15
- lightDarkButton.addEventListener("click", lightDarkClick);
16
- }
17
-
18
- if (window.location.hash) {
19
- let parts = window.location.hash.slice(1).split(",");
20
-
21
- if (parts.includes("light-mode")) {
22
- lightDarkButton.click();
23
- }
24
- }
File without changes