fast-clean 1.2.0__py3-none-any.whl → 1.2.2__py3-none-any.whl
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.
- fast_clean/contrib/healthcheck/router.py +1 -1
- fast_clean/{schemas/status_response.py → contrib/healthcheck/schemas.py} +1 -4
- fast_clean/middleware.py +3 -0
- fast_clean/repositories/crud/__init__.py +3 -2
- fast_clean/services/cryptography/__init__.py +2 -1
- fast_clean/settings.py +4 -4
- fast_clean-1.2.2.dist-info/METADATA +1426 -0
- {fast_clean-1.2.0.dist-info → fast_clean-1.2.2.dist-info}/RECORD +10 -10
- fast_clean-1.2.0.dist-info/METADATA +0 -43
- {fast_clean-1.2.0.dist-info → fast_clean-1.2.2.dist-info}/WHEEL +0 -0
- {fast_clean-1.2.0.dist-info → fast_clean-1.2.2.dist-info}/top_level.txt +0 -0
fast_clean/middleware.py
CHANGED
@@ -5,6 +5,8 @@
|
|
5
5
|
from fastapi import FastAPI
|
6
6
|
from starlette.middleware.cors import CORSMiddleware
|
7
7
|
|
8
|
+
from .contrib.monitoring.middleware import use_middleware as use_monitoring_middleware
|
9
|
+
|
8
10
|
|
9
11
|
def use_middleware(app: FastAPI, cors_origins: list[str]) -> FastAPI:
|
10
12
|
"""
|
@@ -17,4 +19,5 @@ def use_middleware(app: FastAPI, cors_origins: list[str]) -> FastAPI:
|
|
17
19
|
allow_methods=['*'],
|
18
20
|
allow_headers=['*'],
|
19
21
|
)
|
22
|
+
use_monitoring_middleware(app)
|
20
23
|
return app
|
@@ -22,6 +22,7 @@ from .type_vars import (
|
|
22
22
|
CreateSchemaType,
|
23
23
|
IdTypeContravariant,
|
24
24
|
ReadSchemaBaseType,
|
25
|
+
ReadSchemaIntType,
|
25
26
|
UpdateSchemaBaseType,
|
26
27
|
UpdateSchemaIntType,
|
27
28
|
UpdateSchemaType,
|
@@ -120,13 +121,13 @@ class CrudRepositoryBaseProtocol(
|
|
120
121
|
|
121
122
|
class CrudRepositoryIntProtocol(
|
122
123
|
CrudRepositoryBaseProtocol[
|
123
|
-
|
124
|
+
ReadSchemaIntType,
|
124
125
|
CreateSchemaIntType,
|
125
126
|
UpdateSchemaIntType,
|
126
127
|
int,
|
127
128
|
],
|
128
129
|
Protocol[
|
129
|
-
|
130
|
+
ReadSchemaIntType,
|
130
131
|
CreateSchemaIntType,
|
131
132
|
UpdateSchemaIntType,
|
132
133
|
],
|
fast_clean/settings.py
CHANGED
@@ -6,9 +6,9 @@ from __future__ import annotations
|
|
6
6
|
|
7
7
|
import os
|
8
8
|
from pathlib import Path
|
9
|
-
from typing import ClassVar, Literal, Self
|
9
|
+
from typing import Annotated, ClassVar, Literal, Self
|
10
10
|
|
11
|
-
from pydantic import BaseModel, ConfigDict, RedisDsn, model_validator
|
11
|
+
from pydantic import BaseModel, ConfigDict, Field, RedisDsn, model_validator
|
12
12
|
from pydantic_settings import BaseSettings as PydanticBaseSettings
|
13
13
|
from pydantic_settings import SettingsConfigDict
|
14
14
|
from typing_extensions import Unpack
|
@@ -173,12 +173,12 @@ class CoreSettingsSchema(BaseSettingsSchema):
|
|
173
173
|
"""
|
174
174
|
|
175
175
|
debug: bool
|
176
|
-
title: str
|
177
176
|
base_url: str
|
178
177
|
base_dir: Path = Path(os.getcwd())
|
179
178
|
secret_key: str
|
180
|
-
cors_origins: list[str]
|
179
|
+
cors_origins: Annotated[list[str], Field(default_factory=list)]
|
181
180
|
redis_dsn: RedisDsn | None = None
|
181
|
+
sentry_dsn: str | None = None
|
182
182
|
|
183
183
|
model_config = SettingsConfigDict(
|
184
184
|
env_file='.env',
|