swiftpy-framework 0.3.5__tar.gz → 0.3.7__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.
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/CHANGELOG.md +28 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/PKG-INFO +6 -2
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/README.md +5 -1
- swiftpy_framework-0.3.7/app/schemas/user_schema.py +22 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/documentations/2026-11-14-installation-quick-start.md +1 -1
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/documentations/2026-11-15-database-query-builder-and-migrations.md +109 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/documentations/2026-11-15-http-routing-middleware-and-exceptions.md +8 -6
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/documentations/2026-11-15-orm-models-and-relationships.md +56 -3
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/documentations/2026-11-15-validation-and-form-requests.md +17 -1
- swiftpy_framework-0.3.7/documentations/2026-11-19-application-schemas.md +255 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/documentations/2026-11-19-cli-and-testing.md +1 -1
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/documentations/2026-11-21-application-architecture-and-project-structure.md +1 -1
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/pyproject.toml +1 -1
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/__init__.py +18 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/auth/auth_manager.py +39 -23
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/console/commands/new.py +8 -21
- swiftpy_framework-0.3.7/swiftpy/console/stubs/repository.stub +13 -0
- swiftpy_framework-0.3.7/swiftpy/console/stubs/schema.stub +11 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/core/application.py +30 -87
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/core/container.py +2 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/database/__init__.py +2 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/database/exceptions.py +5 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/database/identifiers.py +41 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/database/orm/model.py +618 -87
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/database/query_builder.py +975 -54
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/helpers/helper.py +15 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/http/response.py +2 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/http/router.py +6 -2
- swiftpy_framework-0.3.7/swiftpy/schemas/__init__.py +19 -0
- swiftpy_framework-0.3.7/swiftpy/schemas/base.py +1527 -0
- swiftpy_framework-0.3.7/swiftpy/schemas/fields.py +207 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/console/test_phase9_cli_remediation.py +1 -1
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/console/test_stubs_and_make.py +1 -1
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/core/test_helpers.py +24 -0
- swiftpy_framework-0.3.7/tests/database/test_query_helpers_v036.py +1742 -0
- swiftpy_framework-0.3.7/tests/logging/__init__.py +1 -0
- swiftpy_framework-0.3.7/tests/schemas/__init__.py +1 -0
- swiftpy_framework-0.3.7/tests/schemas/test_schema_auth.py +184 -0
- swiftpy_framework-0.3.7/tests/schemas/test_schema_orm_and_cli.py +193 -0
- swiftpy_framework-0.3.7/tests/schemas/test_schema_routing.py +372 -0
- swiftpy_framework-0.3.7/tests/schemas/test_schemas.py +458 -0
- swiftpy_framework-0.3.7/tests/typing/test_orm_typing.py +333 -0
- swiftpy_framework-0.3.7/tests/typing/test_schema_typing.py +65 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/uv.lock +1 -1
- swiftpy_framework-0.3.5/app/schemas/user_schema.py +0 -35
- swiftpy_framework-0.3.5/documentations/2026-11-19-application-schemas.md +0 -276
- swiftpy_framework-0.3.5/swiftpy/console/stubs/repository.stub +0 -8
- swiftpy_framework-0.3.5/swiftpy/console/stubs/schema.stub +0 -12
- swiftpy_framework-0.3.5/tests/typing/test_orm_typing.py +0 -181
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/.dockerignore +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/.env.example +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/.github/workflows/ci.yml +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/.github/workflows/publish.yml +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/.gitignore +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/CONTRIBUTING.md +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/Dockerfile +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/LICENSE +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/app/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/app/ai/agents/assistant_agent.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/app/ai/observers/.gitkeep +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/app/ai/pipelines/.gitkeep +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/app/ai/providers/.gitkeep +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/app/ai/tools/system_status_tool.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/app/ai/vectorstores/.gitkeep +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/app/events/user_registered.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/app/http/controllers/user_controller.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/app/http/handler/exceptions.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/app/http/middleware/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/app/http/middleware/admin_middleware.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/app/http/middleware/auth_middleware.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/app/http/middleware/test_middleware.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/app/http/requests/create_user_request.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/app/http/resources/user_resource.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/app/jobs/send_notification_job.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/app/listeners/send_welcome_notification.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/app/mail/welcome_email.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/app/models/user.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/app/providers/app_service_provider.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/app/providers/auth_service_provider.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/app/providers/cache_service_provider.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/app/providers/database_service_provider.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/app/providers/event_service_provider.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/app/providers/filesystem_service_provider.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/app/providers/mail_service_provider.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/app/providers/queue_service_provider.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/app/repositories/user_repository.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/app/services/user_service.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/bootstrap/cache/.gitkeep +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/config/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/config/ai.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/config/app.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/config/auth.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/config/cache.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/config/cors.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/config/database.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/config/events.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/config/filesystems.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/config/http.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/config/logging.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/config/mail.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/config/queue.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/config/schedule.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/database/migrations/2026_01_01_000000_create_users_table.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/database/seeders/database_seeder.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/docker-compose.yml +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/documentations/2026-11-15-ai-subsystem.md +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/documentations/2026-11-15-authentication-and-security.md +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/documentations/2026-11-15-cache-events-and-queues.md +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/documentations/2026-11-15-core-application-di-and-config.md +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/documentations/2026-11-15-filesystem-storage-and-mail.md +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/documentations/2026-11-15-websockets-and-admin.md +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/documentations/2026-11-19-database-schema-and-blueprint.md +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/documentations/2026-11-20-error-handling.md +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/documentations/2026-11-20-logging.md +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/documentations/2026-11-20-request-and-responses.md +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/documentations/2026-11-21-cors.md +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/documentations/2026-11-22-task-scheduling.md +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/main.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/prompts/classify.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/prompts/summarise.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/red-black.png +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/routes/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/routes/api.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/.gitignore +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/ai/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/ai/_deterministic.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/ai/_fake.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/ai/agents/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/ai/agents/base_agent.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/ai/agents/memory.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/ai/client.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/ai/conversation.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/ai/embeddings.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/ai/exceptions.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/ai/history_strategies.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/ai/middleware.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/ai/observability/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/ai/observability/drivers.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/ai/observability/observer.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/ai/pool.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/ai/pricing.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/ai/prompts/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/ai/prompts/loader.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/ai/providers/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/ai/providers/anthropic_provider.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/ai/providers/base.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/ai/providers/openai_provider.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/ai/rag/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/ai/rag/context_formatter.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/ai/rag/pipeline_builder.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/ai/rag/reranker.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/ai/rag/result.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/ai/rag/retriever.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/ai/redis_store.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/ai/streaming.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/ai/tools/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/ai/tools/base_tool.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/ai/tools/first_party.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/ai/tools/tool_loop.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/ai/vectorstore/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/ai/vectorstore/base.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/ai/vectorstore/chroma_adapter.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/ai/vectorstore/in_memory_adapter.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/ai/vectorstore/lancedb_adapter.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/ai/vectorstore/pgvector_adapter.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/ai/vectorstore/pinecone_adapter.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/ai/vectorstore/qdrant_adapter.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/auth/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/auth/api_key_guard.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/auth/events.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/auth/exceptions.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/auth/jwt_guard.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/auth/jwt_issuer.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/auth/throttle.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/auth/token_blacklist.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/auth/user_context.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/auth_manager.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/cache/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/cache/cache.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/cache/driver.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/cache/drivers/memory.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/cache/drivers/redis.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/console/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/console/cli.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/console/commands/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/console/commands/cache.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/console/commands/make.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/console/commands/migrate.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/console/commands/queue.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/console/commands/schedule.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/console/commands/seed.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/console/commands/start.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/console/commands/storage.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/console/loader.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/console/stubs/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/console/stubs/agent.stub +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/console/stubs/controller.stub +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/console/stubs/event.stub +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/console/stubs/job.stub +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/console/stubs/listener.stub +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/console/stubs/mail.stub +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/console/stubs/middleware.stub +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/console/stubs/migration.alter.stub +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/console/stubs/migration.api_keys.stub +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/console/stubs/migration.blank.stub +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/console/stubs/migration.create.stub +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/console/stubs/migration.stub +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/console/stubs/migration.update.stub +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/console/stubs/model.stub +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/console/stubs/prompt.stub +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/console/stubs/provider.stub +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/console/stubs/request.stub +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/console/stubs/resource.stub +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/console/stubs/seeder.stub +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/console/stubs/service.stub +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/console/stubs/tool.stub +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/core/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/core/bootstrap.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/core/config.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/core/container_exceptions.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/core/context.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/core/exceptions.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/core/providers/base.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/database/migrations/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/database/migrations/blueprint.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/database/migrations/lock.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/database/migrations/migration.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/database/migrations/migrator.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/database/migrations/schema.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/database/orm/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/database/orm/fields.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/database/orm/registry.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/database/orm/relationships.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/database/pagination/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/database/pagination/contracts.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/database/pagination/paginator.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/database/pagination/simple_paginator.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/database/pool.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/database/seeder.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/database/transaction.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/events/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/events/dispatcher.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/events/redis_bus.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/filesystem/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/filesystem/disk.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/filesystem/drivers/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/filesystem/drivers/base.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/filesystem/drivers/local.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/filesystem/drivers/s3.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/filesystem/events.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/filesystem/exceptions.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/filesystem/manager.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/filesystem/metadata.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/filesystem/paths.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/filesystem/service_provider.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/filesystem/uploads/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/filesystem/uploads/handlers.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/filesystem/uploads/uploaded_file.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/filesystem/uploads/validators.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/filesystem/visibility.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/helpers/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/http/client_ip.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/http/exceptions.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/http/middleware.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/http/request.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/logging/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/logging/channels.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/logging/log.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/logging/manager.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/mail/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/mail/attachments.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/mail/config.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/mail/envelope.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/mail/exceptions.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/mail/facade.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/mail/mailable.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/mail/manager.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/mail/message.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/mail/models.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/mail/queue/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/mail/queue/job.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/mail/service_provider.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/mail/templates/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/mail/templates/renderer.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/mail/transports/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/mail/transports/api/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/mail/transports/api/base.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/mail/transports/api/mailgun.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/mail/transports/api/resend.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/mail/transports/api/sendgrid.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/mail/transports/base.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/mail/transports/console.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/mail/transports/sendmail.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/mail/transports/smtp.py +0 -0
- /swiftpy_framework-0.3.5/tests/logging/__init__.py → /swiftpy_framework-0.3.7/swiftpy/py.typed +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/queue/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/queue/dispatcher.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/queue/job.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/queue/worker.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/scheduling/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/scheduling/_redis_lua.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/scheduling/cron.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/scheduling/events.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/scheduling/exceptions.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/scheduling/jobs.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/scheduling/models.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/scheduling/scheduler.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/scheduling/signing.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/scheduling/store.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/support/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/support/hashing.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/support/keys.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/support/redis_config.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/support/strings.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/testing/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/testing/fakes/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/testing/fakes/ai_fake.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/testing/fakes/vectorstore_fake.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/testing/fixtures.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/testing/http_client.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/testing/test_case.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/validation/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/validation/exceptions.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/validation/form_request.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/validation/protocols.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/validation/rules/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/validation/rules/builtin.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/validation/rules/exists.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/validation/rules/registry.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/validation/rules/required.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/validation/rules/unique.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/validation/validator.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/websockets/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/websockets/connection.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/swiftpy/websockets/manager.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/ai/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/ai/conftest.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/ai/integration/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/ai/integration/test_chroma.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/ai/integration/test_lancedb.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/ai/integration/test_pinecone.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/ai/integration/test_qdrant.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/ai/integration/test_rag_integration.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/ai/test_agents.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/ai/test_ai_fake.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/ai/test_ai_fake_isolation.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/ai/test_client.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/ai/test_conversation.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/ai/test_embeddings.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/ai/test_middleware.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/ai/test_middleware_concurrency.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/ai/test_observability.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/ai/test_observability_resilience.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/ai/test_phase7_ai_remediation.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/ai/test_phase8_agents_tools_prompts_remediation.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/ai/test_phase8_rag_remediation.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/ai/test_phase8_vectorstore_remediation.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/ai/test_prompts.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/ai/test_prompts_security.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/ai/test_providers.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/ai/test_rag.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/ai/test_streaming.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/ai/test_tools.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/ai/test_vectorstore.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/ai/test_vectorstore_adapters.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/app/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/app/test_application_providers.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/app/test_starter_auth.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/auth/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/auth/test_api_key_guard.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/auth/test_auth_attempt.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/auth/test_auth_context_on_issue.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/auth/test_auth_manager.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/auth/test_auth_proxy.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/auth/test_auth_remediation.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/auth/test_auth_security.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/auth/test_auth_throttle.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/auth/test_jwt_defaults.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/auth/test_jwt_issuer.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/auth/test_password_hashing.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/auth/test_refresh_and_logout.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/auth/test_token_blacklist.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/benchmarks.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/cache/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/cache/test_cache_concurrency.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/cache/test_cache_manager.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/cache/test_driver_correctness.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/cache/test_memory_cache.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/cache/test_redis_cache.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/concurrency/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/concurrency/test_circular_dependency.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/concurrency/test_container_semantics.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/concurrency/test_resolution.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/concurrency/test_resolution2.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/conftest.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/console/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/console/test_cache_commands.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/console/test_cli.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/console/test_new_command.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/console/test_start.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/console/test_storage_command.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/core/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/core/test_application_config_isolation.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/core/test_core_config.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/core/test_exceptions.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/core/test_instance_singletons.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/core/test_lifespan.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/database/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/database/test_orm_expansion.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/database/test_orm_vector.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/database/test_pagination_and_grouping.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/database/test_pagination_pg_integration.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/database/test_pgvector_integration.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/database/test_phase4_remediation.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/database/test_query_expansion.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/database/test_query_expansion_pg_integration.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/database/test_seeder.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/database/test_sequence_gaps.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/db/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/db/load_test_database.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/db/load_test_database2.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/db/test_arbitrary_primary_keys.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/db/test_identifiers.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/db/test_mass_writes.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/db/test_pool_config.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/db/test_query_builder_terminals.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/db/test_sql_injections.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/db/test_transaction_isolation.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/docs/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/docs/test_readme_examples.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/e2e/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/e2e/test_concurrent_auth.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/e2e/test_crud_auth_e2e.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/events/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/events/test_event_dispatcher.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/events/test_model_events.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/events/test_redis_bus.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/events/test_redis_bus_reliability.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/filesystem/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/filesystem/test_cli_storage_link.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/filesystem/test_disk.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/filesystem/test_filesystem_concurrency.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/filesystem/test_filesystem_config.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/filesystem/test_http_integration.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/filesystem/test_local_driver.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/filesystem/test_multipart.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/filesystem/test_paths.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/filesystem/test_phase6_filesystem_remediation.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/filesystem/test_s3_driver.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/filesystem/test_signed_urls.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/filesystem/test_storage_facade.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/filesystem/test_uploaded_file.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/filesystem/test_validation.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/http/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/http/test_client_ip.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/http/test_controller_routing.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/http/test_error_pipeline.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/http/test_http_remediation.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/http/test_include_router.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/http/test_request.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/http/test_request_router_abort.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/http/test_response.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/http/test_route_groups.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/http/test_router.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/http/test_router_405_and_has_file.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/integration/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/integration/test_queue_event_websocket.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/logging/test_logging.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/mail/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/mail/test_api_transports.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/mail/test_attachments.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/mail/test_cli_make_mail.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/mail/test_console_transport.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/mail/test_envelope.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/mail/test_facade_and_fake.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/mail/test_mailable.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/mail/test_manager_and_config.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/mail/test_message.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/mail/test_phase6_mail_remediation.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/mail/test_queue_integration.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/mail/test_service_provider_and_helpers.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/mail/test_smtp_and_sendmail.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/mail/test_templates.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/migrations/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/migrations/test_migrations.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/orm/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/orm/test_defaults_dirty.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/orm/test_eager_loading.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/orm/test_hidden.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/orm/test_instance_update.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/orm/test_mass_assignment.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/orm/test_model_events_transaction.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/orm/test_relationships_hardening.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/orm/test_where_has.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/queue/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/queue/test_after_commit.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/queue/test_phase5_remediation.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/queue/test_poison_messages.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/queue/test_queue.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/queue/test_reliability.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/queue/test_signing.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/queue/test_worker_behavior.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/scheduling/test_cron_and_timezone.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/scheduling/test_scheduler_core.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/scheduling/test_scheduler_lifecycle_and_cli.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/scheduling/test_scheduler_queue_integration.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/scheduling/test_scheduler_recovery_and_failures.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/scheduling/test_scheduler_redis_store.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/scheduling/test_scheduler_worker_lifecycle.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/security/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/security/test_security_audit.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/stress/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/stress/test_context_isolation.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/support/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/support/test_redis_config.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/support/test_strings.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/testing/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/testing/test_fixtures.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/testing/test_phase9_testing_remediation.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/testing/test_test_client.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/typing/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/validation/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/validation/test_db_rules.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/validation/test_form_request_fail_closed.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/validation/test_form_request_pipeline.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/validation/test_phase6_validation_remediation.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/validation/test_rules_hardening.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/validation/test_validation_concurrency.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/validation/test_validation_ergonomics.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/validation/test_validator_rules.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/websockets/__init__.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/websockets/test_broadcast.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/websockets/test_handshake.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/websockets/test_lifecycle.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/websockets/test_websocket_concurrency.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/websockets/test_websocket_connection.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/websockets/test_websocket_manager.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/websockets/test_websocket_remediation.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/tests/websockets/test_websocket_routing_and_lifecycle.py +0 -0
- {swiftpy_framework-0.3.5 → swiftpy_framework-0.3.7}/views/mail/template.html +0 -0
|
@@ -4,6 +4,34 @@ All notable changes to SwiftPY will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.3.7] - 2026-11-25
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
- **PEP 561 Static Typing Support (`swiftpy/py.typed`):** Added the PEP 561 `py.typed` marker packaged into distributions, and updated `Model` / `ModelQueryBuilder[T]` fluent query annotations so repository chains (`await self.model.with_(...).where(...).first()` and `.get()`) preserve concrete model return types in Pyrefly, Mypy, and Pyright.
|
|
11
|
+
- **Declarative Application Schemas (`swiftpy.schemas`):** Added zero-dependency declarative schema module exporting `BaseSchema`, `Schema` (alias of `BaseSchema`), `Field`, `SchemaField`, `SchemaFieldInfo`, `@field_validator`, and `@model_validator` with `@dataclass_transform(kw_only_default=True, field_specifiers=(Field, SchemaField, SchemaFieldInfo))`.
|
|
12
|
+
- Supports automatic type coercion (`str`, `int`, `float`, `bool`, `Decimal`, `UUID`, `date`, `datetime`, `time`, `Enum`, `IntEnum`, `Literal`, `Annotated`, unions, nested schemas, and container generics) and `Field(...)` constraints (`gt`, `ge`, `lt`, `le`, `multiple_of`, `min_length`, `max_length`, `pattern`, `strip_whitespace`, `to_lower`, `to_upper`, `alias`, `exclude`, `default_factory`), raising HTTP 422 `ValidationException` on failure.
|
|
13
|
+
- Added `.validate()`, `.from_dict()`, `.model_validate()`, `await .from_request()`, `.from_model()`, `.to_dict(exclude_none=..., exclude_unset=..., by_alias=...)`, `.model_dump()`, `.fields_set`, and `.is_set()`.
|
|
14
|
+
- **HTTP Schema Auto-Injection & Serialization (`Router`, `Container`, `Application`, `Response`):** Route functions and controller handlers declaring a `BaseSchema` / `Schema` parameter automatically parse JSON, `application/x-www-form-urlencoded`, or `multipart/form-data` payloads into the validated schema before execution; unbound `BaseSchema` subclasses are excluded from DI auto-wiring; handlers returning `BaseSchema` (or `list[BaseSchema]`) auto-serialize to JSON (including `set` / `frozenset` -> JSON arrays via `_json_default`).
|
|
15
|
+
- **ORM & Auth Interoperability:** `Model.create()`, `Model.force_create()`, `model.update()`, and `model.force_update()` accept `BaseSchema` instances directly (`to_dict()` on create with keyword overrides, `to_dict(exclude_unset=True)` on update to preserve omitted fields); `Auth.attempt()`, `Auth.attempt_when()`, and `Auth.once()` (along with `AuthManager` / `AuthProxy`) accept `BaseSchema` payloads; and `isset()` resolves canonical schema fields, aliases, nested schemas, and `__extra_fields__`.
|
|
16
|
+
- **Schema Hardening & Performance:** `BaseSchema` tracks post-validation field mutations in `__fields_set__`, enforces `Annotated[T, Field(...)]` constraints inside generic collections, normalizes mixed `Decimal`/float bounds, rejects `_`-prefixed keys and prevents method shadowing under `extra = "allow"`, supports single-mapping and positional runtime constructors, skips `copy.deepcopy()` on immutable defaults, and avoids duplicate `request.input(_preload=True)` body parsing when handlers take both `Request` and `BaseSchema`/`FormRequest`.
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
- **CLI Scaffolding (`make:schema`, `make:repository`, `swiftpy new`):** Updated `schema.stub` and starter `app/schemas/user_schema.py` to generate declarative `BaseSchema` DTOs (`UserCreateSchema` / `UserResponseSchema`), updated `repository.stub` with typed `model: type[YourModel]` guidance, and bumped the `swiftpy-framework` dependency floor to `>=0.3.7` (package version `0.3.7`).
|
|
20
|
+
|
|
21
|
+
### Documentation
|
|
22
|
+
- Updated Application Schemas, Validation & Form Requests, HTTP Routing, ORM Models, CLI & Testing, Application Architecture, and Installation Quick Start guides for `swiftpy.schemas`, typed repositories, and `0.3.7`.
|
|
23
|
+
|
|
24
|
+
## [0.3.6] - 2026-11-24
|
|
25
|
+
|
|
26
|
+
### Added
|
|
27
|
+
- **Query Builder Predicates:** Added `where_column()`, correlated `where_exists()` / `where_not_exists()` (including OR variants), grouped `where_any()` / `where_all()` / `where_none()`, and `where_past()` / `where_future()` with ORM parity.
|
|
28
|
+
- **JSON Query Support:** Added strict `column->path` expressions for `where()`, `where_in()` and query-builder `update()` keys, plus JSON containment, key-existence, and array-length helpers with ORM parity. JSON paths are bound as PostgreSQL `text[]`; JSON path updates do not create missing intermediate parents.
|
|
29
|
+
- **Query Builder Unions & Row Locks:** Added `union()` / `union_all()` to `QueryBuilder`, plus `shared_lock()` / `lock_for_update()` on query builders and model queries. Row locks require an active transaction; unsupported lock combinations and union terminals raise `QueryError`.
|
|
30
|
+
- **Query Debugging:** Added `to_raw_sql()`, `dump()`, `dump_raw_sql()`, `dd()`, and `dd_raw_sql()` to `QueryBuilder` and `ModelQueryBuilder`, plus the exported `QueryDumpError`. Rendered SQL and logged bindings are for development/debugging only and must not be executed or used to build queries.
|
|
31
|
+
|
|
32
|
+
### Changed
|
|
33
|
+
- **Packaging & Scaffolding:** Bumped `swiftpy-framework` and the `swiftpy new` dependency floor to `0.3.6`.
|
|
34
|
+
|
|
7
35
|
## [0.3.5] - 2026-11-23
|
|
8
36
|
|
|
9
37
|
### Added
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: swiftpy-framework
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.7
|
|
4
4
|
Summary: SwiftPY is a new generation async-first Python framework purpose built for the modern API and AI economy.
|
|
5
5
|
Project-URL: Homepage, https://github.com/obrainwave/swiftpy
|
|
6
6
|
Project-URL: Repository, https://github.com/obrainwave/swiftpy
|
|
@@ -94,6 +94,8 @@ All core architectural, storage, AI, and security hardening phases have been com
|
|
|
94
94
|
| **Release v0.3.0: Project Structure, AI/Prompts & Controller Routing** | Standardized `app/` + `app/ai/{agents,tools,pipelines,providers,vectorstores,observers}/` + `prompts/` scaffolding, `Prompt.load("summarise.v2")` & `messages` lists, direct unbound controller method DI (`router.get(..., Controller.index)`), `make:agent`/`make:tool`/`make:prompt`, Admin Dashboard removal | ✅ Completed |
|
|
95
95
|
| **Release v0.3.1: Auth Ergonomics, ORM `has()` & Login Throttling** | `Auth.attempt()`, `Callback` conditions + ORM `has()`/`where_has()`, `attempt_when()`, Remember Me cookies (`Blueprint.remember_token()`, `via_remember()`), `login_using_id()`, `once()`, default `LoginThrottle` (`429 TooManyRequestsError`), `Request.cookies` | ✅ Completed |
|
|
96
96
|
| **Release v0.3.5: Client IP Detection & Native Task Scheduler** | Fail-safe `request.ip()` / `Request.ip()` / `websocket.ip()` & `LoginThrottle` IP trust via `TRUSTED_PROXIES`, zero-dependency 5-field cron + `ZoneInfo` scheduler (`Schedule` / `Scheduler`), Redis crash recovery (`_CLAIM_DUE_LUA` / `_RECLAIM_PENDING_LUA`), worker overlap locks, `schedule:list`/`run`/`work` | ✅ Completed |
|
|
97
|
+
| **Release v0.3.6: Query Builder Helpers** | `where_column()`, correlated `where_exists()`, `where_any()`/`where_all()`/`where_none()`, `where_past()`/`where_future()`, JSON `column->path` queries & updates, `union()`/`union_all()`, `shared_lock()`/`lock_for_update()`, debug helpers (`to_raw_sql()`, `dump()`, `dd()`) with ORM parity | ✅ Completed |
|
|
98
|
+
| **Release v0.3.7: Declarative Schemas (`swiftpy.schemas`) & Pyrefly/PEP 561 Typing** | `swiftpy/py.typed` PEP 561 marker, `Model` / `ModelQueryBuilder[T]` fluent generic preservation, `BaseSchema` / `Schema` & `Field(...)` constraints, `@field_validator` / `@model_validator`, Router/Controller auto-injection & JSON serialization, ORM `create()`/`update()` schema interop, `make:schema` & `swiftpy new` updates | ✅ Completed |
|
|
97
99
|
|
|
98
100
|
*See [`documentations/2026-11-14-installation-quick-start.md`](./documentations/2026-11-14-installation-quick-start.md), [`documentations/2026-11-21-application-architecture-and-project-structure.md`](./documentations/2026-11-21-application-architecture-and-project-structure.md), and [`documentations/2026-11-22-task-scheduling.md`](./documentations/2026-11-22-task-scheduling.md) for the complete documentation series and [`CHANGELOG.md`](./CHANGELOG.md) for release notes.*
|
|
99
101
|
|
|
@@ -672,10 +674,12 @@ SwiftPY follows a clean, intuitive layout inspired by modern application archite
|
|
|
672
674
|
│ ├── mail/ # Mailables, SMTP/Sendmail/API transports, templates
|
|
673
675
|
│ ├── queue/ # At-least-once queue workers, job serialization
|
|
674
676
|
│ ├── scheduling/ # 5-field cron engine, Redis/Memory stores, Scheduler & builders
|
|
677
|
+
│ ├── schemas/ # Declarative BaseSchema / Schema DTOs, Field constraints & validators
|
|
675
678
|
│ ├── support/ # Shared identifiers, keys, Redis config, string inflection
|
|
676
679
|
│ ├── testing/ # TestClient, TestCase, AIFake, MailFake, VectorStoreFake, DB fixtures
|
|
677
680
|
│ ├── validation/ # FormRequest, fail-closed Validator, builtin & DB rules
|
|
678
|
-
│
|
|
681
|
+
│ ├── websockets/ # WebSocket manager, connections, broadcast
|
|
682
|
+
│ └── py.typed # PEP 561 static typing marker
|
|
679
683
|
├── tests/ # Automated pytest suite
|
|
680
684
|
├── docker-compose.yml # Hardened local PostgreSQL & Redis environment
|
|
681
685
|
├── Dockerfile # Multi-stage production container
|
|
@@ -64,6 +64,8 @@ All core architectural, storage, AI, and security hardening phases have been com
|
|
|
64
64
|
| **Release v0.3.0: Project Structure, AI/Prompts & Controller Routing** | Standardized `app/` + `app/ai/{agents,tools,pipelines,providers,vectorstores,observers}/` + `prompts/` scaffolding, `Prompt.load("summarise.v2")` & `messages` lists, direct unbound controller method DI (`router.get(..., Controller.index)`), `make:agent`/`make:tool`/`make:prompt`, Admin Dashboard removal | ✅ Completed |
|
|
65
65
|
| **Release v0.3.1: Auth Ergonomics, ORM `has()` & Login Throttling** | `Auth.attempt()`, `Callback` conditions + ORM `has()`/`where_has()`, `attempt_when()`, Remember Me cookies (`Blueprint.remember_token()`, `via_remember()`), `login_using_id()`, `once()`, default `LoginThrottle` (`429 TooManyRequestsError`), `Request.cookies` | ✅ Completed |
|
|
66
66
|
| **Release v0.3.5: Client IP Detection & Native Task Scheduler** | Fail-safe `request.ip()` / `Request.ip()` / `websocket.ip()` & `LoginThrottle` IP trust via `TRUSTED_PROXIES`, zero-dependency 5-field cron + `ZoneInfo` scheduler (`Schedule` / `Scheduler`), Redis crash recovery (`_CLAIM_DUE_LUA` / `_RECLAIM_PENDING_LUA`), worker overlap locks, `schedule:list`/`run`/`work` | ✅ Completed |
|
|
67
|
+
| **Release v0.3.6: Query Builder Helpers** | `where_column()`, correlated `where_exists()`, `where_any()`/`where_all()`/`where_none()`, `where_past()`/`where_future()`, JSON `column->path` queries & updates, `union()`/`union_all()`, `shared_lock()`/`lock_for_update()`, debug helpers (`to_raw_sql()`, `dump()`, `dd()`) with ORM parity | ✅ Completed |
|
|
68
|
+
| **Release v0.3.7: Declarative Schemas (`swiftpy.schemas`) & Pyrefly/PEP 561 Typing** | `swiftpy/py.typed` PEP 561 marker, `Model` / `ModelQueryBuilder[T]` fluent generic preservation, `BaseSchema` / `Schema` & `Field(...)` constraints, `@field_validator` / `@model_validator`, Router/Controller auto-injection & JSON serialization, ORM `create()`/`update()` schema interop, `make:schema` & `swiftpy new` updates | ✅ Completed |
|
|
67
69
|
|
|
68
70
|
*See [`documentations/2026-11-14-installation-quick-start.md`](./documentations/2026-11-14-installation-quick-start.md), [`documentations/2026-11-21-application-architecture-and-project-structure.md`](./documentations/2026-11-21-application-architecture-and-project-structure.md), and [`documentations/2026-11-22-task-scheduling.md`](./documentations/2026-11-22-task-scheduling.md) for the complete documentation series and [`CHANGELOG.md`](./CHANGELOG.md) for release notes.*
|
|
69
71
|
|
|
@@ -642,10 +644,12 @@ SwiftPY follows a clean, intuitive layout inspired by modern application archite
|
|
|
642
644
|
│ ├── mail/ # Mailables, SMTP/Sendmail/API transports, templates
|
|
643
645
|
│ ├── queue/ # At-least-once queue workers, job serialization
|
|
644
646
|
│ ├── scheduling/ # 5-field cron engine, Redis/Memory stores, Scheduler & builders
|
|
647
|
+
│ ├── schemas/ # Declarative BaseSchema / Schema DTOs, Field constraints & validators
|
|
645
648
|
│ ├── support/ # Shared identifiers, keys, Redis config, string inflection
|
|
646
649
|
│ ├── testing/ # TestClient, TestCase, AIFake, MailFake, VectorStoreFake, DB fixtures
|
|
647
650
|
│ ├── validation/ # FormRequest, fail-closed Validator, builtin & DB rules
|
|
648
|
-
│
|
|
651
|
+
│ ├── websockets/ # WebSocket manager, connections, broadcast
|
|
652
|
+
│ └── py.typed # PEP 561 static typing marker
|
|
649
653
|
├── tests/ # Automated pytest suite
|
|
650
654
|
├── docker-compose.yml # Hardened local PostgreSQL & Redis environment
|
|
651
655
|
├── Dockerfile # Multi-stage production container
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from swiftpy.schemas import BaseSchema, Field
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class UserCreateSchema(BaseSchema):
|
|
7
|
+
"""Input validation schema for user creation requests."""
|
|
8
|
+
|
|
9
|
+
name: str = Field(..., min_length=2, max_length=100)
|
|
10
|
+
email: str = Field(..., max_length=255)
|
|
11
|
+
password: str = Field(..., min_length=8)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class UserResponseSchema(BaseSchema):
|
|
15
|
+
"""Output serialization schema for user responses."""
|
|
16
|
+
|
|
17
|
+
id: int
|
|
18
|
+
name: str
|
|
19
|
+
email: str
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
UserSchema = UserResponseSchema
|
|
@@ -170,6 +170,9 @@ Key filtering methods:
|
|
|
170
170
|
- **`NULL` handling:** `.where("deleted_at", None)` compiles to `IS NULL` and `.where("deleted_at", "!=", None)` compiles to `IS NOT NULL` (or use `.where_null()`, `.or_where_null()`, `.where_not_null()`, `.or_where_not_null()`). Passing `None` with `<`, `>`, `LIKE`, or `IN` raises `QueryError`.
|
|
171
171
|
- **Lists & subqueries:** `.where_in(col, values)`, `.or_where_in(...)`, `.where_not_in(...)`, `.or_where_not_in(...)`. Empty lists compile safely (`IN []` -> `WHERE FALSE`; `NOT IN []` -> `WHERE TRUE`).
|
|
172
172
|
- **Ranges:** `.where_between(col, (min_v, max_v))`, `.where_not_between(...)`, `.or_where_between(...)`, `.or_where_not_between(...)`.
|
|
173
|
+
- **Multi-column comparisons:** `.where_any(columns, operator, value)`, `.where_all(...)`, and `.where_none(...)` compare the same value against a non-empty list/tuple of columns. `where_any` matches one or more columns, `where_all` requires every comparison, and `where_none` negates the OR group. Each value is bound separately; the one-argument form defaults to equality.
|
|
174
|
+
- **Column comparisons & existence:** `.where_column("orders.user_id", "=", "users.id")` compares two validated identifiers. `.where_exists(query)` / `.where_not_exists(query)` accept a `QueryBuilder`, including a correlated subquery; use the outer table's real name in `where_column`. Table aliases are not supported, and the subquery must use a different table.
|
|
175
|
+
- **Time comparisons:** `.where_past("due_at")` and `.where_future("starts_at")` compare against PostgreSQL `CURRENT_TIMESTAMP`; `or_where_past` and `or_where_future` are available. `CURRENT_TIMESTAMP` is fixed at the start of the current transaction. For `timestamp without time zone`, PostgreSQL's session time zone applies. SQL NULL timestamps do not match.
|
|
173
176
|
- **Escaped `LIKE` / `ILIKE`:** `.where_like(col, value, case_insensitive=False, match="contains")` and `.where_ilike(...)` (plus `or_where_like` / `or_where_ilike`). Supported `match` modes are `"contains"`, `"starts_with"` / `"prefix"`, `"ends_with"` / `"suffix"`, and `"exact"`. User characters `%`, `_`, and `\` are automatically escaped via `escape_like()` with `ESCAPE '\'`.
|
|
174
177
|
- **Nested parentheses:** `.where_group(callback)` / `.or_where_group(callback)` group boolean expressions (`AND (...)` / `OR (...)`).
|
|
175
178
|
- **Conditionals:** `.when(cond, fn, default=None)` and `.unless(cond, fn, default=None)`.
|
|
@@ -178,6 +181,112 @@ Key filtering methods:
|
|
|
178
181
|
> [!CAUTION]
|
|
179
182
|
> Never pass untrusted user strings directly into `select_raw()`, `where_raw()`, or `having_raw()`. Always use `?` placeholders in `sql` and pass user values in `bindings`.
|
|
180
183
|
|
|
184
|
+
### JSON Columns
|
|
185
|
+
|
|
186
|
+
JSON paths use PostgreSQL's `->` separator, not dots. Dots already qualify identifiers (`users.settings` means a table-qualified column); `users.settings.theme` would otherwise be ambiguous. A path is a validated column followed by one or more identifier or non-negative array-index segments:
|
|
187
|
+
|
|
188
|
+
```python
|
|
189
|
+
from swiftpy.database import Query
|
|
190
|
+
|
|
191
|
+
query = (
|
|
192
|
+
Query.table("users")
|
|
193
|
+
.where("settings->theme", "dark")
|
|
194
|
+
.where_in("settings->languages", ["en", "fr"])
|
|
195
|
+
.where_json_contains("settings->roles", "editor")
|
|
196
|
+
.where_json_contains_key("settings->theme")
|
|
197
|
+
)
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
In addition to plain columns, `->` paths are accepted only in `where`/`or_where`, `where_in`/`where_not_in` and their `or_` variants, the `where_json_*` methods, and `update()` keys. The path is sent as a bound `text[]`; values remain bound parameters. JSON paths are not accepted in `select`, `order_by`, `group_by`, `pluck`, `value`, null/range filters, joins, inserts, upserts, counters, or direct instance `Model.update(...)`.
|
|
201
|
+
|
|
202
|
+
For `where()` and `where_in()` on a JSON path:
|
|
203
|
+
|
|
204
|
+
| Operator | Value | Behavior |
|
|
205
|
+
|---|---|---|
|
|
206
|
+
| `=` | JSON value | JSONB equality; Python values are JSON-encoded at registration |
|
|
207
|
+
| `=` / `!=` / `<>` | `None` | `=` matches JSON null and missing paths; `!=` / `<>` matches only non-null JSON values |
|
|
208
|
+
| `!=` / `<>` | non-`None` value | JSONB inequality; missing paths and SQL NULL do not match |
|
|
209
|
+
| `<`, `>`, `<=`, `>=` | string or number (not bool) | Compare only rows whose JSON type matches, so mixed-type rows do not raise cast errors |
|
|
210
|
+
| `LIKE`, `ILIKE` | string | Compare JSON string values only |
|
|
211
|
+
| `IN`, `NOT IN` | list/tuple of JSON scalars | Compare JSONB values; an empty list becomes `FALSE` / `TRUE` |
|
|
212
|
+
|
|
213
|
+
Use the dedicated helpers for PostgreSQL containment, key existence, and array length:
|
|
214
|
+
|
|
215
|
+
```python
|
|
216
|
+
from swiftpy.database import Query
|
|
217
|
+
|
|
218
|
+
query = (
|
|
219
|
+
Query.table("users")
|
|
220
|
+
.where_json_contains("settings->roles", "editor")
|
|
221
|
+
.where_json_doesnt_contain("settings->roles", "banned")
|
|
222
|
+
.where_json_contains_key("settings->theme")
|
|
223
|
+
.where_json_doesnt_contain_key("settings->retired")
|
|
224
|
+
.where_json_length("settings->languages", ">=", 2)
|
|
225
|
+
)
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
Containment follows PostgreSQL `jsonb @>` semantics: the scalar `"editor"` is contained in an array such as `["editor", "admin"]`; an array value means that all its elements must be present. `where_json_doesnt_contain()` also matches a missing path or SQL NULL. A JSON `null` value counts as an existing key. `where_json_length()` compares array lengths only; an object, scalar, missing path, or SQL NULL never matches, including for `!=`.
|
|
229
|
+
|
|
230
|
+
JSON path updates use `jsonb_set()` and can be mixed with ordinary assignments:
|
|
231
|
+
|
|
232
|
+
```python
|
|
233
|
+
from swiftpy.database import Query
|
|
234
|
+
|
|
235
|
+
await (
|
|
236
|
+
Query.table("users")
|
|
237
|
+
.where("id", user_id)
|
|
238
|
+
.update({"settings->theme": "dark", "settings->notifications->email": True})
|
|
239
|
+
)
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
A SQL NULL JSON column is treated as `{}`, and assigning Python `None` writes JSON `null`. PostgreSQL `jsonb_set()` does not create missing intermediate parents: when `settings->notifications` does not already exist, setting `settings->notifications->email` leaves the document unchanged. Updating both an entire JSON column and one of its paths in the same statement is rejected. JSON path updates are available through query-builder `.update(...)`, not a persisted model instance's `update(...)`.
|
|
243
|
+
|
|
244
|
+
### Unions
|
|
245
|
+
|
|
246
|
+
`QueryBuilder.union(query)` removes duplicate rows; `union_all(query)` preserves them. Each branch must be a `QueryBuilder` that selects the same number of compatible columns. A branch's own ordering and pagination stay inside that branch; ordering/limit/offset on the base builder apply to the combined result. An order column must name an output column. Clauses added after `union()` still belong to the base query. Nested unions and union methods on `ModelQueryBuilder` / `Model` are not supported.
|
|
247
|
+
|
|
248
|
+
```python
|
|
249
|
+
from swiftpy.database import Query
|
|
250
|
+
|
|
251
|
+
combined = (
|
|
252
|
+
Query.table("current_users").select("id", "email")
|
|
253
|
+
.union_all(Query.table("archived_users").select("id", "email"))
|
|
254
|
+
.order_by("id")
|
|
255
|
+
.limit(50)
|
|
256
|
+
)
|
|
257
|
+
rows = await combined.get()
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
Union queries support `get()`, `first()`, `simple_paginate()`, `to_sql()`, and the debugging helpers below. Aggregates, `exists()`, `paginate()`, `pluck()`, `value()`, writes, and chunking raise `QueryError` rather than silently operating on only one branch. A union builder can be used as a subquery.
|
|
261
|
+
|
|
262
|
+
### Pessimistic Row Locks
|
|
263
|
+
|
|
264
|
+
`shared_lock()` emits `FOR SHARE`; `lock_for_update()` emits `FOR UPDATE`. Locks require a live SwiftPY transaction when a read is executed:
|
|
265
|
+
|
|
266
|
+
```python
|
|
267
|
+
from swiftpy.database import Query, db
|
|
268
|
+
|
|
269
|
+
async with db.transaction():
|
|
270
|
+
user = await Query.table("users").where("id", user_id).lock_for_update().first()
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
The lock is applied to reads such as `get()`, `first()`, `value()`, and `simple_paginate()`. Calling `to_sql()` only compiles SQL and does not require a transaction. Locks cannot be combined with `DISTINCT`, `GROUP BY`, `HAVING`, or unions; they are rejected on write operations. Aggregates and the count query in `paginate()` do not carry the row lock, while the page's data query does.
|
|
274
|
+
|
|
275
|
+
### Query Debugging
|
|
276
|
+
|
|
277
|
+
`to_raw_sql()` produces a human-readable rendering; `dump()` logs parameterized SQL plus bindings, and `dump_raw_sql()` logs the rendering. The `dd()` variants log and raise `QueryDumpError` to stop the current flow. Enable INFO logging for `swiftpy.database.query_builder` to see these records.
|
|
278
|
+
|
|
279
|
+
```python
|
|
280
|
+
from swiftpy.database import Query
|
|
281
|
+
|
|
282
|
+
query = Query.table("users").where("email", "ada@example.com")
|
|
283
|
+
sql, bindings = query.to_sql() # Parameterized SQL and safe binding values
|
|
284
|
+
debug_sql = query.to_raw_sql() # Human-readable only
|
|
285
|
+
query.dump()
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
`to_raw_sql()` output is for human debugging only: never execute it or use it to construct another query. Its string escaping assumes PostgreSQL's default `standard_conforming_strings=on`, and values that cannot be represented as ordinary PostgreSQL text literals (such as Python strings containing NUL bytes or unsupported custom objects) are rendered diagnostically rather than as executable SQL literals. Bindings may contain credentials or tokens, so keep `dump*()` and `dd*()` out of production code paths.
|
|
289
|
+
|
|
181
290
|
### Grouping, `HAVING`, Ordering & Terminals
|
|
182
291
|
|
|
183
292
|
```python
|
|
@@ -210,9 +210,10 @@ SwiftPY inspects your route handler's signature and automatically binds any comb
|
|
|
210
210
|
1. `request: Request` — the incoming HTTP request.
|
|
211
211
|
2. **Path parameters** matching `{param_name}` in the route pattern.
|
|
212
212
|
3. **`FormRequest` subclasses** — automatically parsed and validated before your handler executes (covered in Guide #4).
|
|
213
|
-
4.
|
|
214
|
-
5. **
|
|
215
|
-
6. **
|
|
213
|
+
4. **`BaseSchema` / `Schema` subclasses** — automatically parsed from JSON, form-urlencoded, or multipart bodies, coerced to your field annotations, and validated via `Field(...)` constraints (HTTP `422` on failure; covered in [Application Schemas](2026-11-19-application-schemas.md)).
|
|
214
|
+
5. **Uploaded files** — `UploadedFile` or `list[UploadedFile]` matching the multipart field name.
|
|
215
|
+
6. **DI container services** — any class or binding registered in the application container (such as `OrderService`, `Config`, or repository classes).
|
|
216
|
+
7. **Optional defaulted parameters** — parameters with default values when not satisfied by path or DI bindings.
|
|
216
217
|
|
|
217
218
|
```python
|
|
218
219
|
@router.post("/orders/{order_id}/receipt")
|
|
@@ -473,14 +474,15 @@ async def bulk_import(request: Request) -> dict[str, str]:
|
|
|
473
474
|
|
|
474
475
|
## Returning Responses (`Response` & Helpers)
|
|
475
476
|
|
|
476
|
-
### Auto-JSON Serialization for `dict` and `
|
|
477
|
+
### Auto-JSON Serialization for `dict`, `list`, and `BaseSchema`
|
|
477
478
|
|
|
478
|
-
Any `dict` or `
|
|
479
|
+
Any `dict`, `list`, or `BaseSchema` / `Schema` instance returned from a handler is automatically wrapped into an `application/json` `Response`. SwiftPY's JSON encoder handles:
|
|
479
480
|
|
|
480
481
|
- `datetime`, `date`, `time` -> ISO-8601 strings
|
|
481
482
|
- `UUID` and `Decimal` -> strings
|
|
482
483
|
- `Enum` -> `.value`
|
|
483
|
-
-
|
|
484
|
+
- `set` and `frozenset` -> JSON arrays
|
|
485
|
+
- `BaseSchema` and other objects with `.to_dict()` -> dictionary output with excluded (`exclude=True`) or `__hidden__` fields removed
|
|
484
486
|
|
|
485
487
|
For safety and RFC compliance, `NaN`/`Infinity` floats and raw `bytes` values raise `TypeError` during JSON serialization.
|
|
486
488
|
|
|
@@ -251,10 +251,39 @@ Dirty-tracking safeguards:
|
|
|
251
251
|
|
|
252
252
|
- If an existing persisted model has **no dirty non-PK attributes**, calling `await model.save()` performs **0 SQL queries** and emits no `updated` event.
|
|
253
253
|
|
|
254
|
-
- **Direct instance updates (`update()` & `force_update()`):** On a persisted model instance, call `await model.update({"name": "New Name"})
|
|
254
|
+
- **Direct instance updates (`update()` & `force_update()`):** On a persisted model instance, call `await model.update({"name": "New Name"})`, `await model.update(name="New Name")`, or pass a `BaseSchema` DTO (`await model.update(payload)`) to apply attributes via `.fill()`, respect `__fillable__` / `__guarded__` rules, update `updated_at`, run dirty checks (0 SQL queries if nothing changed), emit `updating` / `updated` events, and persist via `.save()` (returning `self`). When given a `BaseSchema`, `update()` extracts `payload.to_dict(exclude_unset=True)` so omitted optional fields in partial-update payloads do not overwrite existing columns, while `Model.create(payload)` extracts `payload.to_dict()` (merging any extra keyword overrides such as `organization_id=org_id`). For trusted internal writes bypassing mass-assignment rules, use `await Model.force_create(...)` or `await model.force_update(...)`. Calling `update()` or `force_update()` on an unsaved model raises `PrimaryKeyError`.
|
|
255
255
|
- If the model defines `updated_at`, saving a dirty existing record refreshes `updated_at` to `datetime.now(UTC)` automatically.
|
|
256
256
|
- If you load a partial subset of columns with `.select("id", "title")`, SwiftPY records only the selected columns in its original snapshot. Calling `await post.save()` after modifying `post.title` updates only `title` and never clobbers unselected database columns.
|
|
257
257
|
|
|
258
|
+
#### Typed Repository Pattern (`Model` Class Attribute)
|
|
259
|
+
|
|
260
|
+
When wrapping ORM queries inside repository classes, annotate `model` explicitly with `type[YourModel]` (or parameterize a generic repository base with `T = TypeVar("T", bound=Model)` / `class BaseRepository[T: Model]`) so Pyrefly and `mypy --strict` preserve concrete model types through `.with_(...).where(...).first()` and `.get()`:
|
|
261
|
+
|
|
262
|
+
```python
|
|
263
|
+
from typing import TypeVar
|
|
264
|
+
|
|
265
|
+
from swiftpy.database.orm import Model
|
|
266
|
+
|
|
267
|
+
T = TypeVar("T", bound=Model)
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
class BaseRepository(Generic[T]): # or class BaseRepository[T: Model]: in Python 3.12+
|
|
271
|
+
model: type[T]
|
|
272
|
+
|
|
273
|
+
async def find_or_fail(self, record_id: int) -> T:
|
|
274
|
+
row = await self.model.where("id", record_id).first()
|
|
275
|
+
if row is None:
|
|
276
|
+
raise NotFoundError(f"{self.model.__name__} not found")
|
|
277
|
+
return row
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
class DocVersionRepository(BaseRepository[DocVersion]):
|
|
281
|
+
model: type[DocVersion] = DocVersion
|
|
282
|
+
|
|
283
|
+
async def get_doc_versions(self) -> list[DocVersion]:
|
|
284
|
+
return await self.model.with_("groups", "author").order_by("sort_order").get()
|
|
285
|
+
```
|
|
286
|
+
|
|
258
287
|
#### Query Builder Methods on `Model`
|
|
259
288
|
|
|
260
289
|
Every `Model` exposes classmethods that return a `ModelQueryBuilder` bound to that model. You can chain filters and either call a terminal method or `await` the query directly:
|
|
@@ -303,7 +332,31 @@ async def send_digest_batch(users: list[User]) -> None:
|
|
|
303
332
|
completed = await User.where("needs_digest", True).chunk_by_id(200, send_digest_batch)
|
|
304
333
|
```
|
|
305
334
|
|
|
306
|
-
`ModelQueryBuilder` supports `.where()`, `.or_where()`, `.where_group()`, `.or_where_group()`, `.where_in()`, `.where_like()`, `.where_ilike()`, `.where_between()`, `.where_null()`, `.where_not_null()`, `.where_raw()`, `.join()`, `.left_join()`, `.right_join()`, `.select()`, `.select_raw()`, `.distinct()`, `.group_by()`, `.having()`, `.latest()`, `.oldest()`, `.in_random_order()`, `.when()`, `.unless()`, `.limit()`/`.take()`, `.offset()`/`.skip()`, `.clone()`, `.count()`, `.exists()`, `.sum()`, `.avg()`, `.min()`, `.max()`, `.value()`, `.pluck()`, `.upsert()`, `.chunk()`, `.chunk_by_id()`, `.paginate()`, `.simple_paginate()`, and `.allow_all()`. Both `.latest()` and `.oldest()` default to sorting by `"created_at"` (pass a column name such as `.latest("id")` if your table uses another column), and `.chunk(count, callback)` / `.chunk_by_id(count, callback)` return `False` early if `callback` returns `False`.
|
|
335
|
+
`ModelQueryBuilder` supports `.where()`, `.or_where()`, `.where_group()`, `.or_where_group()`, `.where_in()`, `.where_like()`, `.where_ilike()`, `.where_between()`, `.where_null()`, `.where_not_null()`, `.where_raw()`, `.join()`, `.left_join()`, `.right_join()`, `.select()`, `.select_raw()`, `.distinct()`, `.group_by()`, `.having()`, `.latest()`, `.oldest()`, `.in_random_order()`, `.when()`, `.unless()`, `.limit()`/`.take()`, `.offset()`/`.skip()`, `.clone()`, `.count()`, `.exists()`, `.sum()`, `.avg()`, `.min()`, `.max()`, `.value()`, `.pluck()`, `.upsert()`, `.chunk()`, `.chunk_by_id()`, `.paginate()`, `.simple_paginate()`, and `.allow_all()`. It also forwards `.where_column()`, `.where_exists()`/`.where_not_exists()`, `.where_any()`/`.where_all()`/`.where_none()`, `.where_past()`/`.where_future()`, the `.where_json_*()` helpers, `.shared_lock()`/`.lock_for_update()`, `.to_sql()`, `.to_raw_sql()`, `.dump()`, `.dump_raw_sql()`, `.dd()`, and `.dd_raw_sql()`. Both `.latest()` and `.oldest()` default to sorting by `"created_at"` (pass a column name such as `.latest("id")` if your table uses another column), and `.chunk(count, callback)` / `.chunk_by_id(count, callback)` return `False` early if `callback` returns `False`.
|
|
336
|
+
|
|
337
|
+
#### Column, JSON, Existence & Time Filters
|
|
338
|
+
|
|
339
|
+
The ORM forwards these filters through `ModelQueryBuilder` and model classmethods. `where_exists()` accepts either another model query or a core `QueryBuilder`; use the real outer table name in a correlated `where_column()` condition:
|
|
340
|
+
|
|
341
|
+
```python
|
|
342
|
+
users_with_posts = User.where_exists(
|
|
343
|
+
Post.query().where_column("posts.user_id", "=", "users.id")
|
|
344
|
+
)
|
|
345
|
+
active_users = User.where_any(["email", "name"], "ada").where_future("created_at")
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
JSON `->` paths are supported in `Model.where()` / `where_in()` and in the `where_json_*()` methods. For example, `User.where_json_contains("preferences->roles", "editor")` or `User.where_json_length("preferences->languages", ">=", 2)`. Query-builder `.update({...})` also accepts JSON path keys; instance `await user.update({...})` intentionally does not.
|
|
349
|
+
|
|
350
|
+
`where_past()` and `where_future()` compare with PostgreSQL `CURRENT_TIMESTAMP`, which is fixed at the start of the active transaction. Row locks must be read inside `db.transaction()`:
|
|
351
|
+
|
|
352
|
+
```python
|
|
353
|
+
from swiftpy.database import db
|
|
354
|
+
|
|
355
|
+
async with db.transaction():
|
|
356
|
+
user = await User.where("id", user_id).lock_for_update().first()
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
Unions are intentionally limited to the lower-level `QueryBuilder`; `ModelQueryBuilder` and `Model` do not expose `union()`. Table aliases are not supported for correlated existence queries. See the [query-builder guide](./2026-11-15-database-query-builder-and-migrations.md) for JSON comparison rules, update limitations, lock compatibility, union terminal restrictions, and debugging safety.
|
|
307
360
|
|
|
308
361
|
### 5. Lifecycle Events & Transactions
|
|
309
362
|
|
|
@@ -504,7 +557,7 @@ await post.tags.sync([tag_a.id, tag_b])
|
|
|
504
557
|
- **Never share models with unloaded relations into sync templates/serializers**: Either eager-load with `.with_()` upfront or catch missing eager loads early in development/CI with `prevent_lazy_loading = True` so `LazyLoadingDisabledError` surfaces N+1 paths before production.
|
|
505
558
|
- **Bulk deletes/updates vs single-record saves**: `model.save()` and `model.delete()` execute targeted single-row operations wrapped in dirty checks and lifecycle hooks. Never loop `await row.save()` inside a handler when a single batched query or `Model.upsert()` / `Query` update is appropriate, and remember `Query` bulk updates/deletes require `.allow_all()` if called intentionally without a `WHERE` clause.
|
|
506
559
|
- **Database migrations remain the source of truth**: `Field(...)`, `Vector(...)`, and relationship descriptors describe application-level behavior; always create corresponding tables, foreign keys, indexes, and `vector(...)` columns in `database/migrations/` using `Schema` and `Blueprint` (see [Database Schema, `Blueprint` & Migrations](2026-11-19-database-schema-and-blueprint.md)).
|
|
507
|
-
- **Combine models cleanly with schemas**: Return domain `Model` records from repositories and transform
|
|
560
|
+
- **Combine models cleanly with schemas**: Return domain `Model` records from repositories and transform or validate payloads with `BaseSchema.from_model()`, `Model.create(schema)`, `model.update(schema)`, `.to_dict()`, or `Resource` classes in [Application Schemas (`app/schemas`)](2026-11-19-application-schemas.md).
|
|
508
561
|
|
|
509
562
|
---
|
|
510
563
|
|
|
@@ -570,6 +570,22 @@ def register_validation_renderer(app: Application) -> None:
|
|
|
570
570
|
|
|
571
571
|
---
|
|
572
572
|
|
|
573
|
+
## Choosing Between `BaseSchema` / `Schema` and `FormRequest`
|
|
574
|
+
|
|
575
|
+
Both systems return HTTP `422` (`ValidationException`) automatically when annotated on route or controller handlers. Choose based on what each endpoint needs:
|
|
576
|
+
|
|
577
|
+
| Need | Use `BaseSchema` / `Schema` (`swiftpy.schemas`) | Use `FormRequest` (`swiftpy.validation`) |
|
|
578
|
+
|---|---|---|
|
|
579
|
+
| **Static typing in Pyrefly / Mypy** | Full typed attribute access (`payload.movement_date`, `payload.good_eggs`) | Dictionary-like `form.validated()` (`ValidatedData`) |
|
|
580
|
+
| **Schema definition style** | Type annotations + `Field(..., gt=0, max_length=100)` + `@field_validator` / `@model_validator` | String or rule-object DSL (`"required|email|unique:users,email"`) |
|
|
581
|
+
| **Database checks (`unique` / `exists`)** | Validate in service/repository or pair with explicit checks | Built-in async `"unique:table,col"` and `"exists:table,col"` rules |
|
|
582
|
+
| **Service & ORM DTO reuse** | Pass directly to services/repositories and `Model.create(payload)` / `model.update(payload)` | Primarily an HTTP request boundary wrapper |
|
|
583
|
+
| **Nested & union schemas** | Native nested `BaseSchema`, `list[ItemSchema]`, `UUID`, `Decimal`, `date`, `Enum`, `Literal` | Wildcard keys (`"items.*.sku"`) |
|
|
584
|
+
|
|
585
|
+
See [Application Schemas (`app/schemas`)](2026-11-19-application-schemas.md) for the complete `BaseSchema` / `Schema` guide.
|
|
586
|
+
|
|
587
|
+
---
|
|
588
|
+
|
|
573
589
|
## Next Step
|
|
574
590
|
|
|
575
|
-
Continue to [Application Schemas (`app/schemas`)](2026-11-19-application-schemas.md) to organize typed
|
|
591
|
+
Continue to [Application Schemas (`app/schemas`)](2026-11-19-application-schemas.md) to organize strongly typed `BaseSchema` / `Schema` DTOs and `make:schema` contracts across routes, services, repositories, and ORM models.
|