aury-boot 0.0.27__tar.gz → 0.0.28__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.27 → aury_boot-0.0.28}/PKG-INFO +1 -1
  2. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/_version.py +2 -2
  3. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/templates/project/AGENTS.md.tpl +2 -0
  4. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/templates/project/aury_docs/02-repository.md.tpl +31 -0
  5. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/domain/repository/impl.py +164 -0
  6. {aury_boot-0.0.27 → aury_boot-0.0.28}/.gitignore +0 -0
  7. {aury_boot-0.0.27 → aury_boot-0.0.28}/README.md +0 -0
  8. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/__init__.py +0 -0
  9. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/application/__init__.py +0 -0
  10. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/application/adapter/__init__.py +0 -0
  11. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/application/adapter/base.py +0 -0
  12. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/application/adapter/config.py +0 -0
  13. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/application/adapter/decorators.py +0 -0
  14. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/application/adapter/exceptions.py +0 -0
  15. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/application/adapter/http.py +0 -0
  16. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/application/app/__init__.py +0 -0
  17. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/application/app/base.py +0 -0
  18. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/application/app/components.py +0 -0
  19. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/application/app/middlewares.py +0 -0
  20. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/application/app/startup.py +0 -0
  21. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/application/config/__init__.py +0 -0
  22. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/application/config/multi_instance.py +0 -0
  23. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/application/config/settings.py +0 -0
  24. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/application/constants/__init__.py +0 -0
  25. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/application/constants/components.py +0 -0
  26. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/application/constants/scheduler.py +0 -0
  27. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/application/constants/service.py +0 -0
  28. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/application/errors/__init__.py +0 -0
  29. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/application/errors/chain.py +0 -0
  30. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/application/errors/codes.py +0 -0
  31. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/application/errors/exceptions.py +0 -0
  32. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/application/errors/handlers.py +0 -0
  33. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/application/errors/response.py +0 -0
  34. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/application/interfaces/__init__.py +0 -0
  35. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/application/interfaces/egress.py +0 -0
  36. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/application/interfaces/ingress.py +0 -0
  37. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/application/middleware/__init__.py +0 -0
  38. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/application/middleware/logging.py +0 -0
  39. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/application/migrations/__init__.py +0 -0
  40. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/application/migrations/manager.py +0 -0
  41. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/application/migrations/setup.py +0 -0
  42. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/application/rpc/__init__.py +0 -0
  43. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/application/rpc/base.py +0 -0
  44. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/application/rpc/client.py +0 -0
  45. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/application/rpc/discovery.py +0 -0
  46. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/application/scheduler/__init__.py +0 -0
  47. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/application/scheduler/runner.py +0 -0
  48. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/application/server/__init__.py +0 -0
  49. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/__init__.py +0 -0
  50. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/add.py +0 -0
  51. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/app.py +0 -0
  52. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/config.py +0 -0
  53. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/docker.py +0 -0
  54. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/docs.py +0 -0
  55. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/generate.py +0 -0
  56. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/init.py +0 -0
  57. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/migrate/__init__.py +0 -0
  58. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/migrate/app.py +0 -0
  59. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/migrate/commands.py +0 -0
  60. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/pkg.py +0 -0
  61. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/scheduler.py +0 -0
  62. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/server/__init__.py +0 -0
  63. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/server/app.py +0 -0
  64. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/templates/generate/api.py.tpl +0 -0
  65. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/templates/generate/model.py.tpl +0 -0
  66. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/templates/generate/repository.py.tpl +0 -0
  67. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/templates/generate/schema.py.tpl +0 -0
  68. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/templates/generate/service.py.tpl +0 -0
  69. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/templates/project/README.md.tpl +0 -0
  70. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/templates/project/admin_console_init.py.tpl +0 -0
  71. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/templates/project/aury_docs/00-overview.md.tpl +0 -0
  72. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/templates/project/aury_docs/01-model.md.tpl +0 -0
  73. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/templates/project/aury_docs/03-service.md.tpl +0 -0
  74. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/templates/project/aury_docs/04-schema.md.tpl +0 -0
  75. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/templates/project/aury_docs/05-api.md.tpl +0 -0
  76. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/templates/project/aury_docs/06-exception.md.tpl +0 -0
  77. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/templates/project/aury_docs/07-cache.md.tpl +0 -0
  78. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/templates/project/aury_docs/08-scheduler.md.tpl +0 -0
  79. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/templates/project/aury_docs/09-tasks.md.tpl +0 -0
  80. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/templates/project/aury_docs/10-storage.md.tpl +0 -0
  81. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/templates/project/aury_docs/11-logging.md.tpl +0 -0
  82. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/templates/project/aury_docs/12-admin.md.tpl +0 -0
  83. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/templates/project/aury_docs/13-channel.md.tpl +0 -0
  84. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/templates/project/aury_docs/14-mq.md.tpl +0 -0
  85. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/templates/project/aury_docs/15-events.md.tpl +0 -0
  86. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/templates/project/aury_docs/16-adapter.md.tpl +0 -0
  87. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/templates/project/aury_docs/99-cli.md.tpl +0 -0
  88. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/templates/project/config.py.tpl +0 -0
  89. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/templates/project/conftest.py.tpl +0 -0
  90. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/templates/project/env_templates/_header.tpl +0 -0
  91. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/templates/project/env_templates/admin.tpl +0 -0
  92. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/templates/project/env_templates/cache.tpl +0 -0
  93. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/templates/project/env_templates/database.tpl +0 -0
  94. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/templates/project/env_templates/log.tpl +0 -0
  95. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/templates/project/env_templates/messaging.tpl +0 -0
  96. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/templates/project/env_templates/rpc.tpl +0 -0
  97. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/templates/project/env_templates/scheduler.tpl +0 -0
  98. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/templates/project/env_templates/service.tpl +0 -0
  99. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/templates/project/env_templates/storage.tpl +0 -0
  100. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/templates/project/env_templates/third_party.tpl +0 -0
  101. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/templates/project/gitignore.tpl +0 -0
  102. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/templates/project/main.py.tpl +0 -0
  103. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/templates/project/modules/api.py.tpl +0 -0
  104. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/templates/project/modules/exceptions.py.tpl +0 -0
  105. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/templates/project/modules/schedules.py.tpl +0 -0
  106. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/templates/project/modules/tasks.py.tpl +0 -0
  107. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/commands/worker.py +0 -0
  108. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/common/__init__.py +0 -0
  109. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/common/exceptions/__init__.py +0 -0
  110. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/common/i18n/__init__.py +0 -0
  111. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/common/i18n/translator.py +0 -0
  112. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/common/logging/__init__.py +0 -0
  113. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/common/logging/context.py +0 -0
  114. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/common/logging/decorators.py +0 -0
  115. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/common/logging/format.py +0 -0
  116. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/common/logging/setup.py +0 -0
  117. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/contrib/__init__.py +0 -0
  118. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/contrib/admin_console/__init__.py +0 -0
  119. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/contrib/admin_console/auth.py +0 -0
  120. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/contrib/admin_console/discovery.py +0 -0
  121. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/contrib/admin_console/install.py +0 -0
  122. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/contrib/admin_console/utils.py +0 -0
  123. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/domain/__init__.py +0 -0
  124. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/domain/exceptions/__init__.py +0 -0
  125. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/domain/models/__init__.py +0 -0
  126. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/domain/models/base.py +0 -0
  127. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/domain/models/mixins.py +0 -0
  128. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/domain/models/models.py +0 -0
  129. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/domain/pagination/__init__.py +0 -0
  130. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/domain/repository/__init__.py +0 -0
  131. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/domain/repository/interceptors.py +0 -0
  132. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/domain/repository/interface.py +0 -0
  133. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/domain/repository/query_builder.py +0 -0
  134. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/domain/service/__init__.py +0 -0
  135. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/domain/service/base.py +0 -0
  136. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/domain/transaction/__init__.py +0 -0
  137. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/infrastructure/__init__.py +0 -0
  138. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/infrastructure/cache/__init__.py +0 -0
  139. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/infrastructure/cache/backends.py +0 -0
  140. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/infrastructure/cache/base.py +0 -0
  141. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/infrastructure/cache/exceptions.py +0 -0
  142. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/infrastructure/cache/factory.py +0 -0
  143. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/infrastructure/cache/manager.py +0 -0
  144. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/infrastructure/channel/__init__.py +0 -0
  145. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/infrastructure/channel/backends/__init__.py +0 -0
  146. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/infrastructure/channel/backends/memory.py +0 -0
  147. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/infrastructure/channel/backends/redis.py +0 -0
  148. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/infrastructure/channel/base.py +0 -0
  149. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/infrastructure/channel/manager.py +0 -0
  150. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/infrastructure/clients/__init__.py +0 -0
  151. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/infrastructure/clients/rabbitmq/__init__.py +0 -0
  152. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/infrastructure/clients/rabbitmq/config.py +0 -0
  153. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/infrastructure/clients/rabbitmq/manager.py +0 -0
  154. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/infrastructure/clients/redis/__init__.py +0 -0
  155. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/infrastructure/clients/redis/config.py +0 -0
  156. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/infrastructure/clients/redis/manager.py +0 -0
  157. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/infrastructure/database/__init__.py +0 -0
  158. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/infrastructure/database/config.py +0 -0
  159. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/infrastructure/database/exceptions.py +0 -0
  160. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/infrastructure/database/manager.py +0 -0
  161. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/infrastructure/database/query_tools/__init__.py +0 -0
  162. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/infrastructure/database/strategies/__init__.py +0 -0
  163. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/infrastructure/di/__init__.py +0 -0
  164. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/infrastructure/di/container.py +0 -0
  165. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/infrastructure/events/__init__.py +0 -0
  166. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/infrastructure/events/backends/__init__.py +0 -0
  167. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/infrastructure/events/backends/memory.py +0 -0
  168. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/infrastructure/events/backends/rabbitmq.py +0 -0
  169. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/infrastructure/events/backends/redis.py +0 -0
  170. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/infrastructure/events/base.py +0 -0
  171. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/infrastructure/events/manager.py +0 -0
  172. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/infrastructure/events/middleware.py +0 -0
  173. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/infrastructure/monitoring/__init__.py +0 -0
  174. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/infrastructure/mq/__init__.py +0 -0
  175. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/infrastructure/mq/backends/__init__.py +0 -0
  176. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/infrastructure/mq/backends/rabbitmq.py +0 -0
  177. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/infrastructure/mq/backends/redis.py +0 -0
  178. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/infrastructure/mq/base.py +0 -0
  179. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/infrastructure/mq/manager.py +0 -0
  180. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/infrastructure/scheduler/__init__.py +0 -0
  181. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/infrastructure/scheduler/exceptions.py +0 -0
  182. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/infrastructure/scheduler/manager.py +0 -0
  183. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/infrastructure/storage/__init__.py +0 -0
  184. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/infrastructure/storage/base.py +0 -0
  185. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/infrastructure/storage/exceptions.py +0 -0
  186. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/infrastructure/storage/factory.py +0 -0
  187. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/infrastructure/tasks/__init__.py +0 -0
  188. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/infrastructure/tasks/config.py +0 -0
  189. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/infrastructure/tasks/constants.py +0 -0
  190. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/infrastructure/tasks/exceptions.py +0 -0
  191. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/infrastructure/tasks/manager.py +0 -0
  192. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/testing/__init__.py +0 -0
  193. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/testing/base.py +0 -0
  194. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/testing/client.py +0 -0
  195. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/testing/factory.py +0 -0
  196. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/toolkit/__init__.py +0 -0
  197. {aury_boot-0.0.27 → aury_boot-0.0.28}/aury/boot/toolkit/http/__init__.py +0 -0
  198. {aury_boot-0.0.27 → aury_boot-0.0.28}/pyproject.toml +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aury-boot
3
- Version: 0.0.27
3
+ Version: 0.0.28
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.27'
32
- __version_tuple__ = version_tuple = (0, 0, 27)
31
+ __version__ = version = '0.0.28'
32
+ __version_tuple__ = version_tuple = (0, 0, 28)
33
33
 
34
34
  __commit_id__ = commit_id = None
@@ -75,6 +75,8 @@ mypy {package_name}/
75
75
  2. **[aury_docs/02-repository.md](./aury_docs/02-repository.md)** - Repository 使用
76
76
  - BaseRepository API
77
77
  - Filters 语法(__gt, __like 等)
78
+ - Cursor 分页(推荐,性能更优)
79
+ - 流式查询(大数据处理)
78
80
  - 自动提交机制
79
81
 
80
82
  3. **[aury_docs/03-service.md](./aury_docs/03-service.md)** - Service 编写与事务
@@ -72,6 +72,37 @@ result = await repo.paginate(
72
72
  # - result.has_next: bool # 是否有下一页
73
73
  # - result.has_prev: bool # 是否有上一页
74
74
 
75
+ # === Cursor 分页(推荐,性能更优) ===
76
+ from aury.boot.domain.pagination import CursorPaginationParams
77
+
78
+ # 第一页
79
+ result = await repo.cursor_paginate(
80
+ CursorPaginationParams(limit=20),
81
+ is_active=True,
82
+ )
83
+
84
+ # 下一页(带上 cursor)
85
+ result = await repo.cursor_paginate(
86
+ CursorPaginationParams(cursor=result.next_cursor, limit=20),
87
+ is_active=True,
88
+ )
89
+
90
+ # CursorPaginationResult 结构:
91
+ # - result.items: list[T] # 数据列表
92
+ # - result.next_cursor: str | None # 下一页游标
93
+ # - result.prev_cursor: str | None # 上一页游标
94
+ # - result.has_next: bool # 是否有下一页
95
+ # - result.has_prev: bool # 是否有上一页
96
+
97
+ # === 流式查询(大数据处理) ===
98
+ # 逐条流式处理,不会一次性加载到内存
99
+ async for user in repo.stream(batch_size=1000, is_active=True):
100
+ await process(user)
101
+
102
+ # 批量流式处理
103
+ async for batch in repo.stream_batches(batch_size=1000):
104
+ await bulk_sync_to_es(batch)
105
+
75
106
  # === 创建 ===
76
107
  user = await repo.create({{"name": "Alice", "email": "a@b.com"}})
77
108
  users = await repo.batch_create([{{"name": "A"}}, {{"name": "B"}}]) # 返回实体
@@ -18,6 +18,8 @@ from aury.boot.common.logging import logger
18
18
  from aury.boot.domain.exceptions import VersionConflictError
19
19
  from aury.boot.domain.models import GUID, Base
20
20
  from aury.boot.domain.pagination import (
21
+ CursorPaginationParams,
22
+ CursorPaginationResult,
21
23
  PaginationParams,
22
24
  PaginationResult,
23
25
  SortParams,
@@ -263,6 +265,168 @@ class BaseRepository[ModelType: Base](IRepository[ModelType]):
263
265
  pagination_params=pagination_params,
264
266
  )
265
267
 
268
+ async def cursor_paginate(
269
+ self,
270
+ params: CursorPaginationParams,
271
+ cursor_field: str = "id",
272
+ **filters
273
+ ) -> CursorPaginationResult[ModelType]:
274
+ """基于游标的分页查询。
275
+
276
+ 适用于无限滚动、大数据集等场景,性能优于 offset 分页。
277
+
278
+ Args:
279
+ params: 游标分页参数(cursor, limit, direction)
280
+ cursor_field: 游标字段名,默认 "id",必须是有序且唯一的字段
281
+ **filters: 过滤条件
282
+
283
+ Returns:
284
+ CursorPaginationResult: 包含 items, next_cursor, prev_cursor, has_next, has_prev
285
+
286
+ 示例:
287
+ # 第一页
288
+ result = await repo.cursor_paginate(
289
+ CursorPaginationParams(limit=20),
290
+ status="active"
291
+ )
292
+
293
+ # 下一页
294
+ result = await repo.cursor_paginate(
295
+ CursorPaginationParams(cursor=result.next_cursor, limit=20),
296
+ status="active"
297
+ )
298
+ """
299
+ import base64
300
+ import json
301
+
302
+ query = self._build_base_query()
303
+ query = self._apply_filters(query, **filters)
304
+
305
+ cursor_attr = _get_model_attr(self._model_class, cursor_field)
306
+ if cursor_attr is None:
307
+ raise AttributeError(f"模型 {self._model_class.__name__} 没有 '{cursor_field}' 字段")
308
+
309
+ # 解码 cursor
310
+ cursor_value = None
311
+ if params.cursor:
312
+ try:
313
+ decoded = base64.urlsafe_b64decode(params.cursor.encode()).decode()
314
+ cursor_value = json.loads(decoded)
315
+ except Exception:
316
+ raise ValueError("无效的游标") from None
317
+
318
+ # 根据方向决定查询条件和排序
319
+ is_next = params.direction == "next"
320
+ if cursor_value is not None:
321
+ if is_next:
322
+ query = query.where(cursor_attr > cursor_value)
323
+ else:
324
+ query = query.where(cursor_attr < cursor_value)
325
+
326
+ # 排序
327
+ if is_next:
328
+ query = query.order_by(cursor_attr)
329
+ else:
330
+ query = query.order_by(cursor_attr.desc())
331
+
332
+ # 多取一条判断是否有更多
333
+ query = query.limit(params.limit + 1)
334
+ result = await self._session.execute(query)
335
+ items = list(result.scalars().all())
336
+
337
+ has_more = len(items) > params.limit
338
+ if has_more:
339
+ items = items[:params.limit]
340
+
341
+ # 反向查询时反转结果
342
+ if not is_next:
343
+ items = list(reversed(items))
344
+
345
+ # 生成游标
346
+ def encode_cursor(value) -> str:
347
+ return base64.urlsafe_b64encode(json.dumps(value).encode()).decode()
348
+
349
+ next_cursor = None
350
+ prev_cursor = None
351
+
352
+ if items:
353
+ last_value = getattr(items[-1], cursor_field)
354
+ first_value = getattr(items[0], cursor_field)
355
+
356
+ if is_next:
357
+ if has_more:
358
+ next_cursor = encode_cursor(last_value)
359
+ if cursor_value is not None:
360
+ prev_cursor = encode_cursor(first_value)
361
+ else:
362
+ if cursor_value is not None:
363
+ next_cursor = encode_cursor(last_value)
364
+ if has_more:
365
+ prev_cursor = encode_cursor(first_value)
366
+
367
+ return CursorPaginationResult.create(
368
+ items=items,
369
+ next_cursor=next_cursor,
370
+ prev_cursor=prev_cursor,
371
+ limit=params.limit,
372
+ )
373
+
374
+ async def stream(
375
+ self,
376
+ batch_size: int = 1000,
377
+ **filters
378
+ ):
379
+ """流式查询,使用数据库原生 server-side cursor。
380
+
381
+ 适用于大数据集处理,避免一次性加载所有数据到内存。
382
+
383
+ Args:
384
+ batch_size: 每批次获取的记录数,默认 1000
385
+ **filters: 过滤条件
386
+
387
+ Yields:
388
+ ModelType: 模型实例
389
+
390
+ 示例:
391
+ async for user in repo.stream(batch_size=500, status="active"):
392
+ process(user)
393
+ """
394
+ query = self._build_base_query()
395
+ query = self._apply_filters(query, **filters)
396
+
397
+ async with self._session.stream_scalars(
398
+ query.execution_options(yield_per=batch_size)
399
+ ) as result:
400
+ async for item in result:
401
+ yield item
402
+
403
+ async def stream_batches(
404
+ self,
405
+ batch_size: int = 1000,
406
+ **filters
407
+ ):
408
+ """批量流式查询,每次返回一批数据。
409
+
410
+ Args:
411
+ batch_size: 每批次的记录数,默认 1000
412
+ **filters: 过滤条件
413
+
414
+ Yields:
415
+ list[ModelType]: 一批模型实例
416
+
417
+ 示例:
418
+ async for batch in repo.stream_batches(batch_size=500):
419
+ bulk_process(batch)
420
+ """
421
+ query = self._build_base_query()
422
+ query = self._apply_filters(query, **filters)
423
+
424
+ async with self._session.stream_scalars(
425
+ query.execution_options(yield_per=batch_size)
426
+ ) as result:
427
+ async for partition in result.partitions():
428
+ yield list(partition)
429
+
266
430
  async def count(self, **filters) -> int:
267
431
  query = select(func.count()).select_from(self._model_class)
268
432
  if hasattr(self._model_class, "deleted_at"):
File without changes
File without changes
File without changes