rb-commons 0.5.13__py3-none-any.whl → 0.5.14__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.
@@ -1,5 +1,6 @@
1
1
  from typing import Optional, Any
2
2
 
3
+ from pydantic import field_validator
3
4
  from pydantic_settings import BaseSettings
4
5
 
5
6
  class CommonConfigs(BaseSettings):
@@ -24,6 +25,18 @@ class CommonConfigs(BaseSettings):
24
25
  DIGITALOCEAN_STORAGE_BUCKET_NAME: Optional[str] = None
25
26
  DIGITALOCEAN_S3_ENDPOINT_URL: Optional[str] = None
26
27
 
28
+ @field_validator("POSTGRES_PORT", mode="before")
29
+ @classmethod
30
+ def convert_port(cls, value):
31
+ print("DEBUG: POSTGRES_PORT from env =", value)
32
+
33
+ if value is None:
34
+ return None
35
+ try:
36
+ print(value)
37
+ return int(value)
38
+ except ValueError:
39
+ raise ValueError(f"POSTGRES_PORT must be an integer, got: {value}")
27
40
 
28
41
  @property
29
42
  def database_url(self) -> Optional[str]:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rb-commons
3
- Version: 0.5.13
3
+ Version: 0.5.14
4
4
  Summary: Commons of project and simplified orm based on sqlalchemy.
5
5
  Home-page: https://github.com/RoboSell-organization/rb-commons
6
6
  Author: Abdulvoris
@@ -2,7 +2,7 @@ rb_commons/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  rb_commons/broker/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  rb_commons/broker/consumer.py,sha256=84yLq8kJIGNYAH9_ySSTDpOMNL54NSs3cA8lNG8CTGY,1264
4
4
  rb_commons/configs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
- rb_commons/configs/config.py,sha256=UB-gGq26nkt_L2XSM0RpV58C64T8oaZofdo7-PbwPWc,1535
5
+ rb_commons/configs/config.py,sha256=E501qNU9ATQEOGKlNnZejehU4Yj5pAwAz2aTrvOZ75k,1971
6
6
  rb_commons/configs/injections.py,sha256=6B1EOgIGnkWv3UrFaV9PRgG0-CJAbLu1UZ3kq-SjPVU,273
7
7
  rb_commons/configs/rabbitmq.py,sha256=vUqa_PcZkPp1lX0B6HLSAXVMUcPR2_8-8cN-C7xFxRI,741
8
8
  rb_commons/http/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -20,7 +20,7 @@ rb_commons/schemes/jwt.py,sha256=4MLw3J1-LiU2CXIgm0kP1mlGoDmNfMXmj9iav2s-1Iw,205
20
20
  rb_commons/schemes/pagination.py,sha256=8VZW1wZGJIPR9jEBUgppZUoB4uqP8ORudHkMwvEJSxg,1866
21
21
  rb_commons/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
22
22
  rb_commons/utils/media.py,sha256=KNY_9SdRa3Rp7d3B1tZaXkhmzVa65RcS62BYwZP1bVM,332
23
- rb_commons-0.5.13.dist-info/METADATA,sha256=S12_XY8LrZBsTJSD_mkfOCdlH0nWlWLXXQc7Ufu1VwQ,6571
24
- rb_commons-0.5.13.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
25
- rb_commons-0.5.13.dist-info/top_level.txt,sha256=HPx_WAYo3_fbg1WCeGHsz3wPGio1ucbnrlm2lmqlJog,11
26
- rb_commons-0.5.13.dist-info/RECORD,,
23
+ rb_commons-0.5.14.dist-info/METADATA,sha256=urSAiGh-Tz0zO-AXXIooTHwCYiGwhM49Stpsoo1g_Rk,6571
24
+ rb_commons-0.5.14.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
25
+ rb_commons-0.5.14.dist-info/top_level.txt,sha256=HPx_WAYo3_fbg1WCeGHsz3wPGio1ucbnrlm2lmqlJog,11
26
+ rb_commons-0.5.14.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.4.0)
2
+ Generator: setuptools (80.7.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5