notoecd 0.1.5__py3-none-any.whl → 0.1.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.
- notoecd/__init__.py +1 -1
- notoecd/calls.py +18 -11
- {notoecd-0.1.5.dist-info → notoecd-0.1.6.dist-info}/METADATA +1 -1
- notoecd-0.1.6.dist-info/RECORD +9 -0
- {notoecd-0.1.5.dist-info → notoecd-0.1.6.dist-info}/WHEEL +1 -1
- notoecd-0.1.5.dist-info/RECORD +0 -9
- {notoecd-0.1.5.dist-info → notoecd-0.1.6.dist-info}/licenses/LICENSE +0 -0
- {notoecd-0.1.5.dist-info → notoecd-0.1.6.dist-info}/top_level.txt +0 -0
notoecd/__init__.py
CHANGED
notoecd/calls.py
CHANGED
|
@@ -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
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
notoecd/__init__.py,sha256=xd8luxA_Bd8ya9XUHTb2_hWIN3rtkP5qopH5My9BLQI,189
|
|
2
|
+
notoecd/calls.py,sha256=SFJiYELGPKU3XOSJwPmdSabYX9JhTFieGm1cbCFGzdI,3679
|
|
3
|
+
notoecd/datasets.py,sha256=BTDgdhOK6tJrU0fp_7GZQOoTpOf4CRQrqDVkXcvpAcU,3818
|
|
4
|
+
notoecd/structure.py,sha256=ur8kkdCL2zRjCVrw1grtyCRNZ-aqHKRgv9X_a_6qtDQ,7349
|
|
5
|
+
notoecd-0.1.6.dist-info/licenses/LICENSE,sha256=jb9xgeCKfW-VCXFQtYmiM_SZ9tC2zPGtOIVsE5G17W8,1076
|
|
6
|
+
notoecd-0.1.6.dist-info/METADATA,sha256=AhjL-SKDfGt7H82GdT2gn4oEpGLHq2y31uRo6IpxKw8,2755
|
|
7
|
+
notoecd-0.1.6.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
8
|
+
notoecd-0.1.6.dist-info/top_level.txt,sha256=GrcbH10OAguGh5dkpzst216N_C-NtZ-QF1nlXiUpeLs,8
|
|
9
|
+
notoecd-0.1.6.dist-info/RECORD,,
|
notoecd-0.1.5.dist-info/RECORD
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
notoecd/__init__.py,sha256=v397Mb7CzA-dmcZYLK6AiEesjCf3ugEv0keEVFh8bz4,189
|
|
2
|
-
notoecd/calls.py,sha256=wy7ELlMLl6X5bEN7V4Pn-AcV8YYqAUPWzL-9uT-1NzM,3400
|
|
3
|
-
notoecd/datasets.py,sha256=BTDgdhOK6tJrU0fp_7GZQOoTpOf4CRQrqDVkXcvpAcU,3818
|
|
4
|
-
notoecd/structure.py,sha256=ur8kkdCL2zRjCVrw1grtyCRNZ-aqHKRgv9X_a_6qtDQ,7349
|
|
5
|
-
notoecd-0.1.5.dist-info/licenses/LICENSE,sha256=jb9xgeCKfW-VCXFQtYmiM_SZ9tC2zPGtOIVsE5G17W8,1076
|
|
6
|
-
notoecd-0.1.5.dist-info/METADATA,sha256=hnnWK8pgdyajFl71f3hLsS3-QP_vYdapjYnQK-E9YNM,2755
|
|
7
|
-
notoecd-0.1.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
8
|
-
notoecd-0.1.5.dist-info/top_level.txt,sha256=GrcbH10OAguGh5dkpzst216N_C-NtZ-QF1nlXiUpeLs,8
|
|
9
|
-
notoecd-0.1.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|