internal 1.0.90__tar.gz → 1.0.98__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.

Potentially problematic release.


This version of internal might be problematic. Click here for more details.

Files changed (40) hide show
  1. {internal-1.0.90 → internal-1.0.98}/PKG-INFO +1 -1
  2. {internal-1.0.90 → internal-1.0.98}/pyproject.toml +1 -1
  3. {internal-1.0.90 → internal-1.0.98}/src/internal/base_config.py +1 -0
  4. internal-1.0.98/src/internal/common_enum/device_code.py +10 -0
  5. {internal-1.0.90 → internal-1.0.98}/src/internal/common_enum/event_trigger_type.py +3 -0
  6. internal-1.0.90/src/internal/common_enum/lpnr_direction.py → internal-1.0.98/src/internal/common_enum/lpr_direction.py +1 -1
  7. {internal-1.0.90 → internal-1.0.98}/src/internal/const.py +2 -0
  8. {internal-1.0.90 → internal-1.0.98}/src/internal/model/base_model.py +2 -1
  9. {internal-1.0.90 → internal-1.0.98}/src/internal/utils.py +10 -1
  10. {internal-1.0.90 → internal-1.0.98}/README.md +0 -0
  11. {internal-1.0.90 → internal-1.0.98}/src/internal/__init__.py +0 -0
  12. {internal-1.0.90 → internal-1.0.98}/src/internal/base_factory.py +0 -0
  13. {internal-1.0.90 → internal-1.0.98}/src/internal/cache_redis.py +0 -0
  14. {internal-1.0.90 → internal-1.0.98}/src/internal/common_enum/__init__.py +0 -0
  15. {internal-1.0.90 → internal-1.0.98}/src/internal/common_enum/contact_type.py +0 -0
  16. {internal-1.0.90 → internal-1.0.98}/src/internal/common_enum/description_type.py +0 -0
  17. {internal-1.0.90 → internal-1.0.98}/src/internal/common_enum/event_code.py +0 -0
  18. {internal-1.0.90 → internal-1.0.98}/src/internal/common_enum/feature.py +0 -0
  19. {internal-1.0.90 → internal-1.0.98}/src/internal/common_enum/notify_type.py +0 -0
  20. {internal-1.0.90 → internal-1.0.98}/src/internal/common_enum/operator_type.py +0 -0
  21. {internal-1.0.90 → internal-1.0.98}/src/internal/common_enum/order_type.py +0 -0
  22. {internal-1.0.90 → internal-1.0.98}/src/internal/database.py +0 -0
  23. {internal-1.0.90 → internal-1.0.98}/src/internal/exception/__init__.py +0 -0
  24. {internal-1.0.90 → internal-1.0.98}/src/internal/exception/app_exception.py +0 -0
  25. {internal-1.0.90 → internal-1.0.98}/src/internal/exception/base_exception.py +0 -0
  26. {internal-1.0.90 → internal-1.0.98}/src/internal/exception/internal_exception.py +0 -0
  27. {internal-1.0.90 → internal-1.0.98}/src/internal/ext/__init__.py +0 -0
  28. {internal-1.0.90 → internal-1.0.98}/src/internal/ext/amazon/__init__.py +0 -0
  29. {internal-1.0.90 → internal-1.0.98}/src/internal/ext/amazon/aws/__init__.py +0 -0
  30. {internal-1.0.90 → internal-1.0.98}/src/internal/ext/amazon/aws/const.py +0 -0
  31. {internal-1.0.90 → internal-1.0.98}/src/internal/http/__init__.py +0 -0
  32. {internal-1.0.90 → internal-1.0.98}/src/internal/http/requests.py +0 -0
  33. {internal-1.0.90 → internal-1.0.98}/src/internal/http/responses.py +0 -0
  34. {internal-1.0.90 → internal-1.0.98}/src/internal/interface/__init__.py +0 -0
  35. {internal-1.0.90 → internal-1.0.98}/src/internal/interface/base_interface.py +0 -0
  36. {internal-1.0.90 → internal-1.0.98}/src/internal/middleware/__init__.py +0 -0
  37. {internal-1.0.90 → internal-1.0.98}/src/internal/middleware/log_request.py +0 -0
  38. {internal-1.0.90 → internal-1.0.98}/src/internal/model/__init__.py +0 -0
  39. {internal-1.0.90 → internal-1.0.98}/src/internal/model/operate.py +0 -0
  40. {internal-1.0.90 → internal-1.0.98}/src/internal/validator_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: internal
3
- Version: 1.0.90
3
+ Version: 1.0.98
4
4
  Summary:
5
5
  Author: Ray
6
6
  Author-email: ray@cruisys.com
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "internal"
3
- version = "1.0.90"
3
+ version = "1.0.98"
4
4
  description = ""
5
5
  authors = [{ name = "Ray", email = "ray@cruisys.com" }]
6
6
  readme = "README.md"
@@ -48,6 +48,7 @@ class BaseConfig(BaseSettings):
48
48
  NOTIFY_BASE_URL: str = "http://notify-service-api:5000"
49
49
  THIRD_PARTY_BASE_URL: str = "http://third-party-service-api:5000"
50
50
  SCHEDULER_BASE_URL: str = "http://scheduler-service-api:5000"
51
+ AUTO_DATA_PROCESSING_BASE_URL: str = "http://auto-data-processing-service-api:5000"
51
52
 
52
53
  # Exception Notify
53
54
  WEBHOOK_BASE_URL: str = ""
@@ -0,0 +1,10 @@
1
+ from enum import Enum
2
+
3
+
4
+ class DeviceCodeEnum(str, Enum):
5
+ DOOR_IN = "door_in"
6
+ DOOR_OUT = "door_out"
7
+ REPAIR_IN = "repair_in"
8
+ REPAIR_OUT = "repair_out"
9
+ DETAIL_IN = "detail_in"
10
+ DETAIL_OUT = "detail_out"
@@ -27,3 +27,6 @@ class EventTriggerTypeEnum(str, Enum):
27
27
  LPNR_OUT_NO_SERVE = "lpnr_out_no_serve"
28
28
  LPNR_IN_POSITION = "lpnr_in_position"
29
29
  LPNR_OUT_POSITION = "lpnr_out_position"
30
+
31
+ LPR_STATE = "lpr_state"
32
+ LPR = "lpr"
@@ -1,7 +1,7 @@
1
1
  from enum import Enum
2
2
 
3
3
 
4
- class LpnrDirectionEnum(str, Enum):
4
+ class LPRDirectionEnum(str, Enum):
5
5
  IN = "in"
6
6
  OUT = "out"
7
7
  UNKNOWN = "unknown"
@@ -39,3 +39,5 @@ SECONDS_PER_MIN = 60
39
39
  DEF_PAGE_NO = 1
40
40
  DEF_PAGE_SIZE = 15
41
41
  DEF_ORDER_BY = "_id"
42
+
43
+ REDIS_LPR_DATA_LIST_PREFIX = "lpr_data_list"
@@ -15,12 +15,13 @@ from .operate import Operate
15
15
  from ..const import DEF_PAGE_SIZE, DEF_PAGE_NO
16
16
  from ..exception.internal_exception import NoChangeException
17
17
  from ..common_enum.order_type import OrderTypeEnum
18
+ from ..utils import get_current_utc
18
19
 
19
20
  IncEx: TypeAlias = Union[Set[int], Set[str], Mapping[int, Union['IncEx', bool]], Mapping[str, Union['IncEx', bool]]]
20
21
 
21
22
 
22
23
  class InternalBaseDocument(Document):
23
- create_time: datetime = Field(default_factory=datetime.utcnow)
24
+ create_time: datetime = Field(default_factory=get_current_utc)
24
25
  update_time: Optional[datetime] = None
25
26
 
26
27
  @classmethod
@@ -1,10 +1,11 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  import json
3
+ from datetime import datetime, timezone
3
4
 
4
5
  import arrow
5
6
 
6
7
  from .base_config import BaseConfig
7
- from .const import STR_EMPTY, ARR_EXPORT_DATETIME_FMT, STR_DASH
8
+ from .const import STR_EMPTY, ARR_EXPORT_DATETIME_FMT, STR_DASH, REDIS_LPR_DATA_LIST_PREFIX
8
9
 
9
10
 
10
11
  def is_today(time, system_time_zone):
@@ -48,3 +49,11 @@ def update_dict_with_cast(curr_settings: BaseConfig, new_conf: dict):
48
49
 
49
50
  def sanitize_plate_no(plate_no):
50
51
  return plate_no.replace(STR_DASH, STR_EMPTY).upper()
52
+
53
+
54
+ def get_current_utc() -> datetime:
55
+ return datetime.now(timezone.utc)
56
+
57
+
58
+ def get_lpr_data_list_redis_key(organization_id, plate_no):
59
+ return f"{REDIS_LPR_DATA_LIST_PREFIX}_{organization_id}_{plate_no}"
File without changes