azpaddypy 0.4.5__py3-none-any.whl → 0.4.7__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,22 +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)
192
- manager.logger.info(f"Loaded settings from {json_path}")
194
+ loadded_from_json = True
193
195
 
194
196
  # Try loading .env
195
197
  dotenv_path = pathlib.Path(file_path)
196
198
  if dotenv_path.is_file() and dotenv_path.name == ".env":
197
199
  manager.load_from_dotenv(dotenv_path, override=override_dotenv)
198
- manager.logger.info(f"Loaded settings from {dotenv_path}")
200
+ loadded_from_dotenv = True
199
201
 
200
202
  # Apply dictionary settings
201
- if settings:
203
+ if settings and (loadded_from_json or loadded_from_dotenv):
202
204
  manager.apply_settings(settings, override=override_settings)
203
- manager.logger.info(f"Applied {len(settings)} settings to environment.")
204
205
 
205
206
  return manager
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: azpaddypy
3
- Version: 0.4.5
3
+ Version: 0.4.7
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=6pN6cbn8ltz6RGDsGnsX-opB4NEqDB9SHDBVpt-w4j4,8180
4
+ azpaddypy/mgmt/local_env_manager.py,sha256=SDmFyis50Uz7l9QI1AFWVK3SSlqlnKLomaJw_oHa5xY,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.5.dist-info/licenses/LICENSE,sha256=hQ6t0g2QaewGCQICHqTckBFbMVakGmoyTAzDpmEYV4c,1089
9
- azpaddypy-0.4.5.dist-info/METADATA,sha256=FVIz6tImJVPLUXRNPI4xTEXJkpuq1R6C5p6ekSBic-I,665
10
- azpaddypy-0.4.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
11
- azpaddypy-0.4.5.dist-info/top_level.txt,sha256=hsDuboDhT61320ML8X479ezSTwT3rrlDWz1_Z45B2cs,10
12
- azpaddypy-0.4.5.dist-info/RECORD,,
8
+ azpaddypy-0.4.7.dist-info/licenses/LICENSE,sha256=hQ6t0g2QaewGCQICHqTckBFbMVakGmoyTAzDpmEYV4c,1089
9
+ azpaddypy-0.4.7.dist-info/METADATA,sha256=7LJbGofzRYSPo74OfvQjnkiE-EphrxgfC_4HUTq12TM,665
10
+ azpaddypy-0.4.7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
11
+ azpaddypy-0.4.7.dist-info/top_level.txt,sha256=hsDuboDhT61320ML8X479ezSTwT3rrlDWz1_Z45B2cs,10
12
+ azpaddypy-0.4.7.dist-info/RECORD,,