internal 0.1.92__tar.gz → 0.1.94__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 (29) hide show
  1. {internal-0.1.92 → internal-0.1.94}/PKG-INFO +1 -1
  2. {internal-0.1.92 → internal-0.1.94}/pyproject.toml +1 -1
  3. {internal-0.1.92 → internal-0.1.94}/src/internal/base_config.py +1 -0
  4. {internal-0.1.92 → internal-0.1.94}/src/internal/base_factory.py +1 -0
  5. internal-0.1.94/src/internal/common_enum/event_trigger_type.py +5 -0
  6. {internal-0.1.92 → internal-0.1.94}/src/internal/database.py +4 -2
  7. {internal-0.1.92 → internal-0.1.94}/README.md +0 -0
  8. {internal-0.1.92 → internal-0.1.94}/src/internal/__init__.py +0 -0
  9. {internal-0.1.92 → internal-0.1.94}/src/internal/common_enum/__init__.py +0 -0
  10. {internal-0.1.92 → internal-0.1.94}/src/internal/common_enum/contact_type.py +0 -0
  11. {internal-0.1.92 → internal-0.1.94}/src/internal/common_enum/event_type.py +0 -0
  12. {internal-0.1.92 → internal-0.1.94}/src/internal/common_enum/operator_type.py +0 -0
  13. {internal-0.1.92 → internal-0.1.94}/src/internal/const.py +0 -0
  14. {internal-0.1.92 → internal-0.1.94}/src/internal/exception/__init__.py +0 -0
  15. {internal-0.1.92 → internal-0.1.94}/src/internal/exception/base_exception.py +0 -0
  16. {internal-0.1.92 → internal-0.1.94}/src/internal/exception/internal_exception.py +0 -0
  17. {internal-0.1.92 → internal-0.1.94}/src/internal/ext/__init__.py +0 -0
  18. {internal-0.1.92 → internal-0.1.94}/src/internal/ext/amazon/__init__.py +0 -0
  19. {internal-0.1.92 → internal-0.1.94}/src/internal/ext/amazon/aws/__init__.py +0 -0
  20. {internal-0.1.92 → internal-0.1.94}/src/internal/ext/amazon/aws/const.py +0 -0
  21. {internal-0.1.92 → internal-0.1.94}/src/internal/http/__init__.py +0 -0
  22. {internal-0.1.92 → internal-0.1.94}/src/internal/http/requests.py +0 -0
  23. {internal-0.1.92 → internal-0.1.94}/src/internal/http/responses.py +0 -0
  24. {internal-0.1.92 → internal-0.1.94}/src/internal/interface/__init__.py +0 -0
  25. {internal-0.1.92 → internal-0.1.94}/src/internal/interface/base_interface.py +0 -0
  26. {internal-0.1.92 → internal-0.1.94}/src/internal/model/__init__.py +0 -0
  27. {internal-0.1.92 → internal-0.1.94}/src/internal/model/base_model.py +0 -0
  28. {internal-0.1.92 → internal-0.1.94}/src/internal/model/operate.py +0 -0
  29. {internal-0.1.92 → internal-0.1.94}/src/internal/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: internal
3
- Version: 0.1.92
3
+ Version: 0.1.94
4
4
  Summary:
5
5
  Author: Ray
6
6
  Author-email: ray@cruisys.com
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "internal"
3
- version = "0.1.92"
3
+ version = "0.1.94"
4
4
  description = ""
5
5
  authors = ["Ray <ray@cruisys.com>"]
6
6
  readme = "README.md"
@@ -34,6 +34,7 @@ class BaseConfig(BaseSettings):
34
34
  DATABASE_SSL_CA_CERTS: str = ""
35
35
  DATABASE_SERVER_SELECTION_TIMEOUT_MS: int = 5000
36
36
  DATABASE_CONNECT_TIMEOUT_MS: int = 10000
37
+ DATABASE_AUTH_SOURCE: str = 'admin'
37
38
 
38
39
  # Micro Service
39
40
  AUTH_BASE_URL: str = "http://auth-service-api:5000"
@@ -72,6 +72,7 @@ class BaseFactory(metaclass=ABCMeta):
72
72
  self.get_app_config().DATABASE_NAME,
73
73
  self.get_app_config().DATABASE_SERVER_SELECTION_TIMEOUT_MS,
74
74
  self.get_app_config().DATABASE_CONNECT_TIMEOUT_MS,
75
+ self.get_app_config().DATABASE_AUTH_SOURCE,
75
76
  self.get_app_config().DATABASE_SSL, self.get_app_config().DATABASE_SSL_CA_CERTS)
76
77
 
77
78
  @app.on_event("startup")
@@ -0,0 +1,5 @@
1
+ from enum import Enum
2
+
3
+
4
+ class EventTriggerEnum(str, Enum):
5
+ BOOKING_REMINDING = "BOOKING_REMINDING"
@@ -12,7 +12,7 @@ class MongoDB:
12
12
  # self.ssl = ssl
13
13
  # self.ssl_ca_certs = ssl_ca_certs
14
14
  def __init__(self, user_name: str, password: str, host: str, port: int, db_name: str, server_selection_timeout: int,
15
- connection_timeout: int, ssl: bool = False, ssl_ca_certs: str = None):
15
+ connection_timeout: int, auth_source: str, ssl: bool = False, ssl_ca_certs: str = None):
16
16
  self.client = None
17
17
  self.user_name = user_name
18
18
  self.password = password
@@ -23,12 +23,14 @@ class MongoDB:
23
23
  self.server_selection_timeout = server_selection_timeout
24
24
  self.ssl = ssl
25
25
  self.ssl_ca_certs = ssl_ca_certs
26
+ self.auth_source = auth_source
26
27
 
27
28
  async def connect(self):
28
29
  try:
29
30
  db_settings = dict(username=self.user_name, password=self.password, host=self.host, port=self.port,
30
31
  connectTimeoutMS=self.connection_timeout,
31
- serverSelectionTimeoutMS=self.server_selection_timeout, retryWrites=False)
32
+ serverSelectionTimeoutMS=self.server_selection_timeout, retryWrites=False,
33
+ authSource=self.auth_source)
32
34
  if self.ssl:
33
35
  db_settings["ssl"] = self.ssl
34
36
 
File without changes