swiftpy-framework 0.2.1__tar.gz → 0.3.0__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.2.1 → swiftpy_framework-0.3.0}/.env.example +3 -1
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/.github/workflows/ci.yml +0 -1
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/.gitignore +1 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/CHANGELOG.md +35 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/PKG-INFO +19 -13
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/README.md +18 -12
- swiftpy_framework-0.3.0/app/ai/agents/assistant_agent.py +43 -0
- swiftpy_framework-0.3.0/app/ai/pipelines/.gitkeep +1 -0
- swiftpy_framework-0.3.0/app/ai/providers/.gitkeep +1 -0
- swiftpy_framework-0.3.0/app/ai/tools/system_status_tool.py +33 -0
- swiftpy_framework-0.3.0/app/ai/vectorstores/.gitkeep +1 -0
- swiftpy_framework-0.3.0/app/http/controllers/user_controller.py +23 -0
- swiftpy_framework-0.3.0/app/http/middleware/admin_middleware.py +67 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/app/http/middleware/auth_middleware.py +4 -0
- swiftpy_framework-0.3.0/app/http/resources/user_resource.py +32 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/app/schemas/user_schema.py +10 -1
- swiftpy_framework-0.3.0/app/services/user_service.py +44 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/config/ai.py +5 -1
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/config/auth.py +1 -1
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/documentations/2026-11-14-installation-quick-start.md +21 -9
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/documentations/2026-11-15-ai-subsystem.md +36 -20
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/documentations/2026-11-15-authentication-and-security.md +4 -4
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/documentations/2026-11-15-core-application-di-and-config.md +17 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/documentations/2026-11-15-filesystem-storage-and-mail.md +2 -2
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/documentations/2026-11-15-http-routing-middleware-and-exceptions.md +12 -7
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/documentations/2026-11-15-orm-models-and-relationships.md +2 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/documentations/2026-11-15-websockets-and-admin.md +3 -111
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/documentations/2026-11-19-application-schemas.md +2 -2
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/documentations/2026-11-19-cli-and-testing.md +3 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/documentations/2026-11-20-request-and-responses.md +2 -1
- swiftpy_framework-0.3.0/documentations/2026-11-21-application-architecture-and-project-structure.md +397 -0
- swiftpy_framework-0.3.0/documentations/2026-11-21-cors.md +273 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/main.py +2 -6
- swiftpy_framework-0.3.0/prompts/classify.py +17 -0
- swiftpy_framework-0.3.0/prompts/summarise.py +17 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/pyproject.toml +1 -1
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/routes/api.py +2 -11
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/__init__.py +17 -12
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/ai/__init__.py +4 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/ai/client.py +57 -8
- swiftpy_framework-0.3.0/swiftpy/ai/prompts/__init__.py +6 -0
- swiftpy_framework-0.3.0/swiftpy/ai/prompts/loader.py +617 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/auth/api_key_guard.py +6 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/auth/auth_manager.py +43 -13
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/auth/jwt_issuer.py +36 -5
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/auth/token_blacklist.py +21 -6
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/auth/user_context.py +1 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/console/commands/make.py +256 -27
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/console/commands/new.py +287 -221
- swiftpy_framework-0.3.0/swiftpy/console/stubs/agent.stub +40 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/console/stubs/controller.stub +3 -1
- swiftpy_framework-0.3.0/swiftpy/console/stubs/prompt.stub +14 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/console/stubs/repository.stub +0 -2
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/console/stubs/resource.stub +7 -4
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/console/stubs/schema.stub +1 -1
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/console/stubs/service.stub +1 -3
- swiftpy_framework-0.3.0/swiftpy/console/stubs/tool.stub +35 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/core/application.py +374 -25
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/database/orm/model.py +83 -1
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/helpers/__init__.py +2 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/helpers/helper.py +149 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/http/request.py +58 -1
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/http/response.py +2 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/http/router.py +756 -118
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/ai/test_observability.py +11 -51
- swiftpy_framework-0.3.0/tests/ai/test_prompts.py +413 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/ai/test_prompts_security.py +56 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/app/test_application_providers.py +13 -5
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/app/test_starter_auth.py +78 -1
- swiftpy_framework-0.3.0/tests/auth/test_jwt_defaults.py +89 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/auth/test_refresh_and_logout.py +60 -25
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/console/test_new_command.py +119 -58
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/console/test_phase9_cli_remediation.py +1 -13
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/console/test_stubs_and_make.py +66 -4
- swiftpy_framework-0.3.0/tests/core/test_helpers.py +364 -0
- swiftpy_framework-0.3.0/tests/http/test_controller_routing.py +416 -0
- swiftpy_framework-0.3.0/tests/http/test_router_405_and_has_file.py +279 -0
- swiftpy_framework-0.3.0/tests/logging/__init__.py +1 -0
- swiftpy_framework-0.3.0/tests/orm/test_instance_update.py +202 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/uv.lock +1 -1
- swiftpy_framework-0.2.1/app/http/middleware/admin_middleware.py +0 -45
- swiftpy_framework-0.2.1/app/services/user_service.py +0 -27
- swiftpy_framework-0.2.1/swiftpy/admin/__init__.py +0 -50
- swiftpy_framework-0.2.1/swiftpy/admin/auth.py +0 -538
- swiftpy_framework-0.2.1/swiftpy/admin/registry.py +0 -567
- swiftpy_framework-0.2.1/swiftpy/admin/views.py +0 -1583
- swiftpy_framework-0.2.1/swiftpy/ai/prompts/__init__.py +0 -6
- swiftpy_framework-0.2.1/swiftpy/ai/prompts/loader.py +0 -343
- swiftpy_framework-0.2.1/tests/admin/test_admin.py +0 -899
- swiftpy_framework-0.2.1/tests/ai/test_prompts.py +0 -147
- swiftpy_framework-0.2.1/tests/websockets/__init__.py +0 -0
- swiftpy_framework-0.2.1/views/admin/dashboard.html +0 -102
- swiftpy_framework-0.2.1/views/admin/login.html +0 -87
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/.dockerignore +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/.github/workflows/publish.yml +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/CONTRIBUTING.md +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/Dockerfile +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/LICENSE +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/app/__init__.py +0 -0
- /swiftpy_framework-0.2.1/tests/logging/__init__.py → /swiftpy_framework-0.3.0/app/ai/observers/.gitkeep +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/app/events/user_registered.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/app/http/handler/exceptions.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/app/http/middleware/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/app/http/middleware/test_middleware.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/app/http/requests/create_user_request.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/app/jobs/send_notification_job.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/app/listeners/send_welcome_notification.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/app/mail/welcome_email.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/app/models/user.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/app/providers/app_service_provider.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/app/providers/auth_service_provider.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/app/providers/cache_service_provider.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/app/providers/database_service_provider.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/app/providers/event_service_provider.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/app/providers/filesystem_service_provider.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/app/providers/mail_service_provider.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/app/providers/queue_service_provider.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/app/repositories/user_repository.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/bootstrap/cache/.gitkeep +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/config/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/config/app.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/config/cache.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/config/cors.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/config/database.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/config/events.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/config/filesystems.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/config/logging.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/config/mail.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/config/queue.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/database/migrations/2026_01_01_000000_create_users_table.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/database/seeders/database_seeder.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/docker-compose.yml +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/documentations/2026-11-15-cache-events-and-queues.md +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/documentations/2026-11-15-database-query-builder-and-migrations.md +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/documentations/2026-11-15-validation-and-form-requests.md +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/documentations/2026-11-19-database-schema-and-blueprint.md +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/documentations/2026-11-20-error-handling.md +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/documentations/2026-11-20-logging.md +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/red-black.png +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/routes/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/.gitignore +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/ai/_deterministic.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/ai/_fake.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/ai/agents/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/ai/agents/base_agent.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/ai/agents/memory.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/ai/conversation.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/ai/embeddings.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/ai/exceptions.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/ai/history_strategies.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/ai/middleware.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/ai/observability/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/ai/observability/drivers.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/ai/observability/observer.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/ai/pool.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/ai/pricing.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/ai/providers/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/ai/providers/anthropic_provider.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/ai/providers/base.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/ai/providers/openai_provider.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/ai/rag/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/ai/rag/context_formatter.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/ai/rag/pipeline_builder.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/ai/rag/reranker.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/ai/rag/result.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/ai/rag/retriever.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/ai/redis_store.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/ai/streaming.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/ai/tools/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/ai/tools/base_tool.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/ai/tools/first_party.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/ai/tools/tool_loop.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/ai/vectorstore/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/ai/vectorstore/base.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/ai/vectorstore/chroma_adapter.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/ai/vectorstore/in_memory_adapter.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/ai/vectorstore/lancedb_adapter.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/ai/vectorstore/pgvector_adapter.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/ai/vectorstore/pinecone_adapter.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/ai/vectorstore/qdrant_adapter.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/auth/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/auth/exceptions.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/auth/jwt_guard.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/auth_manager.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/cache/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/cache/cache.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/cache/driver.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/cache/drivers/memory.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/cache/drivers/redis.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/console/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/console/cli.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/console/commands/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/console/commands/cache.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/console/commands/migrate.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/console/commands/queue.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/console/commands/seed.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/console/commands/start.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/console/commands/storage.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/console/loader.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/console/stubs/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/console/stubs/event.stub +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/console/stubs/job.stub +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/console/stubs/listener.stub +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/console/stubs/mail.stub +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/console/stubs/middleware.stub +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/console/stubs/migration.alter.stub +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/console/stubs/migration.api_keys.stub +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/console/stubs/migration.blank.stub +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/console/stubs/migration.create.stub +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/console/stubs/migration.stub +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/console/stubs/migration.update.stub +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/console/stubs/model.stub +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/console/stubs/provider.stub +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/console/stubs/request.stub +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/console/stubs/seeder.stub +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/core/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/core/bootstrap.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/core/config.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/core/container.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/core/container_exceptions.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/core/context.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/core/exceptions.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/core/providers/base.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/database/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/database/exceptions.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/database/identifiers.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/database/migrations/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/database/migrations/blueprint.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/database/migrations/lock.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/database/migrations/migration.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/database/migrations/migrator.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/database/migrations/schema.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/database/orm/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/database/orm/fields.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/database/orm/registry.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/database/orm/relationships.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/database/pagination/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/database/pagination/contracts.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/database/pagination/paginator.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/database/pagination/simple_paginator.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/database/pool.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/database/query_builder.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/database/seeder.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/database/transaction.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/events/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/events/dispatcher.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/events/redis_bus.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/filesystem/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/filesystem/disk.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/filesystem/drivers/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/filesystem/drivers/base.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/filesystem/drivers/local.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/filesystem/drivers/s3.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/filesystem/events.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/filesystem/exceptions.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/filesystem/manager.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/filesystem/metadata.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/filesystem/paths.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/filesystem/service_provider.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/filesystem/uploads/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/filesystem/uploads/handlers.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/filesystem/uploads/uploaded_file.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/filesystem/uploads/validators.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/filesystem/visibility.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/http/exceptions.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/http/middleware.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/logging/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/logging/channels.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/logging/log.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/logging/manager.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/mail/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/mail/attachments.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/mail/config.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/mail/envelope.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/mail/exceptions.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/mail/facade.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/mail/mailable.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/mail/manager.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/mail/message.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/mail/models.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/mail/queue/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/mail/queue/job.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/mail/service_provider.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/mail/templates/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/mail/templates/renderer.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/mail/transports/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/mail/transports/api/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/mail/transports/api/base.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/mail/transports/api/mailgun.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/mail/transports/api/resend.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/mail/transports/api/sendgrid.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/mail/transports/base.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/mail/transports/console.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/mail/transports/sendmail.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/mail/transports/smtp.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/queue/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/queue/dispatcher.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/queue/job.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/queue/worker.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/support/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/support/hashing.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/support/keys.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/support/redis_config.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/support/strings.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/testing/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/testing/fakes/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/testing/fakes/ai_fake.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/testing/fakes/vectorstore_fake.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/testing/fixtures.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/testing/http_client.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/testing/test_case.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/validation/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/validation/exceptions.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/validation/form_request.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/validation/protocols.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/validation/rules/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/validation/rules/builtin.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/validation/rules/exists.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/validation/rules/registry.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/validation/rules/required.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/validation/rules/unique.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/validation/validator.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/websockets/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/websockets/connection.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/swiftpy/websockets/manager.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/__init__.py +0 -0
- {swiftpy_framework-0.2.1/tests/admin → swiftpy_framework-0.3.0/tests/ai}/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/ai/conftest.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/ai/integration/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/ai/integration/test_chroma.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/ai/integration/test_lancedb.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/ai/integration/test_pinecone.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/ai/integration/test_qdrant.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/ai/integration/test_rag_integration.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/ai/test_agents.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/ai/test_ai_fake.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/ai/test_ai_fake_isolation.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/ai/test_client.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/ai/test_conversation.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/ai/test_embeddings.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/ai/test_middleware.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/ai/test_middleware_concurrency.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/ai/test_observability_resilience.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/ai/test_phase7_ai_remediation.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/ai/test_phase8_agents_tools_prompts_remediation.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/ai/test_phase8_rag_remediation.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/ai/test_phase8_vectorstore_remediation.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/ai/test_providers.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/ai/test_rag.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/ai/test_streaming.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/ai/test_tools.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/ai/test_vectorstore.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/ai/test_vectorstore_adapters.py +0 -0
- {swiftpy_framework-0.2.1/tests/ai → swiftpy_framework-0.3.0/tests/app}/__init__.py +0 -0
- {swiftpy_framework-0.2.1/tests/app → swiftpy_framework-0.3.0/tests/auth}/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/auth/test_api_key_guard.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/auth/test_auth_context_on_issue.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/auth/test_auth_manager.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/auth/test_auth_proxy.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/auth/test_auth_remediation.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/auth/test_auth_security.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/auth/test_jwt_issuer.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/auth/test_password_hashing.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/auth/test_token_blacklist.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/benchmarks.py +0 -0
- {swiftpy_framework-0.2.1/tests/auth → swiftpy_framework-0.3.0/tests/cache}/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/cache/test_cache_concurrency.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/cache/test_cache_manager.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/cache/test_driver_correctness.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/cache/test_memory_cache.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/cache/test_redis_cache.py +0 -0
- {swiftpy_framework-0.2.1/tests/cache → swiftpy_framework-0.3.0/tests/concurrency}/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/concurrency/test_circular_dependency.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/concurrency/test_container_semantics.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/concurrency/test_resolution.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/concurrency/test_resolution2.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/conftest.py +0 -0
- {swiftpy_framework-0.2.1/tests/concurrency → swiftpy_framework-0.3.0/tests/console}/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/console/test_cache_commands.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/console/test_cli.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/console/test_start.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/console/test_storage_command.py +0 -0
- {swiftpy_framework-0.2.1/tests/console → swiftpy_framework-0.3.0/tests/core}/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/core/test_application_config_isolation.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/core/test_core_config.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/core/test_exceptions.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/core/test_instance_singletons.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/core/test_lifespan.py +0 -0
- {swiftpy_framework-0.2.1/tests/core → swiftpy_framework-0.3.0/tests/database}/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/database/test_orm_expansion.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/database/test_orm_vector.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/database/test_pagination_and_grouping.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/database/test_pagination_pg_integration.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/database/test_pgvector_integration.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/database/test_phase4_remediation.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/database/test_query_expansion.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/database/test_query_expansion_pg_integration.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/database/test_seeder.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/database/test_sequence_gaps.py +0 -0
- {swiftpy_framework-0.2.1/tests/database → swiftpy_framework-0.3.0/tests/db}/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/db/load_test_database.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/db/load_test_database2.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/db/test_arbitrary_primary_keys.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/db/test_identifiers.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/db/test_mass_writes.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/db/test_pool_config.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/db/test_query_builder_terminals.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/db/test_sql_injections.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/db/test_transaction_isolation.py +0 -0
- {swiftpy_framework-0.2.1/tests/db → swiftpy_framework-0.3.0/tests/docs}/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/docs/test_readme_examples.py +0 -0
- {swiftpy_framework-0.2.1/tests/docs → swiftpy_framework-0.3.0/tests/e2e}/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/e2e/test_concurrent_auth.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/e2e/test_crud_auth_e2e.py +0 -0
- {swiftpy_framework-0.2.1/tests/e2e → swiftpy_framework-0.3.0/tests/events}/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/events/test_event_dispatcher.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/events/test_model_events.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/events/test_redis_bus.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/events/test_redis_bus_reliability.py +0 -0
- {swiftpy_framework-0.2.1/tests/events → swiftpy_framework-0.3.0/tests/filesystem}/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/filesystem/test_cli_storage_link.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/filesystem/test_disk.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/filesystem/test_filesystem_concurrency.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/filesystem/test_filesystem_config.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/filesystem/test_http_integration.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/filesystem/test_local_driver.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/filesystem/test_multipart.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/filesystem/test_paths.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/filesystem/test_phase6_filesystem_remediation.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/filesystem/test_s3_driver.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/filesystem/test_signed_urls.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/filesystem/test_storage_facade.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/filesystem/test_uploaded_file.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/filesystem/test_validation.py +0 -0
- {swiftpy_framework-0.2.1/tests/filesystem → swiftpy_framework-0.3.0/tests/http}/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/http/test_error_pipeline.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/http/test_http_remediation.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/http/test_include_router.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/http/test_request.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/http/test_request_router_abort.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/http/test_response.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/http/test_route_groups.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/http/test_router.py +0 -0
- {swiftpy_framework-0.2.1/tests/http → swiftpy_framework-0.3.0/tests/integration}/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/integration/test_queue_event_websocket.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/logging/test_logging.py +0 -0
- {swiftpy_framework-0.2.1/tests/integration → swiftpy_framework-0.3.0/tests/mail}/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/mail/test_api_transports.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/mail/test_attachments.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/mail/test_cli_make_mail.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/mail/test_console_transport.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/mail/test_envelope.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/mail/test_facade_and_fake.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/mail/test_mailable.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/mail/test_manager_and_config.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/mail/test_message.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/mail/test_phase6_mail_remediation.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/mail/test_queue_integration.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/mail/test_service_provider_and_helpers.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/mail/test_smtp_and_sendmail.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/mail/test_templates.py +0 -0
- {swiftpy_framework-0.2.1/tests/mail → swiftpy_framework-0.3.0/tests/migrations}/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/migrations/test_migrations.py +0 -0
- {swiftpy_framework-0.2.1/tests/migrations → swiftpy_framework-0.3.0/tests/orm}/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/orm/test_defaults_dirty.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/orm/test_eager_loading.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/orm/test_hidden.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/orm/test_mass_assignment.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/orm/test_model_events_transaction.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/orm/test_relationships_hardening.py +0 -0
- {swiftpy_framework-0.2.1/tests/orm → swiftpy_framework-0.3.0/tests/queue}/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/queue/test_after_commit.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/queue/test_phase5_remediation.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/queue/test_poison_messages.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/queue/test_queue.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/queue/test_reliability.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/queue/test_signing.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/queue/test_worker_behavior.py +0 -0
- {swiftpy_framework-0.2.1/tests/queue → swiftpy_framework-0.3.0/tests/security}/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/security/test_security_audit.py +0 -0
- {swiftpy_framework-0.2.1/tests/security → swiftpy_framework-0.3.0/tests/stress}/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/stress/test_context_isolation.py +0 -0
- {swiftpy_framework-0.2.1/tests/stress → swiftpy_framework-0.3.0/tests/support}/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/support/test_redis_config.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/support/test_strings.py +0 -0
- {swiftpy_framework-0.2.1/tests/support → swiftpy_framework-0.3.0/tests/testing}/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/testing/test_fixtures.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/testing/test_phase9_testing_remediation.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/testing/test_test_client.py +0 -0
- {swiftpy_framework-0.2.1/tests/testing → swiftpy_framework-0.3.0/tests/typing}/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/typing/test_orm_typing.py +0 -0
- {swiftpy_framework-0.2.1/tests/typing → swiftpy_framework-0.3.0/tests/validation}/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/validation/test_db_rules.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/validation/test_form_request_fail_closed.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/validation/test_form_request_pipeline.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/validation/test_phase6_validation_remediation.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/validation/test_rules_hardening.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/validation/test_validation_concurrency.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/validation/test_validation_ergonomics.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/validation/test_validator_rules.py +0 -0
- {swiftpy_framework-0.2.1/tests/validation → swiftpy_framework-0.3.0/tests/websockets}/__init__.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/websockets/test_broadcast.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/websockets/test_handshake.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/websockets/test_lifecycle.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/websockets/test_websocket_concurrency.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/websockets/test_websocket_connection.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/websockets/test_websocket_manager.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/websockets/test_websocket_remediation.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/tests/websockets/test_websocket_routing_and_lifecycle.py +0 -0
- {swiftpy_framework-0.2.1 → swiftpy_framework-0.3.0}/views/mail/template.html +0 -0
|
@@ -82,7 +82,7 @@ AUTH_HYDRATE_USER=false
|
|
|
82
82
|
AUTH_PASSIVE_RESOLUTION=false
|
|
83
83
|
JWT_SECRET=
|
|
84
84
|
JWT_ALGORITHM=HS256
|
|
85
|
-
JWT_ACCESS_TTL=
|
|
85
|
+
JWT_ACCESS_TTL=3600
|
|
86
86
|
JWT_REFRESH_TTL=604800
|
|
87
87
|
AUTH_KEY_PEPPER=
|
|
88
88
|
|
|
@@ -98,6 +98,8 @@ LOG_LEVEL=info
|
|
|
98
98
|
# AI Subsystem
|
|
99
99
|
AI_ENABLED=true
|
|
100
100
|
AI_DEFAULT_PROVIDER=openai
|
|
101
|
+
AI_PROMPTS_PATH=prompts
|
|
102
|
+
AI_PROMPTS_CACHE=false
|
|
101
103
|
OPENAI_API_KEY=
|
|
102
104
|
OPENAI_MODEL=gpt-4o
|
|
103
105
|
ANTHROPIC_API_KEY=
|
|
@@ -102,7 +102,6 @@ jobs:
|
|
|
102
102
|
cd /tmp && /tmp/swiftpy-wheel-smoke/bin/python -c '
|
|
103
103
|
import asyncio
|
|
104
104
|
import swiftpy
|
|
105
|
-
import swiftpy.admin
|
|
106
105
|
import swiftpy.testing
|
|
107
106
|
from swiftpy import Application, Request, json_response
|
|
108
107
|
from swiftpy.ai.client import AI, AIClient
|
|
@@ -4,6 +4,41 @@ All notable changes to SwiftPY will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.3.0] - 2026-11-22
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
- **Routing & Controller DI Ergonomics (`swiftpy.http.router`, `swiftpy.core.application`):** Added dual decorator + direct handler binding across `Router`, `RouteGroup`, and `Application` (`router.get("/posts", PostController.index)`, `@router.get("/posts")`, `app.get("/posts", PostController.index)`), plus automatic per-request container resolution for unbound controller methods (`controller_cls` resolved once cleanly at compile/dispatch and instantiated isolated per request). Rejects passing raw controller classes directly with `RouteRegistrationError`.
|
|
11
|
+
- **Prompt Versioning & `messages` Templates (`swiftpy.ai.prompts`, `swiftpy.ai.client`):** Added `Prompt` facade (`Prompt.load("summarise.v2", ...)`, `await Prompt.aload(...)`, `Prompt.load_messages(...)`, `Prompt.aload_messages(...)`), module-level `messages` list support (`.py` sequences or zero-arg callables of role/content dicts or `Message` objects), `ai.prompts.path` config resolution, multi-message appending in `AIClient.prompt()` / `AIClient.aprompt()`, compiled cache round-tripping for `messages` lists and dotted versioned names, and exports via `swiftpy.ai.prompts`, `swiftpy.ai`, and top-level `swiftpy`.
|
|
12
|
+
- **CLI AI Generators (`make:agent`, `make:tool`, `make:prompt`):** Added `agent.stub`, `tool.stub`, `prompt.stub` and `swiftpy make:agent`, `swiftpy make:tool`, and `swiftpy make:prompt` (supporting nested folders and versioned `.v2` filenames such as `summarise.v2` with strict path-traversal and extension guards).
|
|
13
|
+
- **Starter Scaffolding Alignment (`swiftpy new`):** Scaffolded `app/ai/{agents,tools,pipelines,providers,vectorstores,observers}/` (`AssistantAgent` and `SystemStatusTool`), `prompts/{summarise.py,classify.py}`, `UserController` + `UserResource` + `UserResponseSchema` -> `routes/api.py` (`router.get("/users", UserController.index)`), and `config/ai.py` (`prompts.path`, `prompts.cache`, `http`).
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
- **Stubs & Resource Invariance (`swiftpy/console/stubs/`):** Refined `controller.stub`, `service.stub`, `repository.stub`, `schema.stub`, and `resource.stub` (typing `collection(cls, items: Iterable[Any])` for `mypy --strict` variance compatibility and removing unused imports).
|
|
17
|
+
- **Packaging:** Bumped `swiftpy-framework` package version and `swiftpy new` dependency floor to `0.3.0`.
|
|
18
|
+
|
|
19
|
+
### Removed
|
|
20
|
+
- **Admin Dashboard (`swiftpy.admin`, `views/admin/`):** Completely removed the built-in HTML Admin Dashboard package (`swiftpy/admin/`), admin HTML templates (`views/admin/`), `AdminSite`/`ModelAdmin`/`AdminSessionStore` exports and scaffolding references, while preserving `app/http/middleware/admin_middleware.py` (`is_admin` API guard) and `views/mail/template.html`.
|
|
21
|
+
|
|
22
|
+
### Documentation
|
|
23
|
+
- Added [`documentations/2026-11-21-application-architecture-and-project-structure.md`](documentations/2026-11-21-application-architecture-and-project-structure.md) covering the full layered `app/` architecture, `Request` vs. `Schema` vs. `Resource` vs. `Model`, Patterns A–D + feature grouping, `app/ai/` and `prompts/`, decision table, Golden Rule, and verified CRUD walkthrough.
|
|
24
|
+
- Updated Installation Quick Start, HTTP Routing, Application Schemas, AI Subsystem, CLI & Testing, Authentication, Filesystem/Mail, CORS, WebSockets, `README.md`, and `docs/2026-11-14_documentation_plan.md` for `v0.3.0`.
|
|
25
|
+
|
|
26
|
+
## [0.2.2] - 2026-11-21
|
|
27
|
+
|
|
28
|
+
### Added
|
|
29
|
+
- **ORM (`Model.update` & `Model.force_update`):** Added async `update()` and `force_update()` methods on `Model` instances accepting either a mapping (`await user.update({"name": "Alice"})`) or keyword attributes (`await user.update(name="Alice")`). Respects `__fillable__` / `__guarded__`, updates `updated_at`, short-circuits cleanly on unchanged attributes, fires `updating` / `updated` events, and raises `PrimaryKeyError` on unsaved instances. Existing query-builder `Model.where(...).update(...)` remains unchanged.
|
|
30
|
+
- **Helpers (`isset()`):** Added `isset(data, *keys)` in `swiftpy.helpers` (and re-exported from top-level `swiftpy`) to test non-`None` key, index, dot-path, and attribute existence across mappings, sequences, sets, `Request`, `FormData`, `FormRequest` (inspecting only actual form input), `ValidatedData`, `Config`, loaded `Model` fields/relations (without triggering lazy loads on unloaded relations or exposing `_`-prefixed private attributes), and generic Python objects.
|
|
31
|
+
- **HTTP (`Request.has_file`):** Added `request.has_file(name)` returning a dual sync/awaitable result (`if request.has_file("image"):` and `if await request.has_file("image"):`, plus direct boolean serialization in `encode_json` / `json_response`) with targeted multipart pre-loading when `Application` detects `has_file` usage on a route, while keeping non-`has_file` multipart routes lazy (`multipart_body_calls == 0`).
|
|
32
|
+
|
|
33
|
+
### Changed
|
|
34
|
+
- **Auth (`JWTIssuer` / Config / Scaffolding):** Increased default `JWT_ACCESS_TTL` / `access_token_ttl` from `900` (15 minutes) to `3600` seconds (60 minutes) across `JWTIssuer`, `config/auth.py`, `.env.example`, and `swiftpy new` templates while retaining `JWT_REFRESH_TTL=604800` (7 days), and added strict positive-integer validation for `access_token_ttl` and `refresh_token_ttl`.
|
|
35
|
+
- **Routing (`MethodNotAllowedError`):** Updated 405 error detail wording in `Router` from `"Method '...' not allowed for path '...'"` to `"Method '...' not allowed for route '...'"` to match framework routing terminology.
|
|
36
|
+
- **Packaging & Scaffolding:** Bumped `swiftpy-framework` package version and `swiftpy new` dependency floor to `0.2.2`.
|
|
37
|
+
|
|
38
|
+
### Documentation
|
|
39
|
+
- Added dedicated CORS guide [`documentations/2026-11-21-cors.md`](documentations/2026-11-21-cors.md) covering `CORSMiddleware` / `CORS`, `config/cors.py` and `.env` / `CORS__*` configuration, global vs. `Router`/`RouteGroup` attachment (including ordering ahead of `JWTGuard`), preflight `OPTIONS` handling, `Vary: Origin`, exact origin matching, wildcard + credentials (`G-3`) enforcement, and `TestClient` verification; cross-linked from [the HTTP routing guide](documentations/2026-11-15-http-routing-middleware-and-exceptions.md) and [README.md](README.md).
|
|
40
|
+
- Updated ORM, Auth, Core Helpers, HTTP Routing, Request/Response, Filesystem Upload, and Installation guides for `v0.2.2`.
|
|
41
|
+
|
|
7
42
|
## [0.2.1] - 2026-11-20
|
|
8
43
|
|
|
9
44
|
### Fixed
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: swiftpy-framework
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
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
|
|
@@ -55,9 +55,9 @@ SwiftPY brings the joy and productivity of Laravel to the modern asynchronous Py
|
|
|
55
55
|
- **Query Builder, GROUP BY & Dynamic Pagination**: Full length-aware `paginate()` and lightweight `simple_paginate()`, `limit()`/`offset()` (with `take()`/`skip()`), group-aware subquery counting, and aggregate selectors (`select_count`, `select_sum`, etc.) with `having` and `or_having` logical filtering.
|
|
56
56
|
- **Multi-Disk Storage & Streaming Engine**: Flysystem-inspired `Storage` abstraction supporting local and S3 disks, high-throughput streaming uploads/downloads, magic-byte validation, and `storage:link`.
|
|
57
57
|
- **Validation Ergonomics & Input Hardening**: `FormRequest` and `await validate(request, rules)` returning `ValidatedData` (supporting both dict and dot attribute access), `stop_on_first_error`, `ValidationException.single()`, automatic 422 JSON errors, configurable body streaming limits, Content-Length checks, and JSON recursion depth caps.
|
|
58
|
-
- **Authentication, Refresh Rotation & Session Revocation**: `JWTIssuer` with `refresh_token_pair()` rotation and reuse rejection, `auth().logout()` / `auth().logout_all()`, `TokenBlacklist`,
|
|
58
|
+
- **Authentication, Refresh Rotation & Session Revocation**: `JWTIssuer` with `refresh_token_pair()` rotation and reuse rejection, `auth().logout()` / `auth().logout_all()`, `TokenBlacklist`, and `ApiKeyGuard`.
|
|
59
59
|
- **Structured Asynchronous Logging**: Non-blocking `Log` facade and `LogManager` (`single`, `daily`, `stderr`, `stack`) backed by bounded `QueueHandler` / `QueueListener` with clean ASGI startup/shutdown flushing and per-application isolation.
|
|
60
|
-
- **Native AI Subsystem (`swiftpy.ai`)**: Fluent async `AI` client across OpenAI and Anthropic providers with shared `AIHttpPool` pooling and SSE streaming, batched `EmbeddingsClient`, unified `VectorStore` adapters (`PgVectorAdapter` for PostgreSQL `pgvector`, `InMemoryVectorStore`, Qdrant, Pinecone, Chroma, LanceDB), nonce-bounded RAG pipelines (`rag()`, `Retriever`, Cohere/CrossEncoder rerankers), autonomous `@tool` / `Agent` loops
|
|
60
|
+
- **Native AI Subsystem (`swiftpy.ai`)**: Fluent async `AI` client across OpenAI and Anthropic providers with shared `AIHttpPool` pooling and SSE streaming, batched `EmbeddingsClient`, unified `VectorStore` adapters (`PgVectorAdapter` for PostgreSQL `pgvector`, `InMemoryVectorStore`, Qdrant, Pinecone, Chroma, LanceDB), nonce-bounded RAG pipelines (`rag()`, `Retriever`, Cohere/CrossEncoder rerankers), autonomous `@tool` / `Agent` loops (`app/ai/{agents,tools,pipelines,providers,vectorstores,observers}/`), versioned `messages`-list prompt templates (`Prompt.load("summarise.v2")`, `prompts/`), moderation/rate-limit/budget middlewares, observability telemetry, and `AIFake` / `VectorStoreFake` test doubles.
|
|
61
61
|
- **Database Engine & Native Transactions**: Connection pool management, automatic transaction propagation across context variables, nested transaction savepoints, and strict SQL injection prevention with full identifier quoting for reserved words.
|
|
62
62
|
- **Fluent Migration DSL & Schema Builder**: Laravel-inspired `Blueprint` table definitions, safe statement ordering (drops executed before adds), column comments, unsigned checks, composite keys, and distributed PostgreSQL advisory locks.
|
|
63
63
|
- **At-Least-Once Queues & Signed Bus**: Robust background jobs with Redis visibility timeout leases, HMAC-SHA256 envelope signing, dead-letter routing, and a cryptographically protected cross-worker event bus.
|
|
@@ -90,8 +90,10 @@ All core architectural, storage, AI, and security hardening phases have been com
|
|
|
90
90
|
| **Week 26: Pagination & Aggregation Subsystem** | Limit/offset parameterized SQL, length-aware `paginate()`, `simple_paginate()`, `group_by()` & `having()` | ✅ Completed |
|
|
91
91
|
| **Release v0.2.0: DX, Logging, Auth Refresh & Docs** | `ValidatedData` & `validate(request)`, `Request.input()` & `abort()`, `Router(prefix, middleware)`, `Blueprint.enum`/`medium_text`/`long_text`, `swiftpy.logging` (`Log`), `refresh_token_pair()` & `auth().logout()`, 17 user guides in `documentations/` | ✅ Completed |
|
|
92
92
|
| **Release v0.2.1: Auth Context on Token Issue** | `CurrentUser` / `auth()` available when an access token is issued, `user=` / `Model` subjects, opt-in `auth.hydrate_user` & `auth.passive_resolution` | ✅ Completed |
|
|
93
|
+
| **Release v0.2.2: Model `.update()`, `isset()`, `has_file()`, & Auth TTL** | `Model.update()` / `force_update()`, `JWT_ACCESS_TTL=3600`, 405 `"for route"` detail, `isset()` helper, `request.has_file()` (sync & `await`), CORS guide | ✅ Completed |
|
|
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 |
|
|
93
95
|
|
|
94
|
-
*See [`documentations/2026-11-14-installation-quick-start.md`](./documentations/2026-11-14-installation-quick-start.md) for the complete
|
|
96
|
+
*See [`documentations/2026-11-14-installation-quick-start.md`](./documentations/2026-11-14-installation-quick-start.md) and [`documentations/2026-11-21-application-architecture-and-project-structure.md`](./documentations/2026-11-21-application-architecture-and-project-structure.md) for the complete documentation series and [`CHANGELOG.md`](./CHANGELOG.md) for release notes.*
|
|
95
97
|
|
|
96
98
|
---
|
|
97
99
|
|
|
@@ -532,8 +534,9 @@ SwiftPY reads environment variables and YAML/Python configuration files with str
|
|
|
532
534
|
| `DB_CONNECTION` | `database.default` | `"postgresql"` | Default database connection key (`"postgresql"`). |
|
|
533
535
|
| `DB_SSL` | `database.connections.postgresql.ssl` | `"disable"` | PostgreSQL SSL mode (`"disable"`, `"require"`, `"verify-ca"`, `"verify-full"`). |
|
|
534
536
|
| `DB_SSL_CA_FILE` | `database.connections.postgresql.ssl_ca_file` | `""` | Filepath to CA certificate when `DB_SSL` is `"verify-ca"` or `"verify-full"`. |
|
|
535
|
-
| `CORS_ALLOWED_ORIGINS` | `cors.allowed_origins` | `[]` | Comma-separated list of allowed CORS origins (never pair `"*"` with `CORS_ALLOW_CREDENTIALS=true`). |
|
|
537
|
+
| `CORS_ALLOWED_ORIGINS` | `cors.allowed_origins` | `[]` | Comma-separated list of exact allowed CORS origins (never pair `"*"` with `CORS_ALLOW_CREDENTIALS=true`). See the [CORS Guide](./documentations/2026-11-21-cors.md). |
|
|
536
538
|
| `CORS_ALLOW_CREDENTIALS` | `cors.allow_credentials` | `False` | Whether cross-origin requests may include credentials/cookies. |
|
|
539
|
+
| `CORS_MAX_AGE` | `cors.max_age` | `600` | Preflight `OPTIONS` cache duration (`Access-Control-Max-Age`) in seconds. |
|
|
537
540
|
| `AI_ENABLED` | `ai.enabled` | `True` | Master toggle for `swiftpy.ai` requests (raises `AIModuleDisabledError` when disabled). |
|
|
538
541
|
| `AI_DEFAULT_PROVIDER` | `ai.default` | `"openai"` | Default LLM provider (`"openai"` or `"anthropic"`) when not inferred from model name. |
|
|
539
542
|
| `OPENAI_API_KEY` | `ai.providers.openai.api_key` | `""` | OpenAI API key for chat, streaming, and embeddings. |
|
|
@@ -593,7 +596,7 @@ Across the hardening and audit remediation phases, architectural decisions (`D-1
|
|
|
593
596
|
- **D-8 (Config Environment Variable Coercion)**: Coercion preserves strings unless the default type is known (e.g. `"0012"` is not silently cast to integer `12`).
|
|
594
597
|
- **D-9 (`FormRequest` Fail-Closed Validation)**: If `rules()` raises `TypeError` or any exception, the request fails closed with `ConfigurationError` (HTTP 500) rather than falling back to unvalidated `{}`.
|
|
595
598
|
- **D-10 (`update()`/`delete()` Without `WHERE`)**: Mass write/delete queries without a `WHERE` clause raise `QueryError` unless `.allow_all()` is explicitly chained.
|
|
596
|
-
- **G-1 (`swiftpy/ai` & Wheel Packaging)**: `swiftpy/ai` (LLM clients, embeddings, vector stores, RAG pipelines, agents, tools, prompt templates, observability), `swiftpy/
|
|
599
|
+
- **G-1 (`swiftpy/ai` & Wheel Packaging)**: `swiftpy/ai` (LLM clients, embeddings, vector stores, RAG pipelines, agents, tools, prompt templates, observability), `swiftpy/mail`, `swiftpy/filesystem`, and `swiftpy/validation` are fully implemented and distributed in the main `swiftpy-framework` wheel (dev test utilities remain in `swiftpy/testing`). `swiftpy/__init__.py` uses PEP 562 lazy exports so lightweight CLI/app imports avoid heavy optional subpackages until accessed.
|
|
597
600
|
- **G-16 (`dict` Auto-JSON & Cache Cleanup)**: Route handlers returning plain `dict` or `list` values are automatically serialized to JSON; legacy unbootstrapped `RouteCache` was removed (`swiftpy cache:build` compiles `config.json` and `prompts.json`); `/docs/` and `AGENTS.md` remain gitignored.
|
|
598
601
|
- **D-12 (Repository Hygiene)**: `.coverage` and cache artifacts untracked from git; `docs/`, `AGENTS.md`, and `DEVLOG.md` maintained untracked at repo root.
|
|
599
602
|
- **D-13 (Default `max_body_size`)**: Default 2 MiB request body limit (`413 Payload Too Large`) enforced across all buffered and streaming HTTP requests, configurable per app and per route.
|
|
@@ -604,16 +607,19 @@ Across the hardening and audit remediation phases, architectural decisions (`D-1
|
|
|
604
607
|
|
|
605
608
|
## Project Structure
|
|
606
609
|
|
|
607
|
-
SwiftPY follows a clean, intuitive layout inspired by modern application architectures:
|
|
610
|
+
SwiftPY follows a clean, intuitive layout inspired by modern application architectures (see [`documentations/2026-11-21-application-architecture-and-project-structure.md`](./documentations/2026-11-21-application-architecture-and-project-structure.md)):
|
|
608
611
|
|
|
609
612
|
```text
|
|
610
613
|
├── app/
|
|
611
|
-
│ ├──
|
|
612
|
-
│ ├──
|
|
614
|
+
│ ├── ai/ # AI agents, tools, pipelines, custom providers/vectorstores/observers
|
|
615
|
+
│ ├── events/ # Domain events
|
|
616
|
+
│ ├── http/ # Controllers, resources, middleware, requests, exception handlers
|
|
617
|
+
│ ├── jobs/ # Background queue jobs
|
|
618
|
+
│ ├── listeners/ # Event listeners
|
|
619
|
+
│ ├── mail/ # Mailables
|
|
613
620
|
│ ├── models/ # Active Record ORM models
|
|
614
621
|
│ ├── providers/ # Service providers (auto-discovered on boot)
|
|
615
|
-
│
|
|
616
|
-
│ │ └── database_service_provider.py
|
|
622
|
+
│ ├── repositories/ # Data access repositories
|
|
617
623
|
│ ├── schemas/ # Typed dataclasses & request/response DTOs
|
|
618
624
|
│ └── services/ # Domain business logic
|
|
619
625
|
├── config/ # Environment & framework configuration
|
|
@@ -630,9 +636,9 @@ SwiftPY follows a clean, intuitive layout inspired by modern application archite
|
|
|
630
636
|
│ └── queue.py
|
|
631
637
|
├── database/
|
|
632
638
|
│ └── migrations/ # Timestamped database migrations
|
|
633
|
-
├──
|
|
639
|
+
├── prompts/ # Named & versioned AI prompt templates (summarise.py, classify.py)
|
|
640
|
+
├── views/ # Sandboxed Jinja2 HTML templates (mail/)
|
|
634
641
|
├── swiftpy/ # SwiftPY framework core
|
|
635
|
-
│ ├── admin/ # Auto-introspecting admin site, RBAC & session auth
|
|
636
642
|
│ ├── ai/ # AI client, embeddings, vectorstores, RAG, agents, tools, prompts
|
|
637
643
|
│ ├── auth/ # JWT issuer, API key guards, token blacklist
|
|
638
644
|
│ ├── cache/ # Redis and memory cache drivers
|
|
@@ -25,9 +25,9 @@ SwiftPY brings the joy and productivity of Laravel to the modern asynchronous Py
|
|
|
25
25
|
- **Query Builder, GROUP BY & Dynamic Pagination**: Full length-aware `paginate()` and lightweight `simple_paginate()`, `limit()`/`offset()` (with `take()`/`skip()`), group-aware subquery counting, and aggregate selectors (`select_count`, `select_sum`, etc.) with `having` and `or_having` logical filtering.
|
|
26
26
|
- **Multi-Disk Storage & Streaming Engine**: Flysystem-inspired `Storage` abstraction supporting local and S3 disks, high-throughput streaming uploads/downloads, magic-byte validation, and `storage:link`.
|
|
27
27
|
- **Validation Ergonomics & Input Hardening**: `FormRequest` and `await validate(request, rules)` returning `ValidatedData` (supporting both dict and dot attribute access), `stop_on_first_error`, `ValidationException.single()`, automatic 422 JSON errors, configurable body streaming limits, Content-Length checks, and JSON recursion depth caps.
|
|
28
|
-
- **Authentication, Refresh Rotation & Session Revocation**: `JWTIssuer` with `refresh_token_pair()` rotation and reuse rejection, `auth().logout()` / `auth().logout_all()`, `TokenBlacklist`,
|
|
28
|
+
- **Authentication, Refresh Rotation & Session Revocation**: `JWTIssuer` with `refresh_token_pair()` rotation and reuse rejection, `auth().logout()` / `auth().logout_all()`, `TokenBlacklist`, and `ApiKeyGuard`.
|
|
29
29
|
- **Structured Asynchronous Logging**: Non-blocking `Log` facade and `LogManager` (`single`, `daily`, `stderr`, `stack`) backed by bounded `QueueHandler` / `QueueListener` with clean ASGI startup/shutdown flushing and per-application isolation.
|
|
30
|
-
- **Native AI Subsystem (`swiftpy.ai`)**: Fluent async `AI` client across OpenAI and Anthropic providers with shared `AIHttpPool` pooling and SSE streaming, batched `EmbeddingsClient`, unified `VectorStore` adapters (`PgVectorAdapter` for PostgreSQL `pgvector`, `InMemoryVectorStore`, Qdrant, Pinecone, Chroma, LanceDB), nonce-bounded RAG pipelines (`rag()`, `Retriever`, Cohere/CrossEncoder rerankers), autonomous `@tool` / `Agent` loops
|
|
30
|
+
- **Native AI Subsystem (`swiftpy.ai`)**: Fluent async `AI` client across OpenAI and Anthropic providers with shared `AIHttpPool` pooling and SSE streaming, batched `EmbeddingsClient`, unified `VectorStore` adapters (`PgVectorAdapter` for PostgreSQL `pgvector`, `InMemoryVectorStore`, Qdrant, Pinecone, Chroma, LanceDB), nonce-bounded RAG pipelines (`rag()`, `Retriever`, Cohere/CrossEncoder rerankers), autonomous `@tool` / `Agent` loops (`app/ai/{agents,tools,pipelines,providers,vectorstores,observers}/`), versioned `messages`-list prompt templates (`Prompt.load("summarise.v2")`, `prompts/`), moderation/rate-limit/budget middlewares, observability telemetry, and `AIFake` / `VectorStoreFake` test doubles.
|
|
31
31
|
- **Database Engine & Native Transactions**: Connection pool management, automatic transaction propagation across context variables, nested transaction savepoints, and strict SQL injection prevention with full identifier quoting for reserved words.
|
|
32
32
|
- **Fluent Migration DSL & Schema Builder**: Laravel-inspired `Blueprint` table definitions, safe statement ordering (drops executed before adds), column comments, unsigned checks, composite keys, and distributed PostgreSQL advisory locks.
|
|
33
33
|
- **At-Least-Once Queues & Signed Bus**: Robust background jobs with Redis visibility timeout leases, HMAC-SHA256 envelope signing, dead-letter routing, and a cryptographically protected cross-worker event bus.
|
|
@@ -60,8 +60,10 @@ All core architectural, storage, AI, and security hardening phases have been com
|
|
|
60
60
|
| **Week 26: Pagination & Aggregation Subsystem** | Limit/offset parameterized SQL, length-aware `paginate()`, `simple_paginate()`, `group_by()` & `having()` | ✅ Completed |
|
|
61
61
|
| **Release v0.2.0: DX, Logging, Auth Refresh & Docs** | `ValidatedData` & `validate(request)`, `Request.input()` & `abort()`, `Router(prefix, middleware)`, `Blueprint.enum`/`medium_text`/`long_text`, `swiftpy.logging` (`Log`), `refresh_token_pair()` & `auth().logout()`, 17 user guides in `documentations/` | ✅ Completed |
|
|
62
62
|
| **Release v0.2.1: Auth Context on Token Issue** | `CurrentUser` / `auth()` available when an access token is issued, `user=` / `Model` subjects, opt-in `auth.hydrate_user` & `auth.passive_resolution` | ✅ Completed |
|
|
63
|
+
| **Release v0.2.2: Model `.update()`, `isset()`, `has_file()`, & Auth TTL** | `Model.update()` / `force_update()`, `JWT_ACCESS_TTL=3600`, 405 `"for route"` detail, `isset()` helper, `request.has_file()` (sync & `await`), CORS guide | ✅ Completed |
|
|
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 |
|
|
63
65
|
|
|
64
|
-
*See [`documentations/2026-11-14-installation-quick-start.md`](./documentations/2026-11-14-installation-quick-start.md) for the complete
|
|
66
|
+
*See [`documentations/2026-11-14-installation-quick-start.md`](./documentations/2026-11-14-installation-quick-start.md) and [`documentations/2026-11-21-application-architecture-and-project-structure.md`](./documentations/2026-11-21-application-architecture-and-project-structure.md) for the complete documentation series and [`CHANGELOG.md`](./CHANGELOG.md) for release notes.*
|
|
65
67
|
|
|
66
68
|
---
|
|
67
69
|
|
|
@@ -502,8 +504,9 @@ SwiftPY reads environment variables and YAML/Python configuration files with str
|
|
|
502
504
|
| `DB_CONNECTION` | `database.default` | `"postgresql"` | Default database connection key (`"postgresql"`). |
|
|
503
505
|
| `DB_SSL` | `database.connections.postgresql.ssl` | `"disable"` | PostgreSQL SSL mode (`"disable"`, `"require"`, `"verify-ca"`, `"verify-full"`). |
|
|
504
506
|
| `DB_SSL_CA_FILE` | `database.connections.postgresql.ssl_ca_file` | `""` | Filepath to CA certificate when `DB_SSL` is `"verify-ca"` or `"verify-full"`. |
|
|
505
|
-
| `CORS_ALLOWED_ORIGINS` | `cors.allowed_origins` | `[]` | Comma-separated list of allowed CORS origins (never pair `"*"` with `CORS_ALLOW_CREDENTIALS=true`). |
|
|
507
|
+
| `CORS_ALLOWED_ORIGINS` | `cors.allowed_origins` | `[]` | Comma-separated list of exact allowed CORS origins (never pair `"*"` with `CORS_ALLOW_CREDENTIALS=true`). See the [CORS Guide](./documentations/2026-11-21-cors.md). |
|
|
506
508
|
| `CORS_ALLOW_CREDENTIALS` | `cors.allow_credentials` | `False` | Whether cross-origin requests may include credentials/cookies. |
|
|
509
|
+
| `CORS_MAX_AGE` | `cors.max_age` | `600` | Preflight `OPTIONS` cache duration (`Access-Control-Max-Age`) in seconds. |
|
|
507
510
|
| `AI_ENABLED` | `ai.enabled` | `True` | Master toggle for `swiftpy.ai` requests (raises `AIModuleDisabledError` when disabled). |
|
|
508
511
|
| `AI_DEFAULT_PROVIDER` | `ai.default` | `"openai"` | Default LLM provider (`"openai"` or `"anthropic"`) when not inferred from model name. |
|
|
509
512
|
| `OPENAI_API_KEY` | `ai.providers.openai.api_key` | `""` | OpenAI API key for chat, streaming, and embeddings. |
|
|
@@ -563,7 +566,7 @@ Across the hardening and audit remediation phases, architectural decisions (`D-1
|
|
|
563
566
|
- **D-8 (Config Environment Variable Coercion)**: Coercion preserves strings unless the default type is known (e.g. `"0012"` is not silently cast to integer `12`).
|
|
564
567
|
- **D-9 (`FormRequest` Fail-Closed Validation)**: If `rules()` raises `TypeError` or any exception, the request fails closed with `ConfigurationError` (HTTP 500) rather than falling back to unvalidated `{}`.
|
|
565
568
|
- **D-10 (`update()`/`delete()` Without `WHERE`)**: Mass write/delete queries without a `WHERE` clause raise `QueryError` unless `.allow_all()` is explicitly chained.
|
|
566
|
-
- **G-1 (`swiftpy/ai` & Wheel Packaging)**: `swiftpy/ai` (LLM clients, embeddings, vector stores, RAG pipelines, agents, tools, prompt templates, observability), `swiftpy/
|
|
569
|
+
- **G-1 (`swiftpy/ai` & Wheel Packaging)**: `swiftpy/ai` (LLM clients, embeddings, vector stores, RAG pipelines, agents, tools, prompt templates, observability), `swiftpy/mail`, `swiftpy/filesystem`, and `swiftpy/validation` are fully implemented and distributed in the main `swiftpy-framework` wheel (dev test utilities remain in `swiftpy/testing`). `swiftpy/__init__.py` uses PEP 562 lazy exports so lightweight CLI/app imports avoid heavy optional subpackages until accessed.
|
|
567
570
|
- **G-16 (`dict` Auto-JSON & Cache Cleanup)**: Route handlers returning plain `dict` or `list` values are automatically serialized to JSON; legacy unbootstrapped `RouteCache` was removed (`swiftpy cache:build` compiles `config.json` and `prompts.json`); `/docs/` and `AGENTS.md` remain gitignored.
|
|
568
571
|
- **D-12 (Repository Hygiene)**: `.coverage` and cache artifacts untracked from git; `docs/`, `AGENTS.md`, and `DEVLOG.md` maintained untracked at repo root.
|
|
569
572
|
- **D-13 (Default `max_body_size`)**: Default 2 MiB request body limit (`413 Payload Too Large`) enforced across all buffered and streaming HTTP requests, configurable per app and per route.
|
|
@@ -574,16 +577,19 @@ Across the hardening and audit remediation phases, architectural decisions (`D-1
|
|
|
574
577
|
|
|
575
578
|
## Project Structure
|
|
576
579
|
|
|
577
|
-
SwiftPY follows a clean, intuitive layout inspired by modern application architectures:
|
|
580
|
+
SwiftPY follows a clean, intuitive layout inspired by modern application architectures (see [`documentations/2026-11-21-application-architecture-and-project-structure.md`](./documentations/2026-11-21-application-architecture-and-project-structure.md)):
|
|
578
581
|
|
|
579
582
|
```text
|
|
580
583
|
├── app/
|
|
581
|
-
│ ├──
|
|
582
|
-
│ ├──
|
|
584
|
+
│ ├── ai/ # AI agents, tools, pipelines, custom providers/vectorstores/observers
|
|
585
|
+
│ ├── events/ # Domain events
|
|
586
|
+
│ ├── http/ # Controllers, resources, middleware, requests, exception handlers
|
|
587
|
+
│ ├── jobs/ # Background queue jobs
|
|
588
|
+
│ ├── listeners/ # Event listeners
|
|
589
|
+
│ ├── mail/ # Mailables
|
|
583
590
|
│ ├── models/ # Active Record ORM models
|
|
584
591
|
│ ├── providers/ # Service providers (auto-discovered on boot)
|
|
585
|
-
│
|
|
586
|
-
│ │ └── database_service_provider.py
|
|
592
|
+
│ ├── repositories/ # Data access repositories
|
|
587
593
|
│ ├── schemas/ # Typed dataclasses & request/response DTOs
|
|
588
594
|
│ └── services/ # Domain business logic
|
|
589
595
|
├── config/ # Environment & framework configuration
|
|
@@ -600,9 +606,9 @@ SwiftPY follows a clean, intuitive layout inspired by modern application archite
|
|
|
600
606
|
│ └── queue.py
|
|
601
607
|
├── database/
|
|
602
608
|
│ └── migrations/ # Timestamped database migrations
|
|
603
|
-
├──
|
|
609
|
+
├── prompts/ # Named & versioned AI prompt templates (summarise.py, classify.py)
|
|
610
|
+
├── views/ # Sandboxed Jinja2 HTML templates (mail/)
|
|
604
611
|
├── swiftpy/ # SwiftPY framework core
|
|
605
|
-
│ ├── admin/ # Auto-introspecting admin site, RBAC & session auth
|
|
606
612
|
│ ├── ai/ # AI client, embeddings, vectorstores, RAG, agents, tools, prompts
|
|
607
613
|
│ ├── auth/ # JWT issuer, API key guards, token blacklist
|
|
608
614
|
│ ├── cache/ # Redis and memory cache drivers
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
from app.ai.tools.system_status_tool import SystemStatusTool
|
|
6
|
+
from swiftpy.ai.agents import AgentMemory, BaseAgent
|
|
7
|
+
|
|
8
|
+
if TYPE_CHECKING:
|
|
9
|
+
from collections.abc import Sequence
|
|
10
|
+
|
|
11
|
+
from swiftpy.ai.agents import BaseMemoryBackend
|
|
12
|
+
from swiftpy.ai.client import AIClient
|
|
13
|
+
from swiftpy.ai.tools import BaseTool
|
|
14
|
+
from swiftpy.core.config import Config
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class AssistantAgent(BaseAgent):
|
|
18
|
+
"""Default conversational assistant agent wired with starter tools."""
|
|
19
|
+
|
|
20
|
+
def __init__(
|
|
21
|
+
self,
|
|
22
|
+
*,
|
|
23
|
+
model: str | None = None,
|
|
24
|
+
system_prompt: str = (
|
|
25
|
+
"You are a helpful, concise SwiftPY application assistant."
|
|
26
|
+
),
|
|
27
|
+
tools: Sequence[BaseTool | type[BaseTool]] | None = None,
|
|
28
|
+
memory: AgentMemory | BaseMemoryBackend | None = None,
|
|
29
|
+
client: AIClient | None = None,
|
|
30
|
+
config: Config | None = None,
|
|
31
|
+
) -> None:
|
|
32
|
+
default_tools: list[BaseTool | type[BaseTool]] = (
|
|
33
|
+
list(tools) if tools is not None else [SystemStatusTool()]
|
|
34
|
+
)
|
|
35
|
+
super().__init__(
|
|
36
|
+
name="AssistantAgent",
|
|
37
|
+
model=model,
|
|
38
|
+
system_prompt=system_prompt,
|
|
39
|
+
tools=default_tools,
|
|
40
|
+
memory=memory if memory is not None else AgentMemory(),
|
|
41
|
+
client=client,
|
|
42
|
+
config=config,
|
|
43
|
+
)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from datetime import UTC, datetime
|
|
4
|
+
from typing import Any
|
|
5
|
+
|
|
6
|
+
from swiftpy.ai.tools import BaseTool
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class SystemStatusTool(BaseTool):
|
|
10
|
+
"""Function-calling tool reporting basic application runtime status."""
|
|
11
|
+
|
|
12
|
+
@property
|
|
13
|
+
def name(self) -> str:
|
|
14
|
+
return "system_status"
|
|
15
|
+
|
|
16
|
+
@property
|
|
17
|
+
def description(self) -> str:
|
|
18
|
+
return "Return the current UTC timestamp and application health status."
|
|
19
|
+
|
|
20
|
+
@property
|
|
21
|
+
def parameters(self) -> dict[str, Any]:
|
|
22
|
+
return {
|
|
23
|
+
"type": "object",
|
|
24
|
+
"properties": {},
|
|
25
|
+
"required": [],
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
async def handle(self, *args: Any, **kwargs: Any) -> Any:
|
|
29
|
+
"""Return structured UTC timestamp and ok status."""
|
|
30
|
+
return {
|
|
31
|
+
"status": "ok",
|
|
32
|
+
"utc_time": datetime.now(tz=UTC).isoformat(),
|
|
33
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from app.http.resources.user_resource import UserResource
|
|
4
|
+
from app.services.user_service import UserService
|
|
5
|
+
from swiftpy.http.request import Request
|
|
6
|
+
from swiftpy.http.response import Response, json_response
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class UserController:
|
|
10
|
+
"""
|
|
11
|
+
HTTP controller for user API endpoints.
|
|
12
|
+
|
|
13
|
+
Resolves constructor dependencies via the SwiftPY DI container and delegates
|
|
14
|
+
domain logic to UserService before formatting responses with UserResource.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
def __init__(self, user_service: UserService) -> None:
|
|
18
|
+
self.user_service = user_service
|
|
19
|
+
|
|
20
|
+
async def index(self, request: Request) -> Response:
|
|
21
|
+
"""List users serialized through UserResource."""
|
|
22
|
+
users = await self.user_service.list_users()
|
|
23
|
+
return json_response(UserResource.collection(users))
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any
|
|
5
|
+
|
|
6
|
+
from swiftpy.core.context import Context
|
|
7
|
+
from swiftpy.core.exceptions import HttpException
|
|
8
|
+
from swiftpy.http.middleware import Handler, Middleware
|
|
9
|
+
from swiftpy.http.request import Request
|
|
10
|
+
from swiftpy.http.response import Response
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def _resolve_authenticated_user(request: Request) -> Any:
|
|
14
|
+
"""Resolve the active authenticated user across Context and request.state, respecting logout state."""
|
|
15
|
+
if Context.get("__swiftpy_logged_out__") or request.state.get(
|
|
16
|
+
"__swiftpy_logged_out__"
|
|
17
|
+
):
|
|
18
|
+
return None
|
|
19
|
+
user = Context.get("auth.user")
|
|
20
|
+
if user is None:
|
|
21
|
+
user = Context.get("__swiftpy_current_user__")
|
|
22
|
+
if user is None:
|
|
23
|
+
user = Context.get("__swiftpy_current_user_model__")
|
|
24
|
+
if user is None:
|
|
25
|
+
user = request.state.get("user")
|
|
26
|
+
return user
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def _is_admin_user(user: Any) -> bool:
|
|
30
|
+
"""Return True only when user carries an explicit boolean `is_admin is True` in a mapping or model."""
|
|
31
|
+
if isinstance(user, Mapping):
|
|
32
|
+
raw_flag = user.get("is_admin")
|
|
33
|
+
if raw_flag is not None:
|
|
34
|
+
return raw_flag is True
|
|
35
|
+
if getattr(user, "is_admin", None) is True:
|
|
36
|
+
return True
|
|
37
|
+
model = getattr(user, "model", None) or Context.get(
|
|
38
|
+
"__swiftpy_current_user_model__"
|
|
39
|
+
)
|
|
40
|
+
return getattr(model, "is_admin", None) is True
|
|
41
|
+
return getattr(user, "is_admin", None) is True
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class AdminMiddleware(Middleware):
|
|
45
|
+
"""
|
|
46
|
+
Authorization ASGI middleware for administrative access control.
|
|
47
|
+
|
|
48
|
+
Retrieves the authenticated user from task-isolated `Context` or `request.state`.
|
|
49
|
+
Verifies that the user exists and has administrative privileges (`user.is_admin` is True).
|
|
50
|
+
Raises HTTP 401 Unauthorized if unauthenticated, or HTTP 403 Forbidden if not an administrator.
|
|
51
|
+
"""
|
|
52
|
+
|
|
53
|
+
async def handle(self, request: Request, next_handler: Handler) -> Response:
|
|
54
|
+
user = _resolve_authenticated_user(request)
|
|
55
|
+
if user is None:
|
|
56
|
+
raise HttpException(
|
|
57
|
+
status_code=401,
|
|
58
|
+
message="Unauthenticated: Please authenticate first",
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
if not _is_admin_user(user):
|
|
62
|
+
raise HttpException(
|
|
63
|
+
status_code=403,
|
|
64
|
+
message="Forbidden: Administrator access required",
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
return await next_handler(request)
|
|
@@ -32,8 +32,12 @@ class AuthMiddleware(Middleware):
|
|
|
32
32
|
message="Unauthenticated: Missing or invalid credentials",
|
|
33
33
|
)
|
|
34
34
|
|
|
35
|
+
Context.set("__swiftpy_logged_out__", False)
|
|
35
36
|
Context.set("auth.user", user)
|
|
36
37
|
Context.set("__swiftpy_current_user__", user)
|
|
38
|
+
if hasattr(user, "__table__"):
|
|
39
|
+
Context.set("__swiftpy_current_user_model__", user)
|
|
40
|
+
request.state.pop("__swiftpy_logged_out__", None)
|
|
37
41
|
request.state["user"] = user
|
|
38
42
|
|
|
39
43
|
return await next_handler(request)
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING, Any
|
|
4
|
+
|
|
5
|
+
if TYPE_CHECKING:
|
|
6
|
+
from collections.abc import Iterable
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class UserResource:
|
|
10
|
+
"""HTTP API resource transformer for User entities and schemas."""
|
|
11
|
+
|
|
12
|
+
def __init__(self, resource: Any) -> None:
|
|
13
|
+
self.resource = resource
|
|
14
|
+
|
|
15
|
+
def to_dict(self) -> dict[str, Any]:
|
|
16
|
+
"""Transform a User model or UserResponseSchema into an HTTP-safe dictionary."""
|
|
17
|
+
if isinstance(self.resource, dict):
|
|
18
|
+
return {
|
|
19
|
+
"id": self.resource.get("id"),
|
|
20
|
+
"name": self.resource.get("name"),
|
|
21
|
+
"email": self.resource.get("email"),
|
|
22
|
+
}
|
|
23
|
+
return {
|
|
24
|
+
"id": getattr(self.resource, "id", None),
|
|
25
|
+
"name": getattr(self.resource, "name", None),
|
|
26
|
+
"email": getattr(self.resource, "email", None),
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@classmethod
|
|
30
|
+
def collection(cls, items: Iterable[Any]) -> list[dict[str, Any]]:
|
|
31
|
+
"""Transform a collection of user items into HTTP-safe dictionaries."""
|
|
32
|
+
return [cls(item).to_dict() for item in items]
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
3
|
from dataclasses import asdict, dataclass
|
|
4
|
-
from typing import Any
|
|
4
|
+
from typing import TYPE_CHECKING, Any
|
|
5
|
+
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
from app.models.user import User
|
|
5
8
|
|
|
6
9
|
|
|
7
10
|
@dataclass(slots=True)
|
|
@@ -21,6 +24,12 @@ class UserResponseSchema:
|
|
|
21
24
|
name: str
|
|
22
25
|
email: str
|
|
23
26
|
|
|
27
|
+
@classmethod
|
|
28
|
+
def from_model(cls, user: User) -> UserResponseSchema:
|
|
29
|
+
return cls(id=user.id, name=user.name, email=user.email)
|
|
30
|
+
|
|
24
31
|
def to_dict(self) -> dict[str, Any]:
|
|
25
32
|
return asdict(self)
|
|
26
33
|
|
|
34
|
+
|
|
35
|
+
UserSchema = UserResponseSchema
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from app.models.user import User
|
|
4
|
+
from app.repositories.user_repository import UserRepository
|
|
5
|
+
from app.schemas.user_schema import UserResponseSchema
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class UserService:
|
|
9
|
+
"""
|
|
10
|
+
Domain business logic layer for user entity management.
|
|
11
|
+
Coordinates between repositories, schemas, transactions, events, and background notifications.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
def __init__(self, repository: UserRepository | None = None) -> None:
|
|
15
|
+
self.repository = repository or UserRepository()
|
|
16
|
+
|
|
17
|
+
async def list_users(self) -> list[UserResponseSchema]:
|
|
18
|
+
"""Return starter user response DTOs."""
|
|
19
|
+
return [
|
|
20
|
+
UserResponseSchema(
|
|
21
|
+
id=1,
|
|
22
|
+
name="Alice Doe",
|
|
23
|
+
email="alice@example.com",
|
|
24
|
+
)
|
|
25
|
+
]
|
|
26
|
+
|
|
27
|
+
async def create_user(
|
|
28
|
+
self, name: str, email: str, password_hash: str
|
|
29
|
+
) -> User:
|
|
30
|
+
"""Create a new user account with hashed credentials."""
|
|
31
|
+
user = await self.repository.create(
|
|
32
|
+
name=name,
|
|
33
|
+
email=email,
|
|
34
|
+
password=password_hash,
|
|
35
|
+
is_admin=False,
|
|
36
|
+
)
|
|
37
|
+
return user
|
|
38
|
+
|
|
39
|
+
async def create_user_schema(
|
|
40
|
+
self, name: str, email: str, password_hash: str
|
|
41
|
+
) -> UserResponseSchema:
|
|
42
|
+
"""Create a new user account and return an explicit response schema."""
|
|
43
|
+
user = await self.create_user(name, email, password_hash)
|
|
44
|
+
return UserResponseSchema.from_model(user)
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
-
from swiftpy import env
|
|
3
|
+
from swiftpy import env, env_bool
|
|
4
4
|
|
|
5
5
|
CONFIG: dict[str, object] = {
|
|
6
6
|
"enabled": env("AI_ENABLED", "true").lower() in ("true", "1", "yes"),
|
|
7
7
|
"default": env("AI_DEFAULT_PROVIDER", "openai"),
|
|
8
|
+
"prompts": {
|
|
9
|
+
"path": env("AI_PROMPTS_PATH", "prompts"),
|
|
10
|
+
"cache": env_bool("AI_PROMPTS_CACHE", False),
|
|
11
|
+
},
|
|
8
12
|
"providers": {
|
|
9
13
|
"openai": {
|
|
10
14
|
"api_key": env("OPENAI_API_KEY", ""),
|
|
@@ -15,7 +15,7 @@ CONFIG: dict[str, object] = {
|
|
|
15
15
|
"driver": "jwt",
|
|
16
16
|
"algorithm": env("JWT_ALGORITHM", "HS256"),
|
|
17
17
|
"secret": env("JWT_SECRET", None),
|
|
18
|
-
"access_token_ttl": int(env("JWT_ACCESS_TTL", "
|
|
18
|
+
"access_token_ttl": int(env("JWT_ACCESS_TTL", "3600")),
|
|
19
19
|
"refresh_token_ttl": int(env("JWT_REFRESH_TTL", "604800")),
|
|
20
20
|
"issuer": env("JWT_ISSUER", None),
|
|
21
21
|
"audience": env("JWT_AUDIENCE", None),
|