swiftpy-framework 0.3.5__tar.gz → 0.3.8__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 (541) hide show
  1. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/CHANGELOG.md +43 -0
  2. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/PKG-INFO +9 -3
  3. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/README.md +8 -2
  4. swiftpy_framework-0.3.8/app/schemas/user_schema.py +22 -0
  5. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/documentations/2026-11-14-installation-quick-start.md +4 -4
  6. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/documentations/2026-11-15-database-query-builder-and-migrations.md +111 -1
  7. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/documentations/2026-11-15-http-routing-middleware-and-exceptions.md +8 -6
  8. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/documentations/2026-11-15-orm-models-and-relationships.md +85 -9
  9. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/documentations/2026-11-15-validation-and-form-requests.md +17 -1
  10. swiftpy_framework-0.3.8/documentations/2026-11-19-application-schemas.md +264 -0
  11. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/documentations/2026-11-19-cli-and-testing.md +13 -1
  12. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/documentations/2026-11-21-application-architecture-and-project-structure.md +9 -19
  13. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/pyproject.toml +1 -1
  14. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/__init__.py +18 -0
  15. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/auth/auth_manager.py +39 -23
  16. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/console/commands/new.py +8 -21
  17. swiftpy_framework-0.3.8/swiftpy/console/stubs/repository.stub +15 -0
  18. swiftpy_framework-0.3.8/swiftpy/console/stubs/schema.stub +11 -0
  19. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/core/application.py +30 -87
  20. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/core/container.py +2 -0
  21. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/database/__init__.py +2 -0
  22. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/database/exceptions.py +5 -0
  23. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/database/identifiers.py +41 -0
  24. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/database/orm/model.py +691 -134
  25. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/database/orm/relationships.py +703 -37
  26. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/database/query_builder.py +1007 -77
  27. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/helpers/helper.py +15 -0
  28. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/http/response.py +2 -0
  29. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/http/router.py +6 -2
  30. swiftpy_framework-0.3.8/swiftpy/schemas/__init__.py +19 -0
  31. swiftpy_framework-0.3.8/swiftpy/schemas/base.py +1527 -0
  32. swiftpy_framework-0.3.8/swiftpy/schemas/fields.py +207 -0
  33. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/console/test_phase9_cli_remediation.py +1 -1
  34. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/console/test_stubs_and_make.py +1 -1
  35. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/core/test_helpers.py +24 -0
  36. swiftpy_framework-0.3.8/tests/database/test_query_helpers_v036.py +1742 -0
  37. swiftpy_framework-0.3.8/tests/logging/__init__.py +1 -0
  38. swiftpy_framework-0.3.8/tests/schemas/__init__.py +1 -0
  39. swiftpy_framework-0.3.8/tests/schemas/test_schema_auth.py +184 -0
  40. swiftpy_framework-0.3.8/tests/schemas/test_schema_orm_and_cli.py +323 -0
  41. swiftpy_framework-0.3.8/tests/schemas/test_schema_routing.py +372 -0
  42. swiftpy_framework-0.3.8/tests/schemas/test_schemas.py +458 -0
  43. swiftpy_framework-0.3.8/tests/typing/test_orm_typing.py +462 -0
  44. swiftpy_framework-0.3.8/tests/typing/test_schema_typing.py +65 -0
  45. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/uv.lock +1 -1
  46. swiftpy_framework-0.3.5/app/schemas/user_schema.py +0 -35
  47. swiftpy_framework-0.3.5/documentations/2026-11-19-application-schemas.md +0 -276
  48. swiftpy_framework-0.3.5/swiftpy/console/stubs/repository.stub +0 -8
  49. swiftpy_framework-0.3.5/swiftpy/console/stubs/schema.stub +0 -12
  50. swiftpy_framework-0.3.5/tests/typing/test_orm_typing.py +0 -181
  51. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/.dockerignore +0 -0
  52. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/.env.example +0 -0
  53. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/.github/workflows/ci.yml +0 -0
  54. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/.github/workflows/publish.yml +0 -0
  55. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/.gitignore +0 -0
  56. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/CONTRIBUTING.md +0 -0
  57. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/Dockerfile +0 -0
  58. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/LICENSE +0 -0
  59. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/app/__init__.py +0 -0
  60. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/app/ai/agents/assistant_agent.py +0 -0
  61. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/app/ai/observers/.gitkeep +0 -0
  62. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/app/ai/pipelines/.gitkeep +0 -0
  63. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/app/ai/providers/.gitkeep +0 -0
  64. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/app/ai/tools/system_status_tool.py +0 -0
  65. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/app/ai/vectorstores/.gitkeep +0 -0
  66. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/app/events/user_registered.py +0 -0
  67. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/app/http/controllers/user_controller.py +0 -0
  68. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/app/http/handler/exceptions.py +0 -0
  69. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/app/http/middleware/__init__.py +0 -0
  70. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/app/http/middleware/admin_middleware.py +0 -0
  71. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/app/http/middleware/auth_middleware.py +0 -0
  72. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/app/http/middleware/test_middleware.py +0 -0
  73. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/app/http/requests/create_user_request.py +0 -0
  74. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/app/http/resources/user_resource.py +0 -0
  75. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/app/jobs/send_notification_job.py +0 -0
  76. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/app/listeners/send_welcome_notification.py +0 -0
  77. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/app/mail/welcome_email.py +0 -0
  78. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/app/models/user.py +0 -0
  79. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/app/providers/app_service_provider.py +0 -0
  80. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/app/providers/auth_service_provider.py +0 -0
  81. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/app/providers/cache_service_provider.py +0 -0
  82. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/app/providers/database_service_provider.py +0 -0
  83. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/app/providers/event_service_provider.py +0 -0
  84. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/app/providers/filesystem_service_provider.py +0 -0
  85. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/app/providers/mail_service_provider.py +0 -0
  86. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/app/providers/queue_service_provider.py +0 -0
  87. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/app/repositories/user_repository.py +0 -0
  88. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/app/services/user_service.py +0 -0
  89. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/bootstrap/cache/.gitkeep +0 -0
  90. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/config/__init__.py +0 -0
  91. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/config/ai.py +0 -0
  92. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/config/app.py +0 -0
  93. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/config/auth.py +0 -0
  94. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/config/cache.py +0 -0
  95. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/config/cors.py +0 -0
  96. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/config/database.py +0 -0
  97. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/config/events.py +0 -0
  98. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/config/filesystems.py +0 -0
  99. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/config/http.py +0 -0
  100. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/config/logging.py +0 -0
  101. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/config/mail.py +0 -0
  102. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/config/queue.py +0 -0
  103. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/config/schedule.py +0 -0
  104. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/database/migrations/2026_01_01_000000_create_users_table.py +0 -0
  105. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/database/seeders/database_seeder.py +0 -0
  106. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/docker-compose.yml +0 -0
  107. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/documentations/2026-11-15-ai-subsystem.md +0 -0
  108. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/documentations/2026-11-15-authentication-and-security.md +0 -0
  109. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/documentations/2026-11-15-cache-events-and-queues.md +0 -0
  110. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/documentations/2026-11-15-core-application-di-and-config.md +0 -0
  111. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/documentations/2026-11-15-filesystem-storage-and-mail.md +0 -0
  112. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/documentations/2026-11-15-websockets-and-admin.md +0 -0
  113. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/documentations/2026-11-19-database-schema-and-blueprint.md +0 -0
  114. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/documentations/2026-11-20-error-handling.md +0 -0
  115. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/documentations/2026-11-20-logging.md +0 -0
  116. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/documentations/2026-11-20-request-and-responses.md +0 -0
  117. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/documentations/2026-11-21-cors.md +0 -0
  118. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/documentations/2026-11-22-task-scheduling.md +0 -0
  119. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/main.py +0 -0
  120. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/prompts/classify.py +0 -0
  121. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/prompts/summarise.py +0 -0
  122. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/red-black.png +0 -0
  123. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/routes/__init__.py +0 -0
  124. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/routes/api.py +0 -0
  125. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/.gitignore +0 -0
  126. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/ai/__init__.py +0 -0
  127. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/ai/_deterministic.py +0 -0
  128. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/ai/_fake.py +0 -0
  129. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/ai/agents/__init__.py +0 -0
  130. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/ai/agents/base_agent.py +0 -0
  131. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/ai/agents/memory.py +0 -0
  132. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/ai/client.py +0 -0
  133. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/ai/conversation.py +0 -0
  134. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/ai/embeddings.py +0 -0
  135. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/ai/exceptions.py +0 -0
  136. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/ai/history_strategies.py +0 -0
  137. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/ai/middleware.py +0 -0
  138. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/ai/observability/__init__.py +0 -0
  139. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/ai/observability/drivers.py +0 -0
  140. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/ai/observability/observer.py +0 -0
  141. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/ai/pool.py +0 -0
  142. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/ai/pricing.py +0 -0
  143. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/ai/prompts/__init__.py +0 -0
  144. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/ai/prompts/loader.py +0 -0
  145. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/ai/providers/__init__.py +0 -0
  146. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/ai/providers/anthropic_provider.py +0 -0
  147. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/ai/providers/base.py +0 -0
  148. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/ai/providers/openai_provider.py +0 -0
  149. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/ai/rag/__init__.py +0 -0
  150. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/ai/rag/context_formatter.py +0 -0
  151. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/ai/rag/pipeline_builder.py +0 -0
  152. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/ai/rag/reranker.py +0 -0
  153. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/ai/rag/result.py +0 -0
  154. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/ai/rag/retriever.py +0 -0
  155. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/ai/redis_store.py +0 -0
  156. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/ai/streaming.py +0 -0
  157. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/ai/tools/__init__.py +0 -0
  158. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/ai/tools/base_tool.py +0 -0
  159. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/ai/tools/first_party.py +0 -0
  160. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/ai/tools/tool_loop.py +0 -0
  161. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/ai/vectorstore/__init__.py +0 -0
  162. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/ai/vectorstore/base.py +0 -0
  163. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/ai/vectorstore/chroma_adapter.py +0 -0
  164. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/ai/vectorstore/in_memory_adapter.py +0 -0
  165. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/ai/vectorstore/lancedb_adapter.py +0 -0
  166. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/ai/vectorstore/pgvector_adapter.py +0 -0
  167. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/ai/vectorstore/pinecone_adapter.py +0 -0
  168. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/ai/vectorstore/qdrant_adapter.py +0 -0
  169. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/auth/__init__.py +0 -0
  170. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/auth/api_key_guard.py +0 -0
  171. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/auth/events.py +0 -0
  172. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/auth/exceptions.py +0 -0
  173. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/auth/jwt_guard.py +0 -0
  174. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/auth/jwt_issuer.py +0 -0
  175. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/auth/throttle.py +0 -0
  176. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/auth/token_blacklist.py +0 -0
  177. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/auth/user_context.py +0 -0
  178. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/auth_manager.py +0 -0
  179. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/cache/__init__.py +0 -0
  180. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/cache/cache.py +0 -0
  181. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/cache/driver.py +0 -0
  182. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/cache/drivers/memory.py +0 -0
  183. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/cache/drivers/redis.py +0 -0
  184. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/console/__init__.py +0 -0
  185. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/console/cli.py +0 -0
  186. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/console/commands/__init__.py +0 -0
  187. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/console/commands/cache.py +0 -0
  188. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/console/commands/make.py +0 -0
  189. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/console/commands/migrate.py +0 -0
  190. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/console/commands/queue.py +0 -0
  191. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/console/commands/schedule.py +0 -0
  192. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/console/commands/seed.py +0 -0
  193. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/console/commands/start.py +0 -0
  194. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/console/commands/storage.py +0 -0
  195. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/console/loader.py +0 -0
  196. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/console/stubs/__init__.py +0 -0
  197. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/console/stubs/agent.stub +0 -0
  198. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/console/stubs/controller.stub +0 -0
  199. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/console/stubs/event.stub +0 -0
  200. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/console/stubs/job.stub +0 -0
  201. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/console/stubs/listener.stub +0 -0
  202. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/console/stubs/mail.stub +0 -0
  203. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/console/stubs/middleware.stub +0 -0
  204. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/console/stubs/migration.alter.stub +0 -0
  205. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/console/stubs/migration.api_keys.stub +0 -0
  206. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/console/stubs/migration.blank.stub +0 -0
  207. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/console/stubs/migration.create.stub +0 -0
  208. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/console/stubs/migration.stub +0 -0
  209. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/console/stubs/migration.update.stub +0 -0
  210. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/console/stubs/model.stub +0 -0
  211. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/console/stubs/prompt.stub +0 -0
  212. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/console/stubs/provider.stub +0 -0
  213. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/console/stubs/request.stub +0 -0
  214. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/console/stubs/resource.stub +0 -0
  215. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/console/stubs/seeder.stub +0 -0
  216. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/console/stubs/service.stub +0 -0
  217. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/console/stubs/tool.stub +0 -0
  218. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/core/__init__.py +0 -0
  219. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/core/bootstrap.py +0 -0
  220. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/core/config.py +0 -0
  221. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/core/container_exceptions.py +0 -0
  222. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/core/context.py +0 -0
  223. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/core/exceptions.py +0 -0
  224. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/core/providers/base.py +0 -0
  225. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/database/migrations/__init__.py +0 -0
  226. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/database/migrations/blueprint.py +0 -0
  227. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/database/migrations/lock.py +0 -0
  228. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/database/migrations/migration.py +0 -0
  229. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/database/migrations/migrator.py +0 -0
  230. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/database/migrations/schema.py +0 -0
  231. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/database/orm/__init__.py +0 -0
  232. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/database/orm/fields.py +0 -0
  233. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/database/orm/registry.py +0 -0
  234. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/database/pagination/__init__.py +0 -0
  235. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/database/pagination/contracts.py +0 -0
  236. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/database/pagination/paginator.py +0 -0
  237. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/database/pagination/simple_paginator.py +0 -0
  238. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/database/pool.py +0 -0
  239. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/database/seeder.py +0 -0
  240. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/database/transaction.py +0 -0
  241. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/events/__init__.py +0 -0
  242. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/events/dispatcher.py +0 -0
  243. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/events/redis_bus.py +0 -0
  244. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/filesystem/__init__.py +0 -0
  245. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/filesystem/disk.py +0 -0
  246. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/filesystem/drivers/__init__.py +0 -0
  247. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/filesystem/drivers/base.py +0 -0
  248. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/filesystem/drivers/local.py +0 -0
  249. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/filesystem/drivers/s3.py +0 -0
  250. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/filesystem/events.py +0 -0
  251. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/filesystem/exceptions.py +0 -0
  252. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/filesystem/manager.py +0 -0
  253. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/filesystem/metadata.py +0 -0
  254. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/filesystem/paths.py +0 -0
  255. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/filesystem/service_provider.py +0 -0
  256. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/filesystem/uploads/__init__.py +0 -0
  257. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/filesystem/uploads/handlers.py +0 -0
  258. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/filesystem/uploads/uploaded_file.py +0 -0
  259. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/filesystem/uploads/validators.py +0 -0
  260. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/filesystem/visibility.py +0 -0
  261. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/helpers/__init__.py +0 -0
  262. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/http/client_ip.py +0 -0
  263. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/http/exceptions.py +0 -0
  264. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/http/middleware.py +0 -0
  265. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/http/request.py +0 -0
  266. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/logging/__init__.py +0 -0
  267. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/logging/channels.py +0 -0
  268. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/logging/log.py +0 -0
  269. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/logging/manager.py +0 -0
  270. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/mail/__init__.py +0 -0
  271. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/mail/attachments.py +0 -0
  272. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/mail/config.py +0 -0
  273. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/mail/envelope.py +0 -0
  274. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/mail/exceptions.py +0 -0
  275. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/mail/facade.py +0 -0
  276. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/mail/mailable.py +0 -0
  277. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/mail/manager.py +0 -0
  278. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/mail/message.py +0 -0
  279. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/mail/models.py +0 -0
  280. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/mail/queue/__init__.py +0 -0
  281. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/mail/queue/job.py +0 -0
  282. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/mail/service_provider.py +0 -0
  283. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/mail/templates/__init__.py +0 -0
  284. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/mail/templates/renderer.py +0 -0
  285. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/mail/transports/__init__.py +0 -0
  286. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/mail/transports/api/__init__.py +0 -0
  287. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/mail/transports/api/base.py +0 -0
  288. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/mail/transports/api/mailgun.py +0 -0
  289. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/mail/transports/api/resend.py +0 -0
  290. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/mail/transports/api/sendgrid.py +0 -0
  291. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/mail/transports/base.py +0 -0
  292. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/mail/transports/console.py +0 -0
  293. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/mail/transports/sendmail.py +0 -0
  294. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/mail/transports/smtp.py +0 -0
  295. /swiftpy_framework-0.3.5/tests/logging/__init__.py → /swiftpy_framework-0.3.8/swiftpy/py.typed +0 -0
  296. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/queue/__init__.py +0 -0
  297. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/queue/dispatcher.py +0 -0
  298. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/queue/job.py +0 -0
  299. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/queue/worker.py +0 -0
  300. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/scheduling/__init__.py +0 -0
  301. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/scheduling/_redis_lua.py +0 -0
  302. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/scheduling/cron.py +0 -0
  303. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/scheduling/events.py +0 -0
  304. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/scheduling/exceptions.py +0 -0
  305. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/scheduling/jobs.py +0 -0
  306. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/scheduling/models.py +0 -0
  307. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/scheduling/scheduler.py +0 -0
  308. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/scheduling/signing.py +0 -0
  309. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/scheduling/store.py +0 -0
  310. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/support/__init__.py +0 -0
  311. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/support/hashing.py +0 -0
  312. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/support/keys.py +0 -0
  313. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/support/redis_config.py +0 -0
  314. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/support/strings.py +0 -0
  315. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/testing/__init__.py +0 -0
  316. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/testing/fakes/__init__.py +0 -0
  317. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/testing/fakes/ai_fake.py +0 -0
  318. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/testing/fakes/vectorstore_fake.py +0 -0
  319. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/testing/fixtures.py +0 -0
  320. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/testing/http_client.py +0 -0
  321. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/testing/test_case.py +0 -0
  322. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/validation/__init__.py +0 -0
  323. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/validation/exceptions.py +0 -0
  324. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/validation/form_request.py +0 -0
  325. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/validation/protocols.py +0 -0
  326. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/validation/rules/__init__.py +0 -0
  327. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/validation/rules/builtin.py +0 -0
  328. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/validation/rules/exists.py +0 -0
  329. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/validation/rules/registry.py +0 -0
  330. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/validation/rules/required.py +0 -0
  331. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/validation/rules/unique.py +0 -0
  332. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/validation/validator.py +0 -0
  333. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/websockets/__init__.py +0 -0
  334. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/websockets/connection.py +0 -0
  335. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/swiftpy/websockets/manager.py +0 -0
  336. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/__init__.py +0 -0
  337. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/ai/__init__.py +0 -0
  338. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/ai/conftest.py +0 -0
  339. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/ai/integration/__init__.py +0 -0
  340. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/ai/integration/test_chroma.py +0 -0
  341. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/ai/integration/test_lancedb.py +0 -0
  342. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/ai/integration/test_pinecone.py +0 -0
  343. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/ai/integration/test_qdrant.py +0 -0
  344. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/ai/integration/test_rag_integration.py +0 -0
  345. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/ai/test_agents.py +0 -0
  346. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/ai/test_ai_fake.py +0 -0
  347. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/ai/test_ai_fake_isolation.py +0 -0
  348. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/ai/test_client.py +0 -0
  349. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/ai/test_conversation.py +0 -0
  350. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/ai/test_embeddings.py +0 -0
  351. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/ai/test_middleware.py +0 -0
  352. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/ai/test_middleware_concurrency.py +0 -0
  353. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/ai/test_observability.py +0 -0
  354. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/ai/test_observability_resilience.py +0 -0
  355. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/ai/test_phase7_ai_remediation.py +0 -0
  356. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/ai/test_phase8_agents_tools_prompts_remediation.py +0 -0
  357. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/ai/test_phase8_rag_remediation.py +0 -0
  358. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/ai/test_phase8_vectorstore_remediation.py +0 -0
  359. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/ai/test_prompts.py +0 -0
  360. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/ai/test_prompts_security.py +0 -0
  361. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/ai/test_providers.py +0 -0
  362. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/ai/test_rag.py +0 -0
  363. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/ai/test_streaming.py +0 -0
  364. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/ai/test_tools.py +0 -0
  365. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/ai/test_vectorstore.py +0 -0
  366. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/ai/test_vectorstore_adapters.py +0 -0
  367. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/app/__init__.py +0 -0
  368. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/app/test_application_providers.py +0 -0
  369. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/app/test_starter_auth.py +0 -0
  370. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/auth/__init__.py +0 -0
  371. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/auth/test_api_key_guard.py +0 -0
  372. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/auth/test_auth_attempt.py +0 -0
  373. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/auth/test_auth_context_on_issue.py +0 -0
  374. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/auth/test_auth_manager.py +0 -0
  375. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/auth/test_auth_proxy.py +0 -0
  376. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/auth/test_auth_remediation.py +0 -0
  377. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/auth/test_auth_security.py +0 -0
  378. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/auth/test_auth_throttle.py +0 -0
  379. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/auth/test_jwt_defaults.py +0 -0
  380. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/auth/test_jwt_issuer.py +0 -0
  381. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/auth/test_password_hashing.py +0 -0
  382. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/auth/test_refresh_and_logout.py +0 -0
  383. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/auth/test_token_blacklist.py +0 -0
  384. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/benchmarks.py +0 -0
  385. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/cache/__init__.py +0 -0
  386. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/cache/test_cache_concurrency.py +0 -0
  387. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/cache/test_cache_manager.py +0 -0
  388. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/cache/test_driver_correctness.py +0 -0
  389. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/cache/test_memory_cache.py +0 -0
  390. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/cache/test_redis_cache.py +0 -0
  391. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/concurrency/__init__.py +0 -0
  392. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/concurrency/test_circular_dependency.py +0 -0
  393. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/concurrency/test_container_semantics.py +0 -0
  394. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/concurrency/test_resolution.py +0 -0
  395. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/concurrency/test_resolution2.py +0 -0
  396. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/conftest.py +0 -0
  397. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/console/__init__.py +0 -0
  398. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/console/test_cache_commands.py +0 -0
  399. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/console/test_cli.py +0 -0
  400. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/console/test_new_command.py +0 -0
  401. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/console/test_start.py +0 -0
  402. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/console/test_storage_command.py +0 -0
  403. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/core/__init__.py +0 -0
  404. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/core/test_application_config_isolation.py +0 -0
  405. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/core/test_core_config.py +0 -0
  406. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/core/test_exceptions.py +0 -0
  407. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/core/test_instance_singletons.py +0 -0
  408. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/core/test_lifespan.py +0 -0
  409. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/database/__init__.py +0 -0
  410. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/database/test_orm_expansion.py +0 -0
  411. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/database/test_orm_vector.py +0 -0
  412. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/database/test_pagination_and_grouping.py +0 -0
  413. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/database/test_pagination_pg_integration.py +0 -0
  414. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/database/test_pgvector_integration.py +0 -0
  415. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/database/test_phase4_remediation.py +0 -0
  416. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/database/test_query_expansion.py +0 -0
  417. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/database/test_query_expansion_pg_integration.py +0 -0
  418. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/database/test_seeder.py +0 -0
  419. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/database/test_sequence_gaps.py +0 -0
  420. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/db/__init__.py +0 -0
  421. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/db/load_test_database.py +0 -0
  422. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/db/load_test_database2.py +0 -0
  423. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/db/test_arbitrary_primary_keys.py +0 -0
  424. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/db/test_identifiers.py +0 -0
  425. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/db/test_mass_writes.py +0 -0
  426. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/db/test_pool_config.py +0 -0
  427. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/db/test_query_builder_terminals.py +0 -0
  428. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/db/test_sql_injections.py +0 -0
  429. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/db/test_transaction_isolation.py +0 -0
  430. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/docs/__init__.py +0 -0
  431. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/docs/test_readme_examples.py +0 -0
  432. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/e2e/__init__.py +0 -0
  433. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/e2e/test_concurrent_auth.py +0 -0
  434. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/e2e/test_crud_auth_e2e.py +0 -0
  435. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/events/__init__.py +0 -0
  436. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/events/test_event_dispatcher.py +0 -0
  437. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/events/test_model_events.py +0 -0
  438. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/events/test_redis_bus.py +0 -0
  439. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/events/test_redis_bus_reliability.py +0 -0
  440. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/filesystem/__init__.py +0 -0
  441. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/filesystem/test_cli_storage_link.py +0 -0
  442. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/filesystem/test_disk.py +0 -0
  443. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/filesystem/test_filesystem_concurrency.py +0 -0
  444. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/filesystem/test_filesystem_config.py +0 -0
  445. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/filesystem/test_http_integration.py +0 -0
  446. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/filesystem/test_local_driver.py +0 -0
  447. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/filesystem/test_multipart.py +0 -0
  448. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/filesystem/test_paths.py +0 -0
  449. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/filesystem/test_phase6_filesystem_remediation.py +0 -0
  450. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/filesystem/test_s3_driver.py +0 -0
  451. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/filesystem/test_signed_urls.py +0 -0
  452. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/filesystem/test_storage_facade.py +0 -0
  453. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/filesystem/test_uploaded_file.py +0 -0
  454. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/filesystem/test_validation.py +0 -0
  455. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/http/__init__.py +0 -0
  456. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/http/test_client_ip.py +0 -0
  457. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/http/test_controller_routing.py +0 -0
  458. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/http/test_error_pipeline.py +0 -0
  459. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/http/test_http_remediation.py +0 -0
  460. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/http/test_include_router.py +0 -0
  461. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/http/test_request.py +0 -0
  462. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/http/test_request_router_abort.py +0 -0
  463. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/http/test_response.py +0 -0
  464. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/http/test_route_groups.py +0 -0
  465. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/http/test_router.py +0 -0
  466. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/http/test_router_405_and_has_file.py +0 -0
  467. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/integration/__init__.py +0 -0
  468. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/integration/test_queue_event_websocket.py +0 -0
  469. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/logging/test_logging.py +0 -0
  470. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/mail/__init__.py +0 -0
  471. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/mail/test_api_transports.py +0 -0
  472. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/mail/test_attachments.py +0 -0
  473. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/mail/test_cli_make_mail.py +0 -0
  474. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/mail/test_console_transport.py +0 -0
  475. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/mail/test_envelope.py +0 -0
  476. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/mail/test_facade_and_fake.py +0 -0
  477. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/mail/test_mailable.py +0 -0
  478. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/mail/test_manager_and_config.py +0 -0
  479. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/mail/test_message.py +0 -0
  480. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/mail/test_phase6_mail_remediation.py +0 -0
  481. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/mail/test_queue_integration.py +0 -0
  482. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/mail/test_service_provider_and_helpers.py +0 -0
  483. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/mail/test_smtp_and_sendmail.py +0 -0
  484. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/mail/test_templates.py +0 -0
  485. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/migrations/__init__.py +0 -0
  486. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/migrations/test_migrations.py +0 -0
  487. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/orm/__init__.py +0 -0
  488. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/orm/test_defaults_dirty.py +0 -0
  489. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/orm/test_eager_loading.py +0 -0
  490. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/orm/test_hidden.py +0 -0
  491. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/orm/test_instance_update.py +0 -0
  492. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/orm/test_mass_assignment.py +0 -0
  493. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/orm/test_model_events_transaction.py +0 -0
  494. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/orm/test_relationships_hardening.py +0 -0
  495. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/orm/test_where_has.py +0 -0
  496. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/queue/__init__.py +0 -0
  497. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/queue/test_after_commit.py +0 -0
  498. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/queue/test_phase5_remediation.py +0 -0
  499. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/queue/test_poison_messages.py +0 -0
  500. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/queue/test_queue.py +0 -0
  501. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/queue/test_reliability.py +0 -0
  502. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/queue/test_signing.py +0 -0
  503. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/queue/test_worker_behavior.py +0 -0
  504. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/scheduling/test_cron_and_timezone.py +0 -0
  505. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/scheduling/test_scheduler_core.py +0 -0
  506. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/scheduling/test_scheduler_lifecycle_and_cli.py +0 -0
  507. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/scheduling/test_scheduler_queue_integration.py +0 -0
  508. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/scheduling/test_scheduler_recovery_and_failures.py +0 -0
  509. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/scheduling/test_scheduler_redis_store.py +0 -0
  510. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/scheduling/test_scheduler_worker_lifecycle.py +0 -0
  511. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/security/__init__.py +0 -0
  512. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/security/test_security_audit.py +0 -0
  513. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/stress/__init__.py +0 -0
  514. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/stress/test_context_isolation.py +0 -0
  515. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/support/__init__.py +0 -0
  516. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/support/test_redis_config.py +0 -0
  517. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/support/test_strings.py +0 -0
  518. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/testing/__init__.py +0 -0
  519. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/testing/test_fixtures.py +0 -0
  520. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/testing/test_phase9_testing_remediation.py +0 -0
  521. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/testing/test_test_client.py +0 -0
  522. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/typing/__init__.py +0 -0
  523. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/validation/__init__.py +0 -0
  524. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/validation/test_db_rules.py +0 -0
  525. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/validation/test_form_request_fail_closed.py +0 -0
  526. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/validation/test_form_request_pipeline.py +0 -0
  527. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/validation/test_phase6_validation_remediation.py +0 -0
  528. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/validation/test_rules_hardening.py +0 -0
  529. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/validation/test_validation_concurrency.py +0 -0
  530. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/validation/test_validation_ergonomics.py +0 -0
  531. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/validation/test_validator_rules.py +0 -0
  532. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/websockets/__init__.py +0 -0
  533. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/websockets/test_broadcast.py +0 -0
  534. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/websockets/test_handshake.py +0 -0
  535. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/websockets/test_lifecycle.py +0 -0
  536. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/websockets/test_websocket_concurrency.py +0 -0
  537. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/websockets/test_websocket_connection.py +0 -0
  538. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/websockets/test_websocket_manager.py +0 -0
  539. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/websockets/test_websocket_remediation.py +0 -0
  540. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/tests/websockets/test_websocket_routing_and_lifecycle.py +0 -0
  541. {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.8}/views/mail/template.html +0 -0
@@ -4,6 +4,49 @@ All notable changes to SwiftPY will be documented in this file.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.3.8] - 2026-11-25
8
+
9
+ ### Added
10
+ - **Source-Level ORM & Relationship Static Typing (`Model`, `ModelQueryBuilder[T]`, `RelationshipQueryBuilder[T]`, `SingleRelationshipQueryBuilder[T]`):** Propagated concrete `Model` types through `Relation._related_cls`, `_get_target_model_typed()`, `Relation.build_lazy_query() -> ModelQueryBuilder[T]`, `_BaseRelationshipQueryBuilder[T]` (explicit typed forwarding for all `ModelQueryBuilder[T]` fluent and terminal methods), `RelationshipQueryBuilder[T].__await__() -> Generator[Any, None, list[T]]`, and `SingleRelationshipQueryBuilder[T].__await__() -> Generator[Any, None, T | None]`. Application repositories (`model = YourModel`), direct model query chains (`DocVersion.with_(...).order_by(...).get()`), and relationship chains infer concrete return types in Pyrefly (including `no-any-return-implicit`), Mypy (`--strict`), and Pyright without requiring user-side `Generic`, `TypeVar`, `Self`, or `model: type[...]` boilerplate.
11
+ - **Covariant Inputs & Schema Parity Across Query Builders and Relations:** Widened `QueryBuilder` / `ModelQueryBuilder` / `Model` filter and write APIs (`where_in`, `or_where_in`, `where_not_in`, `or_where_not_in`, `insert`, `insert_returning`, `update`, `upsert`, `increment`, `decrement`, `first_or_create`, `update_or_create`, `select_raw`, `having_raw`, `or_having_raw`) to accept covariant `Mapping[str, Any]` / non-string `Sequence[Any]` and `ModelQueryBuilder[Any]` subqueries while continuing to reject `str`/`bytes`/`bytearray`/`memoryview` in `IN`/`NOT IN`. Added `BaseSchema` support to `ModelQueryBuilder.update()`, `Model.first_or_create()`, `Model.update_or_create()`, `RelationshipQueryBuilder.create()`, and `RelationshipQueryBuilder.update()`.
12
+
13
+ ### Fixed
14
+ - **Pyrefly ORM Compliance (`swiftpy/database/orm/model.py`):** Annotated empty vector return in `_coerce_db_value()` and guarded `isinstance(other, Model)` in `Model.__eq__()` so `swiftpy/database/` passes Pyrefly cleanly.
15
+
16
+ ### Changed
17
+ - **Packaging & Scaffolding:** Bumped `swiftpy-framework` to `0.3.8` (`pyproject.toml`, `uv.lock`), bumped the `swiftpy new` dependency floor to `"swiftpy-framework>=0.3.8"`, and simplified `repository.stub` to zero-boilerplate `model = YourModel` repository guidance.
18
+
19
+ ### Documentation
20
+ - Updated [ORM Models & Relationships](documentations/2026-11-15-orm-models-and-relationships.md), [Application Schemas](documentations/2026-11-19-application-schemas.md), [Database Pool, Query Builder & Transactions](documentations/2026-11-15-database-query-builder-and-migrations.md), [CLI & Testing](documentations/2026-11-19-cli-and-testing.md), [Application Architecture & Project Structure](documentations/2026-11-21-application-architecture-and-project-structure.md), [Installation & Quick Start](documentations/2026-11-14-installation-quick-start.md), and [README.md](README.md) for zero-boilerplate repository typing, typed relationship chains, `BaseSchema` query-builder/relation interop, covariant `Mapping`/`Sequence` inputs, Pyrefly/Mypy commands, and `>=0.3.8`.
21
+
22
+ ## [0.3.7] - 2026-11-25
23
+
24
+ ### Added
25
+ - **PEP 561 Static Typing Support (`swiftpy/py.typed`):** Added the PEP 561 `py.typed` marker packaged into distributions, and updated `Model` / `ModelQueryBuilder[T]` fluent query annotations so repository chains (`await self.model.with_(...).where(...).first()` and `.get()`) preserve concrete model return types in Pyrefly, Mypy, and Pyright.
26
+ - **Declarative Application Schemas (`swiftpy.schemas`):** Added zero-dependency declarative schema module exporting `BaseSchema`, `Schema` (alias of `BaseSchema`), `Field`, `SchemaField`, `SchemaFieldInfo`, `@field_validator`, and `@model_validator` with `@dataclass_transform(kw_only_default=True, field_specifiers=(Field, SchemaField, SchemaFieldInfo))`.
27
+ - Supports automatic type coercion (`str`, `int`, `float`, `bool`, `Decimal`, `UUID`, `date`, `datetime`, `time`, `Enum`, `IntEnum`, `Literal`, `Annotated`, unions, nested schemas, and container generics) and `Field(...)` constraints (`gt`, `ge`, `lt`, `le`, `multiple_of`, `min_length`, `max_length`, `pattern`, `strip_whitespace`, `to_lower`, `to_upper`, `alias`, `exclude`, `default_factory`), raising HTTP 422 `ValidationException` on failure.
28
+ - Added `.validate()`, `.from_dict()`, `.model_validate()`, `await .from_request()`, `.from_model()`, `.to_dict(exclude_none=..., exclude_unset=..., by_alias=...)`, `.model_dump()`, `.fields_set`, and `.is_set()`.
29
+ - **HTTP Schema Auto-Injection & Serialization (`Router`, `Container`, `Application`, `Response`):** Route functions and controller handlers declaring a `BaseSchema` / `Schema` parameter automatically parse JSON, `application/x-www-form-urlencoded`, or `multipart/form-data` payloads into the validated schema before execution; unbound `BaseSchema` subclasses are excluded from DI auto-wiring; handlers returning `BaseSchema` (or `list[BaseSchema]`) auto-serialize to JSON (including `set` / `frozenset` -> JSON arrays via `_json_default`).
30
+ - **ORM & Auth Interoperability:** `Model.create()`, `Model.force_create()`, `model.update()`, and `model.force_update()` accept `BaseSchema` instances directly (`to_dict()` on create with keyword overrides, `to_dict(exclude_unset=True)` on update to preserve omitted fields); `Auth.attempt()`, `Auth.attempt_when()`, and `Auth.once()` (along with `AuthManager` / `AuthProxy`) accept `BaseSchema` payloads; and `isset()` resolves canonical schema fields, aliases, nested schemas, and `__extra_fields__`.
31
+ - **Schema Hardening & Performance:** `BaseSchema` tracks post-validation field mutations in `__fields_set__`, enforces `Annotated[T, Field(...)]` constraints inside generic collections, normalizes mixed `Decimal`/float bounds, rejects `_`-prefixed keys and prevents method shadowing under `extra = "allow"`, supports single-mapping and positional runtime constructors, skips `copy.deepcopy()` on immutable defaults, and avoids duplicate `request.input(_preload=True)` body parsing when handlers take both `Request` and `BaseSchema`/`FormRequest`.
32
+
33
+ ### Changed
34
+ - **CLI Scaffolding (`make:schema`, `make:repository`, `swiftpy new`):** Updated `schema.stub` and starter `app/schemas/user_schema.py` to generate declarative `BaseSchema` DTOs (`UserCreateSchema` / `UserResponseSchema`), updated `repository.stub` with typed `model: type[YourModel]` guidance, and bumped the `swiftpy-framework` dependency floor to `>=0.3.7` (package version `0.3.7`).
35
+
36
+ ### Documentation
37
+ - Updated Application Schemas, Validation & Form Requests, HTTP Routing, ORM Models, CLI & Testing, Application Architecture, and Installation Quick Start guides for `swiftpy.schemas`, typed repositories, and `0.3.7`.
38
+
39
+ ## [0.3.6] - 2026-11-24
40
+
41
+ ### Added
42
+ - **Query Builder Predicates:** Added `where_column()`, correlated `where_exists()` / `where_not_exists()` (including OR variants), grouped `where_any()` / `where_all()` / `where_none()`, and `where_past()` / `where_future()` with ORM parity.
43
+ - **JSON Query Support:** Added strict `column->path` expressions for `where()`, `where_in()` and query-builder `update()` keys, plus JSON containment, key-existence, and array-length helpers with ORM parity. JSON paths are bound as PostgreSQL `text[]`; JSON path updates do not create missing intermediate parents.
44
+ - **Query Builder Unions & Row Locks:** Added `union()` / `union_all()` to `QueryBuilder`, plus `shared_lock()` / `lock_for_update()` on query builders and model queries. Row locks require an active transaction; unsupported lock combinations and union terminals raise `QueryError`.
45
+ - **Query Debugging:** Added `to_raw_sql()`, `dump()`, `dump_raw_sql()`, `dd()`, and `dd_raw_sql()` to `QueryBuilder` and `ModelQueryBuilder`, plus the exported `QueryDumpError`. Rendered SQL and logged bindings are for development/debugging only and must not be executed or used to build queries.
46
+
47
+ ### Changed
48
+ - **Packaging & Scaffolding:** Bumped `swiftpy-framework` and the `swiftpy new` dependency floor to `0.3.6`.
49
+
7
50
  ## [0.3.5] - 2026-11-23
8
51
 
9
52
  ### Added
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: swiftpy-framework
3
- Version: 0.3.5
3
+ Version: 0.3.8
4
4
  Summary: SwiftPY is a new generation async-first Python framework purpose built for the modern API and AI economy.
5
5
  Project-URL: Homepage, https://github.com/obrainwave/swiftpy
6
6
  Project-URL: Repository, https://github.com/obrainwave/swiftpy
@@ -94,6 +94,9 @@ All core architectural, storage, AI, and security hardening phases have been com
94
94
  | **Release v0.3.0: Project Structure, AI/Prompts & Controller Routing** | Standardized `app/` + `app/ai/{agents,tools,pipelines,providers,vectorstores,observers}/` + `prompts/` scaffolding, `Prompt.load("summarise.v2")` & `messages` lists, direct unbound controller method DI (`router.get(..., Controller.index)`), `make:agent`/`make:tool`/`make:prompt`, Admin Dashboard removal | ✅ Completed |
95
95
  | **Release v0.3.1: Auth Ergonomics, ORM `has()` & Login Throttling** | `Auth.attempt()`, `Callback` conditions + ORM `has()`/`where_has()`, `attempt_when()`, Remember Me cookies (`Blueprint.remember_token()`, `via_remember()`), `login_using_id()`, `once()`, default `LoginThrottle` (`429 TooManyRequestsError`), `Request.cookies` | ✅ Completed |
96
96
  | **Release v0.3.5: Client IP Detection & Native Task Scheduler** | Fail-safe `request.ip()` / `Request.ip()` / `websocket.ip()` & `LoginThrottle` IP trust via `TRUSTED_PROXIES`, zero-dependency 5-field cron + `ZoneInfo` scheduler (`Schedule` / `Scheduler`), Redis crash recovery (`_CLAIM_DUE_LUA` / `_RECLAIM_PENDING_LUA`), worker overlap locks, `schedule:list`/`run`/`work` | ✅ Completed |
97
+ | **Release v0.3.6: Query Builder Helpers** | `where_column()`, correlated `where_exists()`, `where_any()`/`where_all()`/`where_none()`, `where_past()`/`where_future()`, JSON `column->path` queries & updates, `union()`/`union_all()`, `shared_lock()`/`lock_for_update()`, debug helpers (`to_raw_sql()`, `dump()`, `dd()`) with ORM parity | ✅ Completed |
98
+ | **Release v0.3.7: Declarative Schemas (`swiftpy.schemas`) & Pyrefly/PEP 561 Typing** | `swiftpy/py.typed` PEP 561 marker, `Model` / `ModelQueryBuilder[T]` fluent generic preservation, `BaseSchema` / `Schema` & `Field(...)` constraints, `@field_validator` / `@model_validator`, Router/Controller auto-injection & JSON serialization, ORM `create()`/`update()` schema interop, `make:schema` & `swiftpy new` updates | ✅ Completed |
99
+ | **Release v0.3.8: Zero-Boilerplate ORM & Relationship Static Typing** | Source-level `Relation[T]` / `RelationshipQueryBuilder[T]` / `SingleRelationshipQueryBuilder[T]` type propagation (`await v.relation` & full query chains), zero-ceremony `model = YourModel` repositories, covariant `Mapping` / non-string `Sequence` & `ModelQueryBuilder` subqueries, and `BaseSchema` parity on `ModelQueryBuilder.update`, `first_or_create`, `update_or_create`, and relationship `.create()`/`.update()` | ✅ Completed |
97
100
 
98
101
  *See [`documentations/2026-11-14-installation-quick-start.md`](./documentations/2026-11-14-installation-quick-start.md), [`documentations/2026-11-21-application-architecture-and-project-structure.md`](./documentations/2026-11-21-application-architecture-and-project-structure.md), and [`documentations/2026-11-22-task-scheduling.md`](./documentations/2026-11-22-task-scheduling.md) for the complete documentation series and [`CHANGELOG.md`](./CHANGELOG.md) for release notes.*
99
102
 
@@ -672,10 +675,12 @@ SwiftPY follows a clean, intuitive layout inspired by modern application archite
672
675
  │ ├── mail/ # Mailables, SMTP/Sendmail/API transports, templates
673
676
  │ ├── queue/ # At-least-once queue workers, job serialization
674
677
  │ ├── scheduling/ # 5-field cron engine, Redis/Memory stores, Scheduler & builders
678
+ │ ├── schemas/ # Declarative BaseSchema / Schema DTOs, Field constraints & validators
675
679
  │ ├── support/ # Shared identifiers, keys, Redis config, string inflection
676
680
  │ ├── testing/ # TestClient, TestCase, AIFake, MailFake, VectorStoreFake, DB fixtures
677
681
  │ ├── validation/ # FormRequest, fail-closed Validator, builtin & DB rules
678
- │ └── websockets/ # WebSocket manager, connections, broadcast
682
+ │ ├── websockets/ # WebSocket manager, connections, broadcast
683
+ │ └── py.typed # PEP 561 static typing marker
679
684
  ├── tests/ # Automated pytest suite
680
685
  ├── docker-compose.yml # Hardened local PostgreSQL & Redis environment
681
686
  ├── Dockerfile # Multi-stage production container
@@ -709,9 +714,10 @@ docker compose exec app swiftpy migrate
709
714
  # Run full pytest test suite (requires PostgreSQL + Redis running)
710
715
  uv run pytest -vv -ra --timeout=120 --timeout-method=thread
711
716
 
712
- # Static type checking with Mypy in strict mode
717
+ # Static type checking with Mypy in strict mode & Pyrefly
713
718
  uv run --with jinja2 --with aiosmtplib mypy swiftpy
714
719
  uv run mypy --explicit-package-bases .
720
+ uvx pyrefly check --python-interpreter-path .venv/bin/python --error=no-any-return-implicit swiftpy/database/ tests/typing/
715
721
 
716
722
  # Linting with Ruff
717
723
  uv run ruff check .
@@ -64,6 +64,9 @@ All core architectural, storage, AI, and security hardening phases have been com
64
64
  | **Release v0.3.0: Project Structure, AI/Prompts & Controller Routing** | Standardized `app/` + `app/ai/{agents,tools,pipelines,providers,vectorstores,observers}/` + `prompts/` scaffolding, `Prompt.load("summarise.v2")` & `messages` lists, direct unbound controller method DI (`router.get(..., Controller.index)`), `make:agent`/`make:tool`/`make:prompt`, Admin Dashboard removal | ✅ Completed |
65
65
  | **Release v0.3.1: Auth Ergonomics, ORM `has()` & Login Throttling** | `Auth.attempt()`, `Callback` conditions + ORM `has()`/`where_has()`, `attempt_when()`, Remember Me cookies (`Blueprint.remember_token()`, `via_remember()`), `login_using_id()`, `once()`, default `LoginThrottle` (`429 TooManyRequestsError`), `Request.cookies` | ✅ Completed |
66
66
  | **Release v0.3.5: Client IP Detection & Native Task Scheduler** | Fail-safe `request.ip()` / `Request.ip()` / `websocket.ip()` & `LoginThrottle` IP trust via `TRUSTED_PROXIES`, zero-dependency 5-field cron + `ZoneInfo` scheduler (`Schedule` / `Scheduler`), Redis crash recovery (`_CLAIM_DUE_LUA` / `_RECLAIM_PENDING_LUA`), worker overlap locks, `schedule:list`/`run`/`work` | ✅ Completed |
67
+ | **Release v0.3.6: Query Builder Helpers** | `where_column()`, correlated `where_exists()`, `where_any()`/`where_all()`/`where_none()`, `where_past()`/`where_future()`, JSON `column->path` queries & updates, `union()`/`union_all()`, `shared_lock()`/`lock_for_update()`, debug helpers (`to_raw_sql()`, `dump()`, `dd()`) with ORM parity | ✅ Completed |
68
+ | **Release v0.3.7: Declarative Schemas (`swiftpy.schemas`) & Pyrefly/PEP 561 Typing** | `swiftpy/py.typed` PEP 561 marker, `Model` / `ModelQueryBuilder[T]` fluent generic preservation, `BaseSchema` / `Schema` & `Field(...)` constraints, `@field_validator` / `@model_validator`, Router/Controller auto-injection & JSON serialization, ORM `create()`/`update()` schema interop, `make:schema` & `swiftpy new` updates | ✅ Completed |
69
+ | **Release v0.3.8: Zero-Boilerplate ORM & Relationship Static Typing** | Source-level `Relation[T]` / `RelationshipQueryBuilder[T]` / `SingleRelationshipQueryBuilder[T]` type propagation (`await v.relation` & full query chains), zero-ceremony `model = YourModel` repositories, covariant `Mapping` / non-string `Sequence` & `ModelQueryBuilder` subqueries, and `BaseSchema` parity on `ModelQueryBuilder.update`, `first_or_create`, `update_or_create`, and relationship `.create()`/`.update()` | ✅ Completed |
67
70
 
68
71
  *See [`documentations/2026-11-14-installation-quick-start.md`](./documentations/2026-11-14-installation-quick-start.md), [`documentations/2026-11-21-application-architecture-and-project-structure.md`](./documentations/2026-11-21-application-architecture-and-project-structure.md), and [`documentations/2026-11-22-task-scheduling.md`](./documentations/2026-11-22-task-scheduling.md) for the complete documentation series and [`CHANGELOG.md`](./CHANGELOG.md) for release notes.*
69
72
 
@@ -642,10 +645,12 @@ SwiftPY follows a clean, intuitive layout inspired by modern application archite
642
645
  │ ├── mail/ # Mailables, SMTP/Sendmail/API transports, templates
643
646
  │ ├── queue/ # At-least-once queue workers, job serialization
644
647
  │ ├── scheduling/ # 5-field cron engine, Redis/Memory stores, Scheduler & builders
648
+ │ ├── schemas/ # Declarative BaseSchema / Schema DTOs, Field constraints & validators
645
649
  │ ├── support/ # Shared identifiers, keys, Redis config, string inflection
646
650
  │ ├── testing/ # TestClient, TestCase, AIFake, MailFake, VectorStoreFake, DB fixtures
647
651
  │ ├── validation/ # FormRequest, fail-closed Validator, builtin & DB rules
648
- │ └── websockets/ # WebSocket manager, connections, broadcast
652
+ │ ├── websockets/ # WebSocket manager, connections, broadcast
653
+ │ └── py.typed # PEP 561 static typing marker
649
654
  ├── tests/ # Automated pytest suite
650
655
  ├── docker-compose.yml # Hardened local PostgreSQL & Redis environment
651
656
  ├── Dockerfile # Multi-stage production container
@@ -679,9 +684,10 @@ docker compose exec app swiftpy migrate
679
684
  # Run full pytest test suite (requires PostgreSQL + Redis running)
680
685
  uv run pytest -vv -ra --timeout=120 --timeout-method=thread
681
686
 
682
- # Static type checking with Mypy in strict mode
687
+ # Static type checking with Mypy in strict mode & Pyrefly
683
688
  uv run --with jinja2 --with aiosmtplib mypy swiftpy
684
689
  uv run mypy --explicit-package-bases .
690
+ uvx pyrefly check --python-interpreter-path .venv/bin/python --error=no-any-return-implicit swiftpy/database/ tests/typing/
685
691
 
686
692
  # Linting with Ruff
687
693
  uv run ruff check .
@@ -0,0 +1,22 @@
1
+ from __future__ import annotations
2
+
3
+ from swiftpy.schemas import BaseSchema, Field
4
+
5
+
6
+ class UserCreateSchema(BaseSchema):
7
+ """Input validation schema for user creation requests."""
8
+
9
+ name: str = Field(..., min_length=2, max_length=100)
10
+ email: str = Field(..., max_length=255)
11
+ password: str = Field(..., min_length=8)
12
+
13
+
14
+ class UserResponseSchema(BaseSchema):
15
+ """Output serialization schema for user responses."""
16
+
17
+ id: int
18
+ name: str
19
+ email: str
20
+
21
+
22
+ UserSchema = UserResponseSchema
@@ -151,7 +151,7 @@ my_api/
151
151
  │ ├── models/ # Active Record ORM models (User)
152
152
  │ ├── providers/ # Auto-discovered service providers
153
153
  │ ├── repositories/ # Data access layer
154
- │ ├── schemas/ # Typed dataclasses/schemas (see Application Schemas guide)
154
+ │ ├── schemas/ # Declarative BaseSchema DTOs (see Application Schemas guide)
155
155
  │ └── services/ # Business logic services (UserService starter)
156
156
  ├── config/ # Configuration files loading .env via env() / env_bool()
157
157
  ├── database/
@@ -171,7 +171,7 @@ my_api/
171
171
  ├── docker-compose.yml # name: my_api; app, postgres (pgvector:pg16), & redis services
172
172
  ├── Dockerfile
173
173
  ├── main.py # Entrypoint: GET /, /api router, register_exception_handlers(app)
174
- └── pyproject.toml # Configured with swiftpy-framework>=0.3.0, setuptools, & mypy strict settings
174
+ └── pyproject.toml # Configured with swiftpy-framework>=0.3.8, setuptools, & mypy strict settings
175
175
  ```
176
176
 
177
177
  What `swiftpy new my_api` configures automatically:
@@ -325,7 +325,7 @@ The scaffolded `Dockerfile` reads `[project].dependencies` from your project's `
325
325
  name = "my_api"
326
326
  version = "0.1.0"
327
327
  dependencies = [
328
- "swiftpy-framework>=0.3.5",
328
+ "swiftpy-framework>=0.3.8",
329
329
  # ...
330
330
  ]
331
331
  ```
@@ -355,7 +355,7 @@ If running without Docker, upgrade inside your activated `.venv`:
355
355
  uv sync --upgrade-package swiftpy-framework
356
356
 
357
357
  # Or with pip
358
- python -m pip install --upgrade "swiftpy-framework>=0.3.1"
358
+ python -m pip install --upgrade "swiftpy-framework>=0.3.8"
359
359
  swiftpy --version
360
360
  ```
361
361
 
@@ -168,8 +168,11 @@ Key filtering methods:
168
168
 
169
169
  - **Equality & comparison:** `.where(col, val)` (`=`), `.where(col, op, val)` (allows `=`, `!=`, `<>`, `<`, `>`, `<=`, `>=`, `LIKE`, `ILIKE`, `IN`, `NOT IN`), and `.or_where(...)`.
170
170
  - **`NULL` handling:** `.where("deleted_at", None)` compiles to `IS NULL` and `.where("deleted_at", "!=", None)` compiles to `IS NOT NULL` (or use `.where_null()`, `.or_where_null()`, `.where_not_null()`, `.or_where_not_null()`). Passing `None` with `<`, `>`, `LIKE`, or `IN` raises `QueryError`.
171
- - **Lists & subqueries:** `.where_in(col, values)`, `.or_where_in(...)`, `.where_not_in(...)`, `.or_where_not_in(...)`. Empty lists compile safely (`IN []` -> `WHERE FALSE`; `NOT IN []` -> `WHERE TRUE`).
171
+ - **Lists & subqueries:** `.where_in(col, values)`, `.or_where_in(...)`, `.where_not_in(...)`, `.or_where_not_in(...)`. Accepts any non-string `Sequence` (`list`, `tuple`, or custom `Sequence`) as well as `QueryBuilder` subqueries; passing `str`, `bytes`, `bytearray`, or `memoryview` raises `QueryError`. Empty sequences compile safely (`IN []` -> `WHERE FALSE`; `NOT IN []` -> `WHERE TRUE`).
172
172
  - **Ranges:** `.where_between(col, (min_v, max_v))`, `.where_not_between(...)`, `.or_where_between(...)`, `.or_where_not_between(...)`.
173
+ - **Multi-column comparisons:** `.where_any(columns, operator, value)`, `.where_all(...)`, and `.where_none(...)` compare the same value against a non-empty list/tuple of columns. `where_any` matches one or more columns, `where_all` requires every comparison, and `where_none` negates the OR group. Each value is bound separately; the one-argument form defaults to equality.
174
+ - **Column comparisons & existence:** `.where_column("orders.user_id", "=", "users.id")` compares two validated identifiers. `.where_exists(query)` / `.where_not_exists(query)` accept a `QueryBuilder`, including a correlated subquery; use the outer table's real name in `where_column`. Table aliases are not supported, and the subquery must use a different table.
175
+ - **Time comparisons:** `.where_past("due_at")` and `.where_future("starts_at")` compare against PostgreSQL `CURRENT_TIMESTAMP`; `or_where_past` and `or_where_future` are available. `CURRENT_TIMESTAMP` is fixed at the start of the current transaction. For `timestamp without time zone`, PostgreSQL's session time zone applies. SQL NULL timestamps do not match.
173
176
  - **Escaped `LIKE` / `ILIKE`:** `.where_like(col, value, case_insensitive=False, match="contains")` and `.where_ilike(...)` (plus `or_where_like` / `or_where_ilike`). Supported `match` modes are `"contains"`, `"starts_with"` / `"prefix"`, `"ends_with"` / `"suffix"`, and `"exact"`. User characters `%`, `_`, and `\` are automatically escaped via `escape_like()` with `ESCAPE '\'`.
174
177
  - **Nested parentheses:** `.where_group(callback)` / `.or_where_group(callback)` group boolean expressions (`AND (...)` / `OR (...)`).
175
178
  - **Conditionals:** `.when(cond, fn, default=None)` and `.unless(cond, fn, default=None)`.
@@ -178,6 +181,112 @@ Key filtering methods:
178
181
  > [!CAUTION]
179
182
  > Never pass untrusted user strings directly into `select_raw()`, `where_raw()`, or `having_raw()`. Always use `?` placeholders in `sql` and pass user values in `bindings`.
180
183
 
184
+ ### JSON Columns
185
+
186
+ JSON paths use PostgreSQL's `->` separator, not dots. Dots already qualify identifiers (`users.settings` means a table-qualified column); `users.settings.theme` would otherwise be ambiguous. A path is a validated column followed by one or more identifier or non-negative array-index segments:
187
+
188
+ ```python
189
+ from swiftpy.database import Query
190
+
191
+ query = (
192
+ Query.table("users")
193
+ .where("settings->theme", "dark")
194
+ .where_in("settings->languages", ["en", "fr"])
195
+ .where_json_contains("settings->roles", "editor")
196
+ .where_json_contains_key("settings->theme")
197
+ )
198
+ ```
199
+
200
+ In addition to plain columns, `->` paths are accepted only in `where`/`or_where`, `where_in`/`where_not_in` and their `or_` variants, the `where_json_*` methods, and `update()` keys. The path is sent as a bound `text[]`; values remain bound parameters. JSON paths are not accepted in `select`, `order_by`, `group_by`, `pluck`, `value`, null/range filters, joins, inserts, upserts, counters, or direct instance `Model.update(...)`.
201
+
202
+ For `where()` and `where_in()` on a JSON path:
203
+
204
+ | Operator | Value | Behavior |
205
+ |---|---|---|
206
+ | `=` | JSON value | JSONB equality; Python values are JSON-encoded at registration |
207
+ | `=` / `!=` / `<>` | `None` | `=` matches JSON null and missing paths; `!=` / `<>` matches only non-null JSON values |
208
+ | `!=` / `<>` | non-`None` value | JSONB inequality; missing paths and SQL NULL do not match |
209
+ | `<`, `>`, `<=`, `>=` | string or number (not bool) | Compare only rows whose JSON type matches, so mixed-type rows do not raise cast errors |
210
+ | `LIKE`, `ILIKE` | string | Compare JSON string values only |
211
+ | `IN`, `NOT IN` | list/tuple of JSON scalars | Compare JSONB values; an empty list becomes `FALSE` / `TRUE` |
212
+
213
+ Use the dedicated helpers for PostgreSQL containment, key existence, and array length:
214
+
215
+ ```python
216
+ from swiftpy.database import Query
217
+
218
+ query = (
219
+ Query.table("users")
220
+ .where_json_contains("settings->roles", "editor")
221
+ .where_json_doesnt_contain("settings->roles", "banned")
222
+ .where_json_contains_key("settings->theme")
223
+ .where_json_doesnt_contain_key("settings->retired")
224
+ .where_json_length("settings->languages", ">=", 2)
225
+ )
226
+ ```
227
+
228
+ Containment follows PostgreSQL `jsonb @>` semantics: the scalar `"editor"` is contained in an array such as `["editor", "admin"]`; an array value means that all its elements must be present. `where_json_doesnt_contain()` also matches a missing path or SQL NULL. A JSON `null` value counts as an existing key. `where_json_length()` compares array lengths only; an object, scalar, missing path, or SQL NULL never matches, including for `!=`.
229
+
230
+ JSON path updates use `jsonb_set()` and can be mixed with ordinary assignments:
231
+
232
+ ```python
233
+ from swiftpy.database import Query
234
+
235
+ await (
236
+ Query.table("users")
237
+ .where("id", user_id)
238
+ .update({"settings->theme": "dark", "settings->notifications->email": True})
239
+ )
240
+ ```
241
+
242
+ A SQL NULL JSON column is treated as `{}`, and assigning Python `None` writes JSON `null`. PostgreSQL `jsonb_set()` does not create missing intermediate parents: when `settings->notifications` does not already exist, setting `settings->notifications->email` leaves the document unchanged. Updating both an entire JSON column and one of its paths in the same statement is rejected. JSON path updates are available through query-builder `.update(...)`, not a persisted model instance's `update(...)`.
243
+
244
+ ### Unions
245
+
246
+ `QueryBuilder.union(query)` removes duplicate rows; `union_all(query)` preserves them. Each branch must be a `QueryBuilder` that selects the same number of compatible columns. A branch's own ordering and pagination stay inside that branch; ordering/limit/offset on the base builder apply to the combined result. An order column must name an output column. Clauses added after `union()` still belong to the base query. Nested unions and union methods on `ModelQueryBuilder` / `Model` are not supported.
247
+
248
+ ```python
249
+ from swiftpy.database import Query
250
+
251
+ combined = (
252
+ Query.table("current_users").select("id", "email")
253
+ .union_all(Query.table("archived_users").select("id", "email"))
254
+ .order_by("id")
255
+ .limit(50)
256
+ )
257
+ rows = await combined.get()
258
+ ```
259
+
260
+ Union queries support `get()`, `first()`, `simple_paginate()`, `to_sql()`, and the debugging helpers below. Aggregates, `exists()`, `paginate()`, `pluck()`, `value()`, writes, and chunking raise `QueryError` rather than silently operating on only one branch. A union builder can be used as a subquery.
261
+
262
+ ### Pessimistic Row Locks
263
+
264
+ `shared_lock()` emits `FOR SHARE`; `lock_for_update()` emits `FOR UPDATE`. Locks require a live SwiftPY transaction when a read is executed:
265
+
266
+ ```python
267
+ from swiftpy.database import Query, db
268
+
269
+ async with db.transaction():
270
+ user = await Query.table("users").where("id", user_id).lock_for_update().first()
271
+ ```
272
+
273
+ The lock is applied to reads such as `get()`, `first()`, `value()`, and `simple_paginate()`. Calling `to_sql()` only compiles SQL and does not require a transaction. Locks cannot be combined with `DISTINCT`, `GROUP BY`, `HAVING`, or unions; they are rejected on write operations. Aggregates and the count query in `paginate()` do not carry the row lock, while the page's data query does.
274
+
275
+ ### Query Debugging
276
+
277
+ `to_raw_sql()` produces a human-readable rendering; `dump()` logs parameterized SQL plus bindings, and `dump_raw_sql()` logs the rendering. The `dd()` variants log and raise `QueryDumpError` to stop the current flow. Enable INFO logging for `swiftpy.database.query_builder` to see these records.
278
+
279
+ ```python
280
+ from swiftpy.database import Query
281
+
282
+ query = Query.table("users").where("email", "ada@example.com")
283
+ sql, bindings = query.to_sql() # Parameterized SQL and safe binding values
284
+ debug_sql = query.to_raw_sql() # Human-readable only
285
+ query.dump()
286
+ ```
287
+
288
+ `to_raw_sql()` output is for human debugging only: never execute it or use it to construct another query. Its string escaping assumes PostgreSQL's default `standard_conforming_strings=on`, and values that cannot be represented as ordinary PostgreSQL text literals (such as Python strings containing NUL bytes or unsupported custom objects) are rendered diagnostically rather than as executable SQL literals. Bindings may contain credentials or tokens, so keep `dump*()` and `dd*()` out of production code paths.
289
+
181
290
  ### Grouping, `HAVING`, Ordering & Terminals
182
291
 
183
292
  ```python
@@ -265,6 +374,7 @@ await Query.table("events").where("processed", False).chunk_by_id(500, process_p
265
374
 
266
375
  - Use `.chunk_by_id(size, callback, column="id")` whenever rows might be updated or deleted while iterating (cursor advances by `column > last_id`); `.chunk(size, callback)` paginates via `OFFSET`/`LIMIT`.
267
376
  - Both `Query.table("...")` `.update(...)`, `.delete()`, `.increment(...)`, and `.decrement(...)` **refuse to run without a `WHERE` clause** (`QueryError`) unless you explicitly call `.allow_all()`.
377
+ - `.insert()`, `.insert_returning()`, `.update()`, `.increment()` / `.decrement()` (`extra`), and `.upsert()` accept any `Mapping[str, Any]` (and `Sequence[Mapping[str, Any]]` / `Sequence[str]` on `upsert()`), so read-only mappings (such as `MappingProxyType`) and narrowed dictionary types (`dict[str, str]`) type-check cleanly without casts.
268
378
 
269
379
  ---
270
380
 
@@ -210,9 +210,10 @@ SwiftPY inspects your route handler's signature and automatically binds any comb
210
210
  1. `request: Request` — the incoming HTTP request.
211
211
  2. **Path parameters** matching `{param_name}` in the route pattern.
212
212
  3. **`FormRequest` subclasses** — automatically parsed and validated before your handler executes (covered in Guide #4).
213
- 4. **Uploaded files** — `UploadedFile` or `list[UploadedFile]` matching the multipart field name.
214
- 5. **DI container services** — any class or binding registered in the application container (such as `OrderService`, `Config`, or repository classes).
215
- 6. **Optional defaulted parameters** — parameters with default values when not satisfied by path or DI bindings.
213
+ 4. **`BaseSchema` / `Schema` subclasses** — automatically parsed from JSON, form-urlencoded, or multipart bodies, coerced to your field annotations, and validated via `Field(...)` constraints (HTTP `422` on failure; covered in [Application Schemas](2026-11-19-application-schemas.md)).
214
+ 5. **Uploaded files** — `UploadedFile` or `list[UploadedFile]` matching the multipart field name.
215
+ 6. **DI container services** — any class or binding registered in the application container (such as `OrderService`, `Config`, or repository classes).
216
+ 7. **Optional defaulted parameters** — parameters with default values when not satisfied by path or DI bindings.
216
217
 
217
218
  ```python
218
219
  @router.post("/orders/{order_id}/receipt")
@@ -473,14 +474,15 @@ async def bulk_import(request: Request) -> dict[str, str]:
473
474
 
474
475
  ## Returning Responses (`Response` & Helpers)
475
476
 
476
- ### Auto-JSON Serialization for `dict` and `list`
477
+ ### Auto-JSON Serialization for `dict`, `list`, and `BaseSchema`
477
478
 
478
- Any `dict` or `list` returned from a handler is automatically wrapped into an `application/json` `Response`. SwiftPY's JSON encoder handles:
479
+ Any `dict`, `list`, or `BaseSchema` / `Schema` instance returned from a handler is automatically wrapped into an `application/json` `Response`. SwiftPY's JSON encoder handles:
479
480
 
480
481
  - `datetime`, `date`, `time` -> ISO-8601 strings
481
482
  - `UUID` and `Decimal` -> strings
482
483
  - `Enum` -> `.value`
483
- - Objects with `.to_dict()` -> dictionary output with any keys listed in `__hidden__` removed
484
+ - `set` and `frozenset` -> JSON arrays
485
+ - `BaseSchema` and other objects with `.to_dict()` -> dictionary output with excluded (`exclude=True`) or `__hidden__` fields removed
484
486
 
485
487
  For safety and RFC compliance, `NaN`/`Infinity` floats and raw `bytes` values raise `TypeError` during JSON serialization.
486
488
 
@@ -251,10 +251,53 @@ Dirty-tracking safeguards:
251
251
 
252
252
  - If an existing persisted model has **no dirty non-PK attributes**, calling `await model.save()` performs **0 SQL queries** and emits no `updated` event.
253
253
 
254
- - **Direct instance updates (`update()` & `force_update()`):** On a persisted model instance, call `await model.update({"name": "New Name"})` or `await model.update(name="New Name")` to apply attributes via `.fill()`, respect `__fillable__` / `__guarded__` rules, update `updated_at`, run dirty checks (0 SQL queries if nothing changed), emit `updating` / `updated` events, and persist via `.save()` (returning `self`). For trusted internal writes bypassing mass-assignment rules, use `await model.force_update(...)`. Calling `update()` or `force_update()` on an unsaved model raises `PrimaryKeyError`.
254
+ - **Direct instance updates (`update()` & `force_update()`):** On a persisted model instance, call `await model.update({"name": "New Name"})`, `await model.update(name="New Name")`, or pass a `BaseSchema` DTO (`await model.update(payload)`) to apply attributes via `.fill()`, respect `__fillable__` / `__guarded__` rules, update `updated_at`, run dirty checks (0 SQL queries if nothing changed), emit `updating` / `updated` events, and persist via `.save()` (returning `self`). When given a `BaseSchema`, `update()` extracts `payload.to_dict(exclude_unset=True)` so omitted optional fields in partial-update payloads do not overwrite existing columns, while `Model.create(payload)` extracts `payload.to_dict()` (merging any extra keyword overrides such as `organization_id=org_id`). For trusted internal writes bypassing mass-assignment rules, use `await Model.force_create(...)` or `await model.force_update(...)`. Calling `update()` or `force_update()` on an unsaved model raises `PrimaryKeyError`.
255
255
  - If the model defines `updated_at`, saving a dirty existing record refreshes `updated_at` to `datetime.now(UTC)` automatically.
256
256
  - If you load a partial subset of columns with `.select("id", "title")`, SwiftPY records only the selected columns in its original snapshot. Calling `await post.save()` after modifying `post.title` updates only `title` and never clobbers unselected database columns.
257
257
 
258
+ #### Repositories & Static Type Inference
259
+
260
+ SwiftPY's `Model`, `ModelQueryBuilder`, and relationship builders preserve concrete model types end-to-end across chains in Pyrefly, Mypy (`--strict`), and Pyright—without requiring generic repository base classes, `TypeVar`, `Self`, or explicit `model: type[...]` annotations in application code:
261
+
262
+ ```python
263
+ from swiftpy.database.orm import BelongsTo, HasMany, Model
264
+
265
+
266
+ class DocVersion(Model):
267
+ __table__ = "doc_versions"
268
+ id: int
269
+ version: str
270
+ slug: str
271
+ sort_order: int = 0
272
+ groups = HasMany(DocGroup, foreign_key="version_id")
273
+ author = BelongsTo(User, foreign_key="author_id")
274
+
275
+
276
+ class DocVersionRepository:
277
+ model = DocVersion
278
+
279
+ async def get_doc_version(self, version_id: int) -> DocVersion:
280
+ version = await self.model.with_("groups").where("id", version_id).first()
281
+ if not version:
282
+ raise NotFoundError("Version not found")
283
+ return version
284
+
285
+ async def get_doc_versions(self) -> list[DocVersion]:
286
+ return await self.model.with_("groups", "author").order_by("sort_order").get()
287
+
288
+ async def create_doc_version(self, payload: DocVersionCreateSchema) -> DocVersion:
289
+ return await self.model.create(payload)
290
+ ```
291
+
292
+ Direct `Model` calls and class-based relationships (`HasMany(DocGroup)`, `BelongsTo(User)`, `HasOne(Profile)`, `BelongsToMany(Role)`) preserve concrete return types across `await` and chained builders:
293
+
294
+ ```python
295
+ versions: list[DocVersion] = await DocVersion.with_("groups", "author").order_by("sort_order").get()
296
+ first: DocVersion | None = await DocVersion.where("id", 1).first()
297
+ groups: list[DocGroup] = await versions[0].groups.where_in("id", [1, 2]).latest("id").get()
298
+ author: User | None = await versions[0].author
299
+ ```
300
+
258
301
  #### Query Builder Methods on `Model`
259
302
 
260
303
  Every `Model` exposes classmethods that return a `ModelQueryBuilder` bound to that model. You can chain filters and either call a terminal method or `await` the query directly:
@@ -276,7 +319,7 @@ active_authors = await (
276
319
  .limit(25)
277
320
  )
278
321
 
279
- # Find-or-create / update-or-create / upsert
322
+ # Find-or-create / update-or-create / bulk update / upsert (accepts Mapping or BaseSchema)
280
323
  tag = await Tag.first_or_create(
281
324
  {"slug": "async"},
282
325
  values={"name": "Async Python"},
@@ -285,6 +328,7 @@ profile = await Profile.update_or_create(
285
328
  {"user_id": user.id},
286
329
  values={"bio": "Building with SwiftPY"},
287
330
  )
331
+ await User.where("id", user.id).update(patch_schema)
288
332
  await Tag.upsert(
289
333
  [{"slug": "async", "name": "AsyncIO"}, {"slug": "typing", "name": "Strict Typing"}],
290
334
  unique_by=["slug"],
@@ -303,7 +347,32 @@ async def send_digest_batch(users: list[User]) -> None:
303
347
  completed = await User.where("needs_digest", True).chunk_by_id(200, send_digest_batch)
304
348
  ```
305
349
 
306
- `ModelQueryBuilder` supports `.where()`, `.or_where()`, `.where_group()`, `.or_where_group()`, `.where_in()`, `.where_like()`, `.where_ilike()`, `.where_between()`, `.where_null()`, `.where_not_null()`, `.where_raw()`, `.join()`, `.left_join()`, `.right_join()`, `.select()`, `.select_raw()`, `.distinct()`, `.group_by()`, `.having()`, `.latest()`, `.oldest()`, `.in_random_order()`, `.when()`, `.unless()`, `.limit()`/`.take()`, `.offset()`/`.skip()`, `.clone()`, `.count()`, `.exists()`, `.sum()`, `.avg()`, `.min()`, `.max()`, `.value()`, `.pluck()`, `.upsert()`, `.chunk()`, `.chunk_by_id()`, `.paginate()`, `.simple_paginate()`, and `.allow_all()`. Both `.latest()` and `.oldest()` default to sorting by `"created_at"` (pass a column name such as `.latest("id")` if your table uses another column), and `.chunk(count, callback)` / `.chunk_by_id(count, callback)` return `False` early if `callback` returns `False`.
350
+ `ModelQueryBuilder` supports `.where()`, `.or_where()`, `.where_group()`, `.or_where_group()`, `.where_in()`, `.where_like()`, `.where_ilike()`, `.where_between()`, `.where_null()`, `.where_not_null()`, `.where_raw()`, `.join()`, `.left_join()`, `.right_join()`, `.select()`, `.select_raw()`, `.distinct()`, `.group_by()`, `.having()`, `.latest()`, `.oldest()`, `.in_random_order()`, `.when()`, `.unless()`, `.limit()`/`.take()`, `.offset()`/`.skip()`, `.clone()`, `.count()`, `.exists()`, `.sum()`, `.avg()`, `.min()`, `.max()`, `.value()`, `.pluck()`, `.upsert()`, `.chunk()`, `.chunk_by_id()`, `.paginate()`, `.simple_paginate()`, and `.allow_all()`. It also forwards `.where_column()`, `.where_exists()`/`.where_not_exists()`, `.where_any()`/`.where_all()`/`.where_none()`, `.where_past()`/`.where_future()`, the `.where_json_*()` helpers, `.shared_lock()`/`.lock_for_update()`, `.to_sql()`, `.to_raw_sql()`, `.dump()`, `.dump_raw_sql()`, `.dd()`, and `.dd_raw_sql()`. Both `.latest()` and `.oldest()` default to sorting by `"created_at"` (pass a column name such as `.latest("id")` if your table uses another column), and `.chunk(count, callback)` / `.chunk_by_id(count, callback)` return `False` early if `callback` returns `False`.
351
+
352
+ #### Column, JSON, Existence & Time Filters
353
+
354
+ The ORM forwards these filters through `ModelQueryBuilder` and model classmethods. `where_exists()` and `where_in()` / `where_not_in()` (plus `or_` variants and `where(col, "IN", ...)`) accept either another `ModelQueryBuilder` subquery, a core `QueryBuilder` subquery, or any non-string `Sequence` (`list`, `tuple`, custom `Sequence`; `str`, `bytes`, `bytearray`, and `memoryview` raise `QueryError`). Write operations (`insert`, `insert_returning`, `update`, `upsert`, `increment`, `decrement`, `first_or_create`, `update_or_create`) accept covariant `Mapping[str, Any]` inputs cleanly without type casts. Use the real outer table name in a correlated `where_column()` condition:
355
+
356
+ ```python
357
+ users_with_posts = User.where_exists(
358
+ Post.query().where_column("posts.user_id", "=", "users.id")
359
+ )
360
+ authors = User.where_in("id", Post.select("user_id").where("published", True))
361
+ active_users = User.where_any(["email", "name"], "ada").where_future("created_at")
362
+ ```
363
+
364
+ JSON `->` paths are supported in `Model.where()` / `where_in()` and in the `where_json_*()` methods. For example, `User.where_json_contains("preferences->roles", "editor")` or `User.where_json_length("preferences->languages", ">=", 2)`. Query-builder `.update({...})` also accepts JSON path keys; instance `await user.update({...})` intentionally does not.
365
+
366
+ `where_past()` and `where_future()` compare with PostgreSQL `CURRENT_TIMESTAMP`, which is fixed at the start of the active transaction. Row locks must be read inside `db.transaction()`:
367
+
368
+ ```python
369
+ from swiftpy.database import db
370
+
371
+ async with db.transaction():
372
+ user = await User.where("id", user_id).lock_for_update().first()
373
+ ```
374
+
375
+ Unions are intentionally limited to the lower-level `QueryBuilder`; `ModelQueryBuilder` and `Model` do not expose `union()`. Table aliases are not supported for correlated existence queries. See the [query-builder guide](./2026-11-15-database-query-builder-and-migrations.md) for JSON comparison rules, update limitations, lock compatibility, union terminal restrictions, and debugging safety.
307
376
 
308
377
  ### 5. Lifecycle Events & Transactions
309
378
 
@@ -397,7 +466,7 @@ class Tag(Model):
397
466
  > - **Recommended pattern:** Export and import all your domain models together in `app/models/__init__.py` (or import the related model modules at the top of `main.py` / your service module before executing queries).
398
467
  > - If two different modules define models with the **same class name** (for example `billing.models.Item` and `inventory.models.Item`), string lookup raises:
399
468
  > `RuntimeError: Model name 'Item' is ambiguous: ... Pass the class itself instead of a string.`
400
- > In that case (or whenever imports are not circular), import and pass the target model class directly: `items = HasMany(BillingItem)`.
469
+ > In that case (or whenever imports are not circular), import and pass the target model class directly (`items = HasMany(BillingItem)`), which also gives static type checkers exact target-model types (`await order.items -> list[BillingItem]`).
401
470
 
402
471
  > **Note on relationship keys & pivot tables:** `HasOne`, `HasMany`, and `BelongsTo` all accept `(related_model, foreign_key=None, local_key=None)`. When `foreign_key` is omitted on `BelongsTo`, SwiftPY infers `<relation_attribute_name>_id` (so `user = BelongsTo("User")` uses `"user_id"`, whereas `author = BelongsTo("User", foreign_key="user_id")` explicitly maps `author` to `user_id`). `BelongsToMany` accepts `(related_model, pivot_table=None, foreign_pivot_key=None, related_pivot_key=None, parent_key=None, related_key=None)`; when `pivot_table` is omitted, SwiftPY sorts the two snake-case model names alphabetically and joins them with `_` (e.g. `"post_tag"`).
403
472
 
@@ -443,17 +512,24 @@ mixed = await User.where("is_admin", True).or_where_doesnt_have("posts").get()
443
512
 
444
513
  #### Async Lazy Queries vs `RelationNotLoadedError`
445
514
 
446
- By default (`prevent_lazy_loading = False`), accessing an **unloaded** relationship attribute returns a `RelationshipQueryBuilder` (for `HasMany`/`BelongsToMany`) or `SingleRelationshipQueryBuilder` (for `HasOne`/`BelongsTo`):
515
+ By default (`prevent_lazy_loading = False`), accessing an **unloaded** relationship attribute returns a `RelationshipQueryBuilder[T]` (for `HasMany`/`BelongsToMany`) or `SingleRelationshipQueryBuilder[T]` (for `HasOne`/`BelongsTo`), forwarding the full set of `ModelQueryBuilder` fluent and terminal methods while preserving concrete `Model` types:
447
516
 
448
517
  ```python
449
518
  user = await User.find_or_fail(1)
450
519
 
451
- # Async query works explicitly (and lets you refine the query)
452
- published_posts = await user.posts.where("published", True).latest().get()
520
+ # Awaiting directly returns list[Post] (or Profile | None for HasOne/BelongsTo)
521
+ posts = await user.posts
453
522
  profile = await user.profile
454
523
 
455
- # Creating a child record through HasMany/HasOne sets the foreign key automatically
524
+ # Refine relationship queries with full ModelQueryBuilder method parity
525
+ published_posts = await user.posts.where("published", True).latest("id").get()
526
+ filtered_posts = await user.posts.where_in("id", [1, 2]).paginate(per_page=10, page=1)
527
+ required_profile = await user.profile.where_not_null("bio").first_or_fail()
528
+
529
+ # Creating or updating child records through a relation accepts kwargs, mappings, or BaseSchema
456
530
  new_post = await user.posts.create(title="First Post", body="Hello!")
531
+ new_from_schema = await user.posts.create(create_post_schema)
532
+ await user.posts.where("id", new_post.id).update(patch_post_schema)
457
533
  ```
458
534
 
459
535
  However, trying to use an unloaded relationship **synchronously**—such as `for p in user.posts`, `len(user.posts)`, `bool(user.posts)`, `user.posts[0]`, or `user.profile.bio`—raises **`RelationNotLoadedError`** rather than silently executing blocking I/O inside an async event loop.
@@ -504,7 +580,7 @@ await post.tags.sync([tag_a.id, tag_b])
504
580
  - **Never share models with unloaded relations into sync templates/serializers**: Either eager-load with `.with_()` upfront or catch missing eager loads early in development/CI with `prevent_lazy_loading = True` so `LazyLoadingDisabledError` surfaces N+1 paths before production.
505
581
  - **Bulk deletes/updates vs single-record saves**: `model.save()` and `model.delete()` execute targeted single-row operations wrapped in dirty checks and lifecycle hooks. Never loop `await row.save()` inside a handler when a single batched query or `Model.upsert()` / `Query` update is appropriate, and remember `Query` bulk updates/deletes require `.allow_all()` if called intentionally without a `WHERE` clause.
506
582
  - **Database migrations remain the source of truth**: `Field(...)`, `Vector(...)`, and relationship descriptors describe application-level behavior; always create corresponding tables, foreign keys, indexes, and `vector(...)` columns in `database/migrations/` using `Schema` and `Blueprint` (see [Database Schema, `Blueprint` & Migrations](2026-11-19-database-schema-and-blueprint.md)).
507
- - **Combine models cleanly with schemas**: Return domain `Model` records from repositories and transform responses with `.to_dict()`, `Resource` classes, or `@dataclass` schemas in [Application Schemas (`app/schemas`)](2026-11-19-application-schemas.md).
583
+ - **Combine models cleanly with schemas**: Return domain `Model` records from repositories and transform or validate payloads with `BaseSchema.from_model()`, `Model.create(schema)`, `model.update(schema)`, `.to_dict()`, or `Resource` classes in [Application Schemas (`app/schemas`)](2026-11-19-application-schemas.md).
508
584
 
509
585
  ---
510
586
 
@@ -570,6 +570,22 @@ def register_validation_renderer(app: Application) -> None:
570
570
 
571
571
  ---
572
572
 
573
+ ## Choosing Between `BaseSchema` / `Schema` and `FormRequest`
574
+
575
+ Both systems return HTTP `422` (`ValidationException`) automatically when annotated on route or controller handlers. Choose based on what each endpoint needs:
576
+
577
+ | Need | Use `BaseSchema` / `Schema` (`swiftpy.schemas`) | Use `FormRequest` (`swiftpy.validation`) |
578
+ |---|---|---|
579
+ | **Static typing in Pyrefly / Mypy** | Full typed attribute access (`payload.movement_date`, `payload.good_eggs`) | Dictionary-like `form.validated()` (`ValidatedData`) |
580
+ | **Schema definition style** | Type annotations + `Field(..., gt=0, max_length=100)` + `@field_validator` / `@model_validator` | String or rule-object DSL (`"required|email|unique:users,email"`) |
581
+ | **Database checks (`unique` / `exists`)** | Validate in service/repository or pair with explicit checks | Built-in async `"unique:table,col"` and `"exists:table,col"` rules |
582
+ | **Service & ORM DTO reuse** | Pass directly to services/repositories and `Model.create(payload)` / `model.update(payload)` | Primarily an HTTP request boundary wrapper |
583
+ | **Nested & union schemas** | Native nested `BaseSchema`, `list[ItemSchema]`, `UUID`, `Decimal`, `date`, `Enum`, `Literal` | Wildcard keys (`"items.*.sku"`) |
584
+
585
+ See [Application Schemas (`app/schemas`)](2026-11-19-application-schemas.md) for the complete `BaseSchema` / `Schema` guide.
586
+
587
+ ---
588
+
573
589
  ## Next Step
574
590
 
575
- Continue to [Application Schemas (`app/schemas`)](2026-11-19-application-schemas.md) to organize typed `@dataclass(slots=True)` input/output DTOs and `make:schema` validation rule classes across services, repositories, and routes.
591
+ Continue to [Application Schemas (`app/schemas`)](2026-11-19-application-schemas.md) to organize strongly typed `BaseSchema` / `Schema` DTOs and `make:schema` contracts across routes, services, repositories, and ORM models.