azpaddypy 0.4.2__py3-none-any.whl → 0.4.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.
@@ -173,6 +173,7 @@ def create_local_env_manager(
173
173
 
174
174
  This function orchestrates loading settings from a `local.settings.json` file,
175
175
  a `.env` file, and a direct dictionary of settings, in that order.
176
+ If the settings are not loaded from the file, the settings from the dictionary will not be applied.
176
177
 
177
178
  Args:
178
179
  file_path: Base path for `.env` or `local.settings.json`. The function
@@ -184,19 +185,22 @@ def create_local_env_manager(
184
185
  override_settings: Whether settings from the dictionary should override.
185
186
  """
186
187
  manager = LocalDevelopmentSettings(logger=logger)
187
-
188
+ loadded_from_json = False
189
+ loadded_from_dotenv = False
188
190
  # Try loading local.settings.json
189
191
  json_path = pathlib.Path(file_path).parent / "local.settings.json"
190
192
  if json_path.is_file():
191
193
  manager.load_from_json(json_path, override=override_json)
194
+ loadded_from_json = True
192
195
 
193
196
  # Try loading .env
194
197
  dotenv_path = pathlib.Path(file_path)
195
198
  if dotenv_path.is_file() and dotenv_path.name == ".env":
196
199
  manager.load_from_dotenv(dotenv_path, override=override_dotenv)
197
-
200
+ loadded_from_dotenv = True
198
201
  # Apply dictionary settings
199
- if settings:
202
+ if settings and (loadded_from_json or loadded_from_dotenv):
200
203
  manager.apply_settings(settings, override=override_settings)
201
204
 
205
+
202
206
  return manager
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: azpaddypy
3
- Version: 0.4.2
3
+ Version: 0.4.3
4
4
  Summary: Comprehensive Python logger for Azure, integrating OpenTelemetry for advanced, structured, and distributed tracing.
5
5
  Classifier: Programming Language :: Python :: 3
6
6
  Classifier: Operating System :: OS Independent
@@ -1,12 +1,12 @@
1
1
  azpaddypy/__init__.py,sha256=hrWNAh4OHZOvm3Pbhq5eUjO-pSRYn0h0W0J87tc-lNI,45
2
2
  azpaddypy/mgmt/__init__.py,sha256=waW9EAnTFDh2530ieQX1Z0r0Z-ZKHRwabVDfapjfN58,441
3
3
  azpaddypy/mgmt/identity.py,sha256=mA_krQslMsK_sDob-z-QA0B9khK_JUO2way7xwPopR8,12001
4
- azpaddypy/mgmt/local_env_manager.py,sha256=fC9E3V8eMgMMgD1UtH596ntjAVhLaE5eQLG86NYpr5Y,7960
4
+ azpaddypy/mgmt/local_env_manager.py,sha256=F-7kpO0g0mud8YHvLRcUkuAuIJzjvcl776wN0cUM8Zo,8248
5
5
  azpaddypy/mgmt/logging.py,sha256=3ZLSKwpX7Tprthrkm3uN4ph2n2CxiGYUNri7jBJuXEY,36514
6
6
  azpaddypy/resources/__init__.py,sha256=Bvt3VK4RqwoxYpoh6EbLXIR18RuFPKaLP6zLL-icyFk,314
7
7
  azpaddypy/resources/keyvault.py,sha256=4J08vLqoLFd1_UUDBji2oG2fatZaPkgnRyT_Z6wHAOc,20312
8
- azpaddypy-0.4.2.dist-info/licenses/LICENSE,sha256=hQ6t0g2QaewGCQICHqTckBFbMVakGmoyTAzDpmEYV4c,1089
9
- azpaddypy-0.4.2.dist-info/METADATA,sha256=OWfKqs9WR2Y7wI1Qx0HGFJNUo02zmVSHwsx8jLT16d8,665
10
- azpaddypy-0.4.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
11
- azpaddypy-0.4.2.dist-info/top_level.txt,sha256=hsDuboDhT61320ML8X479ezSTwT3rrlDWz1_Z45B2cs,10
12
- azpaddypy-0.4.2.dist-info/RECORD,,
8
+ azpaddypy-0.4.3.dist-info/licenses/LICENSE,sha256=hQ6t0g2QaewGCQICHqTckBFbMVakGmoyTAzDpmEYV4c,1089
9
+ azpaddypy-0.4.3.dist-info/METADATA,sha256=idEJob7oF0edjPouQr3pgZjtLKIKMP_AzgJ2yYsIAaQ,665
10
+ azpaddypy-0.4.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
11
+ azpaddypy-0.4.3.dist-info/top_level.txt,sha256=hsDuboDhT61320ML8X479ezSTwT3rrlDWz1_Z45B2cs,10
12
+ azpaddypy-0.4.3.dist-info/RECORD,,