dataquery-sdk 0.1.3__tar.gz → 0.1.4__tar.gz
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.
- {dataquery_sdk-0.1.3 → dataquery_sdk-0.1.4}/CHANGELOG.md +3 -1
- {dataquery_sdk-0.1.3 → dataquery_sdk-0.1.4}/PKG-INFO +1 -1
- {dataquery_sdk-0.1.3 → dataquery_sdk-0.1.4}/dataquery/__init__.py +1 -1
- {dataquery_sdk-0.1.3 → dataquery_sdk-0.1.4}/dataquery/client.py +3 -2
- {dataquery_sdk-0.1.3 → dataquery_sdk-0.1.4}/dataquery/config.py +3 -0
- {dataquery_sdk-0.1.3 → dataquery_sdk-0.1.4}/dataquery/dataquery.py +7 -7
- {dataquery_sdk-0.1.3 → dataquery_sdk-0.1.4}/dataquery/models.py +1 -0
- {dataquery_sdk-0.1.3 → dataquery_sdk-0.1.4}/dataquery_sdk.egg-info/PKG-INFO +1 -1
- {dataquery_sdk-0.1.3 → dataquery_sdk-0.1.4}/CONTRIBUTING.md +0 -0
- {dataquery_sdk-0.1.3 → dataquery_sdk-0.1.4}/LICENSE +0 -0
- {dataquery_sdk-0.1.3 → dataquery_sdk-0.1.4}/MANIFEST.in +0 -0
- {dataquery_sdk-0.1.3 → dataquery_sdk-0.1.4}/README.md +0 -0
- {dataquery_sdk-0.1.3 → dataquery_sdk-0.1.4}/dataquery/auth.py +0 -0
- {dataquery_sdk-0.1.3 → dataquery_sdk-0.1.4}/dataquery/auto_download.py +0 -0
- {dataquery_sdk-0.1.3 → dataquery_sdk-0.1.4}/dataquery/cli.py +0 -0
- {dataquery_sdk-0.1.3 → dataquery_sdk-0.1.4}/dataquery/connection_pool.py +0 -0
- {dataquery_sdk-0.1.3 → dataquery_sdk-0.1.4}/dataquery/exceptions.py +0 -0
- {dataquery_sdk-0.1.3 → dataquery_sdk-0.1.4}/dataquery/logging_config.py +0 -0
- {dataquery_sdk-0.1.3 → dataquery_sdk-0.1.4}/dataquery/py.typed +0 -0
- {dataquery_sdk-0.1.3 → dataquery_sdk-0.1.4}/dataquery/rate_limiter.py +0 -0
- {dataquery_sdk-0.1.3 → dataquery_sdk-0.1.4}/dataquery/retry.py +0 -0
- {dataquery_sdk-0.1.3 → dataquery_sdk-0.1.4}/dataquery/utils.py +0 -0
- {dataquery_sdk-0.1.3 → dataquery_sdk-0.1.4}/dataquery_sdk.egg-info/SOURCES.txt +0 -0
- {dataquery_sdk-0.1.3 → dataquery_sdk-0.1.4}/dataquery_sdk.egg-info/dependency_links.txt +0 -0
- {dataquery_sdk-0.1.3 → dataquery_sdk-0.1.4}/dataquery_sdk.egg-info/entry_points.txt +0 -0
- {dataquery_sdk-0.1.3 → dataquery_sdk-0.1.4}/dataquery_sdk.egg-info/requires.txt +0 -0
- {dataquery_sdk-0.1.3 → dataquery_sdk-0.1.4}/dataquery_sdk.egg-info/top_level.txt +0 -0
- {dataquery_sdk-0.1.3 → dataquery_sdk-0.1.4}/pyproject.toml +0 -0
- {dataquery_sdk-0.1.3 → dataquery_sdk-0.1.4}/setup.cfg +0 -0
|
@@ -22,4 +22,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
22
22
|
## [0.1.2] - 2026-02-18
|
|
23
23
|
- File already exists status added
|
|
24
24
|
## [0.1.3] - 2026-02-21
|
|
25
|
-
- Historical file download added
|
|
25
|
+
- Historical file download added
|
|
26
|
+
## [0.1.4] - 2026-03-23
|
|
27
|
+
- Introduced circuit breaker environment variable (`DATAQUERY_CIRCUIT_BREAKER_THRESHOLD`)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dataquery-sdk
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.4
|
|
4
4
|
Summary: Python SDK for DATAQUERY Data API - Query, download, and check availability of economic data files
|
|
5
5
|
Author-email: DATAQUERY SDK Team <support@dataquery.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/dataquery/dataquery-sdk
|
|
@@ -134,6 +134,7 @@ class DataQueryClient:
|
|
|
134
134
|
max_delay=300.0,
|
|
135
135
|
strategy=RetryStrategy.EXPONENTIAL,
|
|
136
136
|
enable_circuit_breaker=True,
|
|
137
|
+
circuit_breaker_threshold=self.config.circuit_breaker_threshold,
|
|
137
138
|
retryable_exceptions=[
|
|
138
139
|
ConnectionError,
|
|
139
140
|
TimeoutError,
|
|
@@ -786,7 +787,7 @@ class DataQueryClient:
|
|
|
786
787
|
|
|
787
788
|
# Validate num_parts if provided
|
|
788
789
|
if num_parts is not None and (num_parts is None or num_parts <= 0):
|
|
789
|
-
num_parts =
|
|
790
|
+
num_parts = 1
|
|
790
791
|
|
|
791
792
|
params = {"file-group-id": file_group_id}
|
|
792
793
|
if file_datetime:
|
|
@@ -847,7 +848,7 @@ class DataQueryClient:
|
|
|
847
848
|
file_group_id: str,
|
|
848
849
|
file_datetime: Optional[str] = None,
|
|
849
850
|
options: Optional[DownloadOptions] = None,
|
|
850
|
-
num_parts: int =
|
|
851
|
+
num_parts: int = 1,
|
|
851
852
|
progress_callback: Optional[Callable] = None,
|
|
852
853
|
) -> DownloadResult:
|
|
853
854
|
"""
|
|
@@ -44,6 +44,7 @@ class EnvConfig:
|
|
|
44
44
|
"TIMEOUT": "6000.0",
|
|
45
45
|
"MAX_RETRIES": "3",
|
|
46
46
|
"RETRY_DELAY": "1.0",
|
|
47
|
+
"CIRCUIT_BREAKER_THRESHOLD": "5",
|
|
47
48
|
# Connection Pooling
|
|
48
49
|
"POOL_CONNECTIONS": "10",
|
|
49
50
|
"POOL_MAXSIZE": "20",
|
|
@@ -116,6 +117,7 @@ class EnvConfig:
|
|
|
116
117
|
"timeout": "DATAQUERY_TIMEOUT",
|
|
117
118
|
"max_retries": "DATAQUERY_MAX_RETRIES",
|
|
118
119
|
"retry_delay": "DATAQUERY_RETRY_DELAY",
|
|
120
|
+
"circuit_breaker_threshold": "DATAQUERY_CIRCUIT_BREAKER_THRESHOLD",
|
|
119
121
|
# Connection Pooling
|
|
120
122
|
"pool_connections": "DATAQUERY_POOL_CONNECTIONS",
|
|
121
123
|
"pool_maxsize": "DATAQUERY_POOL_MAXSIZE",
|
|
@@ -279,6 +281,7 @@ class EnvConfig:
|
|
|
279
281
|
timeout=cls.get_float("TIMEOUT"),
|
|
280
282
|
max_retries=cls.get_int("MAX_RETRIES"),
|
|
281
283
|
retry_delay=cls.get_float("RETRY_DELAY"),
|
|
284
|
+
circuit_breaker_threshold=cls.get_int("CIRCUIT_BREAKER_THRESHOLD"),
|
|
282
285
|
# Connection pooling
|
|
283
286
|
pool_connections=cls.get_int("POOL_CONNECTIONS"),
|
|
284
287
|
pool_maxsize=cls.get_int("POOL_MAXSIZE"),
|
|
@@ -319,7 +319,7 @@ class DataQuery:
|
|
|
319
319
|
file_datetime: Optional[str] = None,
|
|
320
320
|
destination_path: Optional[Path] = None,
|
|
321
321
|
options: Optional[DownloadOptions] = None,
|
|
322
|
-
num_parts: int =
|
|
322
|
+
num_parts: int = 1,
|
|
323
323
|
progress_callback: Optional[Callable] = None,
|
|
324
324
|
) -> DownloadResult:
|
|
325
325
|
"""
|
|
@@ -359,7 +359,7 @@ class DataQuery:
|
|
|
359
359
|
|
|
360
360
|
client = self._ensure_client()
|
|
361
361
|
# Pass parameters in correct order: file_group_id, file_datetime, options, num_parts, progress_callback
|
|
362
|
-
# Use default num_parts=
|
|
362
|
+
# Use default num_parts=1
|
|
363
363
|
return await client.download_file_async(file_group_id, file_datetime, options, num_parts, progress_callback)
|
|
364
364
|
|
|
365
365
|
async def list_available_files_async(
|
|
@@ -826,7 +826,7 @@ class DataQuery:
|
|
|
826
826
|
end_date: str,
|
|
827
827
|
destination_dir: Path = Path("./downloads"),
|
|
828
828
|
max_concurrent: int = 25, # Full 25 TPS capacity
|
|
829
|
-
num_parts: int =
|
|
829
|
+
num_parts: int = 1,
|
|
830
830
|
progress_callback: Optional[Callable] = None,
|
|
831
831
|
delay_between_downloads: float = 0.04, # 25 TPS (1/25 = 0.04s)
|
|
832
832
|
max_retries: int = 3,
|
|
@@ -1391,7 +1391,7 @@ class DataQuery:
|
|
|
1391
1391
|
validate_file_datetime(file_datetime)
|
|
1392
1392
|
|
|
1393
1393
|
if num_parts is None or num_parts <= 0:
|
|
1394
|
-
num_parts =
|
|
1394
|
+
num_parts = 1
|
|
1395
1395
|
|
|
1396
1396
|
# Check if range downloads are disabled - use single stream instead
|
|
1397
1397
|
if not client.config.enable_range_downloads:
|
|
@@ -2102,7 +2102,7 @@ class DataQuery:
|
|
|
2102
2102
|
file_datetime: Optional[str] = None,
|
|
2103
2103
|
destination_path: Optional[Path] = None,
|
|
2104
2104
|
options: Optional[DownloadOptions] = None,
|
|
2105
|
-
num_parts: int =
|
|
2105
|
+
num_parts: int = 1,
|
|
2106
2106
|
progress_callback: Optional[Callable] = None,
|
|
2107
2107
|
) -> DownloadResult:
|
|
2108
2108
|
"""
|
|
@@ -2413,7 +2413,7 @@ class DataQuery:
|
|
|
2413
2413
|
end_date: str,
|
|
2414
2414
|
destination_dir: Path = Path("./downloads"),
|
|
2415
2415
|
max_concurrent: int = 5,
|
|
2416
|
-
num_parts: int =
|
|
2416
|
+
num_parts: int = 1,
|
|
2417
2417
|
progress_callback: Optional[Callable] = None,
|
|
2418
2418
|
delay_between_downloads: float = 1.0,
|
|
2419
2419
|
) -> dict:
|
|
@@ -2506,7 +2506,7 @@ class DataQuery:
|
|
|
2506
2506
|
file_datetime: Optional[str] = None,
|
|
2507
2507
|
destination_path: Optional[Path] = None,
|
|
2508
2508
|
options: Optional[DownloadOptions] = None,
|
|
2509
|
-
num_parts: int =
|
|
2509
|
+
num_parts: int = 1,
|
|
2510
2510
|
progress_callback: Optional[Callable] = None,
|
|
2511
2511
|
) -> DownloadResult:
|
|
2512
2512
|
"""Synchronous wrapper for download_file with _sync suffix."""
|
|
@@ -74,6 +74,7 @@ class ClientConfig(BaseModel):
|
|
|
74
74
|
timeout: float = Field(default=600.0, description="Default request timeout in seconds")
|
|
75
75
|
max_retries: int = Field(default=3, description="Maximum retry attempts")
|
|
76
76
|
retry_delay: float = Field(default=1.0, description="Delay between retries in seconds")
|
|
77
|
+
circuit_breaker_threshold: int = Field(default=5, description="Number of failures before circuit breaker opens")
|
|
77
78
|
|
|
78
79
|
# Connection pooling
|
|
79
80
|
pool_connections: int = Field(default=10, description="Number of connection pools")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dataquery-sdk
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.4
|
|
4
4
|
Summary: Python SDK for DATAQUERY Data API - Query, download, and check availability of economic data files
|
|
5
5
|
Author-email: DATAQUERY SDK Team <support@dataquery.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/dataquery/dataquery-sdk
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|