@@ -11,27 +11,24 @@ First, import the |ApiClass| class and create an instance:
1111
1212 The |ApiClass | class provides access to different endpoint handlers:
1313
14- +----------------------------+---------------------------------------------------------------+
15- | Handler | Purpose |
16- +----------------------------+---------------------------------------------------------------+
17- | ``api.resources `` | Uploading, downloading, and managing resources |
18- +----------------------------+---------------------------------------------------------------+
19- | ``api.annotations `` | Creating and managing annotations/segmentations |
20- +----------------------------+---------------------------------------------------------------+
21- | ``api.projects `` | Creating and managing projects |
22- +----------------------------+---------------------------------------------------------------+
23- | ``api.channels `` | Organizing resources into channels |
24- +----------------------------+---------------------------------------------------------------+
25- | ``api.users `` | User management operations |
26- +----------------------------+---------------------------------------------------------------+
27- | ``api.models `` | Managing registered models |
28- +----------------------------+---------------------------------------------------------------+
29- | ``api.annotationsets `` | Working with annotation set configurations |
30- +----------------------------+---------------------------------------------------------------+
31- | ``api.deploy `` | Deploying models to the Datamint platform |
32- +----------------------------+---------------------------------------------------------------+
33- | ``api.inference `` | Running and managing inference jobs |
34- +----------------------------+---------------------------------------------------------------+
14+ +------------------------+--------------------------------------------------+
15+ | Property | Purpose |
16+ +------------------------+--------------------------------------------------+
17+ | ``api.resources `` | Upload, download, and manage data files |
18+ +------------------------+--------------------------------------------------+
19+ | ``api.annotations `` | Create and manage annotations |
20+ +------------------------+--------------------------------------------------+
21+ | ``api.projects `` | Organize resources into projects |
22+ +------------------------+--------------------------------------------------+
23+ | ``api.channels `` | Group resources by category |
24+ +------------------------+--------------------------------------------------+
25+ | ``api.models `` | Register and manage ML models |
26+ +------------------------+--------------------------------------------------+
27+ | ``api.deploy `` | Deploy models |
28+ +------------------------+--------------------------------------------------+
29+ | ``api.inference `` | Run inference jobs |
30+ +------------------------+--------------------------------------------------+
31+
3532
3633Most day-to-day workflows can stay object-based. Endpoint handlers return
3734entity objects such as :py:class: `~datamint.entities.resource.Resource `,
@@ -152,8 +149,8 @@ To delete a resource:
152149 resource = api.resources.get_list(filename = " temp_file.dcm" )[0 ]
153150 api.resources.delete(resource)
154151
155- # Delete multiple resources
156- api.resources.delete_resources (resources_to_delete)
152+ # Delete multiple resources at once
153+ api.resources.bulk_delete (resources_to_delete)
157154
158155 Working with Annotations
159156------------------------
@@ -343,8 +340,9 @@ to inspect one resource within a project:
343340 train_resources = resources[:100 ]
344341 val_resources = resources[100 :120 ]
345342
346- api.projects.assign_splits(project, train_resources, " train" )
347- api.projects.assign_splits(project, val_resources, " val" )
343+ # Note: assign_splits(resources, split_name, project) — project is the third argument
344+ api.projects.assign_splits(train_resources, " train" , project)
345+ api.projects.assign_splits(val_resources, " val" , project)
348346
349347 assignments = api.projects.get_splits(project)
350348 train_assignments = api.projects.get_splits(project, split_name = " train" )
@@ -423,8 +421,5 @@ User management operations:
423421 # List all users
424422 users = api.users.get_all()
425423
426- # Get user by email
424+ # Get user by email (email serves as the entity ID)
427425 user = api.users.get_by_email(" user@example.com" )
428-
429- # Get current user info
430- current_user = api.users.get_current_user()
0 commit comments