Licenses¶
The license controls the terms of access to the BrainFrame server. These APIs allow for BrainFrame instances to be set up with licenses through an automated system. The average user will probably not need these APIs.
API Methods¶
-
BrainFrameAPI.
get_license_info
(timeout=30) → brainframe.api.bf_codecs.license_codecs.LicenseInfo¶ Gets licensing information from the server.
- Parameters
timeout – The timeout to use for this request
- Returns
License info
-
BrainFrameAPI.
set_license_key
(license_key: str, timeout=30) → brainframe.api.bf_codecs.license_codecs.LicenseInfo¶ Uploads a license key to the server and applies it.
- Parameters
license_key – A base64-encoded string of license data
timeout – The timeout to use for this request
- Returns
License info after the key is applied
Data Structures¶
-
DATE_FORMAT
= '%Y-%m-%d'¶ ISO 8601 date format used by the API
-
class
LicenseInfo
(*, state: brainframe.api.bf_codecs.license_codecs.LicenseState, terms: Optional[brainframe.api.bf_codecs.license_codecs.LicenseTerms])¶ Information on the licensing status of the server
-
state
: LicenseState¶ The licensing state of the server.
-
terms
: Optional[LicenseTerms]¶ The active license terms of the server, or None if no license is loaded.
-
-
class
LicenseState
(value)¶ An enumeration.
-
EXPIRED
= 'expired'¶ A license was provided, but it has expired
-
INVALID
= 'invalid'¶ A license was provided, but did not pass validation
-
MISSING
= 'missing'¶ No license was provided
-
VALID
= 'valid'¶ A valid license is loaded, features should be enabled
-
-
class
LicenseTerms
(*, online_checkin: bool, max_streams: int, journal_max_allowed_age: float, expiration_date: Optional[datetime.date])¶ The terms of the currently active license.
-
expiration_date
: Optional[date]¶ The date that this license expires, or None if the license is perpetual.
-
journal_max_allowed_age
: float¶ The maximum amount of time in seconds that the server may hold data in the journal for.
-
max_streams
: int¶ The maximum number of streams that may have analysis enabled at any given time.
-
online_checkin
: bool¶ If True, the server will check in with a remote licensing server to verify license terms.
-