Platform#
- class saagieapi.SaagieApi(url_saagie: str, id_platform: str, user: str, password: str, realm: str, retries: int = 0, pprint_global: bool = False)#
Bases:
object
Define several methods to interact with Saagie API in Python
- get_cluster_capacity() Dict #
Get information for cluster (cpu, gpu, memory)
- Returns:
Dict of cluster resources
- Return type:
Examples
>>> saagie_api.get_cluster_capacity() { "getClusterCapacity":[ { "cpu":3.8, "gpu":0.0, "memory":16.083734528 }, { "cpu":3.8, "gpu":0.0, "memory":16.083734528 }, { "cpu":3.8, "gpu":0.0, "memory":16.08372224 } ] }
- get_platform_info() Dict #
Get platform info (nb projects, jobs, apps, pipelines)
- Returns:
Dict of platform info
- Return type:
Examples
>>> saagie_api.get_platform_info() { "platform": { "id": 1, "counts": { "projects": 21, "jobs": 111, "apps": 59, "pipelines": 17 } } }
- get_repositories_info() Dict #
Get information for all repositories (id, name, technologies) NB: You can only get repositories information if you have the right to access the technology catalog
- Returns:
Dict of repositories
- Return type:
Examples
>>> saagie_api.get_repositories_info() { "repositories":[ { "id":"9fcbddfe-a7b7-4d25-807c-ad030782c923", "name":"Saagie", "technologies":[ { "id":"5cbb55aa-8ce9-449b-b0b9-64cc6781ea89", "label":"R", "available":True, "__typename":"JobTechnology" }, { "id":"36912c68-d084-43b9-9fda-b5ded8eb7b13", "label":"Docker image", "available":True, "__typename":"AppTechnology" }, { "id":"1d117fb6-0697-438a-b419-a69e0e7406e8", "label":"Spark", "available":True, "__typename":"SparkTechnology" } ] }, { "id":"fff42d30-2029-4f23-b326-d751f256f533", "name":"Saagie Community", "technologies":[ { "id":"034c28d7-c21f-4d7c-8dd9-7d09bc02f33f", "label":"ShinyProxy", "available":True, "__typename":"AppTechnology" } ] } ] }