oldman 0.1.0__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 (525) hide show
  1. oldman-0.1.0/LICENSE +21 -0
  2. oldman-0.1.0/LICENSES/aiocache-BSD-3-Clause.txt +12 -0
  3. oldman-0.1.0/LICENSES/flag-icons-LICENSE.txt +26 -0
  4. oldman-0.1.0/LICENSES/nats-py-Apache-2.0.txt +201 -0
  5. oldman-0.1.0/PKG-INFO +157 -0
  6. oldman-0.1.0/README.md +80 -0
  7. oldman-0.1.0/oldman/__init__.py +14 -0
  8. oldman-0.1.0/oldman/apps/__init__.py +23 -0
  9. oldman-0.1.0/oldman/apps/admin/__init__.py +15 -0
  10. oldman-0.1.0/oldman/apps/admin/apps.py +19 -0
  11. oldman-0.1.0/oldman/apps/admin/commands.py +94 -0
  12. oldman-0.1.0/oldman/apps/admin/crud.py +94 -0
  13. oldman-0.1.0/oldman/apps/admin/forms.py +323 -0
  14. oldman-0.1.0/oldman/apps/admin/locales/zh_Hans/LC_MESSAGES/messages.mo +0 -0
  15. oldman-0.1.0/oldman/apps/admin/locales/zh_Hans/LC_MESSAGES/messages.po +547 -0
  16. oldman-0.1.0/oldman/apps/admin/locales/zh_Hant/LC_MESSAGES/messages.mo +0 -0
  17. oldman-0.1.0/oldman/apps/admin/locales/zh_Hant/LC_MESSAGES/messages.po +547 -0
  18. oldman-0.1.0/oldman/apps/admin/model_admin.py +524 -0
  19. oldman-0.1.0/oldman/apps/admin/permissions.py +42 -0
  20. oldman-0.1.0/oldman/apps/admin/runtime.py +121 -0
  21. oldman-0.1.0/oldman/apps/admin/settings.py +17 -0
  22. oldman-0.1.0/oldman/apps/admin/site.py +1345 -0
  23. oldman-0.1.0/oldman/apps/admin/static/oldman/admin/.vite/manifest.json +212 -0
  24. oldman-0.1.0/oldman/apps/admin/static/oldman/admin/assets/autocomplete-jPdFW4Z7.js +1 -0
  25. oldman-0.1.0/oldman/apps/admin/static/oldman/admin/assets/date-time-picker-DXKOYDM_.js +5 -0
  26. oldman-0.1.0/oldman/apps/admin/static/oldman/admin/assets/date-time-picker-XdZfF2Hc.css +1 -0
  27. oldman-0.1.0/oldman/apps/admin/static/oldman/admin/assets/dm-sans-latin-300-normal-C46oWILc.woff2 +0 -0
  28. oldman-0.1.0/oldman/apps/admin/static/oldman/admin/assets/dm-sans-latin-300-normal-CsNfKS1n.woff +0 -0
  29. oldman-0.1.0/oldman/apps/admin/static/oldman/admin/assets/dm-sans-latin-400-normal-BwCSEQnW.woff +0 -0
  30. oldman-0.1.0/oldman/apps/admin/static/oldman/admin/assets/dm-sans-latin-400-normal-CW0RaeGs.woff2 +0 -0
  31. oldman-0.1.0/oldman/apps/admin/static/oldman/admin/assets/dm-sans-latin-500-normal-B9HHJjqV.woff2 +0 -0
  32. oldman-0.1.0/oldman/apps/admin/static/oldman/admin/assets/dm-sans-latin-500-normal-Dr3UlScf.woff +0 -0
  33. oldman-0.1.0/oldman/apps/admin/static/oldman/admin/assets/dm-sans-latin-600-normal-Aqo67rzb.woff2 +0 -0
  34. oldman-0.1.0/oldman/apps/admin/static/oldman/admin/assets/dm-sans-latin-600-normal-BmdmIIQ2.woff +0 -0
  35. oldman-0.1.0/oldman/apps/admin/static/oldman/admin/assets/dm-sans-latin-700-normal-CUSSCpQX.woff +0 -0
  36. oldman-0.1.0/oldman/apps/admin/static/oldman/admin/assets/dm-sans-latin-700-normal-DvUfVpUG.woff2 +0 -0
  37. oldman-0.1.0/oldman/apps/admin/static/oldman/admin/assets/dropdown-DQmEUd1r.js +1 -0
  38. oldman-0.1.0/oldman/apps/admin/static/oldman/admin/assets/form-DZC6BBLO.js +1 -0
  39. oldman-0.1.0/oldman/apps/admin/static/oldman/admin/assets/form-validator-Gq06sYfE.js +1 -0
  40. oldman-0.1.0/oldman/apps/admin/static/oldman/admin/assets/language-switcher-CjE-89Lp.js +1 -0
  41. oldman-0.1.0/oldman/apps/admin/static/oldman/admin/assets/main-BVK9XJmx.css +7 -0
  42. oldman-0.1.0/oldman/apps/admin/static/oldman/admin/assets/main-BcU_G9Qv.js +116 -0
  43. oldman-0.1.0/oldman/apps/admin/static/oldman/admin/assets/modal-C9DpqkgN.js +1 -0
  44. oldman-0.1.0/oldman/apps/admin/static/oldman/admin/assets/preloader-C4Cw6JCy.js +1 -0
  45. oldman-0.1.0/oldman/apps/admin/static/oldman/admin/assets/select-79I-Au9m.js +1 -0
  46. oldman-0.1.0/oldman/apps/admin/static/oldman/admin/assets/select-BnyRxOjF.css +1 -0
  47. oldman-0.1.0/oldman/apps/admin/static/oldman/admin/assets/sidebar-menu-DqAbkKBH.js +1 -0
  48. oldman-0.1.0/oldman/apps/admin/static/oldman/admin/assets/table-B0PQSRm0.js +1 -0
  49. oldman-0.1.0/oldman/apps/admin/static/oldman/admin/assets/table-filter-form-zfFJ-D_E.js +1 -0
  50. oldman-0.1.0/oldman/apps/admin/static/oldman/admin/assets/table-json-BQldyVm2.js +1 -0
  51. oldman-0.1.0/oldman/apps/admin/static/oldman/admin/assets/turbo.es2017-esm-C9IpioHW.js +29 -0
  52. oldman-0.1.0/oldman/apps/admin/staticfiles.py +75 -0
  53. oldman-0.1.0/oldman/apps/admin/table.py +194 -0
  54. oldman-0.1.0/oldman/apps/admin/template.py +26 -0
  55. oldman-0.1.0/oldman/apps/admin/templates/.gitkeep +1 -0
  56. oldman-0.1.0/oldman/apps/admin/templates/admin/base.html +82 -0
  57. oldman-0.1.0/oldman/apps/admin/templates/admin/index.html +32 -0
  58. oldman-0.1.0/oldman/apps/admin/templates/admin/login.html +60 -0
  59. oldman-0.1.0/oldman/apps/admin/templates/admin/model/confirm_delete.html +27 -0
  60. oldman-0.1.0/oldman/apps/admin/templates/admin/model/delete_modal_form.html +18 -0
  61. oldman-0.1.0/oldman/apps/admin/templates/admin/model/form.html +35 -0
  62. oldman-0.1.0/oldman/apps/admin/templates/admin/model/list.html +71 -0
  63. oldman-0.1.0/oldman/apps/admin/templates/admin/model/status_modal_form.html +19 -0
  64. oldman-0.1.0/oldman/apps/admin/templates/admin/partials/language_switcher.html +5 -0
  65. oldman-0.1.0/oldman/apps/admin/templates/admin/partials/topbar.html +21 -0
  66. oldman-0.1.0/oldman/apps/admin/templates/admin/user_notifications.html +12 -0
  67. oldman-0.1.0/oldman/apps/admin/templates/admin/user_session.html +7 -0
  68. oldman-0.1.0/oldman/apps/admin/users.py +56 -0
  69. oldman-0.1.0/oldman/apps/config.py +121 -0
  70. oldman-0.1.0/oldman/apps/registry.py +490 -0
  71. oldman-0.1.0/oldman/auth/__init__.py +34 -0
  72. oldman-0.1.0/oldman/auth/apps.py +19 -0
  73. oldman-0.1.0/oldman/auth/base.py +138 -0
  74. oldman-0.1.0/oldman/auth/contracts.py +244 -0
  75. oldman-0.1.0/oldman/auth/migrations/__init__.py +0 -0
  76. oldman-0.1.0/oldman/auth/migrations/b7c396a46832_create_oldman_user.py +80 -0
  77. oldman-0.1.0/oldman/auth/models.py +10 -0
  78. oldman-0.1.0/oldman/auth/registry.py +44 -0
  79. oldman-0.1.0/oldman/auth/security.py +42 -0
  80. oldman-0.1.0/oldman/auth/services.py +224 -0
  81. oldman-0.1.0/oldman/auth/settings.py +28 -0
  82. oldman-0.1.0/oldman/cache/__init__.py +17 -0
  83. oldman-0.1.0/oldman/cache/backends/__init__.py +4 -0
  84. oldman-0.1.0/oldman/cache/backends/memory.py +120 -0
  85. oldman-0.1.0/oldman/cache/backends/redis.py +263 -0
  86. oldman-0.1.0/oldman/cache/base.py +367 -0
  87. oldman-0.1.0/oldman/cache/exceptions.py +34 -0
  88. oldman-0.1.0/oldman/cache/images.py +420 -0
  89. oldman-0.1.0/oldman/cache/two_level.py +55 -0
  90. oldman-0.1.0/oldman/cache/utils.py +270 -0
  91. oldman-0.1.0/oldman/cli/__init__.py +32 -0
  92. oldman-0.1.0/oldman/cli/__main__.py +6 -0
  93. oldman-0.1.0/oldman/cli/_main.py +1038 -0
  94. oldman-0.1.0/oldman/cli/_service_discovery.py +14 -0
  95. oldman-0.1.0/oldman/cli/babel.cfg +5 -0
  96. oldman-0.1.0/oldman/cli/commands.py +68 -0
  97. oldman-0.1.0/oldman/cli/database.py +257 -0
  98. oldman-0.1.0/oldman/cli/discovery.py +5 -0
  99. oldman-0.1.0/oldman/cli/fixtures.py +60 -0
  100. oldman-0.1.0/oldman/cli/i18n_commands.py +49 -0
  101. oldman-0.1.0/oldman/cli/locales/README.md +29 -0
  102. oldman-0.1.0/oldman/cli/locales/messages.pot +585 -0
  103. oldman-0.1.0/oldman/cli/locales/zh_Hans/LC_MESSAGES/messages.mo +0 -0
  104. oldman-0.1.0/oldman/cli/locales/zh_Hans/LC_MESSAGES/messages.po +660 -0
  105. oldman-0.1.0/oldman/cli/locales/zh_Hant/LC_MESSAGES/messages.mo +0 -0
  106. oldman-0.1.0/oldman/cli/locales/zh_Hant/LC_MESSAGES/messages.po +660 -0
  107. oldman-0.1.0/oldman/cli/localization.py +302 -0
  108. oldman-0.1.0/oldman/cli/scaffold.py +331 -0
  109. oldman-0.1.0/oldman/cli/service.py +198 -0
  110. oldman-0.1.0/oldman/cli/settings.py +70 -0
  111. oldman-0.1.0/oldman/cli/shell.py +37 -0
  112. oldman-0.1.0/oldman/cli/staticfiles.py +59 -0
  113. oldman-0.1.0/oldman/compat/__init__.py +7 -0
  114. oldman-0.1.0/oldman/compat/django/__init__.py +7 -0
  115. oldman-0.1.0/oldman/compat/django/cache.py +108 -0
  116. oldman-0.1.0/oldman/compat/django/serializers.py +34 -0
  117. oldman-0.1.0/oldman/conf/__init__.py +79 -0
  118. oldman-0.1.0/oldman/conf/base.py +156 -0
  119. oldman-0.1.0/oldman/conf/constants.py +157 -0
  120. oldman-0.1.0/oldman/conf/containers.py +275 -0
  121. oldman-0.1.0/oldman/conf/manager.py +574 -0
  122. oldman-0.1.0/oldman/conf/schemas.py +866 -0
  123. oldman-0.1.0/oldman/contrib/__init__.py +7 -0
  124. oldman-0.1.0/oldman/contrib/http/__init__.py +37 -0
  125. oldman-0.1.0/oldman/contrib/http/_logging.py +43 -0
  126. oldman-0.1.0/oldman/contrib/http/backends/__init__.py +14 -0
  127. oldman-0.1.0/oldman/contrib/http/backends/aiohttp.py +356 -0
  128. oldman-0.1.0/oldman/contrib/http/backends/curl.py +455 -0
  129. oldman-0.1.0/oldman/contrib/http/backends/httpx.py +199 -0
  130. oldman-0.1.0/oldman/contrib/http/base.py +91 -0
  131. oldman-0.1.0/oldman/contrib/http/contants.py +50 -0
  132. oldman-0.1.0/oldman/contrib/http/exceptions.py +63 -0
  133. oldman-0.1.0/oldman/contrib/http/multi_client.py +554 -0
  134. oldman-0.1.0/oldman/contrib/http/reconnect_stream.py +559 -0
  135. oldman-0.1.0/oldman/contrib/http/response.py +702 -0
  136. oldman-0.1.0/oldman/contrib/http/schemas.py +29 -0
  137. oldman-0.1.0/oldman/contrib/proxy/__init__.py +19 -0
  138. oldman-0.1.0/oldman/contrib/proxy/base.py +1177 -0
  139. oldman-0.1.0/oldman/contrib/proxy/encrypt.py +568 -0
  140. oldman-0.1.0/oldman/contrib/proxy/simple.py +724 -0
  141. oldman-0.1.0/oldman/db/__init__.py +31 -0
  142. oldman-0.1.0/oldman/db/fixtures.py +584 -0
  143. oldman-0.1.0/oldman/db/migrations/__init__.py +65 -0
  144. oldman-0.1.0/oldman/db/migrations/alembic.py +287 -0
  145. oldman-0.1.0/oldman/db/migrations/autogenerate.py +1505 -0
  146. oldman-0.1.0/oldman/db/migrations/commands.py +1070 -0
  147. oldman-0.1.0/oldman/db/migrations/interaction.py +120 -0
  148. oldman-0.1.0/oldman/db/migrations/metadata.py +196 -0
  149. oldman-0.1.0/oldman/db/migrations/project.py +296 -0
  150. oldman-0.1.0/oldman/db/migrations/revisions.py +652 -0
  151. oldman-0.1.0/oldman/db/migrations/state.py +410 -0
  152. oldman-0.1.0/oldman/db/migrations/templates/env.py +67 -0
  153. oldman-0.1.0/oldman/db/migrations/templates/script.py.mako +27 -0
  154. oldman-0.1.0/oldman/db/models.py +250 -0
  155. oldman-0.1.0/oldman/db/schemas.py +236 -0
  156. oldman-0.1.0/oldman/db/services.py +5 -0
  157. oldman-0.1.0/oldman/db/session.py +365 -0
  158. oldman-0.1.0/oldman/db/sqlalchemy/__init__.py +7 -0
  159. oldman-0.1.0/oldman/db/sqlalchemy/cache.py +469 -0
  160. oldman-0.1.0/oldman/db/sqlalchemy/log.py +134 -0
  161. oldman-0.1.0/oldman/db/sqlalchemy/models.py +246 -0
  162. oldman-0.1.0/oldman/db/sqlalchemy/services.py +18 -0
  163. oldman-0.1.0/oldman/db/sqlalchemy/session.py +22 -0
  164. oldman-0.1.0/oldman/db/sqlalchemy/utils.py +64 -0
  165. oldman-0.1.0/oldman/i18n/__init__.py +46 -0
  166. oldman-0.1.0/oldman/i18n/catalogs.py +47 -0
  167. oldman-0.1.0/oldman/i18n/commands.py +205 -0
  168. oldman-0.1.0/oldman/i18n/data/oldman_web_messages.json +639 -0
  169. oldman-0.1.0/oldman/i18n/framework-babel.cfg +24 -0
  170. oldman-0.1.0/oldman/i18n/frontend.py +398 -0
  171. oldman-0.1.0/oldman/i18n/profiles.py +35 -0
  172. oldman-0.1.0/oldman/i18n/registry.py +183 -0
  173. oldman-0.1.0/oldman/i18n/serialization.py +165 -0
  174. oldman-0.1.0/oldman/i18n/translations.py +109 -0
  175. oldman-0.1.0/oldman/i18n/utils.py +55 -0
  176. oldman-0.1.0/oldman/logging/__init__.py +25 -0
  177. oldman-0.1.0/oldman/logging/config.py +196 -0
  178. oldman-0.1.0/oldman/logging/formatters.py +216 -0
  179. oldman-0.1.0/oldman/logging/handlers.py +195 -0
  180. oldman-0.1.0/oldman/logging/rotation.py +229 -0
  181. oldman-0.1.0/oldman/logging/runtime.py +402 -0
  182. oldman-0.1.0/oldman/processes/__init__.py +28 -0
  183. oldman-0.1.0/oldman/processes/_subprocess_supervisor.py +262 -0
  184. oldman-0.1.0/oldman/processes/executor.py +602 -0
  185. oldman-0.1.0/oldman/processes/subprocess.py +568 -0
  186. oldman-0.1.0/oldman/providers/__init__.py +7 -0
  187. oldman-0.1.0/oldman/providers/nats/__init__.py +13 -0
  188. oldman-0.1.0/oldman/providers/nats/_compat.py +197 -0
  189. oldman-0.1.0/oldman/providers/nats/bus.py +32 -0
  190. oldman-0.1.0/oldman/providers/nats/config.py +45 -0
  191. oldman-0.1.0/oldman/providers/nats/connection.py +524 -0
  192. oldman-0.1.0/oldman/providers/nats/serializers.py +195 -0
  193. oldman-0.1.0/oldman/providers/redis/__init__.py +17 -0
  194. oldman-0.1.0/oldman/providers/redis/client.py +206 -0
  195. oldman-0.1.0/oldman/providers/redis/redis.py +266 -0
  196. oldman-0.1.0/oldman/py.typed +1 -0
  197. oldman-0.1.0/oldman/runtime/__init__.py +81 -0
  198. oldman-0.1.0/oldman/runtime/_taskiq_process.py +166 -0
  199. oldman-0.1.0/oldman/runtime/base.py +605 -0
  200. oldman-0.1.0/oldman/runtime/bootstrap.py +91 -0
  201. oldman-0.1.0/oldman/runtime/discovery.py +212 -0
  202. oldman-0.1.0/oldman/runtime/simple.py +218 -0
  203. oldman-0.1.0/oldman/runtime/taskiq.py +316 -0
  204. oldman-0.1.0/oldman/runtime/web.py +421 -0
  205. oldman-0.1.0/oldman/scaffolds/__init__.py +1 -0
  206. oldman-0.1.0/oldman/scaffolds/app/api_app/.gitkeep +1 -0
  207. oldman-0.1.0/oldman/scaffolds/app/api_app/apps/__app_slug__/__init__.py.tpl +1 -0
  208. oldman-0.1.0/oldman/scaffolds/app/api_app/apps/__app_slug__/apps.py.tpl +16 -0
  209. oldman-0.1.0/oldman/scaffolds/app/api_app/apps/__app_slug__/migrations/__init__.py.tpl +1 -0
  210. oldman-0.1.0/oldman/scaffolds/app/api_app/apps/__app_slug__/models.py.tpl +1 -0
  211. oldman-0.1.0/oldman/scaffolds/app/api_app/apps/__app_slug__/views.py.tpl +44 -0
  212. oldman-0.1.0/oldman/scaffolds/app/dashboard_app/.gitkeep +1 -0
  213. oldman-0.1.0/oldman/scaffolds/app/dashboard_app/apps/__app_slug__/__init__.py.tpl +1 -0
  214. oldman-0.1.0/oldman/scaffolds/app/dashboard_app/apps/__app_slug__/apps.py.tpl +16 -0
  215. oldman-0.1.0/oldman/scaffolds/app/dashboard_app/apps/__app_slug__/migrations/__init__.py.tpl +1 -0
  216. oldman-0.1.0/oldman/scaffolds/app/dashboard_app/apps/__app_slug__/models.py.tpl +1 -0
  217. oldman-0.1.0/oldman/scaffolds/app/dashboard_app/apps/__app_slug__/views.py.tpl +36 -0
  218. oldman-0.1.0/oldman/scaffolds/app/dashboard_app/frontend/src/pages/__app_slug__.ts.tpl +13 -0
  219. oldman-0.1.0/oldman/scaffolds/app/dashboard_app/templates/__app_slug__/index.html.tpl +12 -0
  220. oldman-0.1.0/oldman/scaffolds/app/service_app/.gitkeep +1 -0
  221. oldman-0.1.0/oldman/scaffolds/app/service_app/apps/__app_slug__/__init__.py.tpl +1 -0
  222. oldman-0.1.0/oldman/scaffolds/app/service_app/apps/__app_slug__/apps.py.tpl +16 -0
  223. oldman-0.1.0/oldman/scaffolds/app/service_app/apps/__app_slug__/migrations/__init__.py.tpl +1 -0
  224. oldman-0.1.0/oldman/scaffolds/app/service_app/apps/__app_slug__/services.py.tpl +1 -0
  225. oldman-0.1.0/oldman/scaffolds/app/web_app/.gitkeep +1 -0
  226. oldman-0.1.0/oldman/scaffolds/app/web_app/apps/__app_slug__/__init__.py.tpl +1 -0
  227. oldman-0.1.0/oldman/scaffolds/app/web_app/apps/__app_slug__/apps.py.tpl +16 -0
  228. oldman-0.1.0/oldman/scaffolds/app/web_app/apps/__app_slug__/migrations/__init__.py.tpl +1 -0
  229. oldman-0.1.0/oldman/scaffolds/app/web_app/apps/__app_slug__/models.py.tpl +1 -0
  230. oldman-0.1.0/oldman/scaffolds/app/web_app/apps/__app_slug__/views.py.tpl +13 -0
  231. oldman-0.1.0/oldman/scaffolds/app/web_app/templates/__app_slug__/index.html.tpl +7 -0
  232. oldman-0.1.0/oldman/scaffolds/project/api_service/.gitignore.tpl +4 -0
  233. oldman-0.1.0/oldman/scaffolds/project/api_service/.gitkeep +1 -0
  234. oldman-0.1.0/oldman/scaffolds/project/api_service/README.md.tpl +47 -0
  235. oldman-0.1.0/oldman/scaffolds/project/api_service/apps/__init__.py.tpl +1 -0
  236. oldman-0.1.0/oldman/scaffolds/project/api_service/babel.cfg.tpl +28 -0
  237. oldman-0.1.0/oldman/scaffolds/project/api_service/config/__init__.py.tpl +1 -0
  238. oldman-0.1.0/oldman/scaffolds/project/api_service/config/schemas.py.tpl +9 -0
  239. oldman-0.1.0/oldman/scaffolds/project/api_service/config/settings.py.tpl +10 -0
  240. oldman-0.1.0/oldman/scaffolds/project/api_service/data/{{ service_name }}_settings.yaml.tpl +3 -0
  241. oldman-0.1.0/oldman/scaffolds/project/api_service/locales/.gitkeep +1 -0
  242. oldman-0.1.0/oldman/scaffolds/project/api_service/pyproject.toml.tpl +14 -0
  243. oldman-0.1.0/oldman/scaffolds/project/api_service/run.sh.tpl +14 -0
  244. oldman-0.1.0/oldman/scaffolds/project/api_service/services/__init__.py.tpl +1 -0
  245. oldman-0.1.0/oldman/scaffolds/project/api_service/services/{{ service_name }}.py.tpl +28 -0
  246. oldman-0.1.0/oldman/scaffolds/project/app_service/.gitignore.tpl +4 -0
  247. oldman-0.1.0/oldman/scaffolds/project/app_service/.gitkeep +1 -0
  248. oldman-0.1.0/oldman/scaffolds/project/app_service/README.md.tpl +30 -0
  249. oldman-0.1.0/oldman/scaffolds/project/app_service/apps/__init__.py.tpl +1 -0
  250. oldman-0.1.0/oldman/scaffolds/project/app_service/config/__init__.py.tpl +1 -0
  251. oldman-0.1.0/oldman/scaffolds/project/app_service/config/schemas.py.tpl +9 -0
  252. oldman-0.1.0/oldman/scaffolds/project/app_service/config/settings.py.tpl +10 -0
  253. oldman-0.1.0/oldman/scaffolds/project/app_service/data/{{ service_name }}_settings.yaml.tpl +3 -0
  254. oldman-0.1.0/oldman/scaffolds/project/app_service/pyproject.toml.tpl +14 -0
  255. oldman-0.1.0/oldman/scaffolds/project/app_service/run.sh.tpl +14 -0
  256. oldman-0.1.0/oldman/scaffolds/project/app_service/services/__init__.py.tpl +1 -0
  257. oldman-0.1.0/oldman/scaffolds/project/app_service/services/{{ service_name }}.py.tpl +18 -0
  258. oldman-0.1.0/oldman/scaffolds/project/cli_app/.gitkeep +1 -0
  259. oldman-0.1.0/oldman/scaffolds/project/cli_app/README.md.tpl +16 -0
  260. oldman-0.1.0/oldman/scaffolds/project/cli_app/main.py.tpl +13 -0
  261. oldman-0.1.0/oldman/scaffolds/project/cli_app/pyproject.toml.tpl +14 -0
  262. oldman-0.1.0/oldman/scaffolds/project/dashboard/.gitignore.tpl +7 -0
  263. oldman-0.1.0/oldman/scaffolds/project/dashboard/.gitkeep +1 -0
  264. oldman-0.1.0/oldman/scaffolds/project/dashboard/README.md.tpl +100 -0
  265. oldman-0.1.0/oldman/scaffolds/project/dashboard/apps/__init__.py.tpl +1 -0
  266. oldman-0.1.0/oldman/scaffolds/project/dashboard/babel.cfg.tpl +28 -0
  267. oldman-0.1.0/oldman/scaffolds/project/dashboard/config/__init__.py.tpl +1 -0
  268. oldman-0.1.0/oldman/scaffolds/project/dashboard/config/schemas.py.tpl +9 -0
  269. oldman-0.1.0/oldman/scaffolds/project/dashboard/config/settings.py.tpl +10 -0
  270. oldman-0.1.0/oldman/scaffolds/project/dashboard/data/{{ service_name }}_settings.yaml.tpl +3 -0
  271. oldman-0.1.0/oldman/scaffolds/project/dashboard/frontend/index.html.tpl +2 -0
  272. oldman-0.1.0/oldman/scaffolds/project/dashboard/frontend/package.json.tpl +26 -0
  273. oldman-0.1.0/oldman/scaffolds/project/dashboard/frontend/src/app.css.tpl +13 -0
  274. oldman-0.1.0/oldman/scaffolds/project/dashboard/frontend/src/generated/icons.css.tpl +18 -0
  275. oldman-0.1.0/oldman/scaffolds/project/dashboard/frontend/src/main.ts.tpl +89 -0
  276. oldman-0.1.0/oldman/scaffolds/project/dashboard/frontend/tsconfig.json.tpl +11 -0
  277. oldman-0.1.0/oldman/scaffolds/project/dashboard/frontend/vite.config.ts.tpl +20 -0
  278. oldman-0.1.0/oldman/scaffolds/project/dashboard/locales/.gitkeep +1 -0
  279. oldman-0.1.0/oldman/scaffolds/project/dashboard/pyproject.toml.tpl +14 -0
  280. oldman-0.1.0/oldman/scaffolds/project/dashboard/run.sh.tpl +14 -0
  281. oldman-0.1.0/oldman/scaffolds/project/dashboard/scripts/build_frontend_i18n.py.tpl +119 -0
  282. oldman-0.1.0/oldman/scaffolds/project/dashboard/services/__init__.py.tpl +1 -0
  283. oldman-0.1.0/oldman/scaffolds/project/dashboard/services/{{ service_name }}.py.tpl +125 -0
  284. oldman-0.1.0/oldman/scaffolds/project/dashboard/static/.oldman_keep.tpl +1 -0
  285. oldman-0.1.0/oldman/scaffolds/project/dashboard/templates/base.html.tpl +44 -0
  286. oldman-0.1.0/oldman/scaffolds/project/dashboard/templates/errors/403.html.tpl +1 -0
  287. oldman-0.1.0/oldman/scaffolds/project/dashboard/templates/errors/404.html.tpl +1 -0
  288. oldman-0.1.0/oldman/scaffolds/project/dashboard/templates/errors/500.html.tpl +1 -0
  289. oldman-0.1.0/oldman/scaffolds/project/dashboard/templates/errors/default.html.tpl +1 -0
  290. oldman-0.1.0/oldman/scaffolds/project/web_service/.gitignore.tpl +5 -0
  291. oldman-0.1.0/oldman/scaffolds/project/web_service/.gitkeep +1 -0
  292. oldman-0.1.0/oldman/scaffolds/project/web_service/README.md.tpl +40 -0
  293. oldman-0.1.0/oldman/scaffolds/project/web_service/apps/__init__.py.tpl +1 -0
  294. oldman-0.1.0/oldman/scaffolds/project/web_service/babel.cfg.tpl +28 -0
  295. oldman-0.1.0/oldman/scaffolds/project/web_service/config/__init__.py.tpl +1 -0
  296. oldman-0.1.0/oldman/scaffolds/project/web_service/config/schemas.py.tpl +9 -0
  297. oldman-0.1.0/oldman/scaffolds/project/web_service/config/settings.py.tpl +10 -0
  298. oldman-0.1.0/oldman/scaffolds/project/web_service/data/{{ service_name }}_settings.yaml.tpl +3 -0
  299. oldman-0.1.0/oldman/scaffolds/project/web_service/locales/.gitkeep +1 -0
  300. oldman-0.1.0/oldman/scaffolds/project/web_service/pyproject.toml.tpl +14 -0
  301. oldman-0.1.0/oldman/scaffolds/project/web_service/run.sh.tpl +14 -0
  302. oldman-0.1.0/oldman/scaffolds/project/web_service/services/__init__.py.tpl +1 -0
  303. oldman-0.1.0/oldman/scaffolds/project/web_service/services/{{ service_name }}.py.tpl +39 -0
  304. oldman-0.1.0/oldman/scaffolds/project/web_service/static/.oldman_keep.tpl +1 -0
  305. oldman-0.1.0/oldman/scaffolds/project/web_service/templates/base.html.tpl +11 -0
  306. oldman-0.1.0/oldman/scaffolds/service/simple/services/{{ service_name }}.py.tpl +18 -0
  307. oldman-0.1.0/oldman/scaffolds/service/taskiq_scheduler/services/{{ service_name }}.py.tpl +7 -0
  308. oldman-0.1.0/oldman/scaffolds/service/taskiq_worker/services/{{ service_name }}.py.tpl +7 -0
  309. oldman-0.1.0/oldman/scaffolds/service/web/services/{{ service_name }}.py.tpl +39 -0
  310. oldman-0.1.0/oldman/security/__init__.py +17 -0
  311. oldman-0.1.0/oldman/security/jwt.py +155 -0
  312. oldman-0.1.0/oldman/security/rate_limiter/__init__.py +8 -0
  313. oldman-0.1.0/oldman/security/rate_limiter/token_bucket.py +72 -0
  314. oldman-0.1.0/oldman/serializers/__init__.py +31 -0
  315. oldman-0.1.0/oldman/serializers/base.py +226 -0
  316. oldman-0.1.0/oldman/serializers/cache.py +115 -0
  317. oldman-0.1.0/oldman/storage/__init__.py +46 -0
  318. oldman-0.1.0/oldman/storage/_web.py +89 -0
  319. oldman-0.1.0/oldman/storage/backends/__init__.py +4 -0
  320. oldman-0.1.0/oldman/storage/backends/filesystem.py +540 -0
  321. oldman-0.1.0/oldman/storage/backends/memory.py +98 -0
  322. oldman-0.1.0/oldman/storage/base.py +166 -0
  323. oldman-0.1.0/oldman/storage/exceptions.py +38 -0
  324. oldman-0.1.0/oldman/storage/lifecycle.py +261 -0
  325. oldman-0.1.0/oldman/storage/models.py +106 -0
  326. oldman-0.1.0/oldman/storage/registry.py +198 -0
  327. oldman-0.1.0/oldman/storage/streams.py +50 -0
  328. oldman-0.1.0/oldman/tasks/__init__.py +23 -0
  329. oldman-0.1.0/oldman/tasks/base.py +52 -0
  330. oldman-0.1.0/oldman/tasks/communication.py +100 -0
  331. oldman-0.1.0/oldman/tasks/distributed/__init__.py +13 -0
  332. oldman-0.1.0/oldman/tasks/distributed/broker.py +353 -0
  333. oldman-0.1.0/oldman/tasks/distributed/middleware.py +40 -0
  334. oldman-0.1.0/oldman/tasks/distributed/receiver.py +26 -0
  335. oldman-0.1.0/oldman/tasks/distributed/results.py +67 -0
  336. oldman-0.1.0/oldman/tasks/distributed/scheduler.py +116 -0
  337. oldman-0.1.0/oldman/tasks/distributed/worker.py +144 -0
  338. oldman-0.1.0/oldman/tasks/manager.py +367 -0
  339. oldman-0.1.0/oldman/tasks/messages.py +39 -0
  340. oldman-0.1.0/oldman/tasks/queue.py +94 -0
  341. oldman-0.1.0/oldman/tasks/simple.py +326 -0
  342. oldman-0.1.0/oldman/tasks/worker.py +159 -0
  343. oldman-0.1.0/oldman/utils/__init__.py +7 -0
  344. oldman-0.1.0/oldman/utils/collections_utils.py +233 -0
  345. oldman-0.1.0/oldman/utils/console.py +10 -0
  346. oldman-0.1.0/oldman/utils/date.py +86 -0
  347. oldman-0.1.0/oldman/utils/decorators.py +79 -0
  348. oldman-0.1.0/oldman/utils/files.py +38 -0
  349. oldman-0.1.0/oldman/utils/hash.py +192 -0
  350. oldman-0.1.0/oldman/utils/hash_ids.py +61 -0
  351. oldman-0.1.0/oldman/utils/headers.py +41 -0
  352. oldman-0.1.0/oldman/utils/http.py +113 -0
  353. oldman-0.1.0/oldman/utils/loop_utls.py +179 -0
  354. oldman-0.1.0/oldman/utils/singleton.py +160 -0
  355. oldman-0.1.0/oldman/utils/strings_utils.py +285 -0
  356. oldman-0.1.0/oldman/utils/thread.py +210 -0
  357. oldman-0.1.0/oldman/utils/timezone.py +59 -0
  358. oldman-0.1.0/oldman/version.py +10 -0
  359. oldman-0.1.0/oldman/web/__init__.py +54 -0
  360. oldman-0.1.0/oldman/web/api/__init__.py +27 -0
  361. oldman-0.1.0/oldman/web/api/actions.py +70 -0
  362. oldman-0.1.0/oldman/web/api/enums.py +40 -0
  363. oldman-0.1.0/oldman/web/api/responses.py +29 -0
  364. oldman-0.1.0/oldman/web/auth/__init__.py +35 -0
  365. oldman-0.1.0/oldman/web/auth/decorators.py +229 -0
  366. oldman-0.1.0/oldman/web/auth/forms.py +60 -0
  367. oldman-0.1.0/oldman/web/auth/session.py +40 -0
  368. oldman-0.1.0/oldman/web/auth/user_session.py +231 -0
  369. oldman-0.1.0/oldman/web/components/__init__.py +7 -0
  370. oldman-0.1.0/oldman/web/components/charts/__init__.py +21 -0
  371. oldman-0.1.0/oldman/web/components/charts/config.py +26 -0
  372. oldman-0.1.0/oldman/web/components/charts/renderers.py +50 -0
  373. oldman-0.1.0/oldman/web/components/charts/request.py +41 -0
  374. oldman-0.1.0/oldman/web/components/charts/results.py +49 -0
  375. oldman-0.1.0/oldman/web/components/charts/sqlalchemy.py +35 -0
  376. oldman-0.1.0/oldman/web/components/charts/views.py +133 -0
  377. oldman-0.1.0/oldman/web/components/forms/__init__.py +70 -0
  378. oldman-0.1.0/oldman/web/components/forms/base.py +493 -0
  379. oldman-0.1.0/oldman/web/components/forms/choices.py +54 -0
  380. oldman-0.1.0/oldman/web/components/forms/fields.py +395 -0
  381. oldman-0.1.0/oldman/web/components/forms/layouts.py +69 -0
  382. oldman-0.1.0/oldman/web/components/forms/models.py +367 -0
  383. oldman-0.1.0/oldman/web/components/forms/renderers.py +592 -0
  384. oldman-0.1.0/oldman/web/components/forms/tailwind.py +31 -0
  385. oldman-0.1.0/oldman/web/components/forms/widgets.py +391 -0
  386. oldman-0.1.0/oldman/web/components/selects/__init__.py +23 -0
  387. oldman-0.1.0/oldman/web/components/selects/choices.py +51 -0
  388. oldman-0.1.0/oldman/web/components/selects/providers.py +299 -0
  389. oldman-0.1.0/oldman/web/components/selects/registry.py +41 -0
  390. oldman-0.1.0/oldman/web/components/selects/signing.py +81 -0
  391. oldman-0.1.0/oldman/web/components/selects/views.py +76 -0
  392. oldman-0.1.0/oldman/web/components/tables/__init__.py +22 -0
  393. oldman-0.1.0/oldman/web/components/tables/columns.py +123 -0
  394. oldman-0.1.0/oldman/web/components/tables/legacy.py +207 -0
  395. oldman-0.1.0/oldman/web/components/tables/renderers.py +314 -0
  396. oldman-0.1.0/oldman/web/components/tables/request.py +34 -0
  397. oldman-0.1.0/oldman/web/components/tables/results.py +23 -0
  398. oldman-0.1.0/oldman/web/components/tables/views.py +659 -0
  399. oldman-0.1.0/oldman/web/errors.py +61 -0
  400. oldman-0.1.0/oldman/web/exceptions.py +5 -0
  401. oldman-0.1.0/oldman/web/html.py +53 -0
  402. oldman-0.1.0/oldman/web/http.py +154 -0
  403. oldman-0.1.0/oldman/web/i18n/__init__.py +15 -0
  404. oldman-0.1.0/oldman/web/i18n/assets.py +34 -0
  405. oldman-0.1.0/oldman/web/i18n/request.py +55 -0
  406. oldman-0.1.0/oldman/web/i18n/translation.py +223 -0
  407. oldman-0.1.0/oldman/web/messages/__init__.py +35 -0
  408. oldman-0.1.0/oldman/web/messages/_cookie_storage.py +396 -0
  409. oldman-0.1.0/oldman/web/messages/_template.py +42 -0
  410. oldman-0.1.0/oldman/web/messages/actions.py +20 -0
  411. oldman-0.1.0/oldman/web/messages/flash.py +173 -0
  412. oldman-0.1.0/oldman/web/messages/notifications/__init__.py +38 -0
  413. oldman-0.1.0/oldman/web/messages/notifications/apps.py +17 -0
  414. oldman-0.1.0/oldman/web/messages/notifications/locales/messages.pot +66 -0
  415. oldman-0.1.0/oldman/web/messages/notifications/locales/zh_Hans/LC_MESSAGES/messages.mo +0 -0
  416. oldman-0.1.0/oldman/web/messages/notifications/locales/zh_Hans/LC_MESSAGES/messages.po +68 -0
  417. oldman-0.1.0/oldman/web/messages/notifications/locales/zh_Hant/LC_MESSAGES/messages.mo +0 -0
  418. oldman-0.1.0/oldman/web/messages/notifications/locales/zh_Hant/LC_MESSAGES/messages.po +68 -0
  419. oldman-0.1.0/oldman/web/messages/notifications/migrations/4858aab957ee_create_oldman_notification.py +52 -0
  420. oldman-0.1.0/oldman/web/messages/notifications/migrations/__init__.py +0 -0
  421. oldman-0.1.0/oldman/web/messages/notifications/models.py +74 -0
  422. oldman-0.1.0/oldman/web/messages/notifications/payloads.py +122 -0
  423. oldman-0.1.0/oldman/web/messages/notifications/rendering.py +228 -0
  424. oldman-0.1.0/oldman/web/messages/notifications/runtime.py +242 -0
  425. oldman-0.1.0/oldman/web/messages/notifications/service.py +556 -0
  426. oldman-0.1.0/oldman/web/middlewares/__init__.py +5 -0
  427. oldman-0.1.0/oldman/web/middlewares/_legacy_i18n.py +7 -0
  428. oldman-0.1.0/oldman/web/middlewares/context.py +17 -0
  429. oldman-0.1.0/oldman/web/middlewares/i18n.py +80 -0
  430. oldman-0.1.0/oldman/web/middlewares/session.py +7 -0
  431. oldman-0.1.0/oldman/web/package_data.py +18 -0
  432. oldman-0.1.0/oldman/web/request.py +27 -0
  433. oldman-0.1.0/oldman/web/response.py +161 -0
  434. oldman-0.1.0/oldman/web/routing.py +69 -0
  435. oldman-0.1.0/oldman/web/security/__init__.py +27 -0
  436. oldman-0.1.0/oldman/web/security/csrf/__init__.py +12 -0
  437. oldman-0.1.0/oldman/web/security/csrf/csrf_extension.py +61 -0
  438. oldman-0.1.0/oldman/web/security/csrf/decorators.py +91 -0
  439. oldman-0.1.0/oldman/web/security/csrf/manager.py +243 -0
  440. oldman-0.1.0/oldman/web/security/decryptors.py +62 -0
  441. oldman-0.1.0/oldman/web/security/fingerprint.py +107 -0
  442. oldman-0.1.0/oldman/web/security/keys.py +52 -0
  443. oldman-0.1.0/oldman/web/security/rate_limiter/__init__.py +13 -0
  444. oldman-0.1.0/oldman/web/security/rate_limiter/base.py +13 -0
  445. oldman-0.1.0/oldman/web/security/rate_limiter/fingerprint.py +118 -0
  446. oldman-0.1.0/oldman/web/security/rate_limiter/fixed_window.py +42 -0
  447. oldman-0.1.0/oldman/web/security/rate_limiter/lua.py +123 -0
  448. oldman-0.1.0/oldman/web/session/__init__.py +182 -0
  449. oldman-0.1.0/oldman/web/session/base.py +693 -0
  450. oldman-0.1.0/oldman/web/sse/__init__.py +27 -0
  451. oldman-0.1.0/oldman/web/sse/connection.py +208 -0
  452. oldman-0.1.0/oldman/web/sse/events.py +75 -0
  453. oldman-0.1.0/oldman/web/sse/extension.py +438 -0
  454. oldman-0.1.0/oldman/web/sse/messages.py +39 -0
  455. oldman-0.1.0/oldman/web/sse/pool.py +83 -0
  456. oldman-0.1.0/oldman/web/sse/publisher.py +163 -0
  457. oldman-0.1.0/oldman/web/sse/stream.py +111 -0
  458. oldman-0.1.0/oldman/web/static/oldman/images/flags/cn.svg +11 -0
  459. oldman-0.1.0/oldman/web/static/oldman/images/flags/tw.svg +32 -0
  460. oldman-0.1.0/oldman/web/static/oldman/images/flags/us.svg +171 -0
  461. oldman-0.1.0/oldman/web/staticfiles/__init__.py +40 -0
  462. oldman-0.1.0/oldman/web/staticfiles/bundles.py +261 -0
  463. oldman-0.1.0/oldman/web/staticfiles/collector.py +655 -0
  464. oldman-0.1.0/oldman/web/staticfiles/finders.py +107 -0
  465. oldman-0.1.0/oldman/web/staticfiles/urls.py +47 -0
  466. oldman-0.1.0/oldman/web/template/__init__.py +143 -0
  467. oldman-0.1.0/oldman/web/template/_legacy_init.py +7 -0
  468. oldman-0.1.0/oldman/web/template/i18n_extension.py +149 -0
  469. oldman-0.1.0/oldman/web/template/render.py +38 -0
  470. oldman-0.1.0/oldman/web/templates/.gitkeep +1 -0
  471. oldman-0.1.0/oldman/web/templates/oldman/auth/partials/account_controls.html +28 -0
  472. oldman-0.1.0/oldman/web/templates/oldman/auth/partials/password_form.html +20 -0
  473. oldman-0.1.0/oldman/web/templates/oldman/auth/user_session_content.html +135 -0
  474. oldman-0.1.0/oldman/web/templates/oldman/charts/default/shell.html +8 -0
  475. oldman-0.1.0/oldman/web/templates/oldman/dashboard/base.html +41 -0
  476. oldman-0.1.0/oldman/web/templates/oldman/dashboard/components/modal.html +62 -0
  477. oldman-0.1.0/oldman/web/templates/oldman/dashboard/components/modal_fragment.html +14 -0
  478. oldman-0.1.0/oldman/web/templates/oldman/dashboard/errors/403.html +10 -0
  479. oldman-0.1.0/oldman/web/templates/oldman/dashboard/errors/404.html +10 -0
  480. oldman-0.1.0/oldman/web/templates/oldman/dashboard/errors/500.html +10 -0
  481. oldman-0.1.0/oldman/web/templates/oldman/dashboard/errors/_base.html +39 -0
  482. oldman-0.1.0/oldman/web/templates/oldman/dashboard/errors/default.html +10 -0
  483. oldman-0.1.0/oldman/web/templates/oldman/dashboard/partials/back_to_top.html +3 -0
  484. oldman-0.1.0/oldman/web/templates/oldman/dashboard/partials/language_switcher.html +40 -0
  485. oldman-0.1.0/oldman/web/templates/oldman/dashboard/partials/preloader.html +3 -0
  486. oldman-0.1.0/oldman/web/templates/oldman/dashboard/partials/preloader_critical_css.html +33 -0
  487. oldman-0.1.0/oldman/web/templates/oldman/dashboard/partials/shell.html +34 -0
  488. oldman-0.1.0/oldman/web/templates/oldman/dashboard/partials/topbar.html +131 -0
  489. oldman-0.1.0/oldman/web/templates/oldman/errors/403.html +10 -0
  490. oldman-0.1.0/oldman/web/templates/oldman/errors/404.html +10 -0
  491. oldman-0.1.0/oldman/web/templates/oldman/errors/500.html +10 -0
  492. oldman-0.1.0/oldman/web/templates/oldman/errors/_base.html +32 -0
  493. oldman-0.1.0/oldman/web/templates/oldman/errors/default.html +10 -0
  494. oldman-0.1.0/oldman/web/templates/oldman/forms/default/actions.html +5 -0
  495. oldman-0.1.0/oldman/web/templates/oldman/forms/default/boolean_field.html +2 -0
  496. oldman-0.1.0/oldman/web/templates/oldman/forms/default/field.html +6 -0
  497. oldman-0.1.0/oldman/web/templates/oldman/forms/default/field_errors.html +1 -0
  498. oldman-0.1.0/oldman/web/templates/oldman/forms/default/fields.html +3 -0
  499. oldman-0.1.0/oldman/web/templates/oldman/forms/default/form.html +9 -0
  500. oldman-0.1.0/oldman/web/templates/oldman/forms/default/help.html +1 -0
  501. oldman-0.1.0/oldman/web/templates/oldman/forms/default/json_list_field.html +42 -0
  502. oldman-0.1.0/oldman/web/templates/oldman/forms/default/message.html +1 -0
  503. oldman-0.1.0/oldman/web/templates/oldman/forms/default/multi_step.html +22 -0
  504. oldman-0.1.0/oldman/web/templates/oldman/forms/default/password_field.html +9 -0
  505. oldman-0.1.0/oldman/web/templates/oldman/forms/default/radio_field.html +8 -0
  506. oldman-0.1.0/oldman/web/templates/oldman/forms/default/status.html +1 -0
  507. oldman-0.1.0/oldman/web/templates/oldman/forms/default/widgets/ajax_autocomplete.html +7 -0
  508. oldman-0.1.0/oldman/web/templates/oldman/forms/default/widgets/ajax_select.html +5 -0
  509. oldman-0.1.0/oldman/web/templates/oldman/forms/default/widgets/color_picker.html +5 -0
  510. oldman-0.1.0/oldman/web/templates/oldman/forms/default/widgets/input_spinner.html +5 -0
  511. oldman-0.1.0/oldman/web/templates/oldman/forms/default/widgets/rich_text.html +4 -0
  512. oldman-0.1.0/oldman/web/templates/oldman/messages/flash_message.html +13 -0
  513. oldman-0.1.0/oldman/web/templates/oldman/messages/notifications/center_content.html +99 -0
  514. oldman-0.1.0/oldman/web/templates/oldman/messages/notifications/topbar_fragment.html +24 -0
  515. oldman-0.1.0/oldman/web/templates/oldman/tables/default/cell.html +1 -0
  516. oldman-0.1.0/oldman/web/templates/oldman/tables/default/error.html +1 -0
  517. oldman-0.1.0/oldman/web/templates/oldman/tables/default/fragment.html +39 -0
  518. oldman-0.1.0/oldman/web/templates/oldman/tables/default/head.html +19 -0
  519. oldman-0.1.0/oldman/web/templates/oldman/tables/default/pagination.html +11 -0
  520. oldman-0.1.0/oldman/web/templates/oldman/tables/default/row.html +6 -0
  521. oldman-0.1.0/oldman/web/templates/oldman/tables/default/shell.html +15 -0
  522. oldman-0.1.0/oldman/web/templates/oldman/tables/default/summary.html +5 -0
  523. oldman-0.1.0/oldman/web/websocket/__init__.py +46 -0
  524. oldman-0.1.0/pyproject.toml +154 -0
  525. oldman-0.1.0/scripts/hatch_sdist_hook.py +22 -0
oldman-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Alex
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,12 @@
1
+ Copyright (c) 2016, Manuel Miranda de Cid
2
+ All rights reserved.
3
+
4
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
5
+
6
+ 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7
+
8
+ 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
9
+
10
+ 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
11
+
12
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,26 @@
1
+ Source: https://github.com/lipis/flag-icons
2
+ Version: v7.3.2
3
+ Commit: fe15c16e7463d0c66d6c5730e9d0e832438d98e1
4
+ Included files: flags/4x3/cn.svg, flags/4x3/tw.svg, flags/4x3/us.svg
5
+
6
+ The MIT License (MIT)
7
+
8
+ Copyright (c) 2013 Panayiotis Lipiridis
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
11
+ this software and associated documentation files (the "Software"), to deal in
12
+ the Software without restriction, including without limitation the rights to
13
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
14
+ of the Software, and to permit persons to whom the Software is furnished to do
15
+ so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
@@ -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.
oldman-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,157 @@
1
+ Metadata-Version: 2.4
2
+ Name: oldman
3
+ Version: 0.1.0
4
+ Summary: Oldman backend-rendered Python Web and application framework.
5
+ Project-URL: Homepage, https://github.com/alexliyu7352/oldman
6
+ Project-URL: Documentation, https://github.com/alexliyu7352/oldman#readme
7
+ Project-URL: Repository, https://github.com/alexliyu7352/oldman.git
8
+ Project-URL: Issues, https://github.com/alexliyu7352/oldman/issues
9
+ License: MIT License
10
+
11
+ Copyright (c) 2026 Alex
12
+
13
+ Permission is hereby granted, free of charge, to any person obtaining a copy
14
+ of this software and associated documentation files (the "Software"), to deal
15
+ in the Software without restriction, including without limitation the rights
16
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17
+ copies of the Software, and to permit persons to whom the Software is
18
+ furnished to do so, subject to the following conditions:
19
+
20
+ The above copyright notice and this permission notice shall be included in all
21
+ copies or substantial portions of the Software.
22
+
23
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29
+ SOFTWARE.
30
+ License-File: LICENSE
31
+ Requires-Python: <3.14,>=3.12
32
+ Requires-Dist: aiodns>=3.5.0
33
+ Requires-Dist: aiofiles>=24.1
34
+ Requires-Dist: aiohttp==3.14.3
35
+ Requires-Dist: aiosqlite>=0.20
36
+ Requires-Dist: alembic>=1.18.5
37
+ Requires-Dist: async-lru>=2.0.5
38
+ Requires-Dist: babel>=2.14.0
39
+ Requires-Dist: billiard>=4.2.2
40
+ Requires-Dist: cryptography>=45.0.6
41
+ Requires-Dist: curl-cffi==0.15.0
42
+ Requires-Dist: fake-useragent>=2.2.0
43
+ Requires-Dist: faststream[nats]>=0.7.1
44
+ Requires-Dist: hiredis>=3.3.0
45
+ Requires-Dist: httpx[socks]>=0.28.1
46
+ Requires-Dist: isodate>=0.7.2
47
+ Requires-Dist: jinja2>=3.1.0
48
+ Requires-Dist: lxml>=6.0.1
49
+ Requires-Dist: markupsafe>=2.1
50
+ Requires-Dist: msgspec>=0.20.0
51
+ Requires-Dist: nats-py[nkeys]==2.15.0
52
+ Requires-Dist: orjson>=3.11.5
53
+ Requires-Dist: pillow>=11.3.0
54
+ Requires-Dist: pycares<5.0,>=4.9.0
55
+ Requires-Dist: pycryptodomex>=3.23.0
56
+ Requires-Dist: pydantic-settings>=2.12
57
+ Requires-Dist: pydantic>=2.12.5
58
+ Requires-Dist: pyprctl>=0.1.3; sys_platform == 'linux'
59
+ Requires-Dist: python-slugify>=8.0.4
60
+ Requires-Dist: redis<9,>=8
61
+ Requires-Dist: rich>=13.9
62
+ Requires-Dist: ruamel-yaml>=0.18.14
63
+ Requires-Dist: sanic-ext==25.12.0
64
+ Requires-Dist: sanic==25.12.1
65
+ Requires-Dist: sqids>=0.5.2
66
+ Requires-Dist: sqlalchemy>=2.0.44
67
+ Requires-Dist: sqlmodel>=0.0.27
68
+ Requires-Dist: taskiq-nats==0.6.0
69
+ Requires-Dist: taskiq-redis==1.2.3
70
+ Requires-Dist: taskiq==0.12.6
71
+ Requires-Dist: tenacity>=9.1.2
72
+ Requires-Dist: typer>=0.16.1
73
+ Requires-Dist: ujson>=5.10
74
+ Requires-Dist: uuid6>=2025.0.1
75
+ Requires-Dist: wtforms>=3.2
76
+ Description-Content-Type: text/markdown
77
+
78
+ # Oldman
79
+
80
+ Oldman 是后端渲染优先的 Python 应用框架,适合构建 Dashboard、管理后台、Web/API 服务和后台任务服务。
81
+
82
+ Python 负责配置、应用生命周期、权限、数据和 HTML;浏览器端负责局部更新、表单提交、表格、弹窗和实时交互。你可以只写后端,也可以为需要交互的页面增加 TypeScript。
83
+
84
+ 两个包各有职责:
85
+
86
+ | 包 | 用途 |
87
+ | --- | --- |
88
+ | `oldman`(Python) | Application、App 注册、配置、数据库迁移、Web、Auth、Admin、表单、模板、存储和后台能力 |
89
+ | `oldman-web`(npm) | Page/Component 生命周期、Dashboard 布局、共享样式、表单、Table、Modal 和浏览器交互 |
90
+
91
+ 内置 Admin 和业务 Dashboard 使用同一套组件、样式与响应协议,不需要分别维护两套前端。
92
+
93
+ ## 从哪里开始
94
+
95
+ - [用户文档](docs/users/README.md):安装、创建项目和实际使用。
96
+ - [开发者参考](docs/developers/README.md):准确的接口、加载顺序和扩展方法。
97
+ - [Agent 应用开发指南](docs/agents/README.md):按任务选择文件、完成接线与验证。
98
+ - [文档总入口](docs/README.md):按问题查找正文。
99
+
100
+ 初次使用可先[运行 EPG Dashboard Demo](docs/users/getting-started.md),再对照其[真实数据](docs/users/tutorial-tasks.md)和[表格、Modal 表单](docs/users/tutorial-dashboard.md)。教程直接使用 Demo 代码,给出源文件、运行目录、配置和预期结果;更多页面见[示例索引](docs/users/demo-examples.md)。
101
+
102
+ ## 最短的项目入口
103
+
104
+ 使用与你要开发的版本对应的 `oldman` 包。在发行包可用的环境中安装后执行:
105
+
106
+ ```sh
107
+ oldman startproject my_site
108
+ ```
109
+
110
+ 命令会询问项目类型和数据库。选择 `api`、`none` 后,在新项目目录执行:
111
+
112
+ ```sh
113
+ cd my_site
114
+ uv sync
115
+ ./run.sh api settings sync
116
+ ./run.sh api start
117
+ ```
118
+
119
+ 此时启动的是尚未添加业务路由的服务;`/` 返回 404 是正常结果。添加 API 的接线见[服务创建指南](docs/agents/create-service.md);要直接查看完整业务页面则运行上面的 Demo。
120
+
121
+ `run.sh` 只把原样参数交给项目 `.venv` 中的 `oldman`,不替你选服务、迁移数据库或启动前端。`./run.sh api start` 与使用同一虚拟环境运行 `oldman api start` 的语义相同。上面是新建空项目的命令,不是 Demo 启动步骤;Demo 的独立安装与调试见[运行环境与安装](docs/users/getting-started.md#运行环境与安装)。
122
+
123
+ ## 框架提供什么
124
+
125
+ - **应用组织**:一个项目可包含多个服务;每个服务读取自己的 YAML,并显式安装需要的 App。App 可提供模型、视图、自定义命令和强类型配置。
126
+ - **Web 与数据**:基于 Sanic 的异步服务、Jinja HTML、SQLAlchemy 模型、项目级 Alembic 命令、Auth 与 Admin。
127
+ - **页面交互**:后端 Form、HTML/JSON Table,前端 Form/Modal/Feedback/Select/Chart 等共享组件,以及有序的 JSON 响应动作。
128
+ - **消息**:Cookie 一次性页面提示、数据库持久通知、临时实时推送、通用 SSE 浏览器投递;进程控制消息有独立职责。
129
+ - **基础能力**:文件存储、HTTP Client、缓存、Redis/NATS provider、日志、短生命周期子进程和持久 Worker。
130
+ - **持久任务**:Taskiq + NATS JetStream + Redis,支持异步函数投递、多个执行进程、结果、广播和定时计划;与固定本地 Worker、Core NATS 事件/RPC 分开使用。
131
+
132
+ 普通 API 不要求安装前端包。需要共享 Dashboard UI 时再安装 `oldman-web` 及其声明的依赖;内置 Admin 的默认浏览器资源随 Python 包提供。
133
+
134
+ 当前运行目标为 Linux,Python 版本范围为 `>=3.12,<3.14`。SQLite 驱动随 Python 包安装;MySQL、PostgreSQL 驱动按项目需要声明。配置中存在 Redis 连接项不代表启动就连接 Redis,启用或调用相应能力时才需要可用的服务。
135
+
136
+ ## 完整示例
137
+
138
+ - [Admin Demo](https://github.com/alexliyu7352/oldman-admin-demo):内置后台的独立应用。
139
+ - [EPG Dashboard Demo](https://github.com/alexliyu7352/oldman-epg-dashboard):业务 Dashboard、UI 与功能示例。
140
+
141
+ 示例是独立 Git 仓库,各有配置、虚拟环境、前端依赖和数据库。具体运行步骤以各示例的 README 为准,不在框架目录内安装它们。
142
+
143
+ ## 源码布局
144
+
145
+ ```text
146
+ oldman/ Python 框架和随包资源
147
+ frontend/packages/oldman-web/ 浏览器包
148
+ frontend/apps/admin/ 内置 Admin 的前端源码
149
+ examples/snippets/ 局部用法片段,不是完整应用
150
+ tests/ Python 测试
151
+ scripts/ 维护和验证工具
152
+ docs/ 用户、开发者与 Agent 文档
153
+ ```
154
+
155
+ Python 和 npm 包不包含独立 Demo 的业务代码与运行数据。框架仓库不是业务项目,不在根目录添加应用的 `config/`、`services/` 或数据库。
156
+
157
+ 产品取舍见 [PRODUCT.md](PRODUCT.md),参与本仓库工作前请读 [AGENTS.md](AGENTS.md)。
oldman-0.1.0/README.md ADDED
@@ -0,0 +1,80 @@
1
+ # Oldman
2
+
3
+ Oldman 是后端渲染优先的 Python 应用框架,适合构建 Dashboard、管理后台、Web/API 服务和后台任务服务。
4
+
5
+ Python 负责配置、应用生命周期、权限、数据和 HTML;浏览器端负责局部更新、表单提交、表格、弹窗和实时交互。你可以只写后端,也可以为需要交互的页面增加 TypeScript。
6
+
7
+ 两个包各有职责:
8
+
9
+ | 包 | 用途 |
10
+ | --- | --- |
11
+ | `oldman`(Python) | Application、App 注册、配置、数据库迁移、Web、Auth、Admin、表单、模板、存储和后台能力 |
12
+ | `oldman-web`(npm) | Page/Component 生命周期、Dashboard 布局、共享样式、表单、Table、Modal 和浏览器交互 |
13
+
14
+ 内置 Admin 和业务 Dashboard 使用同一套组件、样式与响应协议,不需要分别维护两套前端。
15
+
16
+ ## 从哪里开始
17
+
18
+ - [用户文档](docs/users/README.md):安装、创建项目和实际使用。
19
+ - [开发者参考](docs/developers/README.md):准确的接口、加载顺序和扩展方法。
20
+ - [Agent 应用开发指南](docs/agents/README.md):按任务选择文件、完成接线与验证。
21
+ - [文档总入口](docs/README.md):按问题查找正文。
22
+
23
+ 初次使用可先[运行 EPG Dashboard Demo](docs/users/getting-started.md),再对照其[真实数据](docs/users/tutorial-tasks.md)和[表格、Modal 表单](docs/users/tutorial-dashboard.md)。教程直接使用 Demo 代码,给出源文件、运行目录、配置和预期结果;更多页面见[示例索引](docs/users/demo-examples.md)。
24
+
25
+ ## 最短的项目入口
26
+
27
+ 使用与你要开发的版本对应的 `oldman` 包。在发行包可用的环境中安装后执行:
28
+
29
+ ```sh
30
+ oldman startproject my_site
31
+ ```
32
+
33
+ 命令会询问项目类型和数据库。选择 `api`、`none` 后,在新项目目录执行:
34
+
35
+ ```sh
36
+ cd my_site
37
+ uv sync
38
+ ./run.sh api settings sync
39
+ ./run.sh api start
40
+ ```
41
+
42
+ 此时启动的是尚未添加业务路由的服务;`/` 返回 404 是正常结果。添加 API 的接线见[服务创建指南](docs/agents/create-service.md);要直接查看完整业务页面则运行上面的 Demo。
43
+
44
+ `run.sh` 只把原样参数交给项目 `.venv` 中的 `oldman`,不替你选服务、迁移数据库或启动前端。`./run.sh api start` 与使用同一虚拟环境运行 `oldman api start` 的语义相同。上面是新建空项目的命令,不是 Demo 启动步骤;Demo 的独立安装与调试见[运行环境与安装](docs/users/getting-started.md#运行环境与安装)。
45
+
46
+ ## 框架提供什么
47
+
48
+ - **应用组织**:一个项目可包含多个服务;每个服务读取自己的 YAML,并显式安装需要的 App。App 可提供模型、视图、自定义命令和强类型配置。
49
+ - **Web 与数据**:基于 Sanic 的异步服务、Jinja HTML、SQLAlchemy 模型、项目级 Alembic 命令、Auth 与 Admin。
50
+ - **页面交互**:后端 Form、HTML/JSON Table,前端 Form/Modal/Feedback/Select/Chart 等共享组件,以及有序的 JSON 响应动作。
51
+ - **消息**:Cookie 一次性页面提示、数据库持久通知、临时实时推送、通用 SSE 浏览器投递;进程控制消息有独立职责。
52
+ - **基础能力**:文件存储、HTTP Client、缓存、Redis/NATS provider、日志、短生命周期子进程和持久 Worker。
53
+ - **持久任务**:Taskiq + NATS JetStream + Redis,支持异步函数投递、多个执行进程、结果、广播和定时计划;与固定本地 Worker、Core NATS 事件/RPC 分开使用。
54
+
55
+ 普通 API 不要求安装前端包。需要共享 Dashboard UI 时再安装 `oldman-web` 及其声明的依赖;内置 Admin 的默认浏览器资源随 Python 包提供。
56
+
57
+ 当前运行目标为 Linux,Python 版本范围为 `>=3.12,<3.14`。SQLite 驱动随 Python 包安装;MySQL、PostgreSQL 驱动按项目需要声明。配置中存在 Redis 连接项不代表启动就连接 Redis,启用或调用相应能力时才需要可用的服务。
58
+
59
+ ## 完整示例
60
+
61
+ - [Admin Demo](https://github.com/alexliyu7352/oldman-admin-demo):内置后台的独立应用。
62
+ - [EPG Dashboard Demo](https://github.com/alexliyu7352/oldman-epg-dashboard):业务 Dashboard、UI 与功能示例。
63
+
64
+ 示例是独立 Git 仓库,各有配置、虚拟环境、前端依赖和数据库。具体运行步骤以各示例的 README 为准,不在框架目录内安装它们。
65
+
66
+ ## 源码布局
67
+
68
+ ```text
69
+ oldman/ Python 框架和随包资源
70
+ frontend/packages/oldman-web/ 浏览器包
71
+ frontend/apps/admin/ 内置 Admin 的前端源码
72
+ examples/snippets/ 局部用法片段,不是完整应用
73
+ tests/ Python 测试
74
+ scripts/ 维护和验证工具
75
+ docs/ 用户、开发者与 Agent 文档
76
+ ```
77
+
78
+ Python 和 npm 包不包含独立 Demo 的业务代码与运行数据。框架仓库不是业务项目,不在根目录添加应用的 `config/`、`services/` 或数据库。
79
+
80
+ 产品取舍见 [PRODUCT.md](PRODUCT.md),参与本仓库工作前请读 [AGENTS.md](AGENTS.md)。
@@ -0,0 +1,14 @@
1
+ """
2
+ @author:alex
3
+ @date:2023/12/29
4
+ @time:上午1:23
5
+ """
6
+
7
+ __author__ = "alex"
8
+
9
+ from oldman.runtime.bootstrap import (
10
+ ServiceBootstrapContext,
11
+ bootstrap_service,
12
+ )
13
+
14
+ __all__ = ["ServiceBootstrapContext", "bootstrap_service"]
@@ -0,0 +1,23 @@
1
+ """
2
+ @author:alex
3
+ @date:2026/7/14
4
+ @time:18:44
5
+ """
6
+
7
+ __author__ = "alex"
8
+
9
+ from oldman.apps.config import (
10
+ AppConfig,
11
+ AppNotInstalledError,
12
+ AppSettingsNotDefinedError,
13
+ AppSettingsNotReadyError,
14
+ )
15
+ from oldman.apps.registry import AppRegistry
16
+
17
+ __all__ = [
18
+ "AppConfig",
19
+ "AppNotInstalledError",
20
+ "AppRegistry",
21
+ "AppSettingsNotDefinedError",
22
+ "AppSettingsNotReadyError",
23
+ ]
@@ -0,0 +1,15 @@
1
+ """Built-in Admin application."""
2
+
3
+ from oldman.apps.admin.model_admin import AdminUserModelAdmin, ModelAdmin
4
+ from oldman.apps.admin.runtime import install_admin
5
+ from oldman.apps.admin.site import AdminSite, site
6
+ from oldman.apps.admin.users import AdminUserManagementError
7
+
8
+ __all__ = [
9
+ "AdminSite",
10
+ "AdminUserManagementError",
11
+ "AdminUserModelAdmin",
12
+ "ModelAdmin",
13
+ "install_admin",
14
+ "site",
15
+ ]
@@ -0,0 +1,19 @@
1
+ """Installable Admin application metadata."""
2
+
3
+ from oldman.apps import AppConfig
4
+ from oldman.apps.admin.settings import AdminSettings
5
+ from oldman.i18n import gettext_lazy as _
6
+
7
+
8
+ class AdminAppConfig(AppConfig[AdminSettings]):
9
+ """Describe the built-in Admin application and its settings owner."""
10
+
11
+ label = "admin"
12
+ display_name = _("Administration")
13
+ icon = "ri-admin-line"
14
+ settings_model = AdminSettings
15
+
16
+
17
+ app = AdminAppConfig()
18
+
19
+ __all__ = ["AdminAppConfig", "app"]