adam.service module¶
service.py
-
class
adam.service.Service(url, project)¶ Bases:
objectModule wrapping the REST API and associated client libraries. The goal of this module is to make it very easy and readable to do basic operations against a prod or dev setup.
-
__init__(url, project)¶ Initialize the Service module.
- Parameters
url (str) – The URL of the ADAM server to send requests to.
project (str) – The ADAM project id, under which to create other working projects.
-
classmethod
from_config(config=None)¶
-
get_batches_module()¶
-
get_groups_module()¶
-
get_permissions_module()¶
-
get_projects_module()¶
-
new_working_project(project_name=None)¶ Creates a new project under the root project (workspace) in the ADAM configuration.
- Parameters
project_name (str) – The name for the new project (optional).
- Returns
the newly created project, or None, if there is no configured root project.
- Return type
-
setup()¶ Sets up the API client and modules for issuing requests to the ADAM API.
-
teardown()¶ Delete all working projects that were created in this Jupyter session.
-