Python License Manager API¶
oneML class that manages licensing of all oneML APIs.
-
oneML.faceAPI.LicenseManager : public object
The oneML LicenseManager object.
Class to manage licensing.
Public Functions
-
__init__
(self, *args)¶ Construct a LicenseManager object.
args: - LicenseManager instance (optional, copy the instance)
- Parameters
args
: Variable length argument list.
-
set_key
(self, key)¶ Set the oneML product key.
- Return
- Parameters
key
: string of product key
-
get_key
(self)¶ Get product key.
- Return
string: product key
-
activate_key
(self)¶ Activate a product key, requires a key to be set first.
- Return
LicenseStatus: Ok if activation is successful, Error otherwise
-
activate_trial
(self)¶ Activate trial version.
- Return
LicenseStatus: Ok if activation is successful, Error otherwise
-
get_machine_code
(self)¶ Get machine code used as a machine unique identifier.
- Return
string: machine code
-
is_trial
(self)¶ Check if the current activation is trial or not.
- Return
bool: true if the activation is trial, false otherwise
-
validate_activation
(self)¶ Check if an activation whether by a key or trial is valid or not (not expired)
- Return
LicenseStatus value
-
get_activation_type
(self)¶ Get the type of the current activation.
- Return
LicenseActivationType: an enum of activation type
NotFound: If a license is not activated or not found
KeyOnline: If an activation is done by a license key and an online service
TrialOnline: If a trial activation is done by an online service
-
get_activation_expiry_date
(self)¶ Get the key expiry date.
- Return
int: unix time
-
get_activation_suspended_date
(self)¶ Get the key suspension date.
- Return
int: unix time
-
-
oneML.alprAPI.LicenseManager : public object
The oneML LicenseManager object.
Class to manage licensing.
Public Functions
-
__init__
(self, *args)¶ Construct a LicenseManager object.
args: - LicenseManager instance (optional, copy the instance)
- Parameters
args
: Variable length argument list.
-
set_key
(self, key)¶ Set the oneML product key.
- Return
- Parameters
key
: string of product key
-
get_key
(self)¶ Get product key.
- Return
string: product key
-
activate_key
(self)¶ Activate a product key, requires a key to be set first.
- Return
LicenseStatus: Ok if activation is successful, Error otherwise
-
activate_trial
(self)¶ Activate trial version.
- Return
LicenseStatus: Ok if activation is successful, Error otherwise
-
get_machine_code
(self)¶ Get machine code used as a machine unique identifier.
- Return
string: machine code
-
is_trial
(self)¶ Check if the current activation is trial or not.
- Return
bool: true if the activation is trial, false otherwise
-
validate_activation
(self)¶ Check if an activation whether by a key or trial is valid or not (not expired)
- Return
LicenseStatus value
-
get_activation_type
(self)¶ Get the type of the current activation.
- Return
LicenseActivationType: an enum of activation type
NotFound: If a license is not activated or not found
KeyOnline: If an activation is done by a license key and an online service
TrialOnline: If a trial activation is done by an online service
-
get_activation_expiry_date
(self)¶ Get the key expiry date.
- Return
int: unix time
-
get_activation_suspended_date
(self)¶ Get the key suspension date.
- Return
int: unix time
-