Technologies#
- 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_available_technologies(catalog: str) List #
Get the list of available jobs technologies for the specified catalog
Examples
>>> saagieapi.get_available_technologies(catalog="Saagie") [ { 'id': 'a3a5e5ea-7af1-47db-b9ca-fed722a123b1', 'label': 'Apache Superset', 'available': True, '__typename': 'AppTechnology' }, { 'id': '19d446bd-bf31-462b-9c0b-023123f5dc4a', 'label': 'CloudBeaver', 'available': True, '__typename': 'AppTechnology' }, { 'id': 'a55afd45-3938-4ee3-8d16-e93227c76b93', 'label': 'Dash', 'available': True, '__typename': 'AppTechnology' } , { 'id': '4adb934e-8ee7-4942-9951-fd461b6769b1', 'label': 'Bash', 'available': True, '__typename': 'JobTechnology' }, { 'id': '1669e3ca-9fcf-1234-be11-cc2f3afabb1d', 'label': 'Generic', 'available': True, '__typename': 'JobTechnology' }, { 'id': '7f7c5c02-e187-448c-8552-99eed6af2001', 'label': 'Java/Scala', 'available': True, '__typename': 'JobTechnology' }, { 'id': '9bb93cad-69a5-4a9d-b059-811c6cde589e', 'label': 'Python', 'available': True, '__typename': 'JobTechnology' } ]
- get_runtimes(technology_id) Dict #
Get the list of runtimes for a technology id
- Parameters:
technology_id (str) – UUID of the technology
- Returns:
Dict of runtime labels
- Return type:
Examples
>>> saagieapi.get_runtimes(technology_id="11d63963-0a74-4821-b17b-8fcec4882863") { 'technology': { '__typename': 'AppTechnology', 'id': '11d63963-0a74-4821-b17b-8fcec4882863', 'label': 'Jupyter Notebook', 'available': True, 'appContexts': [ { 'id': 'jupyter-spark-3.1', 'available': True, 'deprecationDate': None, 'description': None, 'dockerInfo': { 'image': 'saagie/jupyter-python-nbk', 'version': 'pyspark-3.1.1-1.111.0' }, 'facets': [], 'label': 'JupyterLab Spark 3.1', 'lastUpdate': '2023-02-07T09:43:08.057Z', 'ports': [ { 'basePath': 'SAAGIE_BASE_PATH', 'name': 'Notebook', 'port': 8888, 'rewriteUrl': False, 'scope': 'PROJECT' }, { 'basePath': 'SPARK_UI_PATH', 'name': 'SparkUI', 'port': 8080, 'rewriteUrl': False, 'scope': 'PROJECT' } ], 'missingFacets': [], 'recommended': False, 'trustLevel': 'Stable', 'volumes': [ { 'path': '/notebooks-dir', 'size': '64 MB' } ] }, { 'id': 'jupyterlab-3.8-3.9', 'available': True, 'deprecationDate': None, 'description': None, 'dockerInfo': { 'image': 'saagie/jupyterlab-python-nbk', 'version': '3.8-3.9-1.139.0' }, 'facets': [], 'label': 'JupyterLab Python 3.8 / 3.9 / 3.10', 'lastUpdate': '2023-02-07T09:43:08.057Z', 'ports': [ { 'basePath': 'SAAGIE_BASE_PATH', 'name': 'Notebook', 'port': 8888, 'rewriteUrl': False, 'scope': 'PROJECT' } ], 'missingFacets': [], 'recommended': True, 'trustLevel': 'Stable', 'volumes': [ { 'path': '/notebooks-dir', 'size': '64 MB' } ] } ] } }
- get_technology_name_by_id(technology_id: str) Tuple[str, str] #
Get the name and the repository of a specific technology
- Parameters:
technology_id (str) – Technology ID
- Returns:
Repository name and the label of the specific technology
- Return type:
Examples
>>> saagieapi.get_technology_name_by_id(technology_id="11d63963-0a74-4821-b17b-8fcec4882863") ('Saagie', 'Jupyter Notebook')