swiftpy-framework 0.4.1.post1__tar.gz → 0.4.2__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 (556) hide show
  1. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/.github/workflows/ci.yml +65 -3
  2. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/CHANGELOG.md +53 -0
  3. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/PKG-INFO +3 -1
  4. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/README.md +2 -0
  5. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/documentations/2026-11-14-installation-quick-start.md +4 -4
  6. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/documentations/2026-11-15-database-query-builder-and-migrations.md +2 -1
  7. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/documentations/2026-11-15-filesystem-storage-and-mail.md +2 -0
  8. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/documentations/2026-11-15-orm-models-and-relationships.md +70 -22
  9. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/documentations/2026-11-15-validation-and-form-requests.md +65 -5
  10. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/pyproject.toml +1 -1
  11. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/__init__.py +42 -0
  12. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/auth/api_key_guard.py +1 -1
  13. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/auth/auth_manager.py +78 -26
  14. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/auth/jwt_issuer.py +1 -1
  15. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/auth/throttle.py +20 -8
  16. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/auth/token_blacklist.py +15 -12
  17. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/auth/user_context.py +43 -21
  18. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/console/commands/new.py +1 -1
  19. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/core/application.py +17 -11
  20. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/database/__init__.py +4 -0
  21. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/database/orm/__init__.py +8 -0
  22. swiftpy_framework-0.4.2/swiftpy/database/orm/collection.py +328 -0
  23. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/database/orm/model.py +1499 -196
  24. swiftpy_framework-0.4.2/swiftpy/database/orm/relationships.py +2939 -0
  25. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/database/pool.py +1 -1
  26. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/database/query_builder.py +229 -7
  27. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/filesystem/uploads/handlers.py +115 -21
  28. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/filesystem/uploads/uploaded_file.py +50 -9
  29. swiftpy_framework-0.4.2/swiftpy/filesystem/uploads/validators.py +1016 -0
  30. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/http/request.py +73 -8
  31. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/http/response.py +13 -11
  32. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/schemas/base.py +1 -0
  33. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/validation/__init__.py +24 -0
  34. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/validation/rules/__init__.py +26 -0
  35. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/validation/rules/builtin.py +202 -24
  36. swiftpy_framework-0.4.2/swiftpy/validation/rules/file.py +709 -0
  37. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/validation/rules/registry.py +128 -15
  38. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/validation/rules/required.py +24 -2
  39. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/validation/validator.py +146 -63
  40. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/auth/test_auth_attempt.py +184 -20
  41. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/auth/test_auth_throttle.py +13 -1
  42. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/auth/test_token_blacklist.py +49 -0
  43. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/console/test_phase9_cli_remediation.py +1 -1
  44. swiftpy_framework-0.4.2/tests/filesystem/test_multipart.py +301 -0
  45. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/http/test_response.py +39 -2
  46. swiftpy_framework-0.4.2/tests/orm/test_model_collection.py +326 -0
  47. swiftpy_framework-0.4.2/tests/orm/test_relationship_helpers_v042.py +1474 -0
  48. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/typing/test_auth_typing.py +9 -4
  49. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/typing/test_orm_typing.py +87 -5
  50. swiftpy_framework-0.4.2/tests/typing/test_v042_orm_helpers_typing.py +147 -0
  51. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/typing/test_validation_typing.py +65 -1
  52. swiftpy_framework-0.4.2/tests/validation/test_file_image_validation.py +1342 -0
  53. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/uv.lock +1 -1
  54. swiftpy_framework-0.4.1.post1/swiftpy/database/orm/relationships.py +0 -1502
  55. swiftpy_framework-0.4.1.post1/swiftpy/filesystem/uploads/validators.py +0 -186
  56. swiftpy_framework-0.4.1.post1/tests/filesystem/test_multipart.py +0 -144
  57. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/.dockerignore +0 -0
  58. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/.env.example +0 -0
  59. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/.github/workflows/publish.yml +0 -0
  60. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/.gitignore +0 -0
  61. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/CONTRIBUTING.md +0 -0
  62. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/Dockerfile +0 -0
  63. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/LICENSE +0 -0
  64. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/app/__init__.py +0 -0
  65. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/app/ai/agents/assistant_agent.py +0 -0
  66. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/app/ai/observers/.gitkeep +0 -0
  67. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/app/ai/pipelines/.gitkeep +0 -0
  68. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/app/ai/providers/.gitkeep +0 -0
  69. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/app/ai/tools/system_status_tool.py +0 -0
  70. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/app/ai/vectorstores/.gitkeep +0 -0
  71. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/app/events/user_registered.py +0 -0
  72. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/app/http/controllers/user_controller.py +0 -0
  73. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/app/http/handler/exceptions.py +0 -0
  74. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/app/http/middleware/__init__.py +0 -0
  75. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/app/http/middleware/admin_middleware.py +0 -0
  76. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/app/http/middleware/auth_middleware.py +0 -0
  77. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/app/http/middleware/test_middleware.py +0 -0
  78. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/app/http/requests/create_user_request.py +0 -0
  79. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/app/http/resources/user_resource.py +0 -0
  80. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/app/jobs/send_notification_job.py +0 -0
  81. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/app/listeners/send_welcome_notification.py +0 -0
  82. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/app/mail/welcome_email.py +0 -0
  83. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/app/models/profile.py +0 -0
  84. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/app/models/user.py +0 -0
  85. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/app/providers/app_service_provider.py +0 -0
  86. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/app/providers/auth_service_provider.py +0 -0
  87. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/app/providers/cache_service_provider.py +0 -0
  88. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/app/providers/database_service_provider.py +0 -0
  89. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/app/providers/event_service_provider.py +0 -0
  90. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/app/providers/filesystem_service_provider.py +0 -0
  91. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/app/providers/mail_service_provider.py +0 -0
  92. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/app/providers/queue_service_provider.py +0 -0
  93. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/app/repositories/user_repository.py +0 -0
  94. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/app/schemas/user_schema.py +0 -0
  95. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/app/services/user_service.py +0 -0
  96. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/bootstrap/cache/.gitkeep +0 -0
  97. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/config/__init__.py +0 -0
  98. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/config/ai.py +0 -0
  99. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/config/app.py +0 -0
  100. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/config/auth.py +0 -0
  101. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/config/cache.py +0 -0
  102. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/config/cors.py +0 -0
  103. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/config/database.py +0 -0
  104. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/config/events.py +0 -0
  105. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/config/filesystems.py +0 -0
  106. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/config/http.py +0 -0
  107. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/config/logging.py +0 -0
  108. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/config/mail.py +0 -0
  109. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/config/queue.py +0 -0
  110. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/config/schedule.py +0 -0
  111. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/database/__init__.py +0 -0
  112. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/database/migrations/2026_01_01_000000_create_users_table.py +0 -0
  113. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/database/migrations/2026_11_26_180006_create_profiles_table.py +0 -0
  114. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/database/migrations/__init__.py +0 -0
  115. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/database/seeders/database_seeder.py +0 -0
  116. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/docker-compose.yml +0 -0
  117. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/documentations/2026-11-15-ai-subsystem.md +0 -0
  118. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/documentations/2026-11-15-authentication-and-security.md +0 -0
  119. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/documentations/2026-11-15-cache-events-and-queues.md +0 -0
  120. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/documentations/2026-11-15-core-application-di-and-config.md +0 -0
  121. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/documentations/2026-11-15-http-routing-middleware-and-exceptions.md +0 -0
  122. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/documentations/2026-11-15-websockets-and-admin.md +0 -0
  123. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/documentations/2026-11-19-application-schemas.md +0 -0
  124. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/documentations/2026-11-19-cli-and-testing.md +0 -0
  125. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/documentations/2026-11-19-database-schema-and-blueprint.md +0 -0
  126. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/documentations/2026-11-20-error-handling.md +0 -0
  127. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/documentations/2026-11-20-logging.md +0 -0
  128. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/documentations/2026-11-20-request-and-responses.md +0 -0
  129. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/documentations/2026-11-21-application-architecture-and-project-structure.md +0 -0
  130. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/documentations/2026-11-21-cors.md +0 -0
  131. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/documentations/2026-11-22-task-scheduling.md +0 -0
  132. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/main.py +0 -0
  133. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/prompts/classify.py +0 -0
  134. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/prompts/summarise.py +0 -0
  135. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/red-black.png +0 -0
  136. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/routes/__init__.py +0 -0
  137. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/routes/api.py +0 -0
  138. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/.gitignore +0 -0
  139. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/ai/__init__.py +0 -0
  140. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/ai/_deterministic.py +0 -0
  141. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/ai/_fake.py +0 -0
  142. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/ai/agents/__init__.py +0 -0
  143. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/ai/agents/base_agent.py +0 -0
  144. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/ai/agents/memory.py +0 -0
  145. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/ai/client.py +0 -0
  146. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/ai/conversation.py +0 -0
  147. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/ai/embeddings.py +0 -0
  148. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/ai/exceptions.py +0 -0
  149. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/ai/history_strategies.py +0 -0
  150. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/ai/middleware.py +0 -0
  151. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/ai/observability/__init__.py +0 -0
  152. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/ai/observability/drivers.py +0 -0
  153. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/ai/observability/observer.py +0 -0
  154. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/ai/pool.py +0 -0
  155. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/ai/pricing.py +0 -0
  156. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/ai/prompts/__init__.py +0 -0
  157. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/ai/prompts/loader.py +0 -0
  158. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/ai/providers/__init__.py +0 -0
  159. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/ai/providers/anthropic_provider.py +0 -0
  160. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/ai/providers/base.py +0 -0
  161. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/ai/providers/openai_provider.py +0 -0
  162. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/ai/rag/__init__.py +0 -0
  163. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/ai/rag/context_formatter.py +0 -0
  164. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/ai/rag/pipeline_builder.py +0 -0
  165. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/ai/rag/reranker.py +0 -0
  166. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/ai/rag/result.py +0 -0
  167. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/ai/rag/retriever.py +0 -0
  168. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/ai/redis_store.py +0 -0
  169. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/ai/streaming.py +0 -0
  170. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/ai/tools/__init__.py +0 -0
  171. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/ai/tools/base_tool.py +0 -0
  172. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/ai/tools/first_party.py +0 -0
  173. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/ai/tools/tool_loop.py +0 -0
  174. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/ai/vectorstore/__init__.py +0 -0
  175. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/ai/vectorstore/base.py +0 -0
  176. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/ai/vectorstore/chroma_adapter.py +0 -0
  177. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/ai/vectorstore/in_memory_adapter.py +0 -0
  178. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/ai/vectorstore/lancedb_adapter.py +0 -0
  179. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/ai/vectorstore/pgvector_adapter.py +0 -0
  180. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/ai/vectorstore/pinecone_adapter.py +0 -0
  181. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/ai/vectorstore/qdrant_adapter.py +0 -0
  182. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/auth/__init__.py +0 -0
  183. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/auth/events.py +0 -0
  184. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/auth/exceptions.py +0 -0
  185. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/auth/jwt_guard.py +0 -0
  186. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/auth_manager.py +0 -0
  187. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/cache/__init__.py +0 -0
  188. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/cache/cache.py +0 -0
  189. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/cache/driver.py +0 -0
  190. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/cache/drivers/memory.py +0 -0
  191. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/cache/drivers/redis.py +0 -0
  192. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/console/__init__.py +0 -0
  193. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/console/cli.py +0 -0
  194. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/console/commands/__init__.py +0 -0
  195. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/console/commands/cache.py +0 -0
  196. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/console/commands/make.py +0 -0
  197. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/console/commands/migrate.py +0 -0
  198. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/console/commands/queue.py +0 -0
  199. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/console/commands/schedule.py +0 -0
  200. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/console/commands/seed.py +0 -0
  201. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/console/commands/start.py +0 -0
  202. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/console/commands/storage.py +0 -0
  203. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/console/loader.py +0 -0
  204. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/console/stubs/__init__.py +0 -0
  205. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/console/stubs/agent.stub +0 -0
  206. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/console/stubs/controller.stub +0 -0
  207. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/console/stubs/event.stub +0 -0
  208. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/console/stubs/factory.stub +0 -0
  209. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/console/stubs/job.stub +0 -0
  210. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/console/stubs/listener.stub +0 -0
  211. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/console/stubs/mail.stub +0 -0
  212. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/console/stubs/middleware.stub +0 -0
  213. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/console/stubs/migration.alter.stub +0 -0
  214. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/console/stubs/migration.api_keys.stub +0 -0
  215. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/console/stubs/migration.blank.stub +0 -0
  216. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/console/stubs/migration.create.stub +0 -0
  217. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/console/stubs/migration.stub +0 -0
  218. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/console/stubs/migration.update.stub +0 -0
  219. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/console/stubs/model.stub +0 -0
  220. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/console/stubs/prompt.stub +0 -0
  221. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/console/stubs/provider.stub +0 -0
  222. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/console/stubs/repository.stub +0 -0
  223. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/console/stubs/request.stub +0 -0
  224. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/console/stubs/resource.stub +0 -0
  225. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/console/stubs/schema.stub +0 -0
  226. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/console/stubs/seeder.stub +0 -0
  227. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/console/stubs/service.stub +0 -0
  228. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/console/stubs/tool.stub +0 -0
  229. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/core/__init__.py +0 -0
  230. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/core/bootstrap.py +0 -0
  231. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/core/config.py +0 -0
  232. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/core/container.py +0 -0
  233. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/core/container_exceptions.py +0 -0
  234. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/core/context.py +0 -0
  235. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/core/exceptions.py +0 -0
  236. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/core/providers/base.py +0 -0
  237. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/database/exceptions.py +0 -0
  238. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/database/factories.py +0 -0
  239. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/database/identifiers.py +0 -0
  240. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/database/migrations/__init__.py +0 -0
  241. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/database/migrations/blueprint.py +0 -0
  242. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/database/migrations/lock.py +0 -0
  243. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/database/migrations/migration.py +0 -0
  244. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/database/migrations/migrator.py +0 -0
  245. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/database/migrations/schema.py +0 -0
  246. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/database/orm/fields.py +0 -0
  247. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/database/orm/registry.py +0 -0
  248. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/database/pagination/__init__.py +0 -0
  249. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/database/pagination/contracts.py +0 -0
  250. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/database/pagination/paginator.py +0 -0
  251. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/database/pagination/simple_paginator.py +0 -0
  252. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/database/seeder.py +0 -0
  253. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/database/transaction.py +0 -0
  254. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/events/__init__.py +0 -0
  255. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/events/dispatcher.py +0 -0
  256. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/events/redis_bus.py +0 -0
  257. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/filesystem/__init__.py +0 -0
  258. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/filesystem/disk.py +0 -0
  259. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/filesystem/drivers/__init__.py +0 -0
  260. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/filesystem/drivers/base.py +0 -0
  261. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/filesystem/drivers/local.py +0 -0
  262. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/filesystem/drivers/s3.py +0 -0
  263. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/filesystem/events.py +0 -0
  264. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/filesystem/exceptions.py +0 -0
  265. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/filesystem/manager.py +0 -0
  266. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/filesystem/metadata.py +0 -0
  267. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/filesystem/paths.py +0 -0
  268. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/filesystem/service_provider.py +0 -0
  269. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/filesystem/uploads/__init__.py +0 -0
  270. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/filesystem/visibility.py +0 -0
  271. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/helpers/__init__.py +0 -0
  272. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/helpers/helper.py +0 -0
  273. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/http/client_ip.py +0 -0
  274. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/http/exceptions.py +0 -0
  275. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/http/middleware.py +0 -0
  276. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/http/router.py +0 -0
  277. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/logging/__init__.py +0 -0
  278. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/logging/channels.py +0 -0
  279. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/logging/log.py +0 -0
  280. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/logging/manager.py +0 -0
  281. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/mail/__init__.py +0 -0
  282. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/mail/attachments.py +0 -0
  283. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/mail/config.py +0 -0
  284. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/mail/envelope.py +0 -0
  285. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/mail/exceptions.py +0 -0
  286. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/mail/facade.py +0 -0
  287. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/mail/mailable.py +0 -0
  288. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/mail/manager.py +0 -0
  289. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/mail/message.py +0 -0
  290. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/mail/models.py +0 -0
  291. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/mail/queue/__init__.py +0 -0
  292. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/mail/queue/job.py +0 -0
  293. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/mail/service_provider.py +0 -0
  294. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/mail/templates/__init__.py +0 -0
  295. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/mail/templates/renderer.py +0 -0
  296. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/mail/transports/__init__.py +0 -0
  297. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/mail/transports/api/__init__.py +0 -0
  298. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/mail/transports/api/base.py +0 -0
  299. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/mail/transports/api/mailgun.py +0 -0
  300. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/mail/transports/api/resend.py +0 -0
  301. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/mail/transports/api/sendgrid.py +0 -0
  302. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/mail/transports/base.py +0 -0
  303. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/mail/transports/console.py +0 -0
  304. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/mail/transports/sendmail.py +0 -0
  305. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/mail/transports/smtp.py +0 -0
  306. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/py.typed +0 -0
  307. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/queue/__init__.py +0 -0
  308. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/queue/dispatcher.py +0 -0
  309. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/queue/job.py +0 -0
  310. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/queue/worker.py +0 -0
  311. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/scheduling/__init__.py +0 -0
  312. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/scheduling/_redis_lua.py +0 -0
  313. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/scheduling/cron.py +0 -0
  314. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/scheduling/events.py +0 -0
  315. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/scheduling/exceptions.py +0 -0
  316. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/scheduling/jobs.py +0 -0
  317. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/scheduling/models.py +0 -0
  318. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/scheduling/scheduler.py +0 -0
  319. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/scheduling/signing.py +0 -0
  320. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/scheduling/store.py +0 -0
  321. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/schemas/__init__.py +0 -0
  322. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/schemas/fields.py +0 -0
  323. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/support/__init__.py +0 -0
  324. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/support/hashing.py +0 -0
  325. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/support/keys.py +0 -0
  326. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/support/redis_config.py +0 -0
  327. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/support/strings.py +0 -0
  328. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/testing/__init__.py +0 -0
  329. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/testing/fakes/__init__.py +0 -0
  330. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/testing/fakes/ai_fake.py +0 -0
  331. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/testing/fakes/vectorstore_fake.py +0 -0
  332. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/testing/fixtures.py +0 -0
  333. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/testing/http_client.py +0 -0
  334. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/testing/test_case.py +0 -0
  335. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/validation/exceptions.py +0 -0
  336. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/validation/form_request.py +0 -0
  337. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/validation/protocols.py +0 -0
  338. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/validation/rules/exists.py +0 -0
  339. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/validation/rules/unique.py +0 -0
  340. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/websockets/__init__.py +0 -0
  341. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/websockets/connection.py +0 -0
  342. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/swiftpy/websockets/manager.py +0 -0
  343. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/__init__.py +0 -0
  344. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/ai/__init__.py +0 -0
  345. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/ai/conftest.py +0 -0
  346. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/ai/integration/__init__.py +0 -0
  347. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/ai/integration/test_chroma.py +0 -0
  348. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/ai/integration/test_lancedb.py +0 -0
  349. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/ai/integration/test_pinecone.py +0 -0
  350. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/ai/integration/test_qdrant.py +0 -0
  351. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/ai/integration/test_rag_integration.py +0 -0
  352. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/ai/test_agents.py +0 -0
  353. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/ai/test_ai_fake.py +0 -0
  354. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/ai/test_ai_fake_isolation.py +0 -0
  355. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/ai/test_client.py +0 -0
  356. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/ai/test_conversation.py +0 -0
  357. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/ai/test_embeddings.py +0 -0
  358. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/ai/test_middleware.py +0 -0
  359. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/ai/test_middleware_concurrency.py +0 -0
  360. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/ai/test_observability.py +0 -0
  361. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/ai/test_observability_resilience.py +0 -0
  362. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/ai/test_phase7_ai_remediation.py +0 -0
  363. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/ai/test_phase8_agents_tools_prompts_remediation.py +0 -0
  364. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/ai/test_phase8_rag_remediation.py +0 -0
  365. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/ai/test_phase8_vectorstore_remediation.py +0 -0
  366. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/ai/test_prompts.py +0 -0
  367. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/ai/test_prompts_security.py +0 -0
  368. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/ai/test_providers.py +0 -0
  369. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/ai/test_rag.py +0 -0
  370. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/ai/test_streaming.py +0 -0
  371. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/ai/test_tools.py +0 -0
  372. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/ai/test_vectorstore.py +0 -0
  373. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/ai/test_vectorstore_adapters.py +0 -0
  374. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/app/__init__.py +0 -0
  375. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/app/test_application_providers.py +0 -0
  376. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/app/test_starter_auth.py +0 -0
  377. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/auth/__init__.py +0 -0
  378. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/auth/test_api_key_guard.py +0 -0
  379. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/auth/test_auth_context_on_issue.py +0 -0
  380. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/auth/test_auth_manager.py +0 -0
  381. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/auth/test_auth_proxy.py +0 -0
  382. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/auth/test_auth_remediation.py +0 -0
  383. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/auth/test_auth_security.py +0 -0
  384. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/auth/test_jwt_defaults.py +0 -0
  385. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/auth/test_jwt_issuer.py +0 -0
  386. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/auth/test_password_hashing.py +0 -0
  387. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/auth/test_refresh_and_logout.py +0 -0
  388. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/benchmarks.py +0 -0
  389. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/cache/__init__.py +0 -0
  390. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/cache/test_cache_concurrency.py +0 -0
  391. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/cache/test_cache_manager.py +0 -0
  392. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/cache/test_driver_correctness.py +0 -0
  393. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/cache/test_memory_cache.py +0 -0
  394. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/cache/test_redis_cache.py +0 -0
  395. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/concurrency/__init__.py +0 -0
  396. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/concurrency/test_circular_dependency.py +0 -0
  397. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/concurrency/test_container_semantics.py +0 -0
  398. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/concurrency/test_resolution.py +0 -0
  399. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/concurrency/test_resolution2.py +0 -0
  400. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/conftest.py +0 -0
  401. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/console/__init__.py +0 -0
  402. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/console/test_cache_commands.py +0 -0
  403. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/console/test_cli.py +0 -0
  404. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/console/test_new_command.py +0 -0
  405. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/console/test_start.py +0 -0
  406. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/console/test_storage_command.py +0 -0
  407. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/console/test_stubs_and_make.py +0 -0
  408. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/core/__init__.py +0 -0
  409. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/core/test_application_config_isolation.py +0 -0
  410. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/core/test_core_config.py +0 -0
  411. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/core/test_exceptions.py +0 -0
  412. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/core/test_helpers.py +0 -0
  413. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/core/test_instance_singletons.py +0 -0
  414. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/core/test_lifespan.py +0 -0
  415. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/database/__init__.py +0 -0
  416. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/database/test_factories.py +0 -0
  417. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/database/test_orm_expansion.py +0 -0
  418. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/database/test_orm_vector.py +0 -0
  419. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/database/test_pagination_and_grouping.py +0 -0
  420. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/database/test_pagination_pg_integration.py +0 -0
  421. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/database/test_pgvector_integration.py +0 -0
  422. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/database/test_phase4_remediation.py +0 -0
  423. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/database/test_query_expansion.py +0 -0
  424. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/database/test_query_expansion_pg_integration.py +0 -0
  425. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/database/test_query_helpers_v036.py +0 -0
  426. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/database/test_seeder.py +0 -0
  427. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/database/test_sequence_gaps.py +0 -0
  428. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/db/__init__.py +0 -0
  429. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/db/load_test_database.py +0 -0
  430. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/db/load_test_database2.py +0 -0
  431. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/db/test_arbitrary_primary_keys.py +0 -0
  432. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/db/test_identifiers.py +0 -0
  433. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/db/test_mass_writes.py +0 -0
  434. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/db/test_pool_config.py +0 -0
  435. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/db/test_query_builder_terminals.py +0 -0
  436. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/db/test_sql_injections.py +0 -0
  437. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/db/test_transaction_isolation.py +0 -0
  438. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/docs/__init__.py +0 -0
  439. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/docs/test_readme_examples.py +0 -0
  440. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/e2e/__init__.py +0 -0
  441. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/e2e/test_concurrent_auth.py +0 -0
  442. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/e2e/test_crud_auth_e2e.py +0 -0
  443. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/events/__init__.py +0 -0
  444. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/events/test_event_dispatcher.py +0 -0
  445. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/events/test_model_events.py +0 -0
  446. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/events/test_redis_bus.py +0 -0
  447. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/events/test_redis_bus_reliability.py +0 -0
  448. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/filesystem/__init__.py +0 -0
  449. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/filesystem/test_cli_storage_link.py +0 -0
  450. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/filesystem/test_disk.py +0 -0
  451. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/filesystem/test_filesystem_concurrency.py +0 -0
  452. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/filesystem/test_filesystem_config.py +0 -0
  453. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/filesystem/test_http_integration.py +0 -0
  454. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/filesystem/test_local_driver.py +0 -0
  455. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/filesystem/test_paths.py +0 -0
  456. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/filesystem/test_phase6_filesystem_remediation.py +0 -0
  457. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/filesystem/test_s3_driver.py +0 -0
  458. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/filesystem/test_signed_urls.py +0 -0
  459. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/filesystem/test_storage_facade.py +0 -0
  460. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/filesystem/test_uploaded_file.py +0 -0
  461. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/filesystem/test_validation.py +0 -0
  462. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/http/__init__.py +0 -0
  463. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/http/test_client_ip.py +0 -0
  464. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/http/test_controller_routing.py +0 -0
  465. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/http/test_error_pipeline.py +0 -0
  466. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/http/test_http_remediation.py +0 -0
  467. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/http/test_include_router.py +0 -0
  468. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/http/test_request.py +0 -0
  469. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/http/test_request_router_abort.py +0 -0
  470. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/http/test_route_groups.py +0 -0
  471. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/http/test_router.py +0 -0
  472. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/http/test_router_405_and_has_file.py +0 -0
  473. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/integration/__init__.py +0 -0
  474. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/integration/test_queue_event_websocket.py +0 -0
  475. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/logging/__init__.py +0 -0
  476. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/logging/test_logging.py +0 -0
  477. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/mail/__init__.py +0 -0
  478. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/mail/test_api_transports.py +0 -0
  479. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/mail/test_attachments.py +0 -0
  480. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/mail/test_cli_make_mail.py +0 -0
  481. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/mail/test_console_transport.py +0 -0
  482. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/mail/test_envelope.py +0 -0
  483. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/mail/test_facade_and_fake.py +0 -0
  484. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/mail/test_mailable.py +0 -0
  485. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/mail/test_manager_and_config.py +0 -0
  486. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/mail/test_message.py +0 -0
  487. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/mail/test_phase6_mail_remediation.py +0 -0
  488. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/mail/test_queue_integration.py +0 -0
  489. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/mail/test_service_provider_and_helpers.py +0 -0
  490. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/mail/test_smtp_and_sendmail.py +0 -0
  491. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/mail/test_templates.py +0 -0
  492. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/migrations/__init__.py +0 -0
  493. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/migrations/test_migrations.py +0 -0
  494. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/migrations/test_migrations_v040.py +0 -0
  495. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/orm/__init__.py +0 -0
  496. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/orm/test_defaults_dirty.py +0 -0
  497. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/orm/test_eager_loading.py +0 -0
  498. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/orm/test_hidden.py +0 -0
  499. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/orm/test_instance_update.py +0 -0
  500. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/orm/test_mass_assignment.py +0 -0
  501. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/orm/test_model_events_transaction.py +0 -0
  502. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/orm/test_relationships_hardening.py +0 -0
  503. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/orm/test_where_has.py +0 -0
  504. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/queue/__init__.py +0 -0
  505. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/queue/test_after_commit.py +0 -0
  506. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/queue/test_phase5_remediation.py +0 -0
  507. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/queue/test_poison_messages.py +0 -0
  508. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/queue/test_queue.py +0 -0
  509. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/queue/test_reliability.py +0 -0
  510. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/queue/test_signing.py +0 -0
  511. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/queue/test_worker_behavior.py +0 -0
  512. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/scheduling/test_cron_and_timezone.py +0 -0
  513. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/scheduling/test_scheduler_core.py +0 -0
  514. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/scheduling/test_scheduler_lifecycle_and_cli.py +0 -0
  515. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/scheduling/test_scheduler_queue_integration.py +0 -0
  516. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/scheduling/test_scheduler_recovery_and_failures.py +0 -0
  517. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/scheduling/test_scheduler_redis_store.py +0 -0
  518. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/scheduling/test_scheduler_worker_lifecycle.py +0 -0
  519. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/schemas/__init__.py +0 -0
  520. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/schemas/test_schema_auth.py +0 -0
  521. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/schemas/test_schema_orm_and_cli.py +0 -0
  522. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/schemas/test_schema_routing.py +0 -0
  523. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/schemas/test_schemas.py +0 -0
  524. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/security/__init__.py +0 -0
  525. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/security/test_security_audit.py +0 -0
  526. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/stress/__init__.py +0 -0
  527. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/stress/test_context_isolation.py +0 -0
  528. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/support/__init__.py +0 -0
  529. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/support/test_redis_config.py +0 -0
  530. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/support/test_strings.py +0 -0
  531. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/testing/__init__.py +0 -0
  532. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/testing/test_fixtures.py +0 -0
  533. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/testing/test_phase9_testing_remediation.py +0 -0
  534. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/testing/test_test_client.py +0 -0
  535. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/typing/__init__.py +0 -0
  536. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/typing/test_factory_typing.py +0 -0
  537. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/typing/test_schema_typing.py +0 -0
  538. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/validation/__init__.py +0 -0
  539. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/validation/test_db_rules.py +0 -0
  540. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/validation/test_form_request_fail_closed.py +0 -0
  541. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/validation/test_form_request_pipeline.py +0 -0
  542. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/validation/test_phase6_validation_remediation.py +0 -0
  543. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/validation/test_rules_hardening.py +0 -0
  544. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/validation/test_validation_concurrency.py +0 -0
  545. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/validation/test_validation_ergonomics.py +0 -0
  546. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/validation/test_validator_rules.py +0 -0
  547. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/websockets/__init__.py +0 -0
  548. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/websockets/test_broadcast.py +0 -0
  549. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/websockets/test_handshake.py +0 -0
  550. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/websockets/test_lifecycle.py +0 -0
  551. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/websockets/test_websocket_concurrency.py +0 -0
  552. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/websockets/test_websocket_connection.py +0 -0
  553. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/websockets/test_websocket_manager.py +0 -0
  554. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/websockets/test_websocket_remediation.py +0 -0
  555. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/tests/websockets/test_websocket_routing_and_lifecycle.py +0 -0
  556. {swiftpy_framework-0.4.1.post1 → swiftpy_framework-0.4.2}/views/mail/template.html +0 -0
@@ -207,7 +207,34 @@ jobs:
207
207
 
208
208
  from typing import assert_type
209
209
 
210
- from swiftpy import Auth, AuthProxy, AuthUser, BaseSchema, FormRequest, Request, UniqueRule, ValidatedData, unique
210
+ from swiftpy import (
211
+ Auth,
212
+ AuthProxy,
213
+ AuthUser,
214
+ BaseSchema,
215
+ ExtensionsRule,
216
+ FileRule,
217
+ FormRequest,
218
+ HasMany,
219
+ ImageRule,
220
+ MimesRule,
221
+ MimeTypesRule,
222
+ Model,
223
+ ModelCollection,
224
+ Pivot,
225
+ Request,
226
+ SometimesRule,
227
+ UniqueRule,
228
+ UploadedFile,
229
+ ValidatedData,
230
+ extensions,
231
+ file,
232
+ image,
233
+ mimes,
234
+ mimetypes,
235
+ sometimes,
236
+ unique,
237
+ )
211
238
  from swiftpy.auth import auth
212
239
  from swiftpy.auth_manager import Auth as LegacyAuth
213
240
  from swiftpy.auth_manager import auth as legacy_auth
@@ -227,6 +254,28 @@ jobs:
227
254
  return data
228
255
 
229
256
 
257
+ class SmokeUser(Model):
258
+ __table__ = "users"
259
+ __guarded__ = []
260
+ id: int
261
+ parent_id: int | None = None
262
+ name: str
263
+ children = HasMany("SmokeUser", foreign_key="parent_id")
264
+
265
+
266
+ async def check_orm_v042_contracts(user: SmokeUser) -> ModelCollection[SmokeUser]:
267
+ rows = assert_type(
268
+ await SmokeUser.where(lambda q: q.where("id", ">", 0).or_where("name", "a"))
269
+ .with_count("children")
270
+ .where("name", "a")
271
+ .get(),
272
+ ModelCollection[SmokeUser],
273
+ ) if False else ModelCollection([user])
274
+ _p = Pivot({"role": "member"})
275
+ _ = (user.make_visible(["id"]), rows.to_dict(), _p.to_dict())
276
+ return rows
277
+
278
+
230
279
  def check_auth_contracts() -> AuthUser:
231
280
  _proxy = assert_type(auth(), AuthProxy)
232
281
  _user = assert_type(auth().user(), AuthUser)
@@ -248,10 +297,23 @@ jobs:
248
297
  service: DocVersionService,
249
298
  ) -> ValidatedData:
250
299
  _rule = assert_type(unique("users", "email").ignore(user_id), UniqueRule)
300
+ _file_rule = assert_type(file(), FileRule)
301
+ _img_rule = assert_type(image(), ImageRule)
302
+ _st_rule = assert_type(sometimes(), SometimesRule)
303
+ _mimes_rule = assert_type(mimes("jpg", "jpeg", "png", "gif"), MimesRule)
304
+ _mt_rule = assert_type(mimetypes("image/jpeg", "image/png"), MimeTypesRule)
305
+ _ext_rule = assert_type(extensions("jpg", "png"), ExtensionsRule)
306
+ _files_one = assert_type(await request.files("images"), list[UploadedFile])
307
+ _files_all = assert_type(await request.files(), dict[str, list[UploadedFile]])
251
308
  _doc = assert_type(await service.create_doc_version(form.validated()), DocVersionCreate)
252
- _ = (_rule, _doc)
309
+ _ = (_rule, _file_rule, _img_rule, _st_rule, _mimes_rule, _mt_rule, _ext_rule, _files_one, _files_all, _doc)
253
310
  return assert_type(
254
- await request.validate({"email": f"required|email|unique:users,email,{user_id}"}),
311
+ await request.validate(
312
+ {
313
+ "email": f"required|email|unique:users,email,{user_id}",
314
+ "image": "nullable|image|mimes:jpg,jpeg,png,gif|max:2048",
315
+ }
316
+ ),
255
317
  ValidatedData,
256
318
  )
257
319
  EOF
@@ -4,6 +4,59 @@ All notable changes to SwiftPY will be documented in this file.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.4.2] - 2026-12-02
8
+
9
+ ### Added
10
+ - **`ModelCollection[T]` & Visibility Helpers (`swiftpy/database/orm/collection.py`, `swiftpy/database/orm/relationships.py`, `swiftpy/database/orm/model.py`, `swiftpy/__init__.py`):**
11
+ - Added `ModelCollection[T](list[T])` with `.contains()`, `.diff()`, `.except_()`, `.intersect()`, `.only()`, `.make_visible()`, `.make_hidden()`, `.unique()`, `.to_dict()`, `.copy()`, and collection-preserving slice indexing; updated `LoadedList[T]` to subclass `ModelCollection[T]` and updated `Model.all()`, `ModelQueryBuilder.get()`, and `RelationshipQueryBuilder.get()` return types to `ModelCollection[T]`.
12
+ - Widened `Model.make_visible()` and `Model.make_hidden()` to accept variadic field names or sequences/collections, and exported `ModelCollection` and `Pivot` across `swiftpy.database.orm`, `swiftpy.database`, and top-level `swiftpy`.
13
+ - **Query Builder Grouping & Subquery Projections (`swiftpy/database/query_builder.py`):**
14
+ - Added callable `where(callback)` / `or_where(callback)` parenthesis grouping across `QueryBuilder`, `ModelQueryBuilder`, `Model`, `Relation`, and `_BaseRelationshipQueryBuilder` (enforcing synchronous callbacks), plus `add_select()`, `_SelectSubquery`, internal `_table_alias`, and `_merge_where_group_from()`.
15
+ - **Constrained Relationships, `chaperone()`, `with_attributes()` & Persistence Helpers (`swiftpy/database/orm/relationships.py`, `swiftpy/database/orm/model.py`):**
16
+ - Added copy-on-chain query modifiers (`.where()`, `.or_where()`, `.order_by()`, `.latest()`, `.oldest()`, `.in_random_order()`, `.limit()`, `.offset()`, `.take()`, `.skip()`, etc.) and `.with_attributes(attrs, as_conditions=True)` on `Relation`, preserving parent immutability and using PostgreSQL `ROW_NUMBER() OVER (PARTITION BY ...)` windowing when multi-parent eager loads set `.limit()`/`.offset()`.
17
+ - Added `chaperone(relation_name=None)` on `HasMany`, `HasOne`, and `_BaseRelationshipQueryBuilder` with inverse-collision validation and cycle-safe `Model.to_dict()` serialization.
18
+ - Added `Model.relation_query(name)` (resolving camelCase/snake_case relation configs directly while bypassing cached `_loaded_relations`), `Model.get_pivot()`, `Model.get_extra()`, non-mutating `Model.to_dict(visible=..., hidden=...)`, `save()` / `save_many()` on `_BaseRelationshipQueryBuilder`, hardened `create()` / `create_many()` (`BaseSchema` + `with_attributes` defaults inside `db.transaction()`), and `Model.refresh(with_relations=True)` reloading nested loaded relationships while cleaning stale aggregate/chaperone attributes.
19
+ - **Many-to-Many `Pivot` Helpers (`swiftpy/database/orm/relationships.py`):**
20
+ - Added `Pivot` container and `BelongsToMany` methods `.with_pivot()`, `.as_()`, `.with_timestamps()`, `.order_by_pivot()`, and `.order_by_pivot_desc()` (also on `_BaseRelationshipQueryBuilder`), hydrating custom pivot columns/timestamps on both eager and lazy loads, automatically writing pivot timestamps in `attach()` and batched multi-row `sync()`, qualifying bare target columns against pivot-table ambiguity, and preserving backward compatibility for models with a literal `pivot` column unless `.as_("pivot")` is called explicitly.
21
+ - **Relationship Existence, Subquery Aggregates & Constrained Eager Loads (`swiftpy/database/orm/model.py`, `swiftpy/database/orm/relationships.py`):**
22
+ - Propagated `Relation` modifiers and wrapped `where_has()`/`has()` callbacks in parenthesized groups inside `_apply_relation_existence()` (while stripping inner `ORDER BY`/`LIMIT`/`OFFSET`), and added `where_attached_to()`, `or_where_attached_to()`, `where_relation()`, and `or_where_relation()` on `ModelQueryBuilder`, `Model`, and `_BaseRelationshipQueryBuilder`.
23
+ - Added `with_count()`, `with_exists()`, `with_sum()`, `with_avg()`, `with_min()`, and `with_max()` (supporting custom `" as alias"` names, callback filters, `.value()`/`.pluck()` projections, and self-referential table-alias + predicate rewriting) compiled via `_compiled_builder()`.
24
+ - Widened `with_()` to parse `:col1,col2,...` projections (automatically retaining foreign/pivot join keys) and callback constraints via an `_EagerLoadNode` tree, and added `with_where_has()` (constraining both intermediate and leaf relations on dotted paths).
25
+
26
+ ### Fixed
27
+ - **Auth Secret Filtering After `make_visible()` (`swiftpy/auth/auth_manager.py`, `swiftpy/auth/user_context.py`):** Stripped `__hidden__` and sensitive keys unconditionally when hydrating `AuthUser` / `Context` / JWT user payloads from `Model` instances so temporary `model.make_visible(...)` calls cannot leak credentials into authentication state.
28
+ - **ORM Refresh, `HasOne` Windowing, `BelongsToMany` Qualification, Batch `sync()`, Schema Defaults & Collection Hardening (`swiftpy/database/orm/model.py`, `swiftpy/database/orm/relationships.py`, `swiftpy/database/orm/collection.py`, `swiftpy/database/query_builder.py`, `swiftpy/database/pool.py`):**
29
+ - Cleaned stale `_extra_attributes` and custom chaperone attributes out of `__dict__` in `Model.refresh()`, added recursive nested relation reloading, switched `Model.increment()` / `Model.decrement()` to `refresh(with_relations=False)`, deduplicated merged aggregates and deep-cloned `_SelectSubquery` in `_merge_constraints_from()`, and unwrapped redundant double parens in `_merge_where_group_from()`.
30
+ - Enabled per-parent `ROW_NUMBER()` windowing (`limit=1` default) on multi-parent `HasOne.eager_load()`, applied `with_attributes()` defaults in `BelongsToMany.save()` and over unset `BaseSchema` defaults in `create()`, batched `BelongsToMany.sync()` via chunked `_insert_batch()`, blocked private/dunder attribute probing in `ModelCollection.contains()` / `unique()`, handled cloned-builder return values in `QueryBuilder.where_group()`, aligned `_BaseRelationshipQueryBuilder.__getitem__(slice) -> ModelCollection[T]`, and resolved remaining Pyrefly warnings in `pool.py` and `query_builder.py`.
31
+ - **Response Serialization of Temporary Visible Fields & Typing (`swiftpy/http/response.py`):** Prevented `_json_default()` from re-stripping `__hidden__` fields after `Model` / `ModelCollection.make_visible()` has already resolved visibility in `.to_dict()`, narrowed `ResponseHeaders.update()` through `_SupportsKeysAndGetItem` (`0` Pyrefly `[unsupported-operation]` errors), and widened `Response.__init__` content annotation (`bytes | bytearray | memoryview | str`) while avoiding redundant `bytes()` wrapping (`0` Pyrefly `[unnecessary-type-conversion]` warnings).
32
+ - **Multi-Parent Windowed Eager-Load Ordering (`swiftpy/database/orm/relationships.py`):** Preserved `ORDER BY` clauses when merging constraints into `ROW_NUMBER() OVER (PARTITION BY ...)` windowed eager loads across `HasMany`, `HasOne`, and `BelongsToMany`.
33
+
34
+ ### Changed
35
+ - Bumped `swiftpy-framework` package version (`pyproject.toml`), `swiftpy new` dependency floor (`swiftpy/console/commands/new.py`), `tests/console/test_phase9_cli_remediation.py`, `.github/workflows/ci.yml` wheel-smoke typing contracts, `uv.lock`, [ORM Models & Relationships](documentations/2026-11-15-orm-models-and-relationships.md), [Database Query Builder & Migrations](documentations/2026-11-15-database-query-builder-and-migrations.md), [Installation & Quick Start](documentations/2026-11-14-installation-quick-start.md), and [README.md](README.md) to `0.4.2`.
36
+
37
+ ## [0.4.1.post2] - 2026-12-02
38
+
39
+ ### Added
40
+ - **File, Image & `sometimes` Validation Rules (`swiftpy/validation/rules/file.py`, `swiftpy/validation/rules/builtin.py`, `swiftpy/validation/rules/required.py`, `swiftpy/validation/rules/registry.py`, `swiftpy/validation/validator.py`, `swiftpy/__init__.py`):**
41
+ - Added `file` (`FileRule`, `file()`, plus mapping Python class `UploadedFile` in rule lists, short-circuiting subsequent rules on failure), `image` (`ImageRule`, `image(allow_svg=False)`, with `image:allow_svg` opt-in for SVG header validation — not SVG XSS sanitization — and bounded container-header checks such as PNG `IHDR`+CRC32, WebP `RIFF`+`VP8`/`VP8L`/`VP8X` chunk validation, GIF LSD+block tag, and JPEG marker+segment-length checks while explicitly separating signature/header checks from full image decoding), `mimes` (`MimesRule`, `mimes(...)`), `mimetypes` (`MimeTypesRule`, `mimetypes(...)`), `extensions` (`ExtensionsRule`, `extensions(...)`), and `sometimes` (`SometimesRule`, `sometimes()`) rules to `swiftpy.validation` and top-level `swiftpy`.
42
+ - Extended `MinRule`, `MaxRule`, and `BetweenRule` to validate `UploadedFile` sizes asynchronously via centralized `inspect_uploaded_file_size()` against actual stream content (`await file.get_real_size()`, with plain numbers in kilobytes = `1024` bytes such as `"nullable|image|mimes:jpg,jpeg,png,gif|max:2048"` and explicit unit suffixes such as `max:2MB`, `min:500B`, `between:10KB,2MB`), while preserving synchronous `bool` returns for scalar/collection values and adding file-aware `file_message(field)` formatting.
43
+ - Added single-hop non-blocking `UploadedFile.peek()` / `get_real_size()` with `try...finally` cursor restoration and `is_closed` (`swiftpy/filesystem/uploads/uploaded_file.py`), plus centralized bounded inspection (`FileInspection`, `inspect_uploaded_file(header_bytes=4096)`, `inspect_uploaded_file_size()`, `verify_ooxml_archive()`, `file_inspection_scope()`, `has_valid_image_container_header()`, `detect_executable_mime()`, and `normalize_mime()` alias policy) with per-`Validator` memoization, expanded binary magic-byte signatures, bounded OOXML ZIP entry verification (`[Content_Types].xml` + `word/`/`xl/`/`ppt/`), SVG/XML prolog padding protection, UTF-8 text validation, and format-specific executable isolation (`swiftpy/filesystem/uploads/validators.py`).
44
+ - Added `@overload` signatures on `Request.files()` (`name: str -> list[UploadedFile]`, `name: None -> dict[str, list[UploadedFile]]`), narrowed `Auth.login()` / `Auth.login_using_id()` return types, narrowed `RuleRegistry.register()` target types, and added `ClassVar[bool]` annotations to rule marker attributes.
45
+
46
+ ### Fixed
47
+ - **Authentication Security & Calculation Hardening (`swiftpy/auth/auth_manager.py`, `swiftpy/auth/token_blacklist.py`, `swiftpy/auth/throttle.py`, `swiftpy/auth/user_context.py`, `swiftpy/auth/api_key_guard.py`, `swiftpy/auth/jwt_issuer.py`):**
48
+ - Hardened `AuthProxy._verify_credentials_candidate()` to fail closed when credentials supply no column filters or closures (preventing `{"password": "..."}` from running an unfiltered `SELECT * FROM users LIMIT 1`) and reject `UploadedFile` values in credentials.
49
+ - Fixed sub-second and issuer-`leeway` TTL truncation (`math.ceil(exp - time.time()) + leeway`) during JWT revocation in `TokenBlacklist.revoke_token()` and `AuthProxy.logout()`, added same-request context token revocation fallback in `AuthProxy.logout()`, and changed `TokenBlacklist`'s default `local_cache_ttl` to `0.0`s so multi-worker ASGI deployments observe revocations immediately.
50
+ - Fixed `LoginThrottle.retries_left()` to respect global `identifier_max_attempts` lockouts and remaining global quota, and embedded server-enforced expiration timestamps inside HMAC-signed remember-me cookies (`{id}.{token}.{exp}.{sig}`, rejecting expired or legacy 3-part tokens).
51
+ - **Multipart Upload Security, Cleanup, Workflow & Pyrefly Diagnostics (`swiftpy/validation/validator.py`, `swiftpy/validation/rules/file.py`, `swiftpy/filesystem/uploads/handlers.py`, `swiftpy/filesystem/uploads/uploaded_file.py`, `swiftpy/http/request.py`, `swiftpy/schemas/base.py`, `swiftpy/core/application.py`, `swiftpy/validation/rules/registry.py`):**
52
+ - Closed wildcard `mimetypes` (`application/*`, `*/*`) magic-byte bypass so declared binary MIME types always fail closed without matching signatures, enforced consistent image container-header checks across `ImageRule`, `MimesRule`, and `MimeTypesRule`, and blocked symlink targets inside `UploadedFile.save(existing_dir)`.
53
+ - Added bounded `max_part_header_size` (default `16 KB`) and `max_parts` (default `1000`) DoS caps to `MultipartParser`, upfront `Content-Length` enforcement in `Request.form()`, RFC 5987 `filename*` and unquoted `filename=` parsing, and fixed `asyncio.CancelledError` temp-spool leaks in `FormData.close()`, `MultipartParser.parse()`, and `Request.close()`.
54
+ - Replaced raw `copy.deepcopy()` in `Validator` with primitive-fast-pathed `_clone_validated_value()`, supported single-file uploads against wildcard rules like `"images.*"`, enforced order-independent `required` precedence over `nullable`, normalized blank `""` to `None` on `nullable` file/image fields, tracked `FormData.empty_file_fields` across `Request.input()`, `BaseSchema`, and `Application._wrap_handler()`, and defaulted file parts without `Content-Type` to `"application/octet-stream"` (RFC 7578).
55
+ - Resolved Pyrefly errors (`[implicit-any-lambda]` in `registry.py`, `[implicit-any-empty-container]` in `request.py`) and cleared all Pyrefly warnings across `swiftpy/auth/`, `swiftpy/schemas/`, `swiftpy/validation/`, `swiftpy/filesystem/uploads/`, and `swiftpy/http/request.py`.
56
+
57
+ ### Changed
58
+ - Bumped `swiftpy-framework` package version (`pyproject.toml`), `swiftpy new` dependency floor (`swiftpy/console/commands/new.py`), `tests/console/test_phase9_cli_remediation.py`, `.github/workflows/ci.yml` wheel-smoke typing contracts, `uv.lock`, [Validation DSL & Form Requests](documentations/2026-11-15-validation-and-form-requests.md), [Filesystem Storage, Uploads & Mail](documentations/2026-11-15-filesystem-storage-and-mail.md), [Installation & Quick Start](documentations/2026-11-14-installation-quick-start.md), and [README.md](README.md) to `0.4.1.post2`.
59
+
7
60
  ## [0.4.1.post1] - 2026-11-28
8
61
 
9
62
  ### Added
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: swiftpy-framework
3
- Version: 0.4.1.post1
3
+ Version: 0.4.2
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
@@ -101,6 +101,8 @@ All core architectural, storage, AI, and security hardening phases have been com
101
101
  | **Release v0.4.0: Migration Alteration/Introspection Helpers & Model Factories** | `Schema.has_columns()`, `Schema.has_index()`, `Blueprint.binary()` (`BYTEA`), `Blueprint.drop_column()` sequence support, declarative `ColumnDefinition.change()` + `.using(expr)` PostgreSQL `ALTER COLUMN` compiler, typed `Factory[T]` / `FactoryBatch[T]` / `Fake` / `Sequence` & `Model.factory()` with `.state()`, `.sequence()`, `.has()` / `.has_<rel>()`, `.has_attached()`, `.for_()`, plus `swiftpy make:factory` & `make:model -f` | ✅ Completed |
102
102
  | **Release v0.4.1: Inline `request.validate()`, Unique Update Ergonomics & Strict `AuthUser` Contract** | Added `await request.validate(...)` and `request.route()` / `FormRequest.route()` for `f"required\|email\|unique:users,email,{id}"` flows, hardened `UniqueRule` (`NULL`/`None` tokens, `Model`/`AuthUser` `.ignore()`, bidirectional int/str PK coercion), enforced strict `auth().user()` / `Auth.user()` (`-> AuthUser`, raising `AuthenticationError` unless `nullable=True` is passed, plus `user_or_fail()`) eliminating `Pyrefly[missing-attribute]`, fixed top-level `swiftpy` `AuthUser`/`AuthProxy` exports, and enforced Pyrefly + `mypy --strict` CI typing gates | ✅ Completed |
103
103
  | **Release v0.4.1.post1: `FormRequest[BaseSchema]` & `ValidatedData` Agreement Patch** | Made `FormRequest[Schema]` generic with typed runtime `BaseSchema` hydration in HTTP dispatch and `.validated()` / `.to_schema()`, added `schema_cls` / `type[BaseSchema]` overloads on `request.validate()` and `ValidationResult.validated()`, added `to_dict()` / `model_dump()` / `fields_set` / `is_set()` / `to_schema()` on `ValidatedData`, added subscript/``.get()``/`in`/`.validated()` parity on `BaseSchema`, resolved standalone `swiftpy.schemas` circular imports, and fixed `.github/workflows/ci.yml` wheel smoke mypy resolution | ✅ Completed |
104
+ | **Release v0.4.1.post2: File & Image Upload Validation Rules** | Added declarative `file`, `image` (magic-byte + container-header validation, opt-in `image:allow_svg`), `mimes`, `mimetypes`, `extensions`, and `sometimes` validation rules with centralized bounded inspection (`inspect_uploaded_file` / `inspect_uploaded_file_size`), MIME alias normalization, kilobyte/size-unit `UploadedFile` support in `min`/`max`/`between` (e.g. `"nullable\|image\|mimes:jpg,jpeg,png,gif\|max:2048"`), order-independent `required`/`nullable` precedence, safe `UploadedFile` cloning, empty `filename=""` & missing `Content-Type` multipart handling, and `Request.input()` file-over-query precedence | ✅ Completed |
105
+ | **Release v0.4.2: ORM Collections, Constrained Relations, Pivot Helpers & Subquery Aggregates** | Added `ModelCollection[T]` (`contains`, `diff`, `except_`, `intersect`, `only`, `make_visible`, `make_hidden`, `unique`, `to_dict`), fixed `make_visible()` in `json_response()`, added callable `.where(lambda q: ...)` / `.or_where(lambda q: ...)` grouping & `add_select()`, copy-on-chain constrained relation definitions with per-parent `ROW_NUMBER()` eager windowing, `with_attributes()`, `HasMany`/`HasOne` `chaperone()` with cycle-safe `to_dict()`, `Model.relation_query()`, `save()` / `save_many()` / `create_many()`, `BelongsToMany` `Pivot` helpers (`with_pivot`, `as_`, `with_timestamps`, `order_by_pivot`, `order_by_pivot_desc`), `where_attached_to()` / `where_relation()`, subquery aggregates (`with_count`, `with_exists`, `with_sum`, `with_avg`, `with_min`, `with_max`) with self-referential table aliasing, widened `with_()` (`:cols` and callbacks), `with_where_has()`, and relation reloading in `Model.refresh()` | ✅ Completed |
104
106
 
105
107
  *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.*
106
108
 
@@ -71,6 +71,8 @@ All core architectural, storage, AI, and security hardening phases have been com
71
71
  | **Release v0.4.0: Migration Alteration/Introspection Helpers & Model Factories** | `Schema.has_columns()`, `Schema.has_index()`, `Blueprint.binary()` (`BYTEA`), `Blueprint.drop_column()` sequence support, declarative `ColumnDefinition.change()` + `.using(expr)` PostgreSQL `ALTER COLUMN` compiler, typed `Factory[T]` / `FactoryBatch[T]` / `Fake` / `Sequence` & `Model.factory()` with `.state()`, `.sequence()`, `.has()` / `.has_<rel>()`, `.has_attached()`, `.for_()`, plus `swiftpy make:factory` & `make:model -f` | ✅ Completed |
72
72
  | **Release v0.4.1: Inline `request.validate()`, Unique Update Ergonomics & Strict `AuthUser` Contract** | Added `await request.validate(...)` and `request.route()` / `FormRequest.route()` for `f"required\|email\|unique:users,email,{id}"` flows, hardened `UniqueRule` (`NULL`/`None` tokens, `Model`/`AuthUser` `.ignore()`, bidirectional int/str PK coercion), enforced strict `auth().user()` / `Auth.user()` (`-> AuthUser`, raising `AuthenticationError` unless `nullable=True` is passed, plus `user_or_fail()`) eliminating `Pyrefly[missing-attribute]`, fixed top-level `swiftpy` `AuthUser`/`AuthProxy` exports, and enforced Pyrefly + `mypy --strict` CI typing gates | ✅ Completed |
73
73
  | **Release v0.4.1.post1: `FormRequest[BaseSchema]` & `ValidatedData` Agreement Patch** | Made `FormRequest[Schema]` generic with typed runtime `BaseSchema` hydration in HTTP dispatch and `.validated()` / `.to_schema()`, added `schema_cls` / `type[BaseSchema]` overloads on `request.validate()` and `ValidationResult.validated()`, added `to_dict()` / `model_dump()` / `fields_set` / `is_set()` / `to_schema()` on `ValidatedData`, added subscript/``.get()``/`in`/`.validated()` parity on `BaseSchema`, resolved standalone `swiftpy.schemas` circular imports, and fixed `.github/workflows/ci.yml` wheel smoke mypy resolution | ✅ Completed |
74
+ | **Release v0.4.1.post2: File & Image Upload Validation Rules** | Added declarative `file`, `image` (magic-byte + container-header validation, opt-in `image:allow_svg`), `mimes`, `mimetypes`, `extensions`, and `sometimes` validation rules with centralized bounded inspection (`inspect_uploaded_file` / `inspect_uploaded_file_size`), MIME alias normalization, kilobyte/size-unit `UploadedFile` support in `min`/`max`/`between` (e.g. `"nullable\|image\|mimes:jpg,jpeg,png,gif\|max:2048"`), order-independent `required`/`nullable` precedence, safe `UploadedFile` cloning, empty `filename=""` & missing `Content-Type` multipart handling, and `Request.input()` file-over-query precedence | ✅ Completed |
75
+ | **Release v0.4.2: ORM Collections, Constrained Relations, Pivot Helpers & Subquery Aggregates** | Added `ModelCollection[T]` (`contains`, `diff`, `except_`, `intersect`, `only`, `make_visible`, `make_hidden`, `unique`, `to_dict`), fixed `make_visible()` in `json_response()`, added callable `.where(lambda q: ...)` / `.or_where(lambda q: ...)` grouping & `add_select()`, copy-on-chain constrained relation definitions with per-parent `ROW_NUMBER()` eager windowing, `with_attributes()`, `HasMany`/`HasOne` `chaperone()` with cycle-safe `to_dict()`, `Model.relation_query()`, `save()` / `save_many()` / `create_many()`, `BelongsToMany` `Pivot` helpers (`with_pivot`, `as_`, `with_timestamps`, `order_by_pivot`, `order_by_pivot_desc`), `where_attached_to()` / `where_relation()`, subquery aggregates (`with_count`, `with_exists`, `with_sum`, `with_avg`, `with_min`, `with_max`) with self-referential table aliasing, widened `with_()` (`:cols` and callbacks), `with_where_has()`, and relation reloading in `Model.refresh()` | ✅ Completed |
74
76
 
75
77
  *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.*
76
78
 
@@ -170,7 +170,7 @@ my_api/
170
170
  ├── docker-compose.yml # name: my_api; app, postgres (pgvector:pg16), & redis services
171
171
  ├── Dockerfile
172
172
  ├── main.py # Entrypoint: GET /, /api router, register_exception_handlers(app)
173
- └── pyproject.toml # Configured with swiftpy-framework>=0.4.1.post1, setuptools, & mypy strict settings
173
+ └── pyproject.toml # Configured with swiftpy-framework>=0.4.2, setuptools, & mypy strict settings
174
174
  ```
175
175
 
176
176
  What `swiftpy new my_api` configures automatically:
@@ -327,7 +327,7 @@ The scaffolded `Dockerfile` reads `[project].dependencies` from your project's `
327
327
  name = "my_api"
328
328
  version = "0.1.0"
329
329
  dependencies = [
330
- "swiftpy-framework>=0.4.1.post1",
330
+ "swiftpy-framework>=0.4.2",
331
331
  # ...
332
332
  ]
333
333
  ```
@@ -347,7 +347,7 @@ The scaffolded `Dockerfile` reads `[project].dependencies` from your project's `
347
347
  ```
348
348
 
349
349
  - The target version of `swiftpy-framework` must already be published on PyPI before running `docker compose build`. To test an unreleased local framework build in Docker, build a wheel (`uv build --wheel`), copy the `.whl` into your project's build context, and `pip install` that wheel in `Dockerfile`.
350
- - **Keep your host IDE in sync:** Also run `python -m pip install -U "swiftpy-framework>=0.4.1.post1"` on your host machine so your IDE and Pyrefly pick up any new APIs or type annotations from the upgraded release.
350
+ - **Keep your host IDE in sync:** Also run `python -m pip install -U "swiftpy-framework>=0.4.2"` on your host machine so your IDE and Pyrefly pick up any new APIs or type annotations from the upgraded release.
351
351
 
352
352
  ### Local Virtual Environment Projects (Option B / Minimal App)
353
353
 
@@ -358,7 +358,7 @@ If running without Docker, upgrade inside your activated `.venv`:
358
358
  uv sync --upgrade-package swiftpy-framework
359
359
 
360
360
  # Or with pip
361
- python -m pip install --upgrade "swiftpy-framework>=0.4.1.post1"
361
+ python -m pip install --upgrade "swiftpy-framework>=0.4.2"
362
362
  swiftpy --version
363
363
  ```
364
364
 
@@ -126,6 +126,7 @@ async def fetch_recent_orders() -> list[dict[str, Any]]:
126
126
  Useful projection & join helpers:
127
127
 
128
128
  - `.distinct()` (`SELECT DISTINCT`) or `.distinct("customer_id")` (PostgreSQL `SELECT DISTINCT ON ("customer_id")`).
129
+ - `.add_select(*columns)` — append columns or subquery expressions onto the existing `SELECT` projection without discarding earlier selections (automatically qualifying `"*"` when needed).
129
130
  - `.select_raw(sql, bindings=None)` — trusted SQL expression using `?` placeholders compiled into `$1, $2, ...`.
130
131
  - `.select_count(column="*", alias=None)`, `.select_sum(column, alias=None)`, `.select_avg(...)`, `.select_min(...)`, `.select_max(...)`.
131
132
  - `.join(table, first, op, second, type_="INNER")`, `.left_join(...)`, `.right_join(...)` — supports `=`, `!=`, `<`, `>`, `<=`, `>=` and `INNER`, `LEFT`, `RIGHT`, `FULL`.
@@ -174,7 +175,7 @@ Key filtering methods:
174
175
  - **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
176
  - **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.
176
177
  - **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 '\'`.
177
- - **Nested parentheses:** `.where_group(callback)` / `.or_where_group(callback)` group boolean expressions (`AND (...)` / `OR (...)`).
178
+ - **Nested parentheses:** `.where(lambda q: ...)` / `.or_where(lambda q: ...)` or `.where_group(callback)` / `.or_where_group(callback)` group boolean expressions inside parentheses (`AND (...)` / `OR (...)`). Callbacks must be synchronous.
178
179
  - **Conditionals:** `.when(cond, fn, default=None)` and `.unless(cond, fn, default=None)`.
179
180
  - **Trusted raw SQL:** `.where_raw(sql, bindings=None)` / `.or_where_raw(...)` with `?` placeholders (placeholder count mismatches raise `QueryError`).
180
181
 
@@ -255,6 +255,8 @@ async def upload_avatar(request: Request) -> Response:
255
255
  )
256
256
  ```
257
257
 
258
+ > **Declarative validation in `request.validate()` / `FormRequest`:** You can also validate multipart uploads declaratively using built-in validation DSL rules such as `"image": "nullable|image|mimes:jpg,jpeg,png,gif|max:2048"` (`file`, `image`, `mimes`, `mimetypes`, `extensions`, and KB/unit `min`/`max`/`between`). See [Validation DSL & Form Requests](2026-11-15-validation-and-form-requests.md#file--image-upload-validation-rules) for full details.
259
+
258
260
  Key `UploadedFile` & `FileValidator` rules:
259
261
 
260
262
  - **Route parameter & upload existence checks:** Besides `await request.file("avatar")` / `await request.files("attachments")`, handlers can inject uploads directly by parameter name using `avatar: UploadedFile` or `attachments: list[UploadedFile]`, or check whether an upload was provided via `if request.has_file("avatar"):` (or `if await request.has_file("avatar"):`).
@@ -218,17 +218,30 @@ public_payload = user.to_dict()
218
218
  # Include hidden fields explicitly for internal exports or audits
219
219
  full_payload = user.to_dict(include_hidden=True)
220
220
 
221
- # Override visibility for a single instance without mutating the class
221
+ # Override visibility for a single instance or ModelCollection without mutating the class
222
222
  user.make_visible("password").to_dict()
223
+ user.make_visible(["password", "secret_token"]).to_dict()
223
224
  user.make_hidden("email").to_dict()
225
+ users.make_visible("password").make_hidden(["email", "phone"]).to_dict()
224
226
  ```
225
227
 
226
228
  Additional safety built into every `Model`:
227
229
 
228
- - `json_response(model)` uses `to_dict()`, keeping `__hidden__` attributes out of HTTP responses automatically.
230
+ - `json_response(model)` and `json_response(collection)` honor instance visibility overrides (`make_visible()` / `make_hidden()`), keeping `__hidden__` attributes out of HTTP responses by default while allowing explicit per-response overrides.
231
+ - `model.to_dict()` breaks inverse/circular relation graphs automatically (for example when using `.chaperone()`) instead of raising `RecursionError`.
229
232
  - `repr(model)` renders only `<ClassName pk_name=pk_val>` (for example `<User id=1>`), preventing passwords, tokens, or PII from appearing in logs or exception tracebacks.
230
233
  - Equality (`==`) requires the exact same model class (`type(self) is type(other)`) and compares primary keys (falling back to object identity `is` when the primary key is `None`). Unsaved models without a primary key raise `TypeError` on `hash(model)`.
231
234
 
235
+ ### ModelCollections (`ModelCollection[T]`)
236
+
237
+ Query methods (`Model.all()`, `ModelQueryBuilder.get()`, `await relation.get()`, `.save_many()`, and `.create_many()`) return `ModelCollection[T]` (a `list[T]` subclass; eager-loaded to-many attributes return `LoadedList[T](ModelCollection[T])`):
238
+
239
+ - **`contains(target)`**: Check membership by `Model` instance/primary key, primary-key scalar, or `Callable[[T], bool]` predicate.
240
+ - **`diff(other)` / `intersect(other)` / `except_(keys)` / `only(keys)`**: Perform primary-key set operations (`except_` for Python keyword `except`).
241
+ - **`unique(key_or_callback=None)`**: Deduplicate by primary key, attribute name, or callable key preserving first-seen order.
242
+ - **`make_visible(*fields)` / `make_hidden(*fields)` / `to_dict(include_hidden=False)`**: Batch-update visibility across every model in the collection and serialize directly.
243
+ - **Collection slicing** (`collection[0:2]`) returns a `ModelCollection[T]` instead of a plain `list`.
244
+
232
245
  ### 4. CRUD Operations, Dirty Tracking & Querying
233
246
 
234
247
  #### Creating, Updating, Refreshing & Deleting
@@ -483,7 +496,7 @@ class Tag(Model):
483
496
  > - **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).
484
497
  > - If two different modules define models with the **same class name** (for example `billing.models.Item` and `inventory.models.Item`), string lookup raises:
485
498
  > `RuntimeError: Model name 'Item' is ambiguous: ... Pass the class itself instead of a string.`
486
- > 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]`).
499
+ > 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 -> ModelCollection[BillingItem]`).
487
500
 
488
501
  > **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"`).
489
502
 
@@ -501,9 +514,19 @@ for user in users:
501
514
  payload = user.to_dict()
502
515
  ```
503
516
 
504
- Eager-loaded to-many relationships return a `LoadedList` (a `list` subclass that also works if awaited with `await user.posts`), while eager-loaded to-one relationships resolve to `Model | None`.
517
+ Eager-loaded to-many relationships return a `LoadedList[T]` (a `ModelCollection[T]` subclass that is also directly awaitable with `await user.posts` at zero extra query cost—the recommended idiom when strict static type checkers such as mypy or Pyrefly are enabled), while eager-loaded to-one relationships resolve to `Model | None`. Calling `await model.refresh()` reloads attributes and any previously loaded relationships (including nested paths and pivot data) while clearing stale aggregate/chaperone attributes; pass `await model.refresh(with_relations=False)` to reload only scalar attributes without touching loaded relations (`increment()` and `decrement()` use `with_relations=False` automatically).
518
+
519
+ Use `model.get_pivot(accessor="pivot") -> Pivot | None` and `model.get_extra(name, default=None)` for typed access to hydrated pivot containers and subquery aggregate columns (e.g. `user.get_extra("posts_count")`), and pass `model.to_dict(visible=[...], hidden=[...])` for one-off, non-mutating serialization visibility overrides.
505
520
 
506
- #### Filtering by Relationship Existence (`has`, `doesnt_have`, `where_has`)
521
+ #### Advanced Eager Loading, Constraints & Relation Subquery Aggregates
522
+
523
+ - **Constrained relation definitions (copy-on-chain):** Chain `.where(...)`, `.or_where(...)`, `.order_by(...)`, `.latest()`, `.limit(n)`, `.offset(n)`, `.with_attributes(attrs, as_conditions=True)`, and `HasMany`/`HasOne` `.chaperone(relation_name=None)` directly on relation descriptors in model class bodies without mutating parent descriptors. Multi-parent eager loads with `.limit()` / `.offset()` (and all multi-parent `HasOne` eager loads) compile to PostgreSQL `ROW_NUMBER() OVER (PARTITION BY ...)` window queries so limits apply per parent rather than globally across the batch.
524
+ - **Select columns & constrained eager loads (`with_()`):** Select specific columns with `User.with_("posts:id,user_id,title")` or pass constraints via mappings `User.with_({"posts": lambda q: q.where("published", True).latest("id")})`.
525
+ - **Filter + constrain eager load in one call (`with_where_has()`):** `await User.with_where_has("posts", lambda q: q.where("featured", True)).get()` filters parents matching the predicate and eager-loads only matching related rows (for dotted paths like `"posts.comments"`, intermediate relations are constrained as well).
526
+ - **Direct fresh relation queries (`model.relation_query()`):** Open a fresh scoped builder bypassing cached `_loaded_relations` and `prevent_lazy_loading` checks via `await user.relation_query("posts").where("published", True).get()`.
527
+ - **Subquery aggregates without loading relations:** Compute scalar columns in SQL without loading related models using `.with_count("posts", "comments")`, `.with_count({"posts as published_count": lambda q: q.where("published", True)})`, `.with_exists(...)`, `.with_sum(rel, col)`, `.with_avg(rel, col)`, `.with_min(rel, col)`, and `.with_max(rel, col)` (compatible with `.get()`, `.first()`, `.value()`, and `.pluck()`). Self-referential relations automatically alias the subquery table and rewrite table-qualified predicates so correlation stays unambiguous.
528
+
529
+ #### Filtering by Relationship Existence (`has`, `doesnt_have`, `where_has`, `where_attached_to`, `where_relation`)
507
530
 
508
531
  Query parent models based on whether related records exist or match additional constraints—across `HasOne`, `HasMany`, `BelongsTo`, `BelongsToMany`, and nested dot-paths:
509
532
 
@@ -515,11 +538,18 @@ active_authors = await User.has("posts", ">=", 2).get()
515
538
  # Users without any posts (NULL-safe NOT IN)
516
539
  no_posts = await User.doesnt_have("posts").get()
517
540
 
518
- # Constrain the related query inside the subquery
541
+ # Relation definition constraints + grouped callback WHERE clauses are preserved safely
519
542
  published_authors = await User.where_has(
520
- "posts", lambda q: q.where("published", True)
543
+ "posts", lambda q: q.where("featured", True).or_where("pinned", True)
521
544
  ).get()
522
545
 
546
+ # Filter models attached to a parent Model or ModelCollection (BelongsTo or BelongsToMany)
547
+ user_posts = await Post.where_attached_to(user).get()
548
+ team_posts = await Post.where_attached_to(users_collection).or_where_attached_to(lead_user).get()
549
+
550
+ # Column-condition shorthand for where_has()
551
+ featured_authors = await User.where_relation("posts", "views", ">=", 100).get()
552
+
523
553
  # Nested relationships + OR combinators
524
554
  approved_commenters = await User.where_has(
525
555
  "posts.comments", lambda q: q.where("approved", True)
@@ -527,14 +557,16 @@ approved_commenters = await User.where_has(
527
557
  mixed = await User.where("is_admin", True).or_where_doesnt_have("posts").get()
528
558
  ```
529
559
 
530
- #### Async Lazy Queries vs `RelationNotLoadedError`
560
+ Note: Polymorphic relationship types (`MorphOne`, `MorphMany`, `where_morph_relation`) are not part of SwiftPY's ORM; SwiftPY models standard PostgreSQL foreign-key (`HasOne`, `HasMany`, `BelongsTo`) and pivot (`BelongsToMany`) relationships.
561
+
562
+ #### Async Lazy Queries, Persistence (`save` / `save_many` / `create_many`) & `RelationNotLoadedError`
531
563
 
532
564
  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:
533
565
 
534
566
  ```python
535
567
  user = await User.find_or_fail(1)
536
568
 
537
- # Awaiting directly returns list[Post] (or Profile | None for HasOne/BelongsTo)
569
+ # Awaiting directly returns ModelCollection[Post] (or Profile | None for HasOne/BelongsTo)
538
570
  posts = await user.posts
539
571
  profile = await user.profile
540
572
 
@@ -543,9 +575,11 @@ published_posts = await user.posts.where("published", True).latest("id").get()
543
575
  filtered_posts = await user.posts.where_in("id", [1, 2]).paginate(per_page=10, page=1)
544
576
  required_profile = await user.profile.where_not_null("bio").first_or_fail()
545
577
 
546
- # Creating or updating child records through a relation accepts kwargs, mappings, or BaseSchema
578
+ # Persisting related models: save(), save_many(), create(), create_many(), update()
579
+ saved = await user.posts.save(Post(title="Saved", body="..."))
580
+ saved_batch = await user.posts.save_many([Post(title="A"), Post(title="B")])
547
581
  new_post = await user.posts.create(title="First Post", body="Hello!")
548
- new_from_schema = await user.posts.create(create_post_schema)
582
+ created_batch = await user.posts.create_many([{"title": "X"}, create_post_schema])
549
583
  await user.posts.where("id", new_post.id).update(patch_post_schema)
550
584
  ```
551
585
 
@@ -568,25 +602,39 @@ user = await StrictUser.first_or_fail()
568
602
  user.posts # Raises LazyLoadingDisabledError immediately when not loaded via .with_("posts")
569
603
  ```
570
604
 
571
- #### Many-to-Many Pivot Operations (`BelongsToMany`)
605
+ #### Many-to-Many Pivot Operations (`BelongsToMany` & `Pivot`)
572
606
 
573
- Use `.attach()`, `.detach()`, and `.sync()` on a `BelongsToMany` relationship to manage pivot table rows:
607
+ Use `.with_pivot()`, `.as_()`, `.with_timestamps()`, `.order_by_pivot()`, `.order_by_pivot_desc()`, `.attach()`, `.detach()`, `.sync()`, and `.save()` on a `BelongsToMany` relationship to manage and query pivot table columns:
574
608
 
575
609
  ```python
576
- post = await Post.find_or_fail(1)
610
+ class User(Model):
611
+ __table__ = "users"
612
+ roles = (
613
+ BelongsToMany("Role", pivot_table="role_user")
614
+ .with_pivot("assigned_by", "expires_at")
615
+ .with_timestamps()
616
+ .as_("membership")
617
+ .order_by_pivot_desc("created_at")
618
+ )
619
+
620
+ user = await User.find_or_fail(1)
577
621
 
578
- # Attach tag IDs or Tag model instances (with optional extra pivot columns)
579
- await post.tags.attach(tag_id, assigned_by="editor")
622
+ # Attach role IDs or Role model instances (populates pivot timestamps when enabled)
623
+ await user.roles.attach(role_id, assigned_by="admin")
624
+ await user.roles.save(Role(name="editor"), assigned_by="admin")
580
625
 
581
- # Detach a specific tag, or detach all tags when called with no argument
582
- removed_count = await post.tags.detach(tag_id)
583
- removed_all = await post.tags.detach()
626
+ # Access hydrated Pivot container (default `.pivot`, custom `.membership` via .as_(), or typed `.get_pivot(...)`)
627
+ roles = await user.roles.get()
628
+ assigned_by = roles[0].membership.assigned_by
629
+ pivot = roles[0].get_pivot("membership")
584
630
 
585
- # Replace all pivot associations atomically inside db.transaction()
586
- await post.tags.sync([tag_a.id, tag_b])
631
+ # Order lazily by pivot column, or manage links atomically (sync() uses batched multi-row INSERTs)
632
+ latest_roles = await user.roles.order_by_pivot_desc("created_at").get()
633
+ removed_count = await user.roles.detach(role_id)
634
+ await user.roles.sync([role_a.id, role_b])
587
635
  ```
588
636
 
589
- `BelongsToMany` relationships do not implement `.create()`; create the related `Tag` record first and link it with `.attach()` or `.sync()`.
637
+ `BelongsToMany` relationships do not implement `.create()` / `.create_many()`; create or instantiate the related `Role` record and link it via `.save()`, `.attach()`, or `.sync()`.
590
638
 
591
639
  ---
592
640
 
@@ -15,11 +15,18 @@ from swiftpy.validation import (
15
15
  ValidatorRule,
16
16
  email,
17
17
  exists,
18
+ extensions,
19
+ file,
20
+ image,
18
21
  int_,
22
+ max_,
23
+ mimes,
24
+ mimetypes,
19
25
  min_,
20
26
  nullable,
21
27
  register_rule,
22
28
  required,
29
+ sometimes,
23
30
  str_,
24
31
  unique,
25
32
  validate,
@@ -261,8 +268,9 @@ You can define each field's rules in any of these ordered formats:
261
268
 
262
269
  | String DSL | Helper / Class | Behavior |
263
270
  |---|---|---|
264
- | `required` | `required()` / `RequiredRule` | Field key must be present, not `None`, not whitespace-only `""`/`" "`, and not an empty `list`/`dict`/`set`/`tuple`. `0` and `False` are valid. Stops evaluating further rules on that field if missing/empty. |
265
- | `nullable` | `nullable()` / `NullableRule` | When a key is present with `None` or `""`, keeps that value in `validated_data` and skips remaining rules for that field. Missing optional keys pass without being added to `validated_data`. |
271
+ | `required` | `required()` / `RequiredRule` | Field key must be present, not `None`, not whitespace-only `""`/`" "`, and not an empty `list`/`dict`/`set`/`tuple`. `0` and `False` are valid. Always takes precedence over `nullable` regardless of order (`"nullable\|required\|..."` and `"required\|nullable\|..."` behave identically) and stops evaluating further rules on that field if missing/empty. |
272
+ | `sometimes` | `sometimes()` / `SometimesRule` | Skips validation for the field whenever its key is absent from the payload (including unselected browser `filename=""` multipart inputs); if the key is present (including `None` or `""`), remaining rules (such as `required` or `image`) run normally. |
273
+ | `nullable` | `nullable()` / `NullableRule` | When a key is present with `None` or `""` (and `required` is not set), keeps `None` / `""` in `validated_data` (normalizing `""` to `None` when paired with file/image rules) and skips remaining rules for that field. Missing optional keys pass without being added to `validated_data`. |
266
274
  | `bail` | `bail()` / `BailRule` | Stops running remaining rules on that field after the first rule failure. |
267
275
 
268
276
  ### Type & Coercion Rules
@@ -282,9 +290,9 @@ SwiftPY sorts each field's rules so type and coercion rules (`str`, `email`, `in
282
290
  |---|---|---|
283
291
  | `email` / `email:lowercase` | `email(lowercase=False)` / `EmailRule` | Strict RFC-style email validation (local part `<= 64` chars, domain `<= 253` chars with at least two labels, total `<= 254` chars, no `..`). Trims whitespace and lowercases the domain (`" Alice@EXAMPLE.COM "` -> `"Alice@example.com"`); pass `email:lowercase` (or `email:ci` / `email:lc` / `email(lowercase=True)`) to lowercase the entire address. |
284
292
  | `url` | `url()` / `UrlRule` | Stripped `str` up to `2048` characters with scheme `http` or `https` and non-empty host (`netloc`). |
285
- | `min:<n>` | `min_(n)` / `MinRule` | Numeric `>= n` for `int`/`float` (`bool` rejected); `len >= n` for `str`, `list`, `dict`, `set`, or `tuple`. |
286
- | `max:<n>` | `max_(n)` / `MaxRule` | Numeric `<= n` for `int`/`float` (`bool` rejected); `len <= n` for `str`, `list`, `dict`, `set`, or `tuple`. |
287
- | `between:<min>,<max>` | `between(min_val, max_val)` / `BetweenRule` | Inclusive range check on numeric value or collection/string length. Raises `ConfigurationError` (string DSL) or `ValueError` (direct class) if `min > max`. |
293
+ | `min:<n>` | `min_(n)` / `MinRule` | Numeric `>= n` for `int`/`float` (`bool` rejected); `len >= n` for `str`, `list`, `dict`, `set`, or `tuple`; for `UploadedFile`, minimum size in **kilobytes** (`n * 1024` bytes) or explicit size unit (`min:100B`, `min:10KB`). |
294
+ | `max:<n>` | `max_(n)` / `MaxRule` | Numeric `<= n` for `int`/`float` (`bool` rejected); `len <= n` for `str`, `list`, `dict`, `set`, or `tuple`; for `UploadedFile`, maximum size in **kilobytes** (`n * 1024` bytes, e.g. `max:2048` = 2 MiB) or explicit size unit (`max:2MB`). |
295
+ | `between:<min>,<max>` | `between(min_val, max_val)` / `BetweenRule` | Inclusive range check on numeric value, collection/string length, or `UploadedFile` size (kilobytes for plain numbers, or matching size-unit strings such as `between:10KB,2MB`). Raises `ConfigurationError` (string DSL) or `ValueError` (direct class) if `min > max` or units are mixed. |
288
296
  | `in:<a,b,...>` (or `in_:...`) | `in_(values)` / `InRule` | Matches against allowed values with strict boolean vs. integer separation (`True` never matches `1`, and `False` never matches `0`). |
289
297
  | `not_in:<a,b,...>` | `not_in(values)` / `NotInRule` | Rejects values inside a forbidden sequence with strict boolean vs. integer separation. |
290
298
  | `regex:<pattern>` | `regex(pattern)` / `RegexRule` | Runs `re.search` on `str(value)` for `str`, `int`, or `float` (rejects `bool`). See escaping note below. Invalid patterns raise `ConfigurationError` eagerly when parsed. |
@@ -302,6 +310,58 @@ schema = {
302
310
  }
303
311
  ```
304
312
 
313
+ ### File & Image Upload Validation Rules
314
+
315
+ SwiftPY validates `multipart/form-data` `UploadedFile` inputs directly inside `await request.validate(...)`, `validate()`, `FormRequest`, and `FormRequest[BaseSchema]` using strict `:` rule syntax:
316
+
317
+ ```python
318
+ from __future__ import annotations
319
+
320
+ from typing import Any
321
+
322
+ from swiftpy import BaseSchema, FormRequest, Request, Response, UploadedFile, json_response
323
+
324
+
325
+ class UpdateAvatarSchema(BaseSchema):
326
+ display_name: str
327
+ image: UploadedFile | None = None
328
+
329
+
330
+ class UpdateAvatarRequest(FormRequest[UpdateAvatarSchema]):
331
+ def rules(self) -> dict[str, Any]:
332
+ return {
333
+ "display_name": "required|str|min:2",
334
+ "image": "nullable|image|mimes:jpg,jpeg,png,gif|max:2048",
335
+ }
336
+
337
+
338
+ async def update_avatar_inline(request: Request) -> Response:
339
+ validated = await request.validate(
340
+ {
341
+ "image": "nullable|image|mimes:jpg,jpeg,png,gif|max:2048",
342
+ }
343
+ )
344
+ if validated.image is not None:
345
+ path = await validated.image.store("avatars", disk="public")
346
+ return json_response({"path": path}, status_code=201)
347
+ return json_response({"path": None})
348
+ ```
349
+
350
+ | String DSL | Helper / Class | Behavior |
351
+ |---|---|---|
352
+ | `file` | `file()` / `FileRule` / `UploadedFile` | Requires an open `UploadedFile` instance (`UploadedFile` class can also be placed directly in rule lists such as `[required, UploadedFile]`). Failing `file` short-circuits subsequent rules on the field. |
353
+ | `image` / `image:allow_svg` | `image(allow_svg=False)` / `ImageRule` | Verifies leading magic bytes and bounded container headers (`jpg`/`jpeg`, `png` IHDR+CRC, `gif` LSD+block tag, `webp` RIFF+VP8/VP8L/VP8X, `bmp`, `ico`, `tif`/`tiff`, `avif`, `heic`/`heif`), filename extension consistency, and declared `Content-Type`. **Signature/header validation is not full image decoding.** SVG is rejected by default to prevent XSS; `image:allow_svg` / `image(allow_svg=True)` validates `<svg>` XML header structure only and is **not** an SVG XSS sanitizer. |
354
+ | `mimes:<a,b,...>` | `mimes(*types)` / `MimesRule` | Validates short format/extension names (`jpg`, `jpeg`, `png`, `gif`, `pdf`, `docx`, `xlsx`, `pptx`, `csv`, `txt`, etc.) with fail-closed magic-byte + image container-header checks, bounded OOXML ZIP entry verification (`[Content_Types].xml` + `word/`/`xl/`/`ppt/`), format-specific executable isolation, and UTF-8/NUL + XML-prolog checks for text formats. |
355
+ | `mimetypes:<a/b,...>` | `mimetypes(*types)` / `MimeTypesRule` | Validates explicit MIME types and wildcards (e.g. `mimetypes:image/jpeg,image/png`, `mimetypes:image/*`, `mimetypes:application/pdf`) cross-checked against sniffed file headers; wildcard rules like `application/*` or `*/*` still enforce magic-byte verification for any declared binary MIME type. |
356
+ | `extensions:<a,b,...>` | `extensions(*exts)` / `ExtensionsRule` | Case-insensitive filename extension check (leading `.` stripped). |
357
+
358
+ - **MIME alias & content-type policy:** Common equivalent client MIME aliases are normalized canonically rather than trusted verbatim — for example `image/jpg` and `image/pjpeg` -> `image/jpeg`, `image/x-png` -> `image/png`, `image/x-ms-bmp` -> `image/bmp`, `image/vnd.microsoft.icon` / `image/ico` -> `image/x-icon`, `image/x-tiff` -> `image/tiff`, `application/x-pdf` -> `application/pdf`, `application/x-zip-compressed` / `application/x-zip` -> `application/zip`, `audio/x-m4a` -> `audio/mp4`, and `video/avi` -> `video/x-msvideo` (plus Windows browser `.csv` declared as `application/vnd.ms-excel` when content is valid UTF-8 text). Multipart file parts (`filename=...` or RFC 5987 `filename*=UTF-8''...`) that omit a part `Content-Type` header default to `"application/octet-stream"` (not `"text/plain"`) so `image` / `mimes` / `mimetypes` rely on sniffed file content + extension, whereas an explicit mismatched header (such as declaring `text/html` or `image/png` on JPEG bytes) is rejected.
359
+ - **Security boundary (`image` vs. full decoding, SVG, storage, and temp cleanup):** File/image rules inspect a bounded `4096`-byte leading header (`await uploaded.peek(4096)`) and container metadata (PNG `IHDR` + CRC32, WebP `RIFF` + `VP8`/`VP8L`/`VP8X` chunk checks, GIF LSD + image/extension block tag, and JPEG marker + segment-length checks) to avoid buffering or decoding untrusted images in request handlers. Signature/header validation is **not** equivalent to full pixel decoding; if your application must verify or sanitize untrusted image bitstreams or SVG markup, decode/re-encode images via a dedicated library (such as Pillow) or sanitize SVG in a background worker job. Prefer `await upload.store(...)` (which generates collision-resistant random filenames) over client filenames, and rely on `Application`'s request lifecycle to close spooled temp files automatically on success, `413`, `422`, exceptions, and cancellation.
360
+ - **Kilobytes vs. explicit size units:** Numeric `min`/`max`/`between` arguments evaluate `UploadedFile` sizes in **kilobytes** (`1 KB = 1024` bytes, so `max:2048` enforces `2,097,152` bytes = `2 MiB`). You can also pass explicit units such as `max:2MB`, `min:500B`, or `between:10KB,2MB`. File size rules always measure actual stream content via `await file.get_real_size()` (ignoring spoofed declared sizes), and non-seekable or unreadable streams fail closed cleanly. Note that `MinRule`/`MaxRule`/`BetweenRule.validate()` remains synchronous for scalar/collection values and returns an `Awaitable[bool]` for `UploadedFile`; custom rule runners must check `inspect.isawaitable(res)` per `ValidatorRule`.
361
+ - **Non-blocking cursor safety, memoization & `nullable` / `sometimes` uploads:** Header peeking (`await uploaded.peek()`) and real-size checks (`await uploaded.get_real_size()`) run off the event loop in single thread-pool hops via a shared central inspector (`inspect_uploaded_file` / `inspect_uploaded_file_size`), are memoized per `Validator.validate()` pass (peeking and measuring each file at most once across chained rules), and always restore the file cursor to byte `0` so `await validated.image.store(...)` receives the entire upload. Unselected browser file inputs (`filename=""`) and blank `""` values on `nullable` file/image fields resolve cleanly to `None` (without altering `nullable|str`), `sometimes` skips absent keys and unselected file inputs, and `required` always takes precedence over `nullable` regardless of rule ordering.
362
+ - **Upload parser limits:** `MultipartParser` enforces `filesystems.uploads.max_file_size`, `max_request_size` (including upfront `Content-Length` rejection), `max_part_header_size` (default `16 KB`), and `max_parts` (default `1000`) from `config/filesystems.py` (or `Application(max_body_size=...)` when `filesystems.uploads` is unconfigured) with HTTP `413` before validation runs. Validation rules like `max:2048` are not a substitute for request-level upload limits.
363
+ - **Multi-file arrays:** Use wildcard rules (`"images": "required"`, `"images.*": "required|image|mimes:jpg,jpeg,png,gif|max:2048"`) when accepting multiple uploads under one field name; uploading a single file under `"images"` is automatically normalized to a 1-element `list[UploadedFile]` in `validated_data`.
364
+
305
365
  ---
306
366
 
307
367
  ## Wildcards & Nested Array Validation
@@ -10,7 +10,7 @@ dev = [
10
10
 
11
11
  [project]
12
12
  name = "swiftpy-framework"
13
- version = "0.4.1.post1"
13
+ version = "0.4.2"
14
14
  description = "SwiftPY is a new generation async-first Python framework purpose built for the modern API and AI economy."
15
15
  requires-python = ">=3.12"
16
16
  dependencies = [