@@ -309,7 +309,8 @@ def _get_single(self, db_object_type, uid):
309
309
310
310
def get_project (self , project_id ):
311
311
""" Gets a single Project with the given ID.
312
- >>> project = client.get_project("<project_id>")
312
+
313
+ >>> project = client.get_project("<project_id>")
313
314
314
315
Args:
315
316
project_id (str): Unique ID of the Project.
@@ -323,7 +324,8 @@ def get_project(self, project_id):
323
324
324
325
def get_dataset (self , dataset_id ):
325
326
""" Gets a single Dataset with the given ID.
326
- >>> dataset = client.get_dataset("<dataset_id>")
327
+
328
+ >>> dataset = client.get_dataset("<dataset_id>")
327
329
328
330
Args:
329
331
dataset_id (str): Unique ID of the Dataset.
@@ -336,16 +338,17 @@ def get_dataset(self, dataset_id):
336
338
return self ._get_single (Dataset , dataset_id )
337
339
338
340
def get_user (self ):
339
- """ Gets the current User database object.
340
- >>> user = client.get_user()
341
-
341
+ """ Gets the current User database object.
342
+ >>> user = client.get_user()
343
+
342
344
"""
343
345
return self ._get_single (User , None )
344
346
345
347
def get_organization (self ):
346
- """ Gets the Organization DB object of the current user.
347
- >>> organization = client.get_organization()
348
-
348
+ """ Gets the Organization DB object of the current user.
349
+
350
+ >>> organization = client.get_organization()
351
+
349
352
"""
350
353
return self ._get_single (Organization , None )
351
354
@@ -369,7 +372,8 @@ def _get_all(self, db_object_type, where):
369
372
370
373
def get_projects (self , where = None ):
371
374
""" Fetches all the projects the user has access to.
372
- >>> projects = client.get_projects(where=(Project.name == "<project_name>") & (Project.description == "<project_description>"))
375
+
376
+ >>> projects = client.get_projects(where=(Project.name == "<project_name>") & (Project.description == "<project_description>"))
373
377
374
378
Args:
375
379
where (Comparison, LogicalOperation or None): The `where` clause
@@ -381,7 +385,8 @@ def get_projects(self, where=None):
381
385
382
386
def get_datasets (self , where = None ):
383
387
""" Fetches one or more datasets.
384
- >>> datasets = client.get_datasets(where=(Dataset.name == "<dataset_name>") & (Dataset.description == "<dataset_description"))
388
+
389
+ >>> datasets = client.get_datasets(where=(Dataset.name == "<dataset_name>") & (Dataset.description == "<dataset_description"))
385
390
386
391
Args:
387
392
where (Comparison, LogicalOperation or None): The `where` clause
@@ -393,7 +398,8 @@ def get_datasets(self, where=None):
393
398
394
399
def get_labeling_frontends (self , where = None ):
395
400
""" Fetches all the labeling frontends.
396
- >>> frontend = client.get_labeling_frontends(where=LabelingFrontend.name == "Editor")
401
+
402
+ >>> frontend = client.get_labeling_frontends(where=LabelingFrontend.name == "Editor")
397
403
398
404
Args:
399
405
where (Comparison, LogicalOperation or None): The `where` clause
@@ -433,8 +439,9 @@ def _create(self, db_object_type, data):
433
439
def create_dataset (self , ** kwargs ):
434
440
""" Creates a Dataset object on the server. Attribute values are
435
441
passed as keyword arguments:
436
- >>> project = client.get_project("<project_uid>")
437
- >>> dataset = client.create_dataset(name="<dataset_name>", projects=project)
442
+
443
+ >>> project = client.get_project("<project_uid>")
444
+ >>> dataset = client.create_dataset(name="<dataset_name>", projects=project)
438
445
439
446
Kwargs:
440
447
Keyword arguments with new Dataset attribute values.
@@ -451,7 +458,8 @@ def create_dataset(self, **kwargs):
451
458
def create_project (self , ** kwargs ):
452
459
""" Creates a Project object on the server. Attribute values are
453
460
passed as keyword arguments:
454
- >>> project = client.create_project(name="<project_name>", description="<project_description>")
461
+
462
+ >>> project = client.create_project(name="<project_name>", description="<project_description>")
455
463
456
464
Kwargs:
457
465
Keyword arguments with new Project attribute values.
0 commit comments