etlplus 0.15.0__py3-none-any.whl → 0.16.6__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 (130) hide show
  1. etlplus/README.md +25 -3
  2. etlplus/__init__.py +2 -0
  3. etlplus/api/README.md +31 -0
  4. etlplus/api/__init__.py +14 -14
  5. etlplus/api/auth.py +10 -7
  6. etlplus/api/config.py +8 -13
  7. etlplus/api/endpoint_client.py +20 -20
  8. etlplus/api/errors.py +4 -4
  9. etlplus/api/pagination/__init__.py +6 -6
  10. etlplus/api/pagination/config.py +12 -10
  11. etlplus/api/pagination/paginator.py +6 -7
  12. etlplus/api/rate_limiting/__init__.py +2 -2
  13. etlplus/api/rate_limiting/config.py +14 -14
  14. etlplus/api/rate_limiting/rate_limiter.py +3 -3
  15. etlplus/api/request_manager.py +4 -4
  16. etlplus/api/retry_manager.py +8 -8
  17. etlplus/api/transport.py +11 -11
  18. etlplus/api/types.py +131 -11
  19. etlplus/api/utils.py +50 -50
  20. etlplus/cli/commands.py +93 -60
  21. etlplus/cli/constants.py +1 -1
  22. etlplus/cli/handlers.py +43 -26
  23. etlplus/cli/io.py +2 -2
  24. etlplus/cli/main.py +2 -2
  25. etlplus/cli/state.py +4 -7
  26. etlplus/{workflow/pipeline.py → config.py} +62 -99
  27. etlplus/connector/__init__.py +43 -0
  28. etlplus/connector/api.py +161 -0
  29. etlplus/connector/connector.py +26 -0
  30. etlplus/connector/core.py +132 -0
  31. etlplus/connector/database.py +122 -0
  32. etlplus/connector/enums.py +52 -0
  33. etlplus/connector/file.py +120 -0
  34. etlplus/connector/types.py +40 -0
  35. etlplus/connector/utils.py +122 -0
  36. etlplus/database/ddl.py +2 -2
  37. etlplus/database/engine.py +19 -3
  38. etlplus/database/orm.py +2 -0
  39. etlplus/enums.py +36 -200
  40. etlplus/file/_imports.py +1 -0
  41. etlplus/file/_io.py +52 -4
  42. etlplus/file/accdb.py +3 -2
  43. etlplus/file/arrow.py +3 -2
  44. etlplus/file/avro.py +3 -2
  45. etlplus/file/bson.py +3 -2
  46. etlplus/file/cbor.py +3 -2
  47. etlplus/file/cfg.py +3 -2
  48. etlplus/file/conf.py +3 -2
  49. etlplus/file/core.py +11 -8
  50. etlplus/file/csv.py +3 -2
  51. etlplus/file/dat.py +3 -2
  52. etlplus/file/dta.py +3 -2
  53. etlplus/file/duckdb.py +3 -2
  54. etlplus/file/enums.py +1 -1
  55. etlplus/file/feather.py +3 -2
  56. etlplus/file/fwf.py +3 -2
  57. etlplus/file/gz.py +3 -2
  58. etlplus/file/hbs.py +3 -2
  59. etlplus/file/hdf5.py +3 -2
  60. etlplus/file/ini.py +3 -2
  61. etlplus/file/ion.py +3 -2
  62. etlplus/file/jinja2.py +3 -2
  63. etlplus/file/json.py +5 -16
  64. etlplus/file/log.py +3 -2
  65. etlplus/file/mat.py +3 -2
  66. etlplus/file/mdb.py +3 -2
  67. etlplus/file/msgpack.py +3 -2
  68. etlplus/file/mustache.py +3 -2
  69. etlplus/file/nc.py +3 -2
  70. etlplus/file/ndjson.py +3 -2
  71. etlplus/file/numbers.py +3 -2
  72. etlplus/file/ods.py +3 -2
  73. etlplus/file/orc.py +3 -2
  74. etlplus/file/parquet.py +3 -2
  75. etlplus/file/pb.py +3 -2
  76. etlplus/file/pbf.py +3 -2
  77. etlplus/file/properties.py +3 -2
  78. etlplus/file/proto.py +3 -2
  79. etlplus/file/psv.py +3 -2
  80. etlplus/file/rda.py +3 -2
  81. etlplus/file/rds.py +3 -2
  82. etlplus/file/sas7bdat.py +3 -2
  83. etlplus/file/sav.py +3 -2
  84. etlplus/file/sqlite.py +3 -2
  85. etlplus/file/stub.py +1 -0
  86. etlplus/file/sylk.py +3 -2
  87. etlplus/file/tab.py +3 -2
  88. etlplus/file/toml.py +3 -2
  89. etlplus/file/tsv.py +3 -2
  90. etlplus/file/txt.py +4 -3
  91. etlplus/file/vm.py +3 -2
  92. etlplus/file/wks.py +3 -2
  93. etlplus/file/xls.py +3 -2
  94. etlplus/file/xlsm.py +3 -2
  95. etlplus/file/xlsx.py +3 -2
  96. etlplus/file/xml.py +9 -3
  97. etlplus/file/xpt.py +3 -2
  98. etlplus/file/yaml.py +5 -16
  99. etlplus/file/zip.py +3 -2
  100. etlplus/file/zsav.py +3 -2
  101. etlplus/ops/__init__.py +1 -0
  102. etlplus/ops/enums.py +173 -0
  103. etlplus/ops/extract.py +222 -23
  104. etlplus/ops/load.py +155 -36
  105. etlplus/ops/run.py +92 -107
  106. etlplus/ops/transform.py +48 -29
  107. etlplus/ops/types.py +147 -0
  108. etlplus/ops/utils.py +11 -40
  109. etlplus/ops/validate.py +16 -16
  110. etlplus/types.py +6 -102
  111. etlplus/utils.py +163 -29
  112. etlplus/workflow/README.md +0 -24
  113. etlplus/workflow/__init__.py +2 -15
  114. etlplus/workflow/dag.py +23 -1
  115. etlplus/workflow/jobs.py +83 -39
  116. etlplus/workflow/profile.py +4 -2
  117. {etlplus-0.15.0.dist-info → etlplus-0.16.6.dist-info}/METADATA +4 -4
  118. etlplus-0.16.6.dist-info/RECORD +143 -0
  119. {etlplus-0.15.0.dist-info → etlplus-0.16.6.dist-info}/WHEEL +1 -1
  120. etlplus/config/README.md +0 -50
  121. etlplus/config/__init__.py +0 -33
  122. etlplus/config/types.py +0 -140
  123. etlplus/dag.py +0 -103
  124. etlplus/workflow/connector.py +0 -373
  125. etlplus/workflow/types.py +0 -115
  126. etlplus/workflow/utils.py +0 -120
  127. etlplus-0.15.0.dist-info/RECORD +0 -139
  128. {etlplus-0.15.0.dist-info → etlplus-0.16.6.dist-info}/entry_points.txt +0 -0
  129. {etlplus-0.15.0.dist-info → etlplus-0.16.6.dist-info}/licenses/LICENSE +0 -0
  130. {etlplus-0.15.0.dist-info → etlplus-0.16.6.dist-info}/top_level.txt +0 -0
etlplus/README.md CHANGED
@@ -13,12 +13,12 @@ Back to project overview: see the top-level [README](../README.md).
13
13
 
14
14
  - [etlplus.api](api/README.md): Lightweight HTTP client and paginated REST helpers
15
15
  - [etlplus.file](file/README.md): Unified file format support and helpers
16
- - [etlplus.config](config/README.md): Configuration helpers for connectors, pipelines, jobs, and
17
- profiles
18
- - [etlplus.cli](cli/README.md): Command-line interface for ETLPlus workflows
16
+ - [etlplus.cli](cli/README.md): Command-line interface definitions for `etlplus`
19
17
  - [etlplus.database](database/README.md): Database engine, schema, and ORM helpers
20
18
  - [etlplus.templates](templates/README.md): SQL and DDL template helpers
21
19
  - [etlplus.validation](validation/README.md): Data validation utilities and helpers
20
+ - [etlplus.workflow](etlplus/workflow/README.md): Helpers for data connectors, pipelines, jobs, and
21
+ profiles
22
22
 
23
23
  ## Quickstart
24
24
 
@@ -31,6 +31,28 @@ assert validate(filtered, {"age": {"type": "number", "min": 0}})["valid"]
31
31
  load(filtered, "file", "output.json", file_format="json")
32
32
  ```
33
33
 
34
+ ## Loading and Validating Configs
35
+
36
+ Use the provided classes to load and validate configuration files:
37
+
38
+ ```python
39
+ from etlplus.workflow import Config
40
+
41
+ cfg = Config.from_yaml("pipeline.yml")
42
+ ```
43
+
44
+ - Supports YAML and JSON formats
45
+ - Validates against expected schema
46
+
47
+ ## Example: Loading a Pipeline Config
48
+
49
+ ```python
50
+ from etlplus.workflow import Config
51
+
52
+ config = Config.from_yaml("configs/pipeline.yml")
53
+ print(config)
54
+ ```
55
+
34
56
  ## See Also
35
57
 
36
58
  - [Top-level project README](../README.md)
etlplus/__init__.py CHANGED
@@ -5,6 +5,7 @@ Top-level facade for the ETLPlus toolkit.
5
5
  """
6
6
 
7
7
  from .__version__ import __version__
8
+ from .config import Config
8
9
 
9
10
  __author__ = 'ETLPlus Team'
10
11
 
@@ -15,4 +16,5 @@ __author__ = 'ETLPlus Team'
15
16
  __all__ = [
16
17
  '__author__',
17
18
  '__version__',
19
+ 'Config',
18
20
  ]
etlplus/api/README.md CHANGED
@@ -22,6 +22,7 @@ Back to project overview: see the top-level [README](../../README.md).
22
22
  - [Authentication](#authentication)
23
23
  - [Errors and Rate Limiting](#errors-and-rate-limiting)
24
24
  - [Types and Transport](#types-and-transport)
25
+ - [Config Schemas](#config-schemas)
25
26
  - [Supporting Modules](#supporting-modules)
26
27
  - [Minimal Contract](#minimal-contract)
27
28
  - [See also](#see-also)
@@ -225,6 +226,36 @@ providers can fall back to their own defaults. If you already possess a static t
225
226
  `etlplus/api/request_manager.py` wraps `requests` sessions plus retry orchestration. Advanced
226
227
  users may consult those modules to adapt behavior.
227
228
 
229
+ ## Config Schemas
230
+
231
+ `etlplus.api.types` defines TypedDict-based configuration shapes for API profiles and endpoints.
232
+ Runtime parsing remains permissive in `etlplus.api.config`, but these types improve IDE
233
+ autocomplete and static analysis.
234
+
235
+ Exported types:
236
+
237
+ - `ApiConfigMap`: top-level API config shape
238
+ - `ApiProfileConfigMap`: per-profile API config shape
239
+ - `ApiProfileDefaultsMap`: defaults block within a profile
240
+ - `EndpointMap`: endpoint config shape
241
+
242
+ Example:
243
+
244
+ ```python
245
+ from etlplus.api import ApiConfigMap
246
+
247
+ api_cfg: ApiConfigMap = {
248
+ "base_url": "https://example.test",
249
+ "headers": {"Authorization": "Bearer token"},
250
+ "endpoints": {
251
+ "users": {
252
+ "path": "/users",
253
+ "method": "GET",
254
+ },
255
+ },
256
+ }
257
+ ```
258
+
228
259
  ## Supporting Modules
229
260
 
230
261
  - `etlplus.api.types` collects friendly aliases such as `Headers`, `Params`, `Url`, and
etlplus/api/__init__.py CHANGED
@@ -79,21 +79,21 @@ from .config import ApiProfileConfig
79
79
  from .config import EndpointConfig
80
80
  from .endpoint_client import EndpointClient
81
81
  from .enums import HttpMethod
82
- from .pagination import CursorPaginationConfigMap
83
- from .pagination import PagePaginationConfigMap
82
+ from .pagination import CursorPaginationConfigDict
83
+ from .pagination import PagePaginationConfigDict
84
84
  from .pagination import PaginationClient
85
85
  from .pagination import PaginationConfig
86
- from .pagination import PaginationConfigMap
86
+ from .pagination import PaginationConfigDict
87
87
  from .pagination import PaginationType
88
88
  from .pagination import Paginator
89
89
  from .rate_limiting import RateLimitConfig
90
- from .rate_limiting import RateLimitConfigMap
90
+ from .rate_limiting import RateLimitConfigDict
91
91
  from .rate_limiting import RateLimiter
92
92
  from .retry_manager import RetryManager
93
- from .retry_manager import RetryPolicy
93
+ from .retry_manager import RetryPolicyDict
94
94
  from .retry_manager import RetryStrategy
95
- from .transport import HTTPAdapterMountConfig
96
- from .transport import HTTPAdapterRetryConfig
95
+ from .transport import HTTPAdapterMountConfigDict
96
+ from .transport import HTTPAdapterRetryConfigDict
97
97
  from .transport import build_http_adapter
98
98
  from .types import Headers
99
99
  from .types import Params
@@ -133,14 +133,14 @@ __all__ = [
133
133
  'paginate_with_client',
134
134
  'resolve_request',
135
135
  # Type Aliases
136
- 'CursorPaginationConfigMap',
136
+ 'CursorPaginationConfigDict',
137
137
  'Headers',
138
- 'HTTPAdapterMountConfig',
139
- 'HTTPAdapterRetryConfig',
140
- 'PagePaginationConfigMap',
141
- 'PaginationConfigMap',
138
+ 'HTTPAdapterMountConfigDict',
139
+ 'HTTPAdapterRetryConfigDict',
140
+ 'PagePaginationConfigDict',
141
+ 'PaginationConfigDict',
142
142
  'Params',
143
- 'RateLimitConfigMap',
144
- 'RetryPolicy',
143
+ 'RateLimitConfigDict',
144
+ 'RetryPolicyDict',
145
145
  'Url',
146
146
  ]
etlplus/api/auth.py CHANGED
@@ -76,13 +76,16 @@ FORM_HEADERS = MappingProxyType(
76
76
  # SECTION: TYPED DICTS ====================================================== #
77
77
 
78
78
 
79
- class _TokenResponse(TypedDict):
79
+ class _TokenResponseDict(TypedDict):
80
80
  """Minimal shape of an OAuth token response body."""
81
81
 
82
82
  access_token: str
83
83
  expires_in: int | float
84
84
 
85
85
 
86
+ # SECTION: PROTOCOLS ======================================================== #
87
+
88
+
86
89
  class _TokenHttpClient(Protocol):
87
90
  """Protocol for objects that expose a ``post`` helper like ``requests``."""
88
91
 
@@ -136,7 +139,7 @@ def _truncate(
136
139
  limit: int = MAX_LOG_BODY,
137
140
  ) -> str:
138
141
  """
139
- Return ``text`` shortened to ``limit`` characters for logging.
142
+ Return *text* shortened to *limit* characters for logging.
140
143
 
141
144
  Parameters
142
145
  ----------
@@ -284,7 +287,7 @@ class EndpointCredentialsBearer(AuthBase):
284
287
  def _parse_token_response(
285
288
  self,
286
289
  resp: Response,
287
- ) -> _TokenResponse:
290
+ ) -> _TokenResponseDict:
288
291
  """
289
292
  Validate the JSON token response and return a typed mapping.
290
293
 
@@ -295,7 +298,7 @@ class EndpointCredentialsBearer(AuthBase):
295
298
 
296
299
  Returns
297
300
  -------
298
- _TokenResponse
301
+ _TokenResponseDict
299
302
  Parsed token response mapping.
300
303
 
301
304
  Raises
@@ -335,15 +338,15 @@ class EndpointCredentialsBearer(AuthBase):
335
338
  except (TypeError, ValueError):
336
339
  ttl = float(DEFAULT_TOKEN_TTL)
337
340
 
338
- return _TokenResponse(access_token=token, expires_in=ttl)
341
+ return _TokenResponseDict(access_token=token, expires_in=ttl)
339
342
 
340
- def _request_token(self) -> _TokenResponse:
343
+ def _request_token(self) -> _TokenResponseDict:
341
344
  """
342
345
  Execute the OAuth2 token request and parse the response.
343
346
 
344
347
  Returns
345
348
  -------
346
- _TokenResponse
349
+ _TokenResponseDict
347
350
  Parsed token response mapping.
348
351
 
349
352
  Raises
etlplus/api/config.py CHANGED
@@ -3,11 +3,6 @@
3
3
 
4
4
  Configuration dataclasses for REST API services, profiles, and endpoints.
5
5
 
6
- These models used to live under :mod:`etlplus.config`, but they belong in the
7
- API layer because they compose runtime types such as
8
- :class:`etlplus.api.EndpointClient`, :class:`etlplus.api.PaginationConfig`, and
9
- :class:`etlplus.api.RateLimitConfig`.
10
-
11
6
  Notes
12
7
  -----
13
8
  - TypedDict references remain editor hints only; :meth:`from_obj` accepts
@@ -41,9 +36,9 @@ from .pagination import PaginationConfig
41
36
  from .rate_limiting import RateLimitConfig
42
37
 
43
38
  if TYPE_CHECKING:
44
- from ..config.types import ApiConfigMap
45
- from ..config.types import ApiProfileConfigMap
46
- from ..config.types import EndpointMap
39
+ from .types import ApiConfigDict
40
+ from .types import ApiProfileConfigDict
41
+ from .types import EndpointConfigDict
47
42
 
48
43
 
49
44
  # SECTION: EXPORTS ========================================================== #
@@ -73,7 +68,7 @@ def _effective_service_defaults(
73
68
  fallback_headers: dict[str, str],
74
69
  ) -> tuple[str, dict[str, str]]:
75
70
  """
76
- Return ``(base_url, headers)`` using ``profiles`` when present.
71
+ Return ``(base_url, headers)`` using *profiles* when present.
77
72
 
78
73
  Parameters
79
74
  ----------
@@ -92,7 +87,7 @@ def _effective_service_defaults(
92
87
  Raises
93
88
  ------
94
89
  TypeError
95
- If no profiles are defined and ``fallback_base`` is not a string.
90
+ If no profiles are defined and *fallback_base* is not a string.
96
91
  """
97
92
  if profiles:
98
93
  name = 'default' if 'default' in profiles else next(iter(profiles))
@@ -269,7 +264,7 @@ class ApiProfileConfig:
269
264
  @overload
270
265
  def from_obj(
271
266
  cls,
272
- obj: ApiProfileConfigMap,
267
+ obj: ApiProfileConfigDict,
273
268
  ) -> Self: ...
274
269
 
275
270
  @classmethod
@@ -465,7 +460,7 @@ class ApiConfig:
465
460
  @overload
466
461
  def from_obj(
467
462
  cls,
468
- obj: ApiConfigMap,
463
+ obj: ApiConfigDict,
469
464
  ) -> Self: ...
470
465
 
471
466
  @classmethod
@@ -582,7 +577,7 @@ class EndpointConfig:
582
577
  @overload
583
578
  def from_obj(
584
579
  cls,
585
- obj: EndpointMap,
580
+ obj: EndpointConfigDict,
586
581
  ) -> Self: ...
587
582
 
588
583
  @classmethod
@@ -11,8 +11,8 @@ Notes
11
11
  -----
12
12
  - Retry-related types live in :mod:`etlplus.api.retry_manager`.
13
13
  - Pagination requires a ``PaginationConfig``; see
14
- :class:`PagePaginationConfigMap` and :class:`CursorPaginationConfigMap` for
15
- the accepted shapes.
14
+ :class:`PagePaginationConfigDict` and :class:`CursorPaginationConfigDict`
15
+ for the accepted shapes.
16
16
 
17
17
  Examples
18
18
  --------
@@ -65,14 +65,14 @@ from .errors import PaginationError
65
65
  from .pagination import PaginationClient
66
66
  from .pagination import PaginationInput
67
67
  from .pagination import Paginator
68
- from .rate_limiting import RateLimitConfigMap
68
+ from .rate_limiting import RateLimitConfigDict
69
69
  from .rate_limiting import RateLimiter
70
70
  from .rate_limiting import RateLimitOverrides
71
71
  from .request_manager import RequestManager
72
72
  from .retry_manager import RetryManager
73
- from .retry_manager import RetryPolicy
73
+ from .retry_manager import RetryPolicyDict
74
74
  from .retry_manager import RetryStrategy
75
- from .transport import HTTPAdapterMountConfig
75
+ from .transport import HTTPAdapterMountConfigDict
76
76
  from .types import RequestOptions
77
77
  from .types import Url
78
78
 
@@ -101,13 +101,13 @@ class EndpointClient:
101
101
  base_path : str | None, optional
102
102
  Optional base path prefix (``/v2``) prepended to all endpoint
103
103
  paths when building URLs.
104
- retry : RetryPolicy | None, optional
104
+ retry : RetryPolicyDict | None, optional
105
105
  Optional retry policy. When provided, failed requests matching
106
106
  ``retry_on`` statuses are retried with full jitter.
107
107
  retry_network_errors : bool, optional
108
108
  When ``True``, also retry on network errors (timeouts, connection
109
109
  resets). Defaults to ``False``.
110
- rate_limit : RateLimitConfigMap | None, optional
110
+ rate_limit : RateLimitConfigDict | None, optional
111
111
  Optional client-wide rate limit used to derive an inter-request
112
112
  delay when an explicit ``sleep_seconds`` isn't supplied.
113
113
  session : requests.Session | None, optional
@@ -115,7 +115,7 @@ class EndpointClient:
115
115
  session_factory : Callable[[], requests.Session] | None, optional
116
116
  Factory used to lazily create a session. Ignored if ``session`` is
117
117
  provided.
118
- session_adapters : Sequence[HTTPAdapterMountConfig] | None, optional
118
+ session_adapters : Sequence[HTTPAdapterMountConfigDict] | None, optional
119
119
  Adapter mount configuration(s) used to build a session lazily when
120
120
  neither ``session`` nor ``session_factory`` is supplied.
121
121
 
@@ -128,17 +128,17 @@ class EndpointClient:
128
128
  (``MappingProxyType``).
129
129
  base_path : str | None
130
130
  Optional base path prefix appended after ``base_url``.
131
- retry : RetryPolicy | None
131
+ retry : RetryPolicyDict | None
132
132
  Retry policy reference (may be ``None``).
133
133
  retry_network_errors : bool
134
134
  Whether network errors are retried in addition to HTTP statuses.
135
- rate_limit : RateLimitConfigMap | None
135
+ rate_limit : RateLimitConfigDict | None
136
136
  Client-wide rate limit configuration (may be ``None``).
137
137
  session : requests.Session | None
138
138
  Explicit HTTP session used for requests when provided.
139
139
  session_factory : Callable[[], requests.Session] | None
140
140
  Lazily invoked factory producing a session when needed.
141
- session_adapters : Sequence[HTTPAdapterMountConfig] | None
141
+ session_adapters : Sequence[HTTPAdapterMountConfigDict] | None
142
142
  Adapter mount configuration(s) for connection pooling / retries.
143
143
  DEFAULT_PAGE_PARAM : ClassVar[str]
144
144
  Default page parameter name.
@@ -212,10 +212,10 @@ class EndpointClient:
212
212
  base_path: str | None = None
213
213
 
214
214
  # Optional retry configuration (constructor parameter; object is frozen)
215
- retry: RetryPolicy | None = None
215
+ retry: RetryPolicyDict | None = None
216
216
  retry_network_errors: bool = False
217
217
  # Optional client-wide rate limit configuration
218
- rate_limit: RateLimitConfigMap | None = None
218
+ rate_limit: RateLimitConfigDict | None = None
219
219
 
220
220
  # Optional HTTP session or factory
221
221
  session: requests.Session | None = None
@@ -225,7 +225,7 @@ class EndpointClient:
225
225
  # and connection pooling. If provided and neither `session` nor
226
226
  # `session_factory` is supplied, a factory is synthesized to create a
227
227
  # Session and mount the configured adapters lazily.
228
- session_adapters: Sequence[HTTPAdapterMountConfig] | None = None
228
+ session_adapters: Sequence[HTTPAdapterMountConfigDict] | None = None
229
229
 
230
230
  # Internal: context-managed session and ownership flag.
231
231
  _request_manager: RequestManager = field(
@@ -759,8 +759,8 @@ class EndpointClient:
759
759
  Raises
760
760
  ------
761
761
  KeyError
762
- If ``endpoint_key`` is unknown or a required placeholder in the
763
- path has no corresponding entry in ``path_parameters``.
762
+ If *endpoint_key* is unknown or a required placeholder in the path
763
+ has no corresponding entry in *path_parameters*.
764
764
  ValueError
765
765
  If the path template is invalid.
766
766
 
@@ -836,7 +836,7 @@ class EndpointClient:
836
836
  """
837
837
  Sleep for the specified seconds if positive.
838
838
 
839
- The optional ``sleeper`` is useful for tests (e.g., pass
839
+ The optional *sleeper* is useful for tests (e.g., pass
840
840
  ``lambda s: None``). Defaults to using time.sleep when not provided.
841
841
 
842
842
  Parameters
@@ -857,7 +857,7 @@ class EndpointClient:
857
857
  @staticmethod
858
858
  def _resolve_sleep_seconds(
859
859
  explicit: float,
860
- rate_limit: RateLimitConfigMap | None,
860
+ rate_limit: RateLimitConfigDict | None,
861
861
  overrides: RateLimitOverrides = None,
862
862
  ) -> float:
863
863
  """
@@ -867,10 +867,10 @@ class EndpointClient:
867
867
  ----------
868
868
  explicit : float
869
869
  Explicit sleep seconds provided by the caller.
870
- rate_limit : RateLimitConfigMap | None
870
+ rate_limit : RateLimitConfigDict | None
871
871
  Client-wide rate limit configuration.
872
872
  overrides : RateLimitOverrides, optional
873
- Per-call overrides that take precedence over ``rate_limit``.
873
+ Per-call overrides that take precedence over *rate_limit*.
874
874
 
875
875
  Returns
876
876
  -------
etlplus/api/errors.py CHANGED
@@ -30,7 +30,7 @@ from typing import Any
30
30
  import requests # type: ignore[import]
31
31
 
32
32
  if TYPE_CHECKING: # pragma: no cover - typing only
33
- from .retry_manager import RetryPolicy
33
+ from .retry_manager import RetryPolicyDict
34
34
 
35
35
 
36
36
  # SECTION: EXPORTS ========================================================== #
@@ -57,7 +57,7 @@ class ApiRequestError(requests.RequestException):
57
57
  Number of attempts performed (defaults to ``1``).
58
58
  retried : bool, optional
59
59
  Whether any retry attempts were made.
60
- retry_policy : RetryPolicy | None, optional
60
+ retry_policy : RetryPolicyDict | None, optional
61
61
  The retry policy in effect, if any.
62
62
  cause : Exception | None, optional
63
63
  Original underlying exception.
@@ -72,7 +72,7 @@ class ApiRequestError(requests.RequestException):
72
72
  Number of attempts performed.
73
73
  retried : bool
74
74
  Whether any retry attempts were made.
75
- retry_policy : RetryPolicy | None
75
+ retry_policy : RetryPolicyDict | None
76
76
  The retry policy in effect, if any.
77
77
  cause : Exception | None
78
78
  Original underlying exception.
@@ -97,7 +97,7 @@ class ApiRequestError(requests.RequestException):
97
97
  status: int | None = None
98
98
  attempts: int = 1
99
99
  retried: bool = False
100
- retry_policy: RetryPolicy | None = None
100
+ retry_policy: RetryPolicyDict | None = None
101
101
  cause: Exception | None = None
102
102
 
103
103
  # -- Magic Methods (Object Representation) -- #
@@ -20,10 +20,10 @@ Notes
20
20
  from __future__ import annotations
21
21
 
22
22
  from .client import PaginationClient
23
- from .config import CursorPaginationConfigMap
24
- from .config import PagePaginationConfigMap
23
+ from .config import CursorPaginationConfigDict
24
+ from .config import PagePaginationConfigDict
25
25
  from .config import PaginationConfig
26
- from .config import PaginationConfigMap
26
+ from .config import PaginationConfigDict
27
27
  from .config import PaginationInput
28
28
  from .config import PaginationType
29
29
  from .paginator import Paginator
@@ -40,8 +40,8 @@ __all__ = [
40
40
  # Enums
41
41
  'PaginationType',
42
42
  # Type Aliases
43
- 'CursorPaginationConfigMap',
44
- 'PagePaginationConfigMap',
43
+ 'CursorPaginationConfigDict',
44
+ 'PagePaginationConfigDict',
45
45
  'PaginationInput',
46
- 'PaginationConfigMap',
46
+ 'PaginationConfigDict',
47
47
  ]
@@ -8,7 +8,7 @@ by :mod:`etlplus.api.pagination`. It exposes:
8
8
 
9
9
  - :class:`PaginationType` – enumeration of supported pagination modes.
10
10
  - :class:`PaginationConfig` – normalized configuration container.
11
- - ``*PaginationConfigMap`` TypedDicts – loose, user-facing config mappings.
11
+ - ``*PaginationConfigDict`` TypedDicts – loose, user-facing config mappings.
12
12
 
13
13
  Notes
14
14
  -----
@@ -44,11 +44,11 @@ __all__ = [
44
44
  # Enums
45
45
  'PaginationType',
46
46
  # Type Aliases
47
- 'PaginationConfigMap',
47
+ 'PaginationConfigDict',
48
48
  'PaginationInput',
49
49
  # Typed Dicts
50
- 'CursorPaginationConfigMap',
51
- 'PagePaginationConfigMap',
50
+ 'CursorPaginationConfigDict',
51
+ 'PagePaginationConfigDict',
52
52
  ]
53
53
 
54
54
 
@@ -74,7 +74,7 @@ class PaginationType(CoercibleStrEnum):
74
74
  # SECTION: TYPED DICTS ====================================================== #
75
75
 
76
76
 
77
- class CursorPaginationConfigMap(TypedDict, total=False):
77
+ class CursorPaginationConfigDict(TypedDict, total=False):
78
78
  """
79
79
  Configuration mapping for cursor-based REST API response pagination.
80
80
 
@@ -131,7 +131,7 @@ class CursorPaginationConfigMap(TypedDict, total=False):
131
131
  limit_param: str
132
132
 
133
133
 
134
- class PagePaginationConfigMap(TypedDict, total=False):
134
+ class PagePaginationConfigDict(TypedDict, total=False):
135
135
  """
136
136
  Configuration mapping for page-based and offset-based REST API response
137
137
  pagination.
@@ -379,7 +379,7 @@ class PaginationConfig(BoundsWarningsMixin):
379
379
  @overload
380
380
  def from_obj(
381
381
  cls,
382
- obj: PaginationConfigMap,
382
+ obj: PaginationConfigDict,
383
383
  ) -> Self: ...
384
384
 
385
385
  @classmethod
@@ -398,7 +398,7 @@ class PaginationConfig(BoundsWarningsMixin):
398
398
  Returns
399
399
  -------
400
400
  Self | None
401
- Parsed pagination configuration, or ``None`` if ``obj`` isn't a
401
+ Parsed pagination configuration, or ``None`` if *obj* isn't a
402
402
  mapping.
403
403
 
404
404
  Notes
@@ -429,12 +429,14 @@ class PaginationConfig(BoundsWarningsMixin):
429
429
  # SECTION: TYPE ALIASES ===================================================== #
430
430
 
431
431
 
432
- type PaginationConfigMap = PagePaginationConfigMap | CursorPaginationConfigMap
432
+ type PaginationConfigDict = (
433
+ PagePaginationConfigDict | CursorPaginationConfigDict
434
+ )
433
435
 
434
436
  # External callers may pass either a raw mapping-shaped config or an already
435
437
  # constructed PaginationConfig instance, or omit pagination entirely. Accept a
436
438
  # loose mapping here to reflect the runtime behavior while still providing
437
439
  # stronger TypedDict hints for common shapes.
438
440
  type PaginationInput = (
439
- PaginationConfigMap | PaginationConfig | StrAnyMap | None
441
+ PaginationConfigDict | PaginationConfig | StrAnyMap | None
440
442
  )
@@ -66,14 +66,14 @@ def _resolve_path(
66
66
  path: str | None,
67
67
  ) -> Any:
68
68
  """
69
- Resolve dotted ``path`` within ``obj`` or return ``_MISSING``.
69
+ Resolve dotted *path* within *obj* or return ``_MISSING``.
70
70
 
71
71
  Parameters
72
72
  ----------
73
73
  obj : Any
74
74
  JSON payload from an API response.
75
75
  path : str | None
76
- Dotted path to the target value within ``obj``.
76
+ Dotted path to the target value within *obj*.
77
77
 
78
78
  Returns
79
79
  -------
@@ -665,7 +665,7 @@ class Paginator:
665
665
  records_path : str | None
666
666
  Optional dotted path to the records within the payload.
667
667
  fallback_path : str | None
668
- Secondary dotted path consulted when ``records_path`` resolves to
668
+ Secondary dotted path consulted when *records_path* resolves to
669
669
  ``None`` or an empty list.
670
670
 
671
671
  Returns
@@ -675,9 +675,8 @@ class Paginator:
675
675
 
676
676
  Notes
677
677
  -----
678
- Supports dotted path extraction via ``records_path`` and handles
679
- lists, mappings, and scalars by coercing non-dict items into
680
- ``{"value": x}``.
678
+ Supports dotted path extraction via *records_path* and handles lists,
679
+ mappings, and scalars by coercing non-dict items into ``{"value": x}``.
681
680
  """
682
681
  resolver = partial(_resolve_path, x)
683
682
  data = resolver(records_path)
@@ -729,7 +728,7 @@ class Paginator:
729
728
  Returns
730
729
  -------
731
730
  PaginationType | None
732
- Detected pagination type, or ``default`` if not found.
731
+ Detected pagination type, or *default* if not found.
733
732
  """
734
733
  if not config:
735
734
  return default
@@ -19,7 +19,7 @@ Notes
19
19
  from __future__ import annotations
20
20
 
21
21
  from .config import RateLimitConfig
22
- from .config import RateLimitConfigMap
22
+ from .config import RateLimitConfigDict
23
23
  from .config import RateLimitOverrides
24
24
  from .rate_limiter import RateLimiter
25
25
 
@@ -34,5 +34,5 @@ __all__ = [
34
34
  # Type Aliases
35
35
  'RateLimitOverrides',
36
36
  # Type Dicts
37
- 'RateLimitConfigMap',
37
+ 'RateLimitConfigDict',
38
38
  ]