provide-foundation 0.0.0.dev0__py3-none-any.whl → 0.0.0.dev2__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.
Files changed (161) hide show
  1. provide/foundation/__init__.py +41 -23
  2. provide/foundation/archive/__init__.py +23 -0
  3. provide/foundation/archive/base.py +70 -0
  4. provide/foundation/archive/bzip2.py +157 -0
  5. provide/foundation/archive/gzip.py +159 -0
  6. provide/foundation/archive/operations.py +334 -0
  7. provide/foundation/archive/tar.py +164 -0
  8. provide/foundation/archive/zip.py +203 -0
  9. provide/foundation/cli/__init__.py +2 -2
  10. provide/foundation/cli/commands/deps.py +13 -7
  11. provide/foundation/cli/commands/logs/__init__.py +1 -1
  12. provide/foundation/cli/commands/logs/query.py +1 -1
  13. provide/foundation/cli/commands/logs/send.py +1 -1
  14. provide/foundation/cli/commands/logs/tail.py +1 -1
  15. provide/foundation/cli/decorators.py +11 -10
  16. provide/foundation/cli/main.py +1 -1
  17. provide/foundation/cli/testing.py +2 -35
  18. provide/foundation/cli/utils.py +21 -17
  19. provide/foundation/config/__init__.py +35 -2
  20. provide/foundation/config/base.py +2 -2
  21. provide/foundation/config/converters.py +479 -0
  22. provide/foundation/config/defaults.py +67 -0
  23. provide/foundation/config/env.py +4 -19
  24. provide/foundation/config/loader.py +9 -3
  25. provide/foundation/config/sync.py +19 -4
  26. provide/foundation/console/input.py +5 -5
  27. provide/foundation/console/output.py +35 -13
  28. provide/foundation/context/__init__.py +8 -4
  29. provide/foundation/context/core.py +85 -109
  30. provide/foundation/core.py +1 -2
  31. provide/foundation/crypto/__init__.py +2 -0
  32. provide/foundation/crypto/certificates/__init__.py +34 -0
  33. provide/foundation/crypto/certificates/base.py +173 -0
  34. provide/foundation/crypto/certificates/certificate.py +290 -0
  35. provide/foundation/crypto/certificates/factory.py +213 -0
  36. provide/foundation/crypto/certificates/generator.py +138 -0
  37. provide/foundation/crypto/certificates/loader.py +130 -0
  38. provide/foundation/crypto/certificates/operations.py +198 -0
  39. provide/foundation/crypto/certificates/trust.py +107 -0
  40. provide/foundation/errors/__init__.py +2 -3
  41. provide/foundation/errors/decorators.py +0 -231
  42. provide/foundation/errors/types.py +0 -97
  43. provide/foundation/eventsets/__init__.py +0 -0
  44. provide/foundation/eventsets/display.py +84 -0
  45. provide/foundation/eventsets/registry.py +160 -0
  46. provide/foundation/eventsets/resolver.py +192 -0
  47. provide/foundation/eventsets/sets/das.py +128 -0
  48. provide/foundation/eventsets/sets/database.py +125 -0
  49. provide/foundation/eventsets/sets/http.py +153 -0
  50. provide/foundation/eventsets/sets/llm.py +139 -0
  51. provide/foundation/eventsets/sets/task_queue.py +107 -0
  52. provide/foundation/eventsets/types.py +70 -0
  53. provide/foundation/file/directory.py +13 -22
  54. provide/foundation/file/lock.py +3 -1
  55. provide/foundation/hub/components.py +77 -515
  56. provide/foundation/hub/config.py +151 -0
  57. provide/foundation/hub/discovery.py +62 -0
  58. provide/foundation/hub/handlers.py +81 -0
  59. provide/foundation/hub/lifecycle.py +194 -0
  60. provide/foundation/hub/manager.py +4 -4
  61. provide/foundation/hub/processors.py +44 -0
  62. provide/foundation/integrations/__init__.py +11 -0
  63. provide/foundation/{observability → integrations}/openobserve/__init__.py +10 -7
  64. provide/foundation/{observability → integrations}/openobserve/auth.py +1 -1
  65. provide/foundation/{observability → integrations}/openobserve/client.py +12 -12
  66. provide/foundation/{observability → integrations}/openobserve/commands.py +3 -3
  67. provide/foundation/integrations/openobserve/config.py +37 -0
  68. provide/foundation/{observability → integrations}/openobserve/formatters.py +1 -1
  69. provide/foundation/{observability → integrations}/openobserve/otlp.py +1 -1
  70. provide/foundation/{observability → integrations}/openobserve/search.py +2 -2
  71. provide/foundation/{observability → integrations}/openobserve/streaming.py +4 -4
  72. provide/foundation/logger/__init__.py +3 -10
  73. provide/foundation/logger/config/logging.py +68 -298
  74. provide/foundation/logger/config/telemetry.py +41 -121
  75. provide/foundation/logger/core.py +0 -2
  76. provide/foundation/logger/custom_processors.py +1 -0
  77. provide/foundation/logger/factories.py +11 -2
  78. provide/foundation/logger/processors/main.py +20 -84
  79. provide/foundation/logger/setup/__init__.py +5 -1
  80. provide/foundation/logger/setup/coordinator.py +76 -24
  81. provide/foundation/logger/setup/processors.py +2 -9
  82. provide/foundation/logger/trace.py +27 -0
  83. provide/foundation/metrics/otel.py +10 -10
  84. provide/foundation/observability/__init__.py +2 -2
  85. provide/foundation/process/__init__.py +9 -0
  86. provide/foundation/process/exit.py +47 -0
  87. provide/foundation/process/lifecycle.py +115 -59
  88. provide/foundation/resilience/__init__.py +35 -0
  89. provide/foundation/resilience/circuit.py +164 -0
  90. provide/foundation/resilience/decorators.py +220 -0
  91. provide/foundation/resilience/fallback.py +193 -0
  92. provide/foundation/resilience/retry.py +325 -0
  93. provide/foundation/streams/config.py +79 -0
  94. provide/foundation/streams/console.py +7 -8
  95. provide/foundation/streams/core.py +6 -3
  96. provide/foundation/streams/file.py +12 -2
  97. provide/foundation/testing/__init__.py +84 -2
  98. provide/foundation/testing/archive/__init__.py +24 -0
  99. provide/foundation/testing/archive/fixtures.py +217 -0
  100. provide/foundation/testing/cli.py +30 -17
  101. provide/foundation/testing/common/__init__.py +32 -0
  102. provide/foundation/testing/common/fixtures.py +236 -0
  103. provide/foundation/testing/file/__init__.py +40 -0
  104. provide/foundation/testing/file/content_fixtures.py +316 -0
  105. provide/foundation/testing/file/directory_fixtures.py +107 -0
  106. provide/foundation/testing/file/fixtures.py +52 -0
  107. provide/foundation/testing/file/special_fixtures.py +153 -0
  108. provide/foundation/testing/logger.py +117 -11
  109. provide/foundation/testing/mocking/__init__.py +46 -0
  110. provide/foundation/testing/mocking/fixtures.py +331 -0
  111. provide/foundation/testing/process/__init__.py +48 -0
  112. provide/foundation/testing/process/async_fixtures.py +405 -0
  113. provide/foundation/testing/process/fixtures.py +56 -0
  114. provide/foundation/testing/process/subprocess_fixtures.py +209 -0
  115. provide/foundation/testing/threading/__init__.py +38 -0
  116. provide/foundation/testing/threading/basic_fixtures.py +101 -0
  117. provide/foundation/testing/threading/data_fixtures.py +99 -0
  118. provide/foundation/testing/threading/execution_fixtures.py +263 -0
  119. provide/foundation/testing/threading/fixtures.py +54 -0
  120. provide/foundation/testing/threading/sync_fixtures.py +97 -0
  121. provide/foundation/testing/time/__init__.py +32 -0
  122. provide/foundation/testing/time/fixtures.py +409 -0
  123. provide/foundation/testing/transport/__init__.py +30 -0
  124. provide/foundation/testing/transport/fixtures.py +280 -0
  125. provide/foundation/tools/__init__.py +58 -0
  126. provide/foundation/tools/base.py +348 -0
  127. provide/foundation/tools/cache.py +268 -0
  128. provide/foundation/tools/downloader.py +224 -0
  129. provide/foundation/tools/installer.py +254 -0
  130. provide/foundation/tools/registry.py +223 -0
  131. provide/foundation/tools/resolver.py +321 -0
  132. provide/foundation/tools/verifier.py +186 -0
  133. provide/foundation/tracer/otel.py +7 -11
  134. provide/foundation/tracer/spans.py +2 -2
  135. provide/foundation/transport/__init__.py +155 -0
  136. provide/foundation/transport/base.py +171 -0
  137. provide/foundation/transport/client.py +266 -0
  138. provide/foundation/transport/config.py +140 -0
  139. provide/foundation/transport/errors.py +79 -0
  140. provide/foundation/transport/http.py +232 -0
  141. provide/foundation/transport/middleware.py +360 -0
  142. provide/foundation/transport/registry.py +167 -0
  143. provide/foundation/transport/types.py +45 -0
  144. provide/foundation/utils/deps.py +14 -12
  145. provide/foundation/utils/parsing.py +49 -4
  146. {provide_foundation-0.0.0.dev0.dist-info → provide_foundation-0.0.0.dev2.dist-info}/METADATA +5 -28
  147. provide_foundation-0.0.0.dev2.dist-info/RECORD +225 -0
  148. provide/foundation/cli/commands/logs/generate_old.py +0 -569
  149. provide/foundation/crypto/certificates.py +0 -896
  150. provide/foundation/logger/emoji/__init__.py +0 -44
  151. provide/foundation/logger/emoji/matrix.py +0 -209
  152. provide/foundation/logger/emoji/sets.py +0 -458
  153. provide/foundation/logger/emoji/types.py +0 -56
  154. provide/foundation/logger/setup/emoji_resolver.py +0 -64
  155. provide_foundation-0.0.0.dev0.dist-info/RECORD +0 -149
  156. /provide/foundation/{observability → integrations}/openobserve/exceptions.py +0 -0
  157. /provide/foundation/{observability → integrations}/openobserve/models.py +0 -0
  158. {provide_foundation-0.0.0.dev0.dist-info → provide_foundation-0.0.0.dev2.dist-info}/WHEEL +0 -0
  159. {provide_foundation-0.0.0.dev0.dist-info → provide_foundation-0.0.0.dev2.dist-info}/entry_points.txt +0 -0
  160. {provide_foundation-0.0.0.dev0.dist-info → provide_foundation-0.0.0.dev2.dist-info}/licenses/LICENSE +0 -0
  161. {provide_foundation-0.0.0.dev0.dist-info → provide_foundation-0.0.0.dev2.dist-info}/top_level.txt +0 -0
@@ -17,12 +17,12 @@ from provide.foundation.cli.decorators import (
17
17
  )
18
18
  from provide.foundation.cli.testing import (
19
19
  CliTestCase,
20
- MockContext,
21
20
  create_test_cli,
22
21
  isolated_cli_runner,
23
- mock_logger,
24
22
  temp_config_file,
25
23
  )
24
+ from provide.foundation.testing.cli import MockContext
25
+ from provide.foundation.testing.logger import mock_logger
26
26
  from provide.foundation.cli.utils import (
27
27
  CliTestRunner,
28
28
  assert_cli_error,
@@ -8,7 +8,9 @@ except ImportError:
8
8
  click = None
9
9
  _HAS_CLICK = False
10
10
 
11
- from provide.foundation.utils.deps import check_optional_deps
11
+ from provide.foundation.utils.deps import check_optional_deps, has_dependency
12
+ from provide.foundation.console.output import pout
13
+ from provide.foundation.process import exit_success, exit_error
12
14
 
13
15
 
14
16
  def _require_click():
@@ -23,21 +25,25 @@ def _require_click():
23
25
  def _deps_command_impl(quiet: bool, check: str | None) -> None:
24
26
  """Implementation of deps command logic."""
25
27
  if check:
26
- from provide.foundation.utils.deps import has_dependency
27
-
28
28
  available = has_dependency(check)
29
29
  if not quiet:
30
30
  status = "✅" if available else "❌"
31
- print(f"{status} {check}: {'Available' if available else 'Missing'}")
31
+ pout(f"{status} {check}: {'Available' if available else 'Missing'}")
32
32
  if not available:
33
- print(f"Install with: pip install 'provide-foundation[{check}]'")
34
- exit(0 if available else 1)
33
+ pout(f"Install with: pip install 'provide-foundation[{check}]'")
34
+ if available:
35
+ exit_success()
36
+ else:
37
+ exit_error("Dependency check failed")
35
38
  else:
36
39
  # Check all dependencies
37
40
  deps = check_optional_deps(quiet=quiet, return_status=True)
38
41
  available_count = sum(1 for dep in deps if dep.available)
39
42
  total_count = len(deps)
40
- exit(0 if available_count == total_count else 1)
43
+ if available_count == total_count:
44
+ exit_success()
45
+ else:
46
+ exit_error(f"Missing {total_count - available_count} dependencies")
41
47
 
42
48
 
43
49
  if _HAS_CLICK:
@@ -28,7 +28,7 @@ if _HAS_CLICK:
28
28
 
29
29
  # Try to get OpenObserve client if available
30
30
  try:
31
- from provide.foundation.observability.openobserve import OpenObserveClient
31
+ from provide.foundation.integrations.openobserve import OpenObserveClient
32
32
 
33
33
  ctx.obj["client"] = OpenObserveClient.from_config()
34
34
  except Exception as e:
@@ -89,7 +89,7 @@ if _HAS_CLICK:
89
89
  # Custom SQL query
90
90
  foundation logs query --sql "SELECT * FROM default WHERE duration_ms > 1000"
91
91
  """
92
- from provide.foundation.observability.openobserve import (
92
+ from provide.foundation.integrations.openobserve import (
93
93
  format_output,
94
94
  search_logs,
95
95
  )
@@ -83,7 +83,7 @@ if _HAS_CLICK:
83
83
  # Send with JSON attributes
84
84
  foundation logs send -m "Error occurred" -j '{"error_code": 500, "path": "/api/users"}'
85
85
  """
86
- from provide.foundation.observability.openobserve.otlp import send_log
86
+ from provide.foundation.integrations.openobserve.otlp import send_log
87
87
 
88
88
  # Get message from stdin if not provided
89
89
  if not message:
@@ -69,7 +69,7 @@ if _HAS_CLICK:
69
69
  # Tail with JSON output
70
70
  foundation logs tail --format json
71
71
  """
72
- from provide.foundation.observability.openobserve import (
72
+ from provide.foundation.integrations.openobserve import (
73
73
  format_output,
74
74
  tail_logs,
75
75
  )
@@ -11,7 +11,8 @@ try:
11
11
  except ImportError:
12
12
  click = None
13
13
 
14
- from provide.foundation.context import Context
14
+ from provide.foundation.context import CLIContext
15
+ from provide.foundation.process import exit_error, exit_interrupted
15
16
 
16
17
  F = TypeVar("F", bound=Callable[..., Any])
17
18
 
@@ -162,7 +163,7 @@ def error_handler(f: F) -> F:
162
163
  except KeyboardInterrupt:
163
164
  if not json_output:
164
165
  click.secho("\nInterrupted by user", fg="yellow", err=True)
165
- sys.exit(130) # Standard exit code for SIGINT
166
+ exit_interrupted()
166
167
  except Exception as e:
167
168
  if debug:
168
169
  # In debug mode, show full traceback
@@ -179,16 +180,16 @@ def error_handler(f: F) -> F:
179
180
  else:
180
181
  click.secho(f"Error: {e}", fg="red", err=True)
181
182
 
182
- sys.exit(1)
183
+ exit_error(f"Command failed: {str(e)}")
183
184
 
184
185
  return wrapper
185
186
 
186
187
 
187
188
  def pass_context(f: F) -> F:
188
189
  """
189
- Decorator to pass the foundation Context to a command.
190
+ Decorator to pass the foundation CLIContext to a command.
190
191
 
191
- Creates or retrieves a Context from Click's context object
192
+ Creates or retrieves a CLIContext from Click's context object
192
193
  and passes it as the first argument to the decorated function.
193
194
  """
194
195
 
@@ -197,15 +198,15 @@ def pass_context(f: F) -> F:
197
198
  def wrapper(ctx: click.Context, *args, **kwargs):
198
199
  # Get or create foundation context
199
200
  if not hasattr(ctx, "obj") or ctx.obj is None:
200
- ctx.obj = Context()
201
- elif not isinstance(ctx.obj, Context):
201
+ ctx.obj = CLIContext()
202
+ elif not isinstance(ctx.obj, CLIContext):
202
203
  # If obj exists but isn't a Context, wrap it
203
204
  if isinstance(ctx.obj, dict):
204
- ctx.obj = Context.from_dict(ctx.obj)
205
+ ctx.obj = CLIContext.from_dict(ctx.obj)
205
206
  else:
206
- # Store existing obj and create new Context
207
+ # Store existing obj and create new CLIContext
207
208
  old_obj = ctx.obj
208
- ctx.obj = Context()
209
+ ctx.obj = CLIContext()
209
210
  ctx.obj._cli_data = old_obj
210
211
 
211
212
  # Update context from command options
@@ -46,7 +46,7 @@ if _HAS_CLICK:
46
46
 
47
47
  # Register OpenObserve commands if available
48
48
  try:
49
- from provide.foundation.observability.openobserve.commands import (
49
+ from provide.foundation.integrations.openobserve.commands import (
50
50
  openobserve_group,
51
51
  )
52
52
 
@@ -11,31 +11,12 @@ from unittest.mock import MagicMock
11
11
  import click
12
12
  from click.testing import CliRunner
13
13
 
14
- from provide.foundation.context import Context
14
+ from provide.foundation.context import CLIContext
15
15
  from provide.foundation.logger import get_logger
16
16
 
17
17
  log = get_logger(__name__)
18
18
 
19
19
 
20
- class MockContext(Context):
21
- """Mock context for testing that tracks method calls."""
22
-
23
- def __init__(self, **kwargs) -> None:
24
- """Initialize mock context with tracking."""
25
- super().__init__(**kwargs)
26
- self.calls = []
27
- self.saved_configs = []
28
- self.loaded_configs = []
29
-
30
- def save_config(self, path: str | Path) -> None:
31
- """Track save_config calls."""
32
- self.saved_configs.append(path)
33
- super().save_config(path)
34
-
35
- def load_config(self, path: str | Path) -> None:
36
- """Track load_config calls."""
37
- self.loaded_configs.append(path)
38
- super().load_config(path)
39
20
 
40
21
 
41
22
  @contextmanager
@@ -150,7 +131,7 @@ def create_test_cli(
150
131
  @click.pass_context
151
132
  def cli(ctx, **kwargs) -> None:
152
133
  """Test CLI for testing."""
153
- ctx.obj = Context(**{k: v for k, v in kwargs.items() if v is not None})
134
+ ctx.obj = CLIContext(**{k: v for k, v in kwargs.items() if v is not None})
154
135
 
155
136
  if commands:
156
137
  for cmd in commands:
@@ -159,20 +140,6 @@ def create_test_cli(
159
140
  return cli
160
141
 
161
142
 
162
- def mock_logger():
163
- """
164
- Create a mock logger for testing.
165
-
166
- Returns:
167
- MagicMock with common logger methods
168
- """
169
- mock = MagicMock()
170
- mock.debug = MagicMock()
171
- mock.info = MagicMock()
172
- mock.warning = MagicMock()
173
- mock.error = MagicMock()
174
- mock.critical = MagicMock()
175
- return mock
176
143
 
177
144
 
178
145
  class CliTestCase:
@@ -6,7 +6,8 @@ from typing import Any
6
6
  import click
7
7
  from click.testing import CliRunner, Result
8
8
 
9
- from provide.foundation.context import Context
9
+ from provide.foundation.console.output import pout, perr
10
+ from provide.foundation.context import CLIContext
10
11
  from provide.foundation.logger import (
11
12
  LoggingConfig,
12
13
  TelemetryConfig,
@@ -25,7 +26,10 @@ def echo_json(data: Any, err: bool = False) -> None:
25
26
  data: Data to output as JSON
26
27
  err: Whether to output to stderr
27
28
  """
28
- click.echo(json.dumps(data, indent=2, default=str), err=err)
29
+ if err:
30
+ perr(data)
31
+ else:
32
+ pout(data)
29
33
 
30
34
 
31
35
  def echo_error(message: str, json_output: bool = False) -> None:
@@ -37,9 +41,9 @@ def echo_error(message: str, json_output: bool = False) -> None:
37
41
  json_output: Whether to output as JSON
38
42
  """
39
43
  if json_output:
40
- echo_json({"error": message}, err=True)
44
+ perr(message, json_key="error")
41
45
  else:
42
- click.secho(f"✗ {message}", fg="red", err=True)
46
+ perr(f"✗ {message}", color="red")
43
47
 
44
48
 
45
49
  def echo_success(message: str, json_output: bool = False) -> None:
@@ -51,9 +55,9 @@ def echo_success(message: str, json_output: bool = False) -> None:
51
55
  json_output: Whether to output as JSON
52
56
  """
53
57
  if json_output:
54
- echo_json({"success": message})
58
+ pout(message, json_key="success")
55
59
  else:
56
- click.secho(f"✓ {message}", fg="green")
60
+ pout(f"✓ {message}", color="green")
57
61
 
58
62
 
59
63
  def echo_warning(message: str, json_output: bool = False) -> None:
@@ -65,9 +69,9 @@ def echo_warning(message: str, json_output: bool = False) -> None:
65
69
  json_output: Whether to output as JSON
66
70
  """
67
71
  if json_output:
68
- echo_json({"warning": message}, err=True)
72
+ perr(message, json_key="warning")
69
73
  else:
70
- click.secho(f"⚠ {message}", fg="yellow", err=True)
74
+ perr(f"⚠ {message}", color="yellow")
71
75
 
72
76
 
73
77
  def echo_info(message: str, json_output: bool = False) -> None:
@@ -79,23 +83,23 @@ def echo_info(message: str, json_output: bool = False) -> None:
79
83
  json_output: Whether to output as JSON
80
84
  """
81
85
  if json_output:
82
- echo_json({"info": message})
86
+ pout(message, json_key="info")
83
87
  else:
84
- click.echo(f"ℹ {message}")
88
+ pout(f"ℹ {message}")
85
89
 
86
90
 
87
91
  def setup_cli_logging(
88
- ctx: Context,
92
+ ctx: CLIContext,
89
93
  ) -> None:
90
94
  """
91
- Setup logging for CLI applications using a Context object.
95
+ Setup logging for CLI applications using a CLIContext object.
92
96
 
93
97
  This function is the designated way to configure logging within a CLI
94
98
  application built with foundation. It uses the provided context object
95
99
  to construct a full TelemetryConfig and initializes the system.
96
100
 
97
101
  Args:
98
- ctx: The foundation Context, populated by CLI decorators.
102
+ ctx: The foundation CLIContext, populated by CLI decorators.
99
103
  """
100
104
  console_formatter = "json" if ctx.json_output else ctx.log_format
101
105
 
@@ -116,9 +120,9 @@ def setup_cli_logging(
116
120
  setup_telemetry(config=telemetry_config)
117
121
 
118
122
 
119
- def create_cli_context(**kwargs) -> Context:
123
+ def create_cli_context(**kwargs) -> CLIContext:
120
124
  """
121
- Create a Context for CLI usage.
125
+ Create a CLIContext for CLI usage.
122
126
 
123
127
  Loads from environment, then overlays any provided kwargs.
124
128
 
@@ -126,9 +130,9 @@ def create_cli_context(**kwargs) -> Context:
126
130
  **kwargs: Override values for the context
127
131
 
128
132
  Returns:
129
- Configured Context instance
133
+ Configured CLIContext instance
130
134
  """
131
- ctx = Context.from_env()
135
+ ctx = CLIContext.from_env()
132
136
  for key, value in kwargs.items():
133
137
  if value is not None and hasattr(ctx, key):
134
138
  setattr(ctx, key, value)
@@ -45,10 +45,27 @@ from provide.foundation.config.types import (
45
45
  ConfigSource,
46
46
  ConfigValue,
47
47
  )
48
- from provide.foundation.config.validators import (
49
- validate_choice,
48
+ from provide.foundation.config.converters import (
49
+ parse_bool_extended,
50
+ parse_comma_list,
51
+ parse_console_formatter,
52
+ parse_float_with_validation,
53
+ parse_headers,
54
+ parse_json_dict,
55
+ parse_json_list,
56
+ parse_log_level,
57
+ parse_module_levels,
58
+ parse_rate_limits,
59
+ parse_sample_rate,
60
+ validate_log_level,
50
61
  validate_non_negative,
62
+ validate_overflow_policy,
63
+ validate_port,
51
64
  validate_positive,
65
+ validate_sample_rate,
66
+ )
67
+ from provide.foundation.config.validators import (
68
+ validate_choice,
52
69
  validate_range,
53
70
  )
54
71
  from provide.foundation.errors.config import (
@@ -96,11 +113,27 @@ __all__ = [
96
113
  "parse_dict",
97
114
  "parse_list",
98
115
  "set_config",
116
+ # Converters
117
+ "parse_bool_extended",
118
+ "parse_comma_list",
119
+ "parse_console_formatter",
120
+ "parse_float_with_validation",
121
+ "parse_headers",
122
+ "parse_json_dict",
123
+ "parse_json_list",
124
+ "parse_log_level",
125
+ "parse_module_levels",
126
+ "parse_rate_limits",
127
+ "parse_sample_rate",
99
128
  # Validators
100
129
  "validate_choice",
101
130
  "validate_config",
131
+ "validate_log_level",
102
132
  "validate_non_negative",
133
+ "validate_overflow_policy",
134
+ "validate_port",
103
135
  "validate_positive",
104
136
  "validate_range",
137
+ "validate_sample_rate",
105
138
  "validate_schema",
106
139
  ]
@@ -174,8 +174,8 @@ class BaseConfig:
174
174
  Returns:
175
175
  Configuration instance
176
176
  """
177
- # Filter data to only include fields defined in the class
178
- field_names = {f.name for f in fields(cls)}
177
+ # Filter data to only include fields defined in the class, excluding private fields
178
+ field_names = {f.name for f in fields(cls) if not f.name.startswith('_')}
179
179
  filtered_data = {k: v for k, v in data.items() if k in field_names}
180
180
 
181
181
  # Create instance