fast-clean 1.2.1__py3-none-any.whl → 1.2.3__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.
@@ -4,7 +4,7 @@
4
4
 
5
5
  from fastapi import APIRouter
6
6
 
7
- from fast_clean.schemas import StatusOkResponseSchema
7
+ from .schemas import StatusOkResponseSchema
8
8
 
9
9
  router = APIRouter(prefix='/health', tags=['Healthcheck'], include_in_schema=False)
10
10
 
@@ -1,8 +1,5 @@
1
- """
2
- Модуль, содержащий схемы ответов статусов.
3
- """
4
1
 
5
- from .request_response import ResponseSchema
2
+ from fast_clean.schemas.request_response import ResponseSchema
6
3
 
7
4
 
8
5
  class StatusOkResponseSchema(ResponseSchema):
@@ -13,9 +13,6 @@ def use_sentry(
13
13
  level: int = logging.DEBUG,
14
14
  event_level: int = logging.ERROR,
15
15
  ) -> None:
16
- if not dsn:
17
- return
18
-
19
16
  sentry_logging = LoggingIntegration(
20
17
  level=level,
21
18
  event_level=event_level,
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,4 +22,3 @@ from .request_response import RemoteRequestSchema as RemoteRequestSchema
22
22
  from .request_response import RemoteResponseSchema as RemoteResponseSchema
23
23
  from .request_response import RequestSchema as RequestSchema
24
24
  from .request_response import ResponseSchema as ResponseSchema
25
- from .status_response import StatusOkResponseSchema as StatusOkResponseSchema
@@ -42,4 +42,5 @@ class CryptographyServiceFactory:
42
42
  match algorithm:
43
43
  case CryptographicAlgorithmEnum.AES_GCM:
44
44
  return AesGcmCryptographyService(self.secret_key)
45
- raise NotImplementedError(algorithm)
45
+ case _:
46
+ raise NotImplementedError(algorithm)
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',
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fast-clean
3
- Version: 1.2.1
3
+ Version: 1.2.3
4
4
  Summary: FastAPI Clean Architecture implementation
5
5
  Author-email: Luferov Victor <luferovvs@yandex.ru>, Orlov Artem <squakrazv@yandex.ru>, Kashapov Rustam <hardtechnik91@gmail.com>
6
6
  Requires-Python: >=3.13
@@ -21,7 +21,7 @@ Requires-Dist: psycopg[binary]>=3.2.4
21
21
  Requires-Dist: pydantic>=2.10.6
22
22
  Requires-Dist: pydantic-settings>=2.8.0
23
23
  Requires-Dist: pyyaml>=6.0.2
24
- Requires-Dist: sentry-sdk>=2.32.0
24
+ Requires-Dist: sentry-sdk[fastapi]>=2.32.0
25
25
  Requires-Dist: snakecase>=1.0.1
26
26
  Requires-Dist: sqlalchemy-utils>=0.41.2
27
27
  Requires-Dist: sqlalchemy[asyncio]>=2.0.38
@@ -33,11 +33,10 @@ Requires-Dist: typer>=0.15.1
33
33
  FastAPI clean architecture implementation
34
34
 
35
35
 
36
-
37
36
  ## Contribution
38
37
 
39
38
  ```
40
39
  git clone git@github.com:Luferov/fast-clean.git
41
- uv sync --all-extras --dev
40
+ uv sync
42
41
  uv run pre-commit install
43
42
  ```
@@ -6,17 +6,18 @@ fast_clean/depends.py,sha256=nSsn1-c7A0VmtudCI70z5wi0b7TmSUqvHjyZpTE3_wk,7750
6
6
  fast_clean/enums.py,sha256=lPhC_2_r6YFby7Mq-9u_JSiuyZ0e57F2VxBfUwnBZ18,826
7
7
  fast_clean/exceptions.py,sha256=Sp-k-a5z1Gedu0slzj1-rORnr4GP1FXDHKCKRaJq-7o,9485
8
8
  fast_clean/loggers.py,sha256=hVvZSDMMxYnK-p_yyjd4R7SyHpmxQF3eKQEeMu9Q-jo,705
9
- fast_clean/middleware.py,sha256=7iaA39ug85oOtSdQP8T3u8cX4KAAvDlfAlUg43_riR0,461
9
+ fast_clean/middleware.py,sha256=G75qKJ7WxSySTIFUFa7ZwlvnZ16lm4giS0Hx4Ogu1SM,584
10
10
  fast_clean/models.py,sha256=qnNUSwLf0gOW8C98PMIs6vTw7UP3-Nk-k6YoFvHstVM,880
11
11
  fast_clean/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
12
  fast_clean/redis.py,sha256=H_SLnDhY_ute8pYHdhIypUGlCwMcVfFA4S2j8vLUph0,578
13
- fast_clean/settings.py,sha256=o460LZjXW0_WYe0QB9g0fTgch8dhkUq-6flAnf4LKM4,4715
13
+ fast_clean/settings.py,sha256=NPWBmCB8eL6EiHPtlryW5rQyrE1EqeytnBLrcz5pQLI,4792
14
14
  fast_clean/contrib/__init__.py,sha256=AcFNyhc0QGsOnYvzQGanDN3QIAsKpn4d8RIj73F-sGc,63
15
15
  fast_clean/contrib/healthcheck/__init__.py,sha256=p8hUCLdv2qGngTwAeTGIV4h_ZGDm9ZNWMrA5_k3Yi0E,106
16
- fast_clean/contrib/healthcheck/router.py,sha256=6kyFuNqR5m3pB_fzerrZ7m7yvoqL_BiwkUMeLrxJVnE,408
16
+ fast_clean/contrib/healthcheck/router.py,sha256=7uq0D6ldhxB3Jsa9Ia1zpiRAyC3hQgUv8jF4W8SPi88,398
17
+ fast_clean/contrib/healthcheck/schemas.py,sha256=nMdUezXvwyJdlHiJbPiLUIa6bJ_JeF1Tr3S-TllMENU,200
17
18
  fast_clean/contrib/logging/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
18
19
  fast_clean/contrib/logging/enums.py,sha256=a-Tz3k4j0aAbUXDvTV6sl2pKKEGuKG94qc3plXixezU,154
19
- fast_clean/contrib/logging/sentry.py,sha256=hacxHuHqYreosG_Nt0SPRlKQo0iE1hyY8DH4nbMhb5E,625
20
+ fast_clean/contrib/logging/sentry.py,sha256=gey6ynlkZtrU2qzwdKvpkYy0JO0AEyHDpiiRcIzfiDg,593
20
21
  fast_clean/contrib/monitoring/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
21
22
  fast_clean/contrib/monitoring/middleware.py,sha256=F6EDY_hNBmFlji-cCJwzsm5Wl1S0CsO373rjxfqjlGA,191
22
23
  fast_clean/contrib/monitoring/router.py,sha256=94gffX34VE_Yb6TLaQOP4YyXDQsClzOn4APb45V_HyA,153
@@ -41,17 +42,16 @@ fast_clean/repositories/storage/local.py,sha256=s5REPU7xczvzin13sKyZtFdiocrgAMk8
41
42
  fast_clean/repositories/storage/reader.py,sha256=yAxj51ITWJf0u-KGC3DJ0iTB3pDI1p9ixi_h0ZcWoZ4,3299
42
43
  fast_clean/repositories/storage/s3.py,sha256=z3YHGk89Ac87qAy3FApCXDpEx_CRdLfLzXBIng-BfUQ,4318
43
44
  fast_clean/repositories/storage/schemas.py,sha256=etlogfK_1uUZPQjHWQN6LWy6-8YY2Sago3Zbf6p0KcQ,623
44
- fast_clean/schemas/__init__.py,sha256=OrIP8vV_c5tO5fET3slhCRNfiXjgmZnR5hJlVIZYh24,1361
45
+ fast_clean/schemas/__init__.py,sha256=VgJKIY20qoZZOV55zLGnH2FYWoHpPfJS31HJAj_nGIo,1283
45
46
  fast_clean/schemas/exceptions.py,sha256=E7G9jv4G82Ede7OQ3619vPGwEywc7tKmXW6EolOGRFQ,723
46
47
  fast_clean/schemas/pagination.py,sha256=GEQ-Tbhx6xkMMXhDNWrTEhPv8IdnAOJxH2P1tscmn60,1384
47
48
  fast_clean/schemas/repository.py,sha256=ASxMJb23H3zwavr7P0_ZpCWZX7FjqAuC75qAIYqejvQ,889
48
49
  fast_clean/schemas/request_response.py,sha256=i4HTpjelWl4DxJ1sQaeanTWB_PThlhVJRhtMMGqRAiQ,693
49
- fast_clean/schemas/status_response.py,sha256=mASZRCNtKJnDbmhr8_pBytkE_3NguyTIFqO4aw-nNEQ,269
50
50
  fast_clean/services/__init__.py,sha256=Lvdb5ZibRGwoMn_WENrk9wERUViTsPrU8E_71XtPFJc,617
51
51
  fast_clean/services/lock.py,sha256=SLF9_wRx3rgHMw829XwflJgAlGJyXj57o4iVPvGwe78,1653
52
52
  fast_clean/services/seed.py,sha256=M0yA2I5z-jLM2UcW_x7287mwIFW5Vt0fPFaplakGFc0,2836
53
53
  fast_clean/services/transaction.py,sha256=djXR6e6ukgpBXDbVmU095MvRJAIqdOPMgAcege52Qxg,762
54
- fast_clean/services/cryptography/__init__.py,sha256=IDokTE-dJriQxdsov3yoVw1OrsgyxJLeBFJwi_Mb7iE,1531
54
+ fast_clean/services/cryptography/__init__.py,sha256=4bey1z11YvSv1V6PgBNYI6brgE1zMvDYh-1ZYhqDFYU,1560
55
55
  fast_clean/services/cryptography/aes.py,sha256=_k0WtnKDaEKdUBegfwmqerE75ER44307CEQ-I2W0abo,4616
56
56
  fast_clean/services/cryptography/enums.py,sha256=cLibSGv6LNVTUI2rm3_DtDwU68GYIAf4kY3GGbtnw1A,494
57
57
  fast_clean/utils/__init__.py,sha256=Q3OiJNdWl51Vd_wSP7iuZQIq4_SjM1mYkqIWPaw94WU,709
@@ -63,7 +63,7 @@ fast_clean/utils/thread.py,sha256=ChEWBLupnSEMq4Wro_aiW0QvCLUKedKc0TQFMu7Zg4g,56
63
63
  fast_clean/utils/time.py,sha256=nvavbtG4zR_gkrGSbsqKAsBdePxO3LuTeoISbFZIgn0,307
64
64
  fast_clean/utils/type_converters.py,sha256=bMEJeoQB9Q6Qok1-ppn4Ii8ZpIkZwJbD2IzCydSStHw,523
65
65
  fast_clean/utils/typer.py,sha256=1O7BsNGn68bBzNbj0-Ycfhv35WpLzwvYTKn510YNXQQ,663
66
- fast_clean-1.2.1.dist-info/METADATA,sha256=z8RombKVfs2CZhOmNY_rtSFaCsto_EKR3JmPCbynMEk,1245
67
- fast_clean-1.2.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
68
- fast_clean-1.2.1.dist-info/top_level.txt,sha256=QfsGs-QLmPCZWWPFOukD0zhMnokH68FoO2KeObl6ZIA,11
69
- fast_clean-1.2.1.dist-info/RECORD,,
66
+ fast_clean-1.2.3.dist-info/METADATA,sha256=Bs27RK9QJuXlSn7d8OegQdOM_jIHmBWrAVeSSnY0Le0,1234
67
+ fast_clean-1.2.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
68
+ fast_clean-1.2.3.dist-info/top_level.txt,sha256=QfsGs-QLmPCZWWPFOukD0zhMnokH68FoO2KeObl6ZIA,11
69
+ fast_clean-1.2.3.dist-info/RECORD,,