Skip to content

Commit cb9dcfa

Browse files
committed
initial commit of study functionality
1 parent 090dfe3 commit cb9dcfa

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed

openml/study/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
from .study import OpenMLStudy
2+
from .functions import get_study

openml/study/functions.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import xmltodict
2+
3+
from .._api_calls import _perform_api_call
4+
5+
def get_study(study_id):
6+
xml_string = _perform_api_call("study/" % (study_id))
7+
result_dict = xmltodict.parse(xml_string)
8+
9+
pass

openml/study/study.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2+
class OpenMLStudy(object):
3+
4+
def __init__(self, id, name, description, creation_date, creator,
5+
tag, data, tasks, flows, setups):
6+
self.id = id
7+
self.name = name
8+
self.description = description
9+
self.creation_date = creation_date
10+
self.creator = creator
11+
self.tag = tag
12+
self.data = data
13+
self.tasks = tasks
14+
self.flows = flows
15+
self.setups = setups
16+
pass
17+

0 commit comments

Comments
 (0)