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

  1. PRODUCTION: For production
  2. 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
download_app(carolappname, carolappversion, file_path, extract=False)[source]

Download App artifacts.

Args:

carolappname: str
App Name.
carolappversion: str
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(app_name, manifest)[source]
Args:
app_name: str
Carol app name
manifest: dict
Dictionary with the manifest
Returns: dict
{“success”: True}
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

  1. PRODUCTION: For production
  2. 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

  1. PRODUCTION: For production
  2. WORKING: For Draft apps.
Returns: dict
App info json definition.
get_manifest(app_name)[source]
Args: str
app_name: Carol app name
Returns: dict
Dictionary with the manifest file.
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

  1. PRODUCTION: For production
  2. WORKING: For Draft apps.
check_all_spaces: bool default False
Check all entity spaces.
Returns: dict
Dictionary with the settings