aury-boot 0.0.13__tar.gz → 0.0.15__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 (198) hide show
  1. {aury_boot-0.0.13 → aury_boot-0.0.15}/PKG-INFO +1 -1
  2. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/_version.py +2 -2
  3. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/application/middleware/logging.py +1 -13
  4. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/templates/project/aury_docs/11-logging.md.tpl +5 -41
  5. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/templates/project/aury_docs/16-adapter.md.tpl +1 -1
  6. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/templates/project/aury_docs/99-cli.md.tpl +76 -11
  7. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/common/logging/__init__.py +0 -5
  8. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/common/logging/context.py +1 -52
  9. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/infrastructure/database/manager.py +8 -2
  10. {aury_boot-0.0.13 → aury_boot-0.0.15}/.gitignore +0 -0
  11. {aury_boot-0.0.13 → aury_boot-0.0.15}/README.md +0 -0
  12. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/__init__.py +0 -0
  13. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/application/__init__.py +0 -0
  14. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/application/adapter/__init__.py +0 -0
  15. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/application/adapter/base.py +0 -0
  16. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/application/adapter/config.py +0 -0
  17. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/application/adapter/decorators.py +0 -0
  18. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/application/adapter/exceptions.py +0 -0
  19. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/application/adapter/http.py +0 -0
  20. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/application/app/__init__.py +0 -0
  21. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/application/app/base.py +0 -0
  22. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/application/app/components.py +0 -0
  23. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/application/app/middlewares.py +0 -0
  24. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/application/app/startup.py +0 -0
  25. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/application/config/__init__.py +0 -0
  26. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/application/config/multi_instance.py +0 -0
  27. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/application/config/settings.py +0 -0
  28. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/application/constants/__init__.py +0 -0
  29. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/application/constants/components.py +0 -0
  30. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/application/constants/scheduler.py +0 -0
  31. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/application/constants/service.py +0 -0
  32. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/application/errors/__init__.py +0 -0
  33. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/application/errors/chain.py +0 -0
  34. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/application/errors/codes.py +0 -0
  35. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/application/errors/exceptions.py +0 -0
  36. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/application/errors/handlers.py +0 -0
  37. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/application/errors/response.py +0 -0
  38. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/application/interfaces/__init__.py +0 -0
  39. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/application/interfaces/egress.py +0 -0
  40. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/application/interfaces/ingress.py +0 -0
  41. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/application/middleware/__init__.py +0 -0
  42. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/application/migrations/__init__.py +0 -0
  43. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/application/migrations/manager.py +0 -0
  44. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/application/migrations/setup.py +0 -0
  45. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/application/rpc/__init__.py +0 -0
  46. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/application/rpc/base.py +0 -0
  47. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/application/rpc/client.py +0 -0
  48. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/application/rpc/discovery.py +0 -0
  49. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/application/scheduler/__init__.py +0 -0
  50. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/application/scheduler/runner.py +0 -0
  51. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/application/server/__init__.py +0 -0
  52. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/__init__.py +0 -0
  53. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/add.py +0 -0
  54. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/app.py +0 -0
  55. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/config.py +0 -0
  56. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/docker.py +0 -0
  57. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/docs.py +0 -0
  58. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/generate.py +0 -0
  59. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/init.py +0 -0
  60. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/migrate/__init__.py +0 -0
  61. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/migrate/app.py +0 -0
  62. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/migrate/commands.py +0 -0
  63. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/pkg.py +0 -0
  64. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/scheduler.py +0 -0
  65. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/server/__init__.py +0 -0
  66. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/server/app.py +0 -0
  67. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/templates/generate/api.py.tpl +0 -0
  68. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/templates/generate/model.py.tpl +0 -0
  69. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/templates/generate/repository.py.tpl +0 -0
  70. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/templates/generate/schema.py.tpl +0 -0
  71. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/templates/generate/service.py.tpl +0 -0
  72. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/templates/project/AGENTS.md.tpl +0 -0
  73. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/templates/project/README.md.tpl +0 -0
  74. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/templates/project/admin_console_init.py.tpl +0 -0
  75. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/templates/project/aury_docs/00-overview.md.tpl +0 -0
  76. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/templates/project/aury_docs/01-model.md.tpl +0 -0
  77. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/templates/project/aury_docs/02-repository.md.tpl +0 -0
  78. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/templates/project/aury_docs/03-service.md.tpl +0 -0
  79. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/templates/project/aury_docs/04-schema.md.tpl +0 -0
  80. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/templates/project/aury_docs/05-api.md.tpl +0 -0
  81. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/templates/project/aury_docs/06-exception.md.tpl +0 -0
  82. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/templates/project/aury_docs/07-cache.md.tpl +0 -0
  83. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/templates/project/aury_docs/08-scheduler.md.tpl +0 -0
  84. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/templates/project/aury_docs/09-tasks.md.tpl +0 -0
  85. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/templates/project/aury_docs/10-storage.md.tpl +0 -0
  86. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/templates/project/aury_docs/12-admin.md.tpl +0 -0
  87. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/templates/project/aury_docs/13-channel.md.tpl +0 -0
  88. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/templates/project/aury_docs/14-mq.md.tpl +0 -0
  89. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/templates/project/aury_docs/15-events.md.tpl +0 -0
  90. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/templates/project/config.py.tpl +0 -0
  91. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/templates/project/conftest.py.tpl +0 -0
  92. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/templates/project/env_templates/_header.tpl +0 -0
  93. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/templates/project/env_templates/admin.tpl +0 -0
  94. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/templates/project/env_templates/cache.tpl +0 -0
  95. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/templates/project/env_templates/database.tpl +0 -0
  96. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/templates/project/env_templates/log.tpl +0 -0
  97. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/templates/project/env_templates/messaging.tpl +0 -0
  98. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/templates/project/env_templates/rpc.tpl +0 -0
  99. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/templates/project/env_templates/scheduler.tpl +0 -0
  100. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/templates/project/env_templates/service.tpl +0 -0
  101. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/templates/project/env_templates/storage.tpl +0 -0
  102. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/templates/project/env_templates/third_party.tpl +0 -0
  103. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/templates/project/gitignore.tpl +0 -0
  104. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/templates/project/main.py.tpl +0 -0
  105. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/templates/project/modules/api.py.tpl +0 -0
  106. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/templates/project/modules/exceptions.py.tpl +0 -0
  107. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/templates/project/modules/schedules.py.tpl +0 -0
  108. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/templates/project/modules/tasks.py.tpl +0 -0
  109. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/commands/worker.py +0 -0
  110. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/common/__init__.py +0 -0
  111. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/common/exceptions/__init__.py +0 -0
  112. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/common/i18n/__init__.py +0 -0
  113. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/common/i18n/translator.py +0 -0
  114. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/common/logging/decorators.py +0 -0
  115. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/common/logging/format.py +0 -0
  116. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/common/logging/setup.py +0 -0
  117. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/contrib/__init__.py +0 -0
  118. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/contrib/admin_console/__init__.py +0 -0
  119. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/contrib/admin_console/auth.py +0 -0
  120. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/contrib/admin_console/discovery.py +0 -0
  121. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/contrib/admin_console/install.py +0 -0
  122. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/contrib/admin_console/utils.py +0 -0
  123. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/domain/__init__.py +0 -0
  124. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/domain/exceptions/__init__.py +0 -0
  125. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/domain/models/__init__.py +0 -0
  126. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/domain/models/base.py +0 -0
  127. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/domain/models/mixins.py +0 -0
  128. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/domain/models/models.py +0 -0
  129. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/domain/pagination/__init__.py +0 -0
  130. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/domain/repository/__init__.py +0 -0
  131. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/domain/repository/impl.py +0 -0
  132. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/domain/repository/interceptors.py +0 -0
  133. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/domain/repository/interface.py +0 -0
  134. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/domain/repository/query_builder.py +0 -0
  135. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/domain/service/__init__.py +0 -0
  136. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/domain/service/base.py +0 -0
  137. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/domain/transaction/__init__.py +0 -0
  138. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/infrastructure/__init__.py +0 -0
  139. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/infrastructure/cache/__init__.py +0 -0
  140. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/infrastructure/cache/backends.py +0 -0
  141. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/infrastructure/cache/base.py +0 -0
  142. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/infrastructure/cache/exceptions.py +0 -0
  143. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/infrastructure/cache/factory.py +0 -0
  144. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/infrastructure/cache/manager.py +0 -0
  145. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/infrastructure/channel/__init__.py +0 -0
  146. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/infrastructure/channel/backends/__init__.py +0 -0
  147. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/infrastructure/channel/backends/memory.py +0 -0
  148. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/infrastructure/channel/backends/redis.py +0 -0
  149. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/infrastructure/channel/base.py +0 -0
  150. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/infrastructure/channel/manager.py +0 -0
  151. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/infrastructure/clients/__init__.py +0 -0
  152. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/infrastructure/clients/rabbitmq/__init__.py +0 -0
  153. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/infrastructure/clients/rabbitmq/config.py +0 -0
  154. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/infrastructure/clients/rabbitmq/manager.py +0 -0
  155. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/infrastructure/clients/redis/__init__.py +0 -0
  156. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/infrastructure/clients/redis/config.py +0 -0
  157. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/infrastructure/clients/redis/manager.py +0 -0
  158. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/infrastructure/database/__init__.py +0 -0
  159. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/infrastructure/database/config.py +0 -0
  160. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/infrastructure/database/exceptions.py +0 -0
  161. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/infrastructure/database/query_tools/__init__.py +0 -0
  162. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/infrastructure/database/strategies/__init__.py +0 -0
  163. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/infrastructure/di/__init__.py +0 -0
  164. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/infrastructure/di/container.py +0 -0
  165. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/infrastructure/events/__init__.py +0 -0
  166. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/infrastructure/events/backends/__init__.py +0 -0
  167. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/infrastructure/events/backends/memory.py +0 -0
  168. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/infrastructure/events/backends/rabbitmq.py +0 -0
  169. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/infrastructure/events/backends/redis.py +0 -0
  170. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/infrastructure/events/base.py +0 -0
  171. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/infrastructure/events/manager.py +0 -0
  172. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/infrastructure/events/middleware.py +0 -0
  173. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/infrastructure/monitoring/__init__.py +0 -0
  174. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/infrastructure/mq/__init__.py +0 -0
  175. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/infrastructure/mq/backends/__init__.py +0 -0
  176. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/infrastructure/mq/backends/rabbitmq.py +0 -0
  177. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/infrastructure/mq/backends/redis.py +0 -0
  178. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/infrastructure/mq/base.py +0 -0
  179. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/infrastructure/mq/manager.py +0 -0
  180. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/infrastructure/scheduler/__init__.py +0 -0
  181. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/infrastructure/scheduler/exceptions.py +0 -0
  182. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/infrastructure/scheduler/manager.py +0 -0
  183. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/infrastructure/storage/__init__.py +0 -0
  184. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/infrastructure/storage/base.py +0 -0
  185. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/infrastructure/storage/exceptions.py +0 -0
  186. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/infrastructure/storage/factory.py +0 -0
  187. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/infrastructure/tasks/__init__.py +0 -0
  188. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/infrastructure/tasks/config.py +0 -0
  189. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/infrastructure/tasks/constants.py +0 -0
  190. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/infrastructure/tasks/exceptions.py +0 -0
  191. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/infrastructure/tasks/manager.py +0 -0
  192. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/testing/__init__.py +0 -0
  193. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/testing/base.py +0 -0
  194. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/testing/client.py +0 -0
  195. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/testing/factory.py +0 -0
  196. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/toolkit/__init__.py +0 -0
  197. {aury_boot-0.0.13 → aury_boot-0.0.15}/aury/boot/toolkit/http/__init__.py +0 -0
  198. {aury_boot-0.0.13 → aury_boot-0.0.15}/pyproject.toml +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aury-boot
3
- Version: 0.0.13
3
+ Version: 0.0.15
4
4
  Summary: Aury Boot - 基于 FastAPI 生态的企业级 API 开发框架
5
5
  Requires-Python: >=3.13
6
6
  Requires-Dist: alembic>=1.17.2
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
28
28
  commit_id: COMMIT_ID
29
29
  __commit_id__: COMMIT_ID
30
30
 
31
- __version__ = version = '0.0.13'
32
- __version_tuple__ = version_tuple = (0, 0, 13)
31
+ __version__ = version = '0.0.15'
32
+ __version_tuple__ = version_tuple = (0, 0, 15)
33
33
 
34
34
  __commit_id__ = commit_id = None
@@ -17,7 +17,7 @@ from starlette.requests import Request
17
17
  from starlette.responses import Response
18
18
 
19
19
  from aury.boot.application.errors import global_exception_handler
20
- from aury.boot.common.logging import get_request_contexts, logger, set_trace_id
20
+ from aury.boot.common.logging import logger, set_trace_id
21
21
 
22
22
 
23
23
  def log_request[T](func: Callable[..., T]) -> Callable[..., T]:
@@ -187,12 +187,6 @@ class RequestLoggingMiddleware(BaseHTTPMiddleware):
187
187
  )
188
188
  logger.log(log_level.upper(), response_log)
189
189
 
190
- # 记录请求上下文(user_id, tenant_id 等用户注册的字段)
191
- request_contexts = get_request_contexts()
192
- if request_contexts:
193
- ctx_str = " | ".join(f"{k}: {v}" for k, v in request_contexts.items())
194
- logger.info(f"[REQUEST_CONTEXT] Trace-ID: {trace_id} | {ctx_str}")
195
-
196
190
  # 写入 access 日志(简洁格式)
197
191
  logger.bind(access=True).info(
198
192
  f"{request.method} {request.url.path} {status_code} {duration:.3f}s"
@@ -216,12 +210,6 @@ class RequestLoggingMiddleware(BaseHTTPMiddleware):
216
210
  f"耗时: {duration:.3f}s | Trace-ID: {trace_id}"
217
211
  )
218
212
 
219
- # 记录请求上下文(即使异常也要记录,便于追踪问题)
220
- request_contexts = get_request_contexts()
221
- if request_contexts:
222
- ctx_str = " | ".join(f"{k}: {v}" for k, v in request_contexts.items())
223
- logger.info(f"[REQUEST_CONTEXT] Trace-ID: {trace_id} | {ctx_str}")
224
-
225
213
  # 使用全局异常处理器生成响应,而不是直接抛出异常
226
214
  # BaseHTTPMiddleware 中直接 raise 会绕过 FastAPI 的异常处理器
227
215
  response = await global_exception_handler(request, exc)
@@ -19,44 +19,8 @@ logger.exception("异常信息") # 自动记录堆栈
19
19
  2024-01-15 12:00:00 | INFO | app.service:create:42 | abc123 - 操作成功
20
20
  ```
21
21
 
22
- ## 11.2 注入用户信息
23
22
 
24
- 框架不内置用户系统,但支持注入自定义请求上下文:
25
-
26
- ```python
27
- # app/auth/context.py
28
- from contextvars import ContextVar
29
- from aury.boot.common.logging import register_request_context
30
-
31
- _user_id: ContextVar[str] = ContextVar("user_id", default="")
32
-
33
- def set_user_id(uid: str) -> None:
34
- _user_id.set(uid)
35
-
36
- # 启动时注册(只需一次)
37
- register_request_context("user_id", _user_id.get)
38
- ```
39
-
40
- 在认证中间件中设置(order < 100 以在日志中间件前执行):
41
-
42
- ```python
43
- class AuthMiddleware(Middleware):
44
- order = 50 # 在日志中间件(order=100)之前执行
45
-
46
- async def dispatch(self, request, call_next):
47
- user = await verify_token(request)
48
- if user:
49
- set_user_id(str(user.id))
50
- return await call_next(request)
51
- ```
52
-
53
- 结果:
54
- ```
55
- ← GET /api/users | 状态: 200 | 耗时: 0.05s | Trace-ID: abc123
56
- [REQUEST_CONTEXT] Trace-ID: abc123 | user_id: 123
57
- ```
58
-
59
- ## 11.3 性能监控装饰器
23
+ ## 11.2 性能监控装饰器
60
24
 
61
25
  ```python
62
26
  from aury.boot.common.logging import log_performance, log_exceptions
@@ -70,7 +34,7 @@ async def risky_operation():
70
34
  ...
71
35
  ```
72
36
 
73
- ## 11.4 HTTP 请求日志
37
+ ## 11.3 HTTP 请求日志
74
38
 
75
39
  框架内置 `RequestLoggingMiddleware` 自动记录:
76
40
 
@@ -85,7 +49,7 @@ async def risky_operation():
85
49
  慢请求: GET /api/reports | 耗时: 2.345s (超过1秒) | Trace-ID: abc123
86
50
  ```
87
51
 
88
- ## 11.5 自定义日志文件
52
+ ## 11.4 自定义日志文件
89
53
 
90
54
  为特定业务创建独立的日志文件:
91
55
 
@@ -99,7 +63,7 @@ register_log_sink("payment", filter_key="payment")
99
63
  logger.bind(payment=True).info(f"支付成功 | 订单: {{order_id}}")
100
64
  ```
101
65
 
102
- ## 11.6 异步任务链路追踪
66
+ ## 11.5 异步任务链路追踪
103
67
 
104
68
  跨进程任务需要手动传递 trace_id:
105
69
 
@@ -117,7 +81,7 @@ async def process_order(order_id: str, trace_id: str | None = None):
117
81
  logger.info(f"处理订单: {{order_id}}") # 自动包含 trace_id
118
82
  ```
119
83
 
120
- ## 11.7 服务上下文隔离
84
+ ## 11.6 服务上下文隔离
121
85
 
122
86
  日志自动按服务类型分离:
123
87
 
@@ -131,7 +131,7 @@ class WechatAdapter(HttpAdapter):
131
131
  async def _prepare_headers(self, headers: dict | None) -> dict:
132
132
  """添加认证头。"""
133
133
  headers = await super()._prepare_headers(headers)
134
- headers["Authorization"] = f"Bearer {await self._get_access_token()}"
134
+ headers["Authorization"] = f"Bearer {{await self._get_access_token()}}"
135
135
  return headers
136
136
 
137
137
  @adapter_method("send_message")
@@ -104,14 +104,79 @@ aury pkg remove redis
104
104
 
105
105
  常用环境变量:
106
106
 
107
- | 变量 | 说明 | 默认值 |
108
- |------|------|--------|
109
- | `ADMIN__ENABLED` | 是否启用管理后台 | `false` |
110
- | `ADMIN__PATH` | 管理后台路径 | `/api/admin-console` |
111
- | `ADMIN__DATABASE_URL` | 管理后台同步数据库 URL(可覆盖自动推导) | - |
112
- | `ADMIN__AUTH_MODE` | 认证模式(basic/bearer/none/custom/jwt) | `basic` |
113
- | `ADMIN__AUTH_SECRET_KEY` | session 签名密钥(生产必配) | - |
114
- | `ADMIN__AUTH_BASIC_USERNAME` | basic 用户名 | - |
115
- | `ADMIN__AUTH_BASIC_PASSWORD` | basic 密码 | - |
116
- | `ADMIN__AUTH_BEARER_TOKENS` | bearer token 白名单 | `[]` |
117
- | `ADMIN__AUTH_BACKEND` | 自定义认证后端导入路径(module:attr) | - |
107
+ || 变量 | 说明 | 默认值 |
108
+ ||------|------|--------|
109
+ || `ADMIN__ENABLED` | 是否启用管理后台 | `false` |
110
+ || `ADMIN__PATH` | 管理后台路径 | `/api/admin-console` |
111
+ || `ADMIN__DATABASE_URL` | 管理后台同步数据库 URL(可覆盖自动推导) | - |
112
+ || `ADMIN__AUTH_MODE` | 认证模式(basic/bearer/none/custom/jwt) | `basic` |
113
+ || `ADMIN__AUTH_SECRET_KEY` | session 签名密钥(生产必配) | - |
114
+ || `ADMIN__AUTH_BASIC_USERNAME` | basic 用户名 | - |
115
+ || `ADMIN__AUTH_BASIC_PASSWORD` | basic 密码 | - |
116
+ || `ADMIN__AUTH_BEARER_TOKENS` | bearer token 白名单 | `[]` |
117
+ || `ADMIN__AUTH_BACKEND` | 自定义认证后端导入路径(module:attr) | - |
118
+
119
+ ## 注册 CLI 与扩展命令
120
+
121
+ ### 内置 `aury` 命令如何注册
122
+
123
+ Aury Boot 安装后会自动注册一个全局命令 `aury`(见框架自身的 `pyproject.toml`):
124
+
125
+ ```toml
126
+ [project.scripts]
127
+ aury = "aury.boot.commands:main"
128
+ ```
129
+
130
+ - `aury.boot.commands:main` 是 Typer 应用入口,内部通过 `app.add_typer(...)` 注册了 `init/generate/server/scheduler/worker/migrate/docker/docs/pkg` 等子命令。
131
+
132
+ ### 在你自己的项目里注册一个 CLI
133
+
134
+ 如果你希望在自己的服务里有一个独立的 CLI(例如 `{project_name_snake}`),并且复用 Aury Boot 的全部基础命令,可以这样做:
135
+
136
+ 1. 新建模块 `{package_name}/cli.py`:
137
+
138
+ ```python
139
+ from typer import Typer
140
+ from aury.boot.commands import register_commands
141
+
142
+ # 创建项目自己的 CLI
143
+ app = Typer(name="{project_name_snake}")
144
+
145
+ # 继承 aury-boot 的所有基础命令
146
+ register_commands(app)
147
+
148
+ # 或者按需关闭某些命令,例如不暴露 docker 命令:
149
+ # register_commands(app, include_docker=False)
150
+
151
+
152
+ # 添加你自己的项目命令
153
+ @app.command()
154
+ async def hello(name: str = "world") -> None:
155
+ """示例:项目自定义命令。"""
156
+ print(f"Hello, {name} from {project_name_snake}!")
157
+ ```
158
+
159
+ > 注意:这里的 `app` 是 Typer 应用实例,`register_commands` 会把所有内置的 `init/generate/server/...` 等命令挂到你自己的 CLI 下。
160
+
161
+ 2. 在你项目自己的 `pyproject.toml` 中注册脚本入口(**不是框架本身的 pyproject**):
162
+
163
+ ```toml
164
+ [project.scripts]
165
+ {project_name_snake} = "{package_name}.cli:app"
166
+ ```
167
+
168
+ 3. 安装项目后,你就可以使用:
169
+
170
+ ```bash
171
+ # 使用项目 CLI 运行 aury-boot 命令
172
+ {project_name_snake} init
173
+ {project_name_snake} generate crud user -i
174
+ {project_name_snake} server dev
175
+
176
+ # 调用你自定义的命令
177
+ {project_name_snake} hello --name dev
178
+ ```
179
+
180
+ 这样:
181
+ - 基础命令仍由 Aury Boot 维护和升级;
182
+ - 你的项目可以在自己的命名空间下扩展命令,而不用直接修改框架的 `aury` 命令。
@@ -5,7 +5,6 @@
5
5
  - 性能监控装饰器
6
6
  - 异常日志装饰器
7
7
  - 链路追踪 ID 支持
8
- - 请求上下文注入(user_id 等)
9
8
  - 自定义日志 sink 注册 API
10
9
 
11
10
  日志文件:
@@ -27,10 +26,8 @@ logger.remove()
27
26
  # 从子模块导入
28
27
  from aury.boot.common.logging.context import (
29
28
  ServiceContext,
30
- get_request_contexts,
31
29
  get_service_context,
32
30
  get_trace_id,
33
- register_request_context,
34
31
  set_service_context,
35
32
  set_trace_id,
36
33
  )
@@ -55,7 +52,6 @@ __all__ = [
55
52
  "ServiceContext",
56
53
  "format_exception_java_style",
57
54
  "get_class_logger",
58
- "get_request_contexts",
59
55
  "get_service_context",
60
56
  "get_trace_id",
61
57
  "log_exception",
@@ -63,7 +59,6 @@ __all__ = [
63
59
  "log_performance",
64
60
  "logger",
65
61
  "register_log_sink",
66
- "register_request_context",
67
62
  "set_service_context",
68
63
  "set_trace_id",
69
64
  "setup_intercept",
@@ -1,11 +1,10 @@
1
1
  """日志上下文管理。
2
2
 
3
- 提供链路追踪 ID、服务上下文、请求上下文的管理。
3
+ 提供链路追踪 ID、服务上下文的管理。
4
4
  """
5
5
 
6
6
  from __future__ import annotations
7
7
 
8
- from collections.abc import Callable
9
8
  from contextvars import ContextVar
10
9
  from enum import Enum
11
10
  import uuid
@@ -24,8 +23,6 @@ _service_context: ContextVar[ServiceContext] = ContextVar("service_context", def
24
23
  # 链路追踪 ID
25
24
  _trace_id_var: ContextVar[str] = ContextVar("trace_id", default="")
26
25
 
27
- # 请求上下文字段注册表(用户可注册自定义字段,如 user_id, tenant_id)
28
- _request_context_getters: dict[str, Callable[[], str]] = {}
29
26
 
30
27
 
31
28
  def get_service_context() -> ServiceContext:
@@ -75,58 +72,10 @@ def set_trace_id(trace_id: str) -> None:
75
72
  _trace_id_var.set(trace_id)
76
73
 
77
74
 
78
- def register_request_context(name: str, getter: Callable[[], str]) -> None:
79
- """注册请求上下文字段。
80
-
81
- 注册后,该字段会在每个请求结束时记录一次(与 trace_id 关联)。
82
- 适用于 user_id、tenant_id 等需要关联到请求但不需要每行日志都记录的信息。
83
-
84
- Args:
85
- name: 字段名(如 "user_id", "tenant_id")
86
- getter: 获取当前值的函数(通常从 ContextVar 读取)
87
-
88
- 使用示例:
89
- from contextvars import ContextVar
90
- from aury.boot.common.logging import register_request_context
91
-
92
- # 定义上下文变量
93
- _user_id: ContextVar[str] = ContextVar("user_id", default="")
94
-
95
- def set_user_id(uid: str):
96
- _user_id.set(uid)
97
-
98
- # 启动时注册(一次)
99
- register_request_context("user_id", _user_id.get)
100
-
101
- # Auth 中间件中设置(每次请求)
102
- set_user_id(str(user.id))
103
- """
104
- _request_context_getters[name] = getter
105
-
106
-
107
- def get_request_contexts() -> dict[str, str]:
108
- """获取所有已注册的请求上下文当前值。
109
-
110
- Returns:
111
- 字段名到值的字典(仅包含非空值)
112
- """
113
- result = {}
114
- for name, getter in _request_context_getters.items():
115
- try:
116
- value = getter()
117
- if value: # 只包含非空值
118
- result[name] = value
119
- except Exception:
120
- pass # 忽略获取失败的字段
121
- return result
122
-
123
-
124
75
  __all__ = [
125
76
  "ServiceContext",
126
- "get_request_contexts",
127
77
  "get_service_context",
128
78
  "get_trace_id",
129
- "register_request_context",
130
79
  "set_service_context",
131
80
  "set_trace_id",
132
81
  ]
@@ -10,7 +10,7 @@ from collections.abc import AsyncGenerator
10
10
  from contextlib import asynccontextmanager
11
11
 
12
12
  from sqlalchemy import text
13
- from sqlalchemy.exc import DisconnectionError, OperationalError
13
+ from sqlalchemy.exc import DisconnectionError, OperationalError, SQLAlchemyError
14
14
  from sqlalchemy.ext.asyncio import AsyncEngine, AsyncSession, async_sessionmaker, create_async_engine
15
15
 
16
16
  from aury.boot.common.logging import logger
@@ -237,10 +237,16 @@ class DatabaseManager:
237
237
  try:
238
238
  await self._check_session_connection(session)
239
239
  yield session
240
- except Exception as exc:
240
+ except SQLAlchemyError as exc:
241
+ # 只捕获数据库相关异常
241
242
  await session.rollback()
242
243
  logger.exception(f"数据库会话异常: {exc}")
243
244
  raise
245
+ except Exception:
246
+ # 非数据库异常(如请求验证错误):仍需回滚以确保事务一致性
247
+ # 但不记录为数据库异常,直接传播
248
+ await session.rollback()
249
+ raise
244
250
  finally:
245
251
  await session.close()
246
252
 
File without changes
File without changes
File without changes