-
Notifications
You must be signed in to change notification settings - Fork 74
Expand file tree
/
Copy pathdocker_commit_services.py
More file actions
29 lines (23 loc) · 947 Bytes
/
docker_commit_services.py
File metadata and controls
29 lines (23 loc) · 947 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
"""This module is responsible for exposing the services defined at:
<https://rest-docs.synapse.org/rest/#org.sagebionetworks.repo.web.controller.DockerCommitController>
"""
from typing import TYPE_CHECKING, Optional
if TYPE_CHECKING:
from synapseclient import Synapse
async def get_docker_tag(
entity_id: str, *, synapse_client: Optional["Synapse"] = None
) -> dict:
"""
Arguments:
entity_id: The ID of the Docker repository entity.
synapse_client: If not passed in and caching was not disabled by
`Synapse.allow_client_caching(False)` this will use the last created
instance from the Synapse class constructor.
Returns:
The Docker tag information for the entity.
"""
from synapseclient import Synapse
client = Synapse.get_client(synapse_client=synapse_client)
return await client.rest_get_async(
uri=f"/entity/{entity_id}/dockerTag",
)