notoecd 0.1.5__tar.gz → 0.1.6__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.
- {notoecd-0.1.5 → notoecd-0.1.6}/PKG-INFO +1 -1
- {notoecd-0.1.5 → notoecd-0.1.6}/notoecd/__init__.py +1 -1
- {notoecd-0.1.5 → notoecd-0.1.6}/notoecd/calls.py +18 -11
- {notoecd-0.1.5 → notoecd-0.1.6}/notoecd.egg-info/PKG-INFO +1 -1
- {notoecd-0.1.5 → notoecd-0.1.6}/pyproject.toml +1 -1
- {notoecd-0.1.5 → notoecd-0.1.6}/LICENSE +0 -0
- {notoecd-0.1.5 → notoecd-0.1.6}/README.md +0 -0
- {notoecd-0.1.5 → notoecd-0.1.6}/notoecd/datasets.py +0 -0
- {notoecd-0.1.5 → notoecd-0.1.6}/notoecd/structure.py +0 -0
- {notoecd-0.1.5 → notoecd-0.1.6}/notoecd.egg-info/SOURCES.txt +0 -0
- {notoecd-0.1.5 → notoecd-0.1.6}/notoecd.egg-info/dependency_links.txt +0 -0
- {notoecd-0.1.5 → notoecd-0.1.6}/notoecd.egg-info/requires.txt +0 -0
- {notoecd-0.1.5 → notoecd-0.1.6}/notoecd.egg-info/top_level.txt +0 -0
- {notoecd-0.1.5 → notoecd-0.1.6}/setup.cfg +0 -0
- {notoecd-0.1.5 → notoecd-0.1.6}/tests/test_api.py +0 -0
- {notoecd-0.1.5 → notoecd-0.1.6}/tests/test_calls.py +0 -0
- {notoecd-0.1.5 → notoecd-0.1.6}/tests/test_datasets.py +0 -0
- {notoecd-0.1.5 → notoecd-0.1.6}/tests/test_structure.py +0 -0
|
@@ -97,14 +97,21 @@ def get_df(
|
|
|
97
97
|
else:
|
|
98
98
|
filter_expression = _clean(filters).upper()
|
|
99
99
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
100
|
+
def build_url(ver: str) -> str:
|
|
101
|
+
url = (
|
|
102
|
+
f"https://sdmx.oecd.org/public/rest/data/"
|
|
103
|
+
f"{agencyID},{dataflowID},{ver}/{filter_expression}"
|
|
104
|
+
f"?dimensionAtObservation=AllDimensions&format=csvfile"
|
|
105
|
+
)
|
|
106
|
+
if startYear is not None: url += f"&startPeriod={startYear}"
|
|
107
|
+
if endYear is not None: url += f"&endPeriod={endYear}"
|
|
108
|
+
return url
|
|
109
|
+
|
|
110
|
+
versions_to_try = [version] if version else ["", "2", "1"]
|
|
111
|
+
last_err: Exception | None = None
|
|
112
|
+
|
|
113
|
+
for ver in versions_to_try:
|
|
114
|
+
try: return _fetch_df(build_url(ver)).copy()
|
|
115
|
+
except Exception as e: last_err = e
|
|
116
|
+
|
|
117
|
+
raise last_err
|
|
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
|