pycarol.apps¶
Carol app funtionalities.
-
class
pycarol.apps.Apps(carol)[source]¶ Carol App instance.
Args:
- carol: pycarol.Carol
- Carol() instance
-
all(entity_space='PRODUCTION', page_size=50, offset=0, sort_order='ASC', sort_by=None)[source]¶ Get all app information in this environment.
Args:
- entity_space: str default PRODUCTION
Space to get the app from. Possible values
- PRODUCTION: For production
- WORKING: For Draft apps.
- offset: int, default 0
- Offset for pagination. Only used when scrollable=False
- page_size: int, default 100
- Number of records downloaded in each pagination. The maximum value is 1000
- sort_order: str, default ‘ASC’
- Sort ascending (‘ASC’) vs. descending (‘DESC’).
- sort_by: str, default None
- Name to sort by.
- Returns: List of Dicts.
- All apps json definition
-
build_docker_git(git_token, app_name=None)[source]¶ Build App image using manifest definition.
- Args:
- git_token: str
- Git token to be used to pull the files.
- app_name: str default None
- Carol app name. It will overwrite the app name used in Carol() initialization.
- Returns:
- List of task ids.
-
download_app(app_name=None, app_version=None, carolappname=None, carolappversion=None, file_path='carol.zip', extract=False)[source]¶ Download App artifacts.
Args:
- app_name: str default None
- Carol app name. It will overwrite the app name used in Carol() initialization.
- app_version: str
- App Version
- carolappname: str
- App Name. Deprecated. Use app_name
- carolappversion: str
- App Version. Deprecated. Use app_version
- file_path: os.PathLike
- Path to save the zip file.
- extract: bool default False
- Either extract the zip files or not.
Returns: None
-
edit_manifest(manifest, app_name=None)[source]¶ Args:
- manifest: dict
- Dictionary with the manifest
- app_name: str default None
- Carol app name. It will overwrite the app name used in Carol() initialization.
- Returns: dict
- {“success”: True}
-
get_app_details(app_name=None, entity_space='PRODUCTION')[source]¶ Find all information about an app. This will fetch information about connector groups, AI process, descriptions, data models, etc.
- Args:
- app_name: str default None
- App name to change the settings.
- entity_space: str default PRODUCTION
- WORKING or PRODUCTION
- Returns: dict
- Carol response.
-
get_by_id(app_id, entity_space='PRODUCTION')[source]¶ Get app information by ID
Args:
- app_id: str
- App id.
- entity_space: str default PRODUCTION
Space to get the app information from. Possible values
- PRODUCTION: For production
- WORKING: For Draft apps.
- Returns: dict
- App info json definition.
-
get_by_name(app_name, entity_space='PRODUCTION')[source]¶ Get app information by app name
Args:
- app_name: str
- App name.
- entity_space: str default PRODUCTION
Space to get the app information from. Possible values
- PRODUCTION: For production
- WORKING: For Draft apps.
- Returns: dict
- App info json definition.
-
get_git_process(app_name=None)[source]¶ Get Git processes definid in the manifest file.
Args:
- app_name: str default None
- Carol app name. It will overwrite the app name used in Carol() initialization.
Returns: List of Dicts
-
get_manifest(app_name=None)[source]¶ Args: str
- app_name: str default None
- Carol app name. It will overwrite the app name used in Carol() initialization.
- Returns: dict
- Dictionary with the manifest file.
-
get_processes_info(app_name=None, entity_space='WORKING', check_all_spaces=True)[source]¶ Get app processes information. Args:
- app_name: str default None
- App name to change the settings.
- entity_space: str default WORKING
- WORKING or PRODUCTION
- check_all_spaces: bool
- Check all spaces.
- Returns:
- Process informations
-
get_settings(app_name=None, app_id=None, entity_space='PRODUCTION', check_all_spaces=False)[source]¶ Get settings from app
Settings are the settings available in Carol’s UI.
Args:
- app_name: str default None
- App name, if None will get from app_id
- app_id: str default None
- App id. Either app_name or app_id must be set.
- entity_space: str default PRODUCTION
Space to get the app settings from. Possible values
- PRODUCTION: For production
- WORKING: For Draft apps.
- check_all_spaces: bool default False
- Check all entity spaces.
- Returns: dict
- Dictionary with the settings
-
get_subscribable_carol_apps()[source]¶ Find all available apps to install in this env.
- Returns: list
- list of apps.
-
install_carol_app(app_name=None, app_version=None, connector_group=None, publish=True)[source]¶ Install a carol app in an env.
- Args:
- app_name: str default None
- App name to change the settings.
- app_version: str default None
- App version to install. If not specified, it will install the most recent.
- connector_group: str default None
- Connector Group to install.
- publish: bool default True
- If publish the update.
- Returns:
- Carol task.
-
start_app_process(process_name, app_name=None)[source]¶ Start a carol process by process name.
- Args:
- process_name: str
- Process name.
- app_name: str default None
- App name to change the settings.
- Returns: dict
- task information.