Skip to content

Commit 1819b63

Browse files
authored
Merge pull request #403 from openml/datalist_status
Datalist status
2 parents e4035c1 + 4cfe59a commit 1819b63

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

openml/datasets/functions.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def _get_cached_dataset_arff(dataset_id):
137137
"cached" % dataset_id)
138138

139139

140-
def list_datasets(offset=None, size=None, tag=None):
140+
def list_datasets(offset=None, size=None, tag=None, status=None):
141141
"""Return a list of all dataset which are on OpenML.
142142
143143
Parameters
@@ -148,6 +148,10 @@ def list_datasets(offset=None, size=None, tag=None):
148148
The maximum number of datasets to show.
149149
tag : str, optional
150150
Only include datasets matching this tag.
151+
status : str, optional
152+
Should be {active, in_preparation, deactivated}. By
153+
default active datasets are returned, but also datasets
154+
from another status can be requested.
151155
152156
Returns
153157
-------
@@ -174,6 +178,9 @@ def list_datasets(offset=None, size=None, tag=None):
174178
if tag is not None:
175179
api_call += "/tag/%s" % tag
176180

181+
if status is not None:
182+
api_call += "/status/%s" %status
183+
177184
return _list_datasets(api_call)
178185

179186

0 commit comments

Comments
 (0)