Static Public Member Functions | |
| get_resource_key_from_config (config) | |
| set_resource_key_in_config (config, key) | |
| get_data_file_from_config (config) | |
| set_data_file_in_config (config, file) | |
| get_human_readable (device, property) | |
| Format a property value for display. | |
| get_profiles (hardware) | |
| Read the list of hardware profiles from the "hardware" element data. | |
| get_no_profiles_message () | |
| The line printed when a lookup returned no device profiles at all. | |
| get_resource_key () | |
| get_missing_resource_key_message () | |
| The message shown when no resource key is set, naming the variable that was wanted rather than leaving the reader to guess. | |
| get_data_file_path () | |
| get_cloud_endpoint () | |
| find_file (file_name) | |
| get_data_file_date (engine) | |
| data_file_is_old (engine) | |
| get_data_file_tier (engine) | |
| check_data_file (pipeline, logger) | |
Static Public Attributes | |
| int | FIND_FILES_TIMEOUT_S = 5 |
| int | DATA_FILE_AGE_WARNING = 30 |
| str | RESOURCE_KEY_ENV_VAR = "_51DEGREES_RESOURCE_KEY" |
| str | LEGACY_RESOURCE_KEY_ENV_VAR = "resource_key" |
| str | ENDPOINT_ENV_VAR = "cloud_endpoint" |
| str | DATA_FILE_ENV_VAR = "51DEGREES_DD_PATH" |
| DATA_FOLDER = os.path.join("cxx", "data", "device-detection") | |
| str | DOWNLOAD_SOURCE = "examples-51degrees-python" |
Member Function Documentation
◆ check_data_file()
|
static |
◆ data_file_is_old()
|
static |
◆ find_file()
|
static |
◆ get_cloud_endpoint()
|
static |
◆ get_data_file_date()
|
static |
◆ get_data_file_from_config()
|
static |
◆ get_data_file_path()
|
static |
◆ get_data_file_tier()
|
static |
◆ get_human_readable()
|
static |
Format a property value for display.
A property can be unavailable for three reasons, and each one reads differently so the person running the example can tell them apart. The property may have a value, it may have no value with the cloud service giving a reason (most often that the resource key is not entitled to it), or it may not be in the results at all.
◆ get_missing_resource_key_message()
|
static |
The message shown when no resource key is set, naming the variable that was wanted rather than leaving the reader to guess.
◆ get_no_profiles_message()
|
static |
The line printed when a lookup returned no device profiles at all.
◆ get_profiles()
|
static |
Read the list of hardware profiles from the "hardware" element data.
An empty list is returned when the resource key has no access to the hardware aspect at all, because reading a property that is not there raises rather than returning an empty list.
◆ get_resource_key()
|
static |
◆ get_resource_key_from_config()
|
static |
◆ set_data_file_in_config()
|
static |
◆ set_resource_key_in_config()
|
static |
Member Data Documentation
◆ DATA_FILE_AGE_WARNING
|
static |
◆ DATA_FILE_ENV_VAR
|
static |
◆ DATA_FOLDER
|
static |
◆ DOWNLOAD_SOURCE
|
static |
◆ ENDPOINT_ENV_VAR
|
static |
◆ FIND_FILES_TIMEOUT_S
|
static |
◆ LEGACY_RESOURCE_KEY_ENV_VAR
|
static |
◆ RESOURCE_KEY_ENV_VAR
|
static |
