nlbone 0.7.0__py3-none-any.whl → 0.7.1__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.
- nlbone/config/settings.py +5 -5
- {nlbone-0.7.0.dist-info → nlbone-0.7.1.dist-info}/METADATA +1 -1
- {nlbone-0.7.0.dist-info → nlbone-0.7.1.dist-info}/RECORD +6 -6
- {nlbone-0.7.0.dist-info → nlbone-0.7.1.dist-info}/WHEEL +0 -0
- {nlbone-0.7.0.dist-info → nlbone-0.7.1.dist-info}/entry_points.txt +0 -0
- {nlbone-0.7.0.dist-info → nlbone-0.7.1.dist-info}/licenses/LICENSE +0 -0
nlbone/config/settings.py
CHANGED
|
@@ -26,11 +26,11 @@ def _guess_env_file() -> str | None:
|
|
|
26
26
|
raise Exception("Failed to guess env file path!") from e
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
def
|
|
29
|
+
def read_from_os_env() -> bool:
|
|
30
30
|
raw = os.getenv("NLBONE_ENV") or os.getenv("ENV") or os.getenv("ENVIRONMENT")
|
|
31
31
|
if not raw:
|
|
32
32
|
return False
|
|
33
|
-
return raw.strip().lower()
|
|
33
|
+
return raw.strip().lower() in {"prod", "production", "stage", "staging"}
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
class Settings(BaseSettings):
|
|
@@ -114,9 +114,9 @@ class Settings(BaseSettings):
|
|
|
114
114
|
|
|
115
115
|
@classmethod
|
|
116
116
|
def load(cls, env_file: str | None = None) -> "Settings":
|
|
117
|
-
if
|
|
118
|
-
return cls(
|
|
119
|
-
return cls()
|
|
117
|
+
if read_from_os_env():
|
|
118
|
+
return cls()
|
|
119
|
+
return cls(_env_file=env_file or _guess_env_file())
|
|
120
120
|
|
|
121
121
|
|
|
122
122
|
@lru_cache(maxsize=4)
|
|
@@ -40,7 +40,7 @@ nlbone/adapters/ticketing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJW
|
|
|
40
40
|
nlbone/adapters/ticketing/client.py,sha256=V5_u7cxV67eAG4jj4vUD23VWGiMXIXSAU362pNS6hYU,1289
|
|
41
41
|
nlbone/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
42
42
|
nlbone/config/logging.py,sha256=Ot6Ctf7EQZlW8YNB-uBdleqI6wixn5fH0Eo6QRgNkQk,4358
|
|
43
|
-
nlbone/config/settings.py,sha256=
|
|
43
|
+
nlbone/config/settings.py,sha256=E67FOUgPH9prp5WQzGtOIDbVe0DTr_3WziBIh27SEvM,4324
|
|
44
44
|
nlbone/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
45
45
|
nlbone/core/application/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
46
46
|
nlbone/core/application/base_worker.py,sha256=5brIToSd-vi6tw0ukhHnUZGZhOLq1SQ-NRRy-kp6D24,1193
|
|
@@ -104,8 +104,8 @@ nlbone/utils/http.py,sha256=UXUoXgQdTRNT08ho8zl-C5ekfDsD8uf-JiMQ323ooqw,872
|
|
|
104
104
|
nlbone/utils/normalize_mobile.py,sha256=sGH4tV9gX-6eVKozviNWJhm1DN1J28Nj-ERldCYkS_E,732
|
|
105
105
|
nlbone/utils/redactor.py,sha256=-V4HrHmHwPi3Kez587Ek1uJlgK35qGSrwBOvcbw8Jas,1279
|
|
106
106
|
nlbone/utils/time.py,sha256=DjjyQ9GLsfXoT6NK8RDW2rOlJg3e6sF04Jw6PBUrSvg,1268
|
|
107
|
-
nlbone-0.7.
|
|
108
|
-
nlbone-0.7.
|
|
109
|
-
nlbone-0.7.
|
|
110
|
-
nlbone-0.7.
|
|
111
|
-
nlbone-0.7.
|
|
107
|
+
nlbone-0.7.1.dist-info/METADATA,sha256=MnrqzrtBv0nsFUNvS7yxiFkMawm0u7TGzvINlQw2guQ,2294
|
|
108
|
+
nlbone-0.7.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
109
|
+
nlbone-0.7.1.dist-info/entry_points.txt,sha256=CpIL45t5nbhl1dGQPhfIIDfqqak3teK0SxPGBBr7YCk,59
|
|
110
|
+
nlbone-0.7.1.dist-info/licenses/LICENSE,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
111
|
+
nlbone-0.7.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|