Freta Class

Python interface to the Freta service.

Example:


   from freta import Freta

   freta = Freta()
   freta.login()
   for image in freta.list_images():
       print("id: %s state: %s" % (image['image_id'], image['state']))

Constructor

Freta()

Methods

config

Configure Freta CLI

logout

Forget any saved access token. Deletes the token_path file.

regions

Get the list of Azure regions currently supported by Freta for image storage and analysis.

Example result:


   {
       "australiaeast": {"default": false, "name": "Australia East"},
       "...many...": "...more...",
       "westus2": {"default": false, "name": "West US 2"}
   }
versions

Get the versions of various Freta components.

Example result:


   {
       "analysis": "0.0.1"
   }

config

Configure Freta CLI

config(endpoint: typing.Union[str, NoneType] = None, authority: typing.Union[str, NoneType] = None, client_id: typing.Union[str, NoneType] = None, client_secret: typing.Union[str, NoneType] = None)

logout

Forget any saved access token. Deletes the token_path file.

logout()

regions

Get the list of Azure regions currently supported by Freta for image storage and analysis.

Example result:


   {
       "australiaeast": {"default": false, "name": "Australia East"},
       "...many...": "...more...",
       "westus2": {"default": false, "name": "West US 2"}
   }
regions()

Returns

Type Description

dict

key: region value: region details

versions

Get the versions of various Freta components.

Example result:


   {
       "analysis": "0.0.1"
   }
versions()

Returns

Type Description

dict

key: component name value: version